/* Message List Container - Dark Gaming Theme */
.message-list {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column-reverse;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.5);
}

.message-list.empty {
  justify-content: center;
  align-items: center;
}

.no-messages {
  text-align: center;
  color: #9ca3af;
}

.no-messages p {
  margin: 0.5rem 0;
}

.no-messages .hint {
  font-size: 0.875rem;
  color: #d1d5db;
}

/* Message Timestamp Divider */
.message-timestamp-divider {
  text-align: center;
  margin: 1rem 0;
  position: relative;
}

.message-timestamp-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0, 217, 255, 0.1);
  z-index: 0;
}

.message-timestamp-divider span,
.message-timestamp-divider::after {
  display: inline-block;
  padding: 0.25rem 1rem;
  background: rgba(0, 0, 0, 0.8);
  color: #71717a;
  font-size: 0.75rem;
  border-radius: 12px;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(0, 217, 255, 0.1);
}

/* Message */
.message {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.message.own {
  flex-direction: row-reverse;
}

.message.other {
  flex-direction: row;
}

/* Message Avatar */
.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d9ff 0%, #00ff88 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  font-weight: 700;
  font-size: 0.875rem;
}

/* Message Content */
.message-content-wrapper {
  max-width: 70%;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.message.own .message-content-wrapper {
  align-items: flex-end;
}

.message.other .message-content-wrapper {
  align-items: flex-start;
}

.message-sender {
  font-size: 0.75rem;
  font-weight: 500;
  color: #a1a1aa;
  padding: 0 0.75rem;
}

.verified-badge {
  color: #00d9ff;
  margin-left: 0.25rem;
}

/* Message Bubble */
.message-bubble {
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  position: relative;
  word-wrap: break-word;
}

.message.own .message-bubble {
  background: linear-gradient(135deg, #00d9ff 0%, #00ff88 100%);
  color: #000000;
  font-weight: 500;
  border-bottom-right-radius: 0.25rem;
  box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

.message.other .message-bubble {
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  color: #ffffff;
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-bottom-left-radius: 0.25rem;
}

.message-reply-reference {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
  border-left: 2px solid currentColor;
}

.message-text {
  font-size: 0.9375rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.message-attachments {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.attachment {
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.message.own .attachment {
  background: rgba(255, 255, 255, 0.2);
}

/* Message Footer */
.message-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  opacity: 0.7;
}

.message-time {
  font-weight: 400;
}

.edited-indicator {
  font-style: italic;
}

.sending-indicator {
  font-style: italic;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Message Reactions */
.message-reactions {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.reaction {
  padding: 0.25rem 0.5rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
}

.message.own .reaction {
  background: rgba(255, 255, 255, 0.2);
}

.reaction:hover {
  background: rgba(0, 0, 0, 0.1);
}

.message.own .reaction:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

.typing-dots {
  display: flex;
  gap: 0.25rem;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: #9ca3af;
  border-radius: 50%;
  animation: typing 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-10px);
  }
}

.typing-text {
  font-size: 0.875rem;
  color: #6b7280;
  font-style: italic;
}

/* Scrollbar */
.message-list::-webkit-scrollbar {
  width: 6px;
}

.message-list::-webkit-scrollbar-track {
  background: #f3f4f6;
}

.message-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.message-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
