/* ─────────────────────────────────────────────
   SEED Avatar v3.0 — Animations & Keyframes
   ───────────────────────────────────────────── */

/* ══════ CORE KEYFRAMES ══════ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

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

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 90, 90, 0.3); }
  50% { box-shadow: 0 0 0 10px rgba(224, 90, 90, 0); }
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 90, 90, 0.28); }
  50% { box-shadow: 0 0 0 10px rgba(224, 90, 90, 0); }
}

@keyframes liveDotBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes liveRingPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 90, 0.25), 0 0 30px rgba(255, 90, 90, 0.12) inset; }
  50% { box-shadow: 0 0 0 18px rgba(255, 90, 90, 0), 0 0 50px rgba(255, 90, 90, 0.2) inset; }
}

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

@keyframes auroraDrift {
  0% { filter: hue-rotate(0deg) brightness(1); }
  33% { filter: hue-rotate(15deg) brightness(1.08); }
  66% { filter: hue-rotate(-10deg) brightness(1.03); }
  100% { filter: hue-rotate(5deg) brightness(0.97); }
}

@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.04); opacity: 0.9; }
}

/* ══════ ENTRANCE ANIMATIONS ══════ */
.header {
  animation: fadeSlideUp 0.7s 0.2s var(--ease-out) both;
}

.bottom-panel {
  animation: fadeSlideUp 0.7s 0.4s var(--ease-out) both;
}

/* Stagger bottom panel children */
.bottom-panel > *:nth-child(1) { animation: fadeSlideUp 0.5s 0.5s var(--ease-out) both; }
.bottom-panel > *:nth-child(2) { animation: fadeSlideUp 0.5s 0.6s var(--ease-out) both; }
.bottom-panel > *:nth-child(3) { animation: fadeSlideUp 0.5s 0.7s var(--ease-out) both; }
.bottom-panel > *:nth-child(4) { animation: fadeSlideUp 0.5s 0.8s var(--ease-out) both; }
.bottom-panel > *:nth-child(5) { animation: fadeSlideUp 0.5s 0.9s var(--ease-out) both; }
.bottom-panel > *:nth-child(6) { animation: fadeSlideUp 0.5s 1.0s var(--ease-out) both; }
.bottom-panel > *:nth-child(7) { animation: fadeSlideUp 0.5s 1.1s var(--ease-out) both; }

/* ══════ BUTTON STATES ══════ */
.mic-btn.active-screen {
  background: rgba(90, 224, 128, 0.12);
  border-color: rgba(90, 224, 128, 0.35);
  color: #55e055;
}
.mic-btn.active-screen::after {
  content: ''; position: absolute; top: 2px; right: 2px;
  width: 6px; height: 6px; background: #55e055; border-radius: 50%;
}

.mic-btn.active-music {
  background: rgba(100, 180, 255, 0.12);
  border-color: rgba(100, 180, 255, 0.35);
  color: #64b4ff;
  text-shadow: 0 0 8px rgba(100, 180, 255, 0.4);
}

.bg-gradient { transition: background 4s ease; }

/* ══════ MODEL SWITCHER GROUPS ══════ */
.model-group-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 14px 4px;
  margin-top: 2px;
}

.model-dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 8px;
}

/* ══════ SEED PANEL ══════ */
.seed-panel {
  position: fixed; bottom: 200px; right: 24px; width: 220px;
  background: rgba(10, 10, 22, 0.92);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(155, 126, 232, 0.12);
  border-radius: var(--radius-lg); padding: 14px 16px; z-index: 15;
  transition: all 0.4s var(--ease-spring);
  opacity: 0; transform: translateX(16px) scale(0.96); pointer-events: none;
}
.seed-panel.open {
  opacity: 1; transform: translateX(0) scale(1); pointer-events: auto;
}
.seed-header {
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 400;
  color: var(--accent-violet); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
  letter-spacing: 0.06em;
}
.seed-body {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 0.7rem; color: var(--text-secondary);
  line-height: 1.4;
}
.seed-body > div { display: flex; align-items: center; gap: 6px; }

.seed-btn-toggle {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(12, 12, 28, 0.65);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted); font-size: 0.9rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--duration-normal) var(--ease-out); outline: none; flex-shrink: 0;
}
.seed-btn-toggle:hover, .seed-btn-toggle.active {
  background: var(--accent-violet-glow);
  border-color: rgba(155, 126, 232, 0.3); color: var(--accent-violet);
}

/* ══════ PROGRESS BAR ══════ */
.loader-progress {
  width: 220px; height: 3px;
  background: rgba(255, 255, 255, 0.04); border-radius: 2px;
  overflow: hidden; margin-top: 12px;
}
.loader-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-warm), var(--accent-violet), var(--accent-rose));
  background-size: 200% 100%;
  border-radius: 2px; width: 0%;
  transition: width 0.3s ease;
  animation: progressShimmer 2s ease-in-out infinite;
}
@keyframes progressShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ══════ WELCOME OVERLAY ══════ */
.welcome-overlay {
  position: fixed; bottom: 240px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 15; text-align: center;
  pointer-events: none; opacity: 0;
  transition: all 0.8s var(--ease-out);
}
.welcome-overlay.visible {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.welcome-text {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 400; font-style: italic;
  color: var(--accent-warm);
  text-shadow: 0 0 40px rgba(212, 165, 116, 0.2);
  letter-spacing: 0.04em;
}
.welcome-sub {
  font-size: 0.65rem; color: var(--text-muted);
  margin-top: 6px; letter-spacing: 0.12em;
  text-transform: lowercase;
  opacity: 0.7;
}

/* ══════ FULLSCREEN BUTTON ══════ */
.fullscreen-btn {
  position: fixed; top: 16px; right: 24px; z-index: 10;
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  background: rgba(12, 12, 28, 0.6);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted); font-size: 0.8rem;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: all var(--duration-normal) var(--ease-out); outline: none;
  opacity: 0.4;
}
.fullscreen-btn:hover {
  background: var(--surface-glass-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
  opacity: 1;
}

/* ══════ TOOLBAR ROW (compact, moved to bottom-controls-row) ══════ */
/* Styles moved to ui.css bottom-controls-row */

/* ══════ AVATAR NAME ══════ */
.avatar-name {
  position: fixed; bottom: 260px; left: 50%;
  transform: translateX(-50%); z-index: 6;
  font-family: var(--font-display);
  font-size: 0.85rem; font-weight: 400;
  letter-spacing: 0.35em;
  color: rgba(155, 126, 232, 0.12);
  text-transform: uppercase; pointer-events: none;
  transition: opacity 0.6s;
}

/* Cinematic mode: hide name + welcome */
body.cinematic .avatar-name,
body.cinematic .welcome-overlay {
  opacity: 0;
}