:root {
  color-scheme: dark;
}

.app-bg {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(99, 102, 241, 0.28), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(56, 189, 248, 0.12), transparent 50%),
    radial-gradient(800px 500px at 50% 100%, rgba(79, 70, 229, 0.18), transparent 55%),
    linear-gradient(180deg, #0b1220 0%, #0f172a 45%, #020617 100%);
}

.glass {
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#chatWindow::-webkit-scrollbar {
  width: 6px;
}

#chatWindow::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

#chatWindow::-webkit-scrollbar-track {
  background: transparent;
}

.msg {
  animation: fadeUp 0.35s ease-out;
}

.msg-user .bubble {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  border-bottom-right-radius: 0.35rem;
}

.msg-assistant .bubble {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-bottom-left-radius: 0.35rem;
}

.correction-card {
  margin-bottom: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: rgba(120, 53, 15, 0.28);
}

.correction-card .label {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fcd34d;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.correction-card .wrong {
  color: #fca5a5;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.correction-card .right {
  color: #86efac;
  font-weight: 600;
  background: rgba(22, 163, 74, 0.18);
  padding: 0.05rem 0.35rem;
  border-radius: 0.35rem;
}

.correction-card .note {
  margin-top: 0.35rem;
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.4;
}

.avatar {
  background: linear-gradient(145deg, #6366f1, #312e81);
  box-shadow: 0 0 0 1px rgba(165, 180, 252, 0.25);
}

.mic-btn.is-listening {
  background: #4f46e5;
  animation: pulseGlow 1.4s ease-out infinite;
}

.typing-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #94a3b8;
  animation: typingBounce 1s ease-in-out infinite;
}

@keyframes typingBounce {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

textarea {
  field-sizing: content;
}
