.chat-section {
  position: relative;
  overflow: hidden;
  padding: 6rem 0;
  background: #f8fafc;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.chat-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

.chat-container > div {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.chat-message {
  background: rgba(245,245,245,0.85);
  color: #333;
  border-radius: 18px;
  padding: 12px 16px;
  transition: all 0.3s ease;
  transform-origin: center;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
}
.chat-message p {
  line-height: 1.4;
}

.chat-message.bg-brand-600 {
  background: linear-gradient(135deg, #007aff, #409cff) !important;
  color: #fff;
  border-radius: 18px;
  transition: all 0.3s ease;
}
.chat-message.bg-brand-600 .time,
.chat-message.bg-brand-600 span {
  color: rgba(255,255,255,0.75) !important;
}

.chat-message:nth-child(1) { transition-delay: 0.1s; }
.chat-message:nth-child(2) { transition-delay: 0.3s; }
.chat-message:nth-child(3) { transition-delay: 0.5s; }
.chat-message:nth-child(4) { transition-delay: 0.7s; }
.chat-message:nth-child(5) { transition-delay: 0.9s; }
.chat-message:nth-child(6) { transition-delay: 1.1s; }
.chat-message:nth-child(7) { transition-delay: 1.3s; }
.chat-message:nth-child(8) { transition-delay: 1.5s; }

.chat-message.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.chat-avatar {
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center;
}

.chat-avatar.visible {
  transform: scale(1.05);
}

.voice-message {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.voice-message.visible {
  opacity: 1;
  transform: translateY(0);
}

.voice-message.client {
  background: rgba(255, 255, 255, 0.2);
}

.voice-player {
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-player .play-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  color: #007aff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}
.voice-player .play-btn:hover {
  transform: scale(1.1);
}

.voice-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 20px;
}
.voice-bar {
  width: 3px;
  background: white;
  border-radius: 2px;
  animation: voiceAnim 1s infinite ease-in-out;
}
.voice-bar:nth-child(1) { animation-delay: 0s; }
.voice-bar:nth-child(2) { animation-delay: 0.1s; }
.voice-bar:nth-child(3) { animation-delay: 0.2s; }
.voice-bar:nth-child(4) { animation-delay: 0.3s; }
.voice-bar:nth-child(5) { animation-delay: 0.4s; }
.voice-bar:nth-child(6) { animation-delay: 0.5s; }
.voice-bar:nth-child(7) { animation-delay: 0.6s; }

@keyframes voiceAnim {
  0%, 100% { height: 4px; }
  50% { height: 18px; }
}

.voice-message .voice-duration {
  display: none;
}

.voice-message.client .voice-bar {
  background-color: white;
}

.voice-message.client .play-btn {
  background: white;
  color: var(--brand-600);
}