/* ── LOADING SCREEN ─────────────────────────── */
#loading-screen {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
#loading-screen.fade-out { opacity: 0; pointer-events: none; }

.loading-logo {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  animation: logoPulse 1.5s ease-in-out infinite;
}
.loading-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
  animation: fadeInUp 0.6s ease forwards;
}
.loading-bar {
  width: 160px;
  height: 2px;
  background: #2a2a2a;
  border-radius: 2px;
  overflow: hidden;
}
.loading-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  animation: loadBar 1.4s ease forwards;
}

/* ── KEYFRAMES ───────────────────────────────── */
@keyframes logoPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; filter: drop-shadow(0 0 0px rgba(25,195,125,0)); }
  50% { transform: scale(1.08); opacity: 1; filter: drop-shadow(0 0 8px rgba(25,195,125,0.6)); }
}

@keyframes loadBar {
  0% { width: 0; }
  70% { width: 90%; }
  100% { width: 100%; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

/* ── MESSAGE ENTER ───────────────────────────── */
@keyframes msgEnter {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.msg-enter {
  animation: msgEnter 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.msg-enter.assistant-enter {
  animation-delay: 60ms;
}

/* ── REDUCED MOTION ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .msg-enter, .msg-enter.assistant-enter { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
