.chat-messages::-webkit-scrollbar {
  width: 10px; /* Width of the scrollbar */
}

.chat-messages::-webkit-scrollbar-track {
  background: #2a1a47; /* Track color */
  border-radius: 5px; /* Rounded corners for the track */
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #3a336b; /* Thumb color */
  border-radius: 5px; /* Rounded corners for the thumb */
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #3a336b; /* Thumb color on hover */
}

/* Custom scrollbar for Firefox */
.chat-messages {
  scrollbar-width: thin; /* "auto" or "thin" */
  scrollbar-color: #3a336b #2a1a47; /* Thumb and track color */
}

.chat-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
  border-radius: 15px;
  background: linear-gradient(60deg, #08050e 0%, #2a1a47 100%);
  color: #ffffff;
  font-family: monospace;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid #7868e6;
  margin-bottom: 1rem;
}

.author-name {
  font-size: 20px;
  font-weight: bold;
  color: #7868e6;
}

.online-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #4caf50;
}

.chat-messages {
  height: 50vh;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: rgba(11, 6, 19, 0.6);
  border-radius: 10px;
}

.message {
  margin-bottom: 1rem;
  padding: 0.8rem;
  border-radius: 10px;
  max-width: 100%; /* Take up the full width of the container */
  word-wrap: break-word; /* Ensures text wraps within the message box */
}

.message-received {
  background: #2a1a47;
}

.message-sent {
  background: #442b74;
}

.message-content {
  font-size: 16px;
  line-height: 1.4;
  font-size: 1.3rem;
  word-wrap: break-word; /* Ensures long words break and wrap */
  overflow-wrap: break-word; /* Alternative to word-wrap for better browser support */
  white-space: normal; /* Ensures text wraps to the next line */
}

.message-info {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
}

.chat-input {
  display: flex;
  gap: 0.5rem;
}

.message-input,
.username-input {
  padding: 0.8rem;
  border-radius: 50px;
  border: none;
  background: #2a1a47;
  color: #ffffff;
  font-family: monospace;
  font-size: 0.8rem;
}

.message-input {
  flex-grow: 1;
  width: 100%;
}

.username-input {
  flex-grow: 0;
  width: 100%;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .message-input {
    width: auto;
    margin-right: 0.5rem;
  }

  .username-input {
    width: 200px;
    margin-bottom: 0;
  }
}

.send-button {
  color: #ffffff;
  background-color: #7868e6;
  border-radius: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 3em;
  width: 3em;
  border: none;
  cursor: pointer;
  transition-duration: 0.3s;
}

.send-button:hover {
  background-color: #9789f5;
  transform: scale(1.05);
}

.media-button {
  color: #ffffff;
  background-color: #7868e6;
  border-radius: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 3em;
  width: 3em;
  border: none;
  cursor: pointer;
  transition-duration: 0.3s;
}

.media-button:hover {
  background-color: #9789f5;
  transform: scale(1.05);
}

.popup-container {
    position: absolute; /* or fixed if you want it to be always visible */
    display: none; /* Initially hidden */
    width: 400px;
    height: 600px;
    background: white;
    border: 1px solid #2f2b4b;
    z-index: 9999; /* Ensure it's above other elements */
}

.popup-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

