/* ============================
   VALENCE RP — INTERVIEW SYSTEM
   style.css
   ============================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0d0e11;
  --bg2:         #111318;
  --bg3:         #16181e;
  --glass:       rgba(255,255,255,0.04);
  --glass-border:rgba(255,255,255,0.08);
  --accent:      #5865f2;
  --accent2:     #7289da;
  --accent-glow: rgba(88,101,242,0.35);
  --green:       #57f287;
  --yellow:      #fee75c;
  --red:         #ed4245;
  --text:        #dcddde;
  --text-muted:  #72767d;
  --text-dim:    #4f545c;
  --white:       #ffffff;
  --radius:      12px;
  --radius-lg:   18px;
  --font-main:   'Nunito', sans-serif;
  --font-display:'Rajdhani', sans-serif;
  --font-mono:   'JetBrains Mono', monospace;
  --sidebar-w:   240px;
  --trans:       0.25s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- CANVAS ---------- */
#particles-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ---------- PAGES ---------- */
.page {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: translateY(20px);
}
.page.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.page.exit {
  opacity: 0;
  transform: translateY(-20px);
}

/* ---------- GLASS ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ===============================
   GLITCH EFFECT — LOGO TITLE
   =============================== */
.glitch {
  position: relative;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  color: var(--white);
  pointer-events: none;
  opacity: 0;
}
.glitch::before {
  color: #f0f;
  clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
  animation: glitchBefore 4s infinite;
}
.glitch::after {
  color: #0ff;
  clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
  animation: glitchAfter 4s infinite;
}
/* keep the span colored */
.glitch span { color: var(--accent2); }

@keyframes glitchBefore {
  0%, 85%, 100%  { opacity: 0; transform: translate(0); }
  86%            { opacity: 0.8; transform: translate(-3px, 1px); }
  88%            { opacity: 0.8; transform: translate(3px, -1px); }
  90%            { opacity: 0; transform: translate(0); }
  92%            { opacity: 0.6; transform: translate(2px, 1px); }
  94%            { opacity: 0; }
}
@keyframes glitchAfter {
  0%, 87%, 100%  { opacity: 0; transform: translate(0); }
  88%            { opacity: 0.8; transform: translate(3px, -1px) skew(2deg); }
  90%            { opacity: 0.8; transform: translate(-2px, 1px); }
  92%            { opacity: 0; }
  93%            { opacity: 0.5; transform: translate(1px, 2px); }
  95%            { opacity: 0; }
}

/* blur glitch on logo-title whole text */
.logo-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--white);
  line-height: 1;
  animation: glitchBlur 2s infinite;
}
.logo-title span { color: var(--accent2); }

@keyframes glitchBlur {
  0%, 90%, 100%  { filter: none; }
  91%            { filter: blur(1.5px) brightness(1.3); }
  92%            { filter: none; }
  93%            { filter: blur(2px) hue-rotate(90deg); }
  94%            { filter: none; }
}

/* ===============================
   PAGE 1 — LANDING
   =============================== */
#page-landing {
  overflow: auto;
  display: block;
  padding: 20px;
}
.landing-bg-glow {
  position: fixed;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(88,101,242,0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.landing-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  max-width: 540px;
  margin: 40px auto;
  position: relative;
  z-index: 2;
}

/* Logo */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  animation: fadeUp 0.8s ease both;
}
.logo-hexagon {
  position: relative;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
}
.hex-svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  animation: hexSpin 8s linear infinite;
}
.logo-v {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #7289da, #5865f2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}
.logo-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Card */
.landing-card {
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  animation: fadeUp 0.8s 0.15s ease both;
}
.landing-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(87,242,135,0.1);
  border: 1px solid rgba(87,242,135,0.2);
  border-radius: 99px;
  padding: 4px 12px;
  margin-bottom: 20px;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}
.badge-dot.pulse {
  animation: pulseDot 1.5s ease infinite;
}
.landing-headline {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 14px;
}
.gradient-text {
  background: linear-gradient(135deg, #7289da 0%, #5865f2 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.landing-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 24px;
}
.landing-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px 0;
  margin-bottom: 24px;
}
.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent2);
}
.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--glass-border);
}

/* Button main */
.btn-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 28px;
  background: linear-gradient(135deg, #5865f2, #7289da);
  border: none;
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--trans), box-shadow var(--trans), filter var(--trans);
  box-shadow: 0 4px 24px var(--accent-glow);
  position: relative;
  overflow: hidden;
}
.btn-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity var(--trans);
}
.btn-main:hover::before { opacity: 1; }
.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
  filter: brightness(1.1);
}
.btn-main:active { transform: translateY(0); }
.btn-arrow {
  font-size: 20px;
  transition: transform var(--trans);
}
.btn-main:hover .btn-arrow { transform: translateX(4px); }
.landing-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 14px;
}

/* ===============================
   PAGE 2 — LOADING (BUFFER)
   =============================== */
#page-loading {
  flex-direction: column;
}
.loading-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* Buffering rings */
.loading-buffer-wrap {
  position: relative;
  width: 110px; height: 110px;
  display: flex; align-items: center; justify-content: center;
}
.loading-buffer-ring {
  position: absolute;
  border-radius: 50%;
  border: 3px solid transparent;
}
.loading-buffer-ring.r1 {
  inset: 0;
  border-top-color: var(--accent);
  border-right-color: rgba(88,101,242,0.2);
  animation: bufferSpin 1.2s linear infinite;
}
.loading-buffer-ring.r2 {
  inset: 14px;
  border-top-color: var(--accent2);
  border-left-color: rgba(114,137,218,0.2);
  animation: bufferSpin 0.9s linear infinite reverse;
}
.loading-buffer-ring.r3 {
  inset: 28px;
  border-bottom-color: rgba(88,101,242,0.6);
  border-right-color: rgba(88,101,242,0.2);
  animation: bufferSpin 1.5s linear infinite;
}
.loading-logo-small {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #7289da, #5865f2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 2;
  animation: loadingLogoPulse 1.5s ease infinite;
}
@keyframes bufferSpin {
  to { transform: rotate(360deg); }
}
@keyframes loadingLogoPulse {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1; }
}

.loading-text-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.loading-text {
  font-size: 15px;
  color: var(--text-muted);
  text-align: center;
  min-height: 24px;
  transition: opacity 0.3s ease;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}
.loading-dots {
  display: flex;
  gap: 6px;
}
.loading-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent2);
  animation: dotBounce 1.2s ease infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ===============================
   PAGE 3 — INTERVIEW
   =============================== */
#page-interview {
  padding: 0;
  align-items: stretch;
}
.interview-layout {
  display: flex;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  height: 100dvh;
  border-radius: 0;
  border-left: none;
  border-top: none;
  border-bottom: none;
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  gap: 0;
  overflow: hidden;
}
.sidebar-server {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 12px;
}
.sidebar-logo-mini {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5865f2, #7289da);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.sidebar-server-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
}
.sidebar-server-sub {
  font-size: 11px;
  color: var(--text-muted);
}
.sidebar-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  padding: 8px 16px 6px;
}
.staff-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
  flex: 1;
  overflow-y: auto;
}
.staff-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: default;
  transition: background var(--trans);
}
.staff-item:hover { background: rgba(255,255,255,0.04); }
.staff-item.active-now { background: rgba(88,101,242,0.12); }
.staff-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  position: relative;
  font-family: var(--font-display);
}
.staff-avatar::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg);
}
/* Crown for Nathan */
.staff-avatar.has-crown::before {
  content: '👑';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  z-index: 3;
  filter: drop-shadow(0 0 4px gold);
}
.staff-info { flex: 1; min-width: 0; }
.staff-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.staff-role {
  font-size: 11px;
  font-weight: 600;
}
.sidebar-progress-wrap {
  padding: 0 16px 16px;
}
.sidebar-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.sidebar-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}
.sidebar-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #5865f2, #7289da);
  border-radius: 99px;
  transition: width 0.5s ease;
}

/* Chat main */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  min-width: 0;
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-radius: 0;
  border-left: none; border-top: none; border-right: none;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-hash {
  font-size: 22px;
  color: var(--text-muted);
  font-weight: 700;
  line-height: 1;
}
.chat-room-name {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
}
.chat-room-sub {
  font-size: 11px;
  color: var(--text-muted);
}
.header-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: rgba(87,242,135,0.1);
  border: 1px solid rgba(87,242,135,0.2);
  border-radius: 99px;
  padding: 4px 12px;
}

/* Messages area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Message */
.msg-group { margin-bottom: 12px; animation: msgPop 0.3s ease both; }
.msg-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.msg-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  font-family: var(--font-display);
  position: relative;
}
/* crown on chat avatar for Nathan */
.msg-avatar.has-crown::before {
  content: '👑';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  filter: drop-shadow(0 0 3px gold);
}
.msg-name { font-size: 14px; font-weight: 700; }
.msg-role-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.msg-time {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: auto;
}
.msg-body {
  padding-left: 48px;
}
.msg-bubble {
  display: inline-block;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  max-width: 600px;
  word-break: break-word;
}
.msg-bubble.staff-bubble {
  background: rgba(88,101,242,0.08);
  border-color: rgba(88,101,242,0.15);
}

/* User message */
.msg-group.user-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.msg-group.user-msg .msg-header { flex-direction: row-reverse; }
.msg-group.user-msg .msg-body { padding-left: 0; padding-right: 48px; }
.msg-group.user-msg .msg-time { margin-left: 0; margin-right: auto; }
.msg-group.user-msg .msg-name { color: #7289da; }
.user-bubble {
  background: rgba(88,101,242,0.2) !important;
  border-color: rgba(88,101,242,0.3) !important;
  border-radius: var(--radius) 0 var(--radius) var(--radius) !important;
}
.user-avatar-circle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5865f2, #7289da);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  font-family: var(--font-display);
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  flex-shrink: 0;
}
.typing-indicator.hidden { display: none; }
.typing-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.typing-text {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.typing-dots {
  display: flex;
  gap: 3px;
  align-items: center;
}
.typing-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: dotBounce 1.2s ease infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Input area — fixed at bottom, no overflow */
.chat-input-area {
  padding: 10px 16px 12px;
  border-radius: 0;
  border-left: none; border-right: none; border-bottom: none;
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
  /* ensure it sits right above the safe area on mobile */
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 8px 10px 8px 14px;
  transition: border-color var(--trans);
}
.input-wrap:focus-within {
  border-color: rgba(88,101,242,0.5);
  background: rgba(88,101,242,0.05);
}
.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  max-height: 120px;
  overflow-y: auto;
}
.chat-input::placeholder { color: var(--text-dim); }
.btn-send {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--accent);
  border: none;
  color: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--trans), transform var(--trans), opacity var(--trans);
  opacity: 0.5;
}
.btn-send:not(:disabled) { opacity: 1; }
.btn-send:not(:disabled):hover { background: var(--accent2); transform: scale(1.05); }
.btn-send:disabled { cursor: not-allowed; }
.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding: 0 4px;
}
.char-count { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); }
.input-hint { font-size: 11px; color: var(--text-dim); }

/* ===============================
   PAGE 4 — DONE
   =============================== */
.done-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 440px;
  width: 100%;
  padding: 20px;
  text-align: center;
  overflow-y: auto;
  max-height: 100vh;
}
.done-icon-wrap {
  position: relative;
  width: 96px; height: 96px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.done-icon-ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(87,242,135,0.3);
  border-radius: 50%;
  animation: scaleIn 0.5s ease both;
}
.done-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(87,242,135,0.1);
  border: 2px solid rgba(87,242,135,0.3);
  display: flex; align-items: center; justify-content: center;
  animation: scaleIn 0.5s 0.1s ease both;
}
.done-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  animation: fadeUp 0.5s 0.2s ease both;
}
.done-sub {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  animation: fadeUp 0.5s 0.3s ease both;
}
.done-card {
  width: 100%;
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeUp 0.5s 0.4s ease both;
  text-align: left;
}
.done-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}
.done-card-icon { font-size: 18px; flex-shrink: 0; }
.btn-done {
  width: 100%;
  animation: fadeUp 0.5s 0.5s ease both;
}

/* Voice splash */
.voice-splash {
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border-color: rgba(88,101,242,0.3);
  background: rgba(88,101,242,0.06);
  animation: fadeUp 0.5s 0.45s ease both;
}
.voice-splash-icon { font-size: 28px; }
.voice-splash-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}
.voice-splash-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
}
.btn-voice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #5865f2;
  color: white;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--trans), transform var(--trans);
  margin-top: 4px;
}
.btn-voice:hover { background: #7289da; transform: translateY(-1px); }
.voice-splash-note {
  font-size: 12px;
  color: var(--text-dim);
}

/* ===============================
   ANIMATIONS
   =============================== */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes hexSpin {
  to { transform: rotate(360deg); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1; }
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(87,242,135,0.4); }
  50%      { box-shadow: 0 0 0 5px rgba(87,242,135,0); }
}
@keyframes msgPop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* ===============================
   RESPONSIVE
   =============================== */
@media (max-width: 640px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .landing-card { padding: 24px 18px; }
  .landing-headline { font-size: 24px; }
  .chat-messages { padding: 10px 10px 6px; }
  .chat-header { padding: 10px 12px; }
  .chat-input-area { padding: 8px 10px max(10px, env(safe-area-inset-bottom)); }
  .msg-body { padding-left: 36px; }
  .msg-group.user-msg .msg-body { padding-right: 36px; }
  .msg-avatar { width: 32px; height: 32px; font-size: 13px; }
  .input-hint { display: none; }
  .msg-bubble { font-size: 13px; }
  .done-center { padding: 16px; gap: 12px; }
}

/* Scrollbar thin on Firefox */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent; }
