

body {
  background: linear-gradient(to bottom, #ff0080, #ffbf00);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  font-family: Arial, sans-serif;
}

.chat-container {
  width: 320px;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  height: 80vh;
}

.chat-header {
  background: white;
  padding: 15px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #a9a8a8;
  position: relative;
}

.chat-header img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}

.chat-header-text {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.chat-header h2 {
  font-size: 16px;
  margin: 0;
}

.chat-header .username {
  font-size: 12px;
  color: lightgray;
}

.chat-header .icons {
  display: flex;
  gap: 10px;
  font-size: 18px;
  cursor: pointer;
}

.chat-messages {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
  flex-grow: 1;
}

.message-container {
  display: flex;
  align-items: flex-end;
  position: relative;
}

.message-container.received {
  justify-content: flex-start;
}

.message-container.sent {
  justify-content: flex-end;
}

.message-container.received img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: 8px;
}

.message {
  max-width: 65%;
  padding: 10px;
  border-radius: 15px;
  font-size: 14px;
  position: relative;
  word-wrap: break-word;
  white-space: normal;
  background: rgb(233, 231, 231);
  color: black;
}

.received .message {
  background: #f1f1f1;
}

.sent .message {
  background: rgba(158, 130, 175, 0.671);
  color: white;
  text-align: left;
}

.sent .message.purple {
  background: #8a2fcb;
  color: white;
}

.timestamp {
  font-size: 12px;
  color: gray;
  text-align: center;
  margin-top: 5px;
  margin-bottom: -10px;
}

.reaction1, .reaction2 {
  width: 25px;
  height: 20px;
  background: #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  position: absolute;
}

.reaction1 {
  left: 45px;
  bottom: -12px;
}

.reaction2 {
  left: 80px;
  bottom: -12px;
}

.edit-label {
  font-size: 12px;
  color: rgb(92, 92, 90);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px;
  margin-bottom: 5px;
}

.edit-label span {
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  color: #555;
}

.edit-box {
  position: relative;        
  display: flex;
  align-items: flex-start;
  background: #f1f1f1;
  border-radius: 15px;
  padding: 10px 20px;
  width: 100%;
  box-sizing: border-box;
}

.edit-box button {
  position: absolute;        
  bottom: 8px;             
  right: 15px;           
  
  background: none;
  border: none;
  font-size: 15px;
  font-weight: bold;
  color: #7c23bc;
  cursor: pointer;
  padding: 0;     
}
.edit-container textarea {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
  resize: none;
  font-family: Arial, sans-serif;
  padding: 0;
  margin: 0;
  line-height: 1.4;
}

.edit-container {
  padding: 6px 12px 12px 12px;  
  border-top: 1px solid #f1f1f1;
  background: white;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
  margin-top: 0; 
} 

