/* ══════════════════════════════════════════════════════════════════════════════════════
   StreamLens Spatial Pro — Meta Horizon OS & Apple Vision Spatial Studio UI Architecture
   ══════════════════════════════════════════════════════════════════════════════════════ */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* HUD Optics */
  --hud-bg-opacity: 0.85;
  --hud-font-size: 16px;

  /* Core Canvas System */
  --canvas-void: #07080d;
  --canvas-window: rgba(14, 17, 26, var(--hud-bg-opacity));
  --canvas-deck: rgba(20, 24, 38, 0.75);
  --canvas-card: rgba(26, 32, 50, 0.6);
  --canvas-card-hover: rgba(34, 42, 68, 0.8);
  --canvas-input: rgba(11, 13, 22, 0.8);
  --canvas-lip: rgba(255, 255, 255, 0.03);

  /* Specular Lighting & Micro-Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.15);
  --border-focus: rgba(129, 140, 248, 0.65);
  --specular-rim: inset 0 1px 0 0 rgba(255, 255, 255, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.05);

  /* Studio Brand Palette */
  --brand-indigo: #6366f1;
  --brand-violet: #8b5cf6;
  --brand-cyan: #06b6d4;
  --brand-emerald: #10b981;
  --brand-amber: #f59e0b;
  --brand-rose: #f43f5e;

  --glow-indigo: rgba(99, 102, 241, 0.4);
  --glow-violet: rgba(139, 92, 246, 0.45);
  --glow-cyan: rgba(6, 182, 212, 0.4);

  /* Typography */
  --text-pure: #ffffff;
  --text-main: #f1f5f9;
  --text-dim: #94a3b8;
  --text-ghost: #64748b;
  --text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);

  /* Elevation */
  --shadow-spatial-window: 0 24px 64px -8px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1);
  --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.4);

  --ease-snappy: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── THEME ENGINES ── */
body[data-theme="cyber"] {
  --canvas-void: #06040d;
  --canvas-window: rgba(16, 12, 32, var(--hud-bg-opacity));
  --canvas-deck: rgba(26, 18, 54, 0.75);
  --canvas-card: rgba(36, 24, 72, 0.6);
  --brand-indigo: #06b6d4;
  --brand-violet: #d946ef;
  --glow-violet: rgba(217, 70, 239, 0.5);
  --border-light: rgba(6, 182, 212, 0.25);
}

body[data-theme="stealth"] {
  --hud-bg-opacity: 0.35 !important;
  --canvas-void: transparent;
  --canvas-window: rgba(8, 10, 16, 0.35);
  --canvas-deck: rgba(12, 16, 26, 0.5);
  --canvas-card: rgba(16, 22, 36, 0.35);
  --border-subtle: rgba(255, 255, 255, 0.05);
}

body[data-theme="oled"] {
  --canvas-void: #000000;
  --canvas-window: rgba(0, 0, 0, 0.96);
  --canvas-deck: rgba(10, 10, 10, 0.95);
  --canvas-card: rgba(18, 18, 18, 0.9);
  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-light: rgba(255, 255, 255, 0.22);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--canvas-void);
  font-family: var(--font-sans);
  font-size: var(--hud-font-size);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* ── CONFETTI CELEBRATION CANVAS ── */
.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  width: 100vw;
  height: 100vh;
}

/* ── SPATIAL UNIVERSE BACKDROP ── */
.spatial-universe {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.aurora-beam {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.45;
  animation: auroraFloat 24s ease-in-out infinite alternate;
}

.beam-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--brand-violet) 0%, transparent 70%);
  top: -20%;
  left: -15%;
}

.beam-2 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--brand-cyan) 0%, transparent 70%);
  bottom: -20%;
  right: -10%;
  animation-delay: -9s;
}

.beam-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #ec4899 0%, transparent 70%);
  top: 35%;
  left: 45%;
  opacity: 0.2;
  animation-delay: -16s;
}

.grid-perspective {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.6;
}

@keyframes auroraFloat {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(50px, -40px, 0) scale(1.15); }
  100% { transform: translate3d(-40px, 30px, 0) scale(0.92); }
}

/* ═════════════════════════════════════════════
   MAIN FLOATING SPATIAL WINDOW SHELL
   ═════════════════════════════════════════════ */
.hud-window {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  background: var(--canvas-window);
  backdrop-filter: blur(50px) saturate(1.6);
  -webkit-backdrop-filter: blur(50px) saturate(1.6);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-spatial-window);
}

/* ── 1. WINDOW LIP (VISIONOS / QUEST WINDOW FRAME) ── */
.window-lip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  background: var(--canvas-lip);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.lip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  opacity: 0.75;
}
.dot-close { background: #ef4444; }
.dot-min { background: #f59e0b; }
.dot-max { background: #10b981; }

.spatial-handle-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  padding: 2px 20px;
}

.handle-grip {
  width: 54px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
}

.window-actions-pill {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vr-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.vr-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-emerald);
  box-shadow: 0 0 8px var(--brand-emerald);
}

.btn-cmd-k {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
}
.btn-cmd-k kbd {
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

/* ═════════════════════════════════════════════
   2. APP DECK & BRANDING
   ═════════════════════════════════════════════ */
.app-deck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--canvas-deck);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--specular-rim);
  z-index: 30;
}

.deck-brand-zone {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-crest {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.12));
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: var(--specular-rim);
}

.crest-svg {
  width: 26px;
  height: 26px;
}

.crest-halo {
  position: absolute;
  inset: -2px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-violet), var(--brand-cyan));
  opacity: 0.25;
  filter: blur(8px);
  z-index: -1;
}

.brand-hero-title {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-pure);
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-hero-title span {
  background: linear-gradient(135deg, #a78bfa, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pro-tag {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, var(--brand-indigo), var(--brand-violet));
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}

.brand-breadcrumbs {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 500;
  margin-top: 1px;
}

/* Segmented Navigation Tabs */
.deck-tabs-nav {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: transparent;
  border: none;
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s var(--ease-snappy);
}

.nav-tab:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.06);
}

.nav-tab.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(129, 140, 248, 0.4);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tab-badge-pulse {
  font-size: 0.6rem;
  font-weight: 800;
  background: var(--brand-rose);
  color: #fff;
  padding: 1px 5px;
  border-radius: 10px;
  text-transform: uppercase;
}

/* Tools Zone */
.deck-tools-zone {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Equalizer Bars */
.audio-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 18px;
  padding: 0 4px;
}

.eq-bar {
  width: 3px;
  background: linear-gradient(to top, var(--brand-cyan), var(--brand-violet));
  border-radius: 2px;
  animation: eqJump 0.6s ease infinite alternate;
}
.bar-1 { height: 8px; animation-delay: 0.1s; }
.bar-2 { height: 16px; animation-delay: 0.3s; }
.bar-3 { height: 12px; animation-delay: 0.15s; }
.bar-4 { height: 18px; animation-delay: 0.4s; }
.bar-5 { height: 10px; animation-delay: 0.25s; }

@keyframes eqJump {
  0% { transform: scaleY(0.25); }
  100% { transform: scaleY(1); }
}

/* Status Pill */
.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-disconnected {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
}
.status-disconnected .status-dot {
  background: var(--brand-rose);
  box-shadow: 0 0 8px var(--brand-rose);
}

.status-connected {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}
.status-connected .status-dot {
  background: var(--brand-emerald);
  box-shadow: 0 0 10px var(--brand-emerald);
  animation: pulseDot 2s infinite;
}

.status-simulating {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #67e8f9;
}
.status-simulating .status-dot {
  background: var(--brand-cyan);
  box-shadow: 0 0 10px var(--brand-cyan);
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.tool-divider {
  width: 1px;
  height: 18px;
  background: var(--border-subtle);
}

.tool-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--specular-rim);
}
.tool-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateY(-1px);
}

.tool-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(6, 182, 212, 0.12));
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: #c7d2fe;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s var(--ease-snappy);
  box-shadow: var(--specular-rim), 0 2px 10px rgba(99, 102, 241, 0.2);
}
.tool-pill-btn:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.32), rgba(6, 182, 212, 0.22));
  border-color: #a5b4fc;
  color: #fff;
  transform: translateY(-1px);
}

.sim-pill-gem {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-cyan);
  box-shadow: 0 0 8px var(--brand-cyan);
}

.sim-kbd {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text-dim);
}

/* ═════════════════════════════════════════════
   3. COMMAND & SEARCH STRIP
   ═════════════════════════════════════════════ */
.channel-command-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 20px 12px;
  background: rgba(14, 18, 28, 0.55);
  border-bottom: 1px solid var(--border-subtle);
}

.channel-search-capsule {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--canvas-input);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 4px 6px 4px 14px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
}

.channel-search-capsule:focus-within {
  border-color: var(--border-focus);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(99, 102, 241, 0.25), 0 0 24px rgba(99, 102, 241, 0.3);
}

.search-twitch-icon {
  color: #a78bfa;
  display: flex;
}

.url-protocol {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-ghost);
  font-weight: 600;
  user-select: none;
}

.channel-search-capsule input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  padding: 7px 0;
}

.channel-search-capsule input::placeholder {
  color: var(--text-ghost);
  font-family: var(--font-sans);
  font-weight: 400;
}

.btn-connect-studio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--brand-indigo), var(--brand-violet));
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: var(--specular-rim), 0 2px 10px rgba(99, 102, 241, 0.35);
  transition: all 0.2s ease;
}
.btn-connect-studio:hover {
  transform: translateY(-1px);
  box-shadow: var(--specular-rim), 0 4px 18px rgba(99, 102, 241, 0.55);
}

.btn-disconnect-studio {
  padding: 8px 16px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fda4af;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}
.btn-disconnect-studio:hover {
  background: rgba(244, 63, 94, 0.28);
}

/* Quick Streamer Chips */
.streamer-quick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.quick-title {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-ghost);
  white-space: nowrap;
}

.quick-chip-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.streamer-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px 3px 6px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.streamer-chip:hover {
  background: rgba(129, 140, 248, 0.16);
  border-color: rgba(129, 140, 248, 0.45);
  color: #fff;
  transform: translateY(-1px);
}

.chip-avatar-mini {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.55rem;
  font-weight: 800;
  color: #fff;
}

/* ═════════════════════════════════════════════
   4. ALERTS HERO ZONE
   ═════════════════════════════════════════════ */
.alert-zone {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px;
  max-height: 180px;
  overflow: hidden;
  z-index: 25;
}

.alert-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), var(--specular-rim);
  backdrop-filter: blur(20px);
  animation: alertIn 0.4s var(--ease-elastic), alertOut 0.5s ease 6s forwards;
  overflow: hidden;
}

.alert-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: shimmerAnim 2.5s infinite;
}

@keyframes shimmerAnim {
  0% { left: -100%; }
  100% { left: 100%; }
}

.alert-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.alert-icon svg {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4));
}

.alert-content {
  flex: 1;
  min-width: 0;
}

.alert-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.9);
}

.alert-message {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-sub {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.88), rgba(99, 102, 241, 0.88));
  border-color: rgba(196, 181, 253, 0.5);
}

.alert-bits {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.88), rgba(217, 119, 6, 0.88));
  border-color: rgba(253, 230, 138, 0.5);
}

.alert-raid {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.88), rgba(14, 116, 144, 0.88));
  border-color: rgba(165, 243, 252, 0.5);
}

.alert-follow {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.88), rgba(5, 150, 105, 0.88));
  border-color: rgba(167, 243, 208, 0.5);
}

@keyframes alertIn {
  from { transform: translateY(-20px) scale(0.94); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes alertOut {
  to { opacity: 0; transform: scale(0.94) translateY(-10px); max-height: 0; padding: 0; margin: 0; }
}

/* ═════════════════════════════════════════════
   5. TAB VIEWS & CHAT FEED
   ═════════════════════════════════════════════ */
.tab-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tab-view.hidden {
  display: none !important;
}

.chat-feed {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
  user-select: text;
}

/* Glass Scrollbar */
.chat-feed::-webkit-scrollbar,
.alerts-history-list::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar {
  width: 5px;
}
.chat-feed::-webkit-scrollbar-track,
.alerts-history-list::-webkit-scrollbar-track,
.drawer-body::-webkit-scrollbar-track {
  background: transparent;
}
.chat-feed::-webkit-scrollbar-thumb,
.alerts-history-list::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

/* Hologram Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px 20px;
}

.empty-hologram {
  position: relative;
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}

.holo-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(129, 140, 248, 0.18);
}
.hr-1 { width: 100%; height: 100%; animation: holoPulse 3.5s infinite ease; }
.hr-2 { width: 70%; height: 70%; border-color: rgba(6, 182, 212, 0.18); animation: holoPulse 3.5s infinite ease -1.2s; }
.hr-3 { width: 42%; height: 42%; border-color: rgba(168, 85, 247, 0.2); }

.holo-core {
  position: relative;
  z-index: 2;
  color: #a5b4fc;
}

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

.empty-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  max-width: 320px;
  line-height: 1.6;
}

/* ═════════════════════════════════════════════
   6. INDIVIDUAL CHAT MESSAGES
   ═════════════════════════════════════════════ */
.chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  background: var(--canvas-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--brand-indigo);
  border-radius: 12px;
  font-size: var(--hud-font-size);
  line-height: 1.48;
  animation: msgIn 0.28s var(--ease-snappy);
  word-break: break-word;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-float), var(--specular-rim);
}

.chat-msg:hover {
  background: var(--canvas-card-hover);
  border-color: var(--border-light);
  transform: translateX(2px);
}

.chat-msg.faded {
  opacity: 0.25;
}

.user-avatar-bubble {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.72rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
}

.msg-main-wrap {
  flex: 1;
  min-width: 0;
}

.msg-header-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.msg-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-tag {
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.badge-broadcaster { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; }
.badge-mod { background: linear-gradient(135deg, #10b981, #047857); color: #fff; }
.badge-vip { background: linear-gradient(135deg, #ec4899, #be185d); color: #fff; }
.badge-sub { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff; }

.msg-author {
  font-weight: 700;
  font-size: 0.88rem;
}

.msg-timestamp {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-ghost);
  margin-left: auto;
}

.msg-content {
  color: var(--text-main);
  font-weight: 400;
  line-height: 1.45;
}

.msg-cheer {
  border-left-color: var(--brand-amber);
  background: linear-gradient(135deg, rgba(50, 32, 10, 0.65), var(--canvas-card));
}

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

/* ═════════════════════════════════════════════
   7. TAB 2 (ALERTS LOG) & TAB 3 (SOUNDBOARD)
   ═════════════════════════════════════════════ */
.tab-header-box {
  padding: 16px 20px 10px;
}
.tab-header-box h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}
.tab-header-box p {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.alerts-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--canvas-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.history-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--specular-rim);
}
.badge-crown { background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.1)); border-color: rgba(245, 158, 11, 0.4); }
.badge-diamond { background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.1)); border-color: rgba(6, 182, 212, 0.4); }
.badge-star { background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.1)); border-color: rgba(16, 185, 129, 0.4); }

.history-body {
  flex: 1;
}
.history-body strong {
  display: block;
  font-size: 0.82rem;
  color: #fff;
}
.history-body span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 1px;
}

.history-time {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-ghost);
}

/* Soundboard Grid */
.soundboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 20px 20px;
}

.sound-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 20px 14px;
  background: var(--canvas-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s var(--ease-snappy);
}
.sound-pad:hover {
  transform: translateY(-2px);
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(129, 140, 248, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.sound-pad:active {
  transform: scale(0.96);
}

.pad-svg-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
  box-shadow: var(--specular-rim);
  transition: transform 0.2s ease, background 0.2s ease;
}
.sound-pad:hover .pad-svg-badge {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.1);
}

.pad-name { font-size: 0.84rem; font-weight: 800; color: #fff; }
.pad-sub { font-size: 0.68rem; color: var(--text-dim); font-family: var(--font-mono); }

.card-svg-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  margin-bottom: 6px;
  box-shadow: var(--specular-rim);
}

.ui-svg-glyph {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

/* ═════════════════════════════════════════════
   8. FOOTER TELEMETRY & BOTTOM LIP
   ═════════════════════════════════════════════ */
.hud-telemetry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 20px;
  background: var(--canvas-deck);
  border-top: 1px solid var(--border-subtle);
  box-shadow: var(--specular-rim);
  font-size: 0.74rem;
}

.telemetry-items {
  display: flex;
  align-items: center;
  gap: 16px;
}

.telemetry-node {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tele-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.dot-cyan { background: var(--brand-cyan); box-shadow: 0 0 6px var(--brand-cyan); }
.dot-violet { background: var(--brand-violet); box-shadow: 0 0 6px var(--brand-violet); }
.dot-emerald { background: var(--brand-emerald); box-shadow: 0 0 6px var(--brand-emerald); }

.tele-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-ghost);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.tele-val {
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
}

.tele-unit {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.telemetry-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tele-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-size: 0.73rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tele-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--border-subtle);
}

.btn-jump-latest {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
}

/* Spatial Dock Lip */
.spatial-dock-lip {
  display: flex;
  justify-content: center;
  padding: 6px 0 8px;
  background: var(--canvas-lip);
}

.spatial-dock-pill {
  width: 60px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
}

/* ═════════════════════════════════════════════
   9. DRAWERS (SIMULATOR & SETTINGS)
   ═════════════════════════════════════════════ */
.drawer {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
}

.drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  cursor: pointer;
  animation: fadeIn 0.2s ease;
}

.drawer-panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: rgba(13, 16, 26, 0.98);
  backdrop-filter: blur(40px);
  border-left: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  box-shadow: -16px 0 50px rgba(0, 0, 0, 0.7);
  animation: slidePanel 0.3s var(--ease-snappy);
}

@keyframes slidePanel {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--specular-rim);
}

.drawer-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid;
  box-shadow: var(--specular-rim);
}
.box-cyan {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(99, 102, 241, 0.1));
  border-color: rgba(6, 182, 212, 0.35);
  color: var(--brand-cyan);
}
.box-violet {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(236, 72, 153, 0.1));
  border-color: rgba(139, 92, 246, 0.35);
  color: var(--brand-violet);
}

.drawer-header h3 {
  font-size: 0.96rem;
  font-weight: 800;
  color: #fff;
}
.drawer-header p {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 1px;
}

.drawer-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.85rem;
}
.drawer-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Simulator Autonomous */
.autonomous-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 12px;
}

.auto-copy strong {
  display: block;
  font-size: 0.84rem;
  color: #fff;
}
.auto-copy span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.grid-subhead {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-ghost);
}

.sim-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.sim-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  background: var(--canvas-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--specular-rim);
  transition: all 0.25s var(--ease-snappy);
}
.sim-card:hover {
  transform: translateY(-2px);
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(129, 140, 248, 0.45);
}

.card-emoji { font-size: 1.3rem; margin-bottom: 2px; }
.sim-card strong { font-size: 0.78rem; color: #fff; }
.sim-card span { font-size: 0.68rem; color: var(--text-dim); }

.card-amber:hover { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.4); }
.card-green:hover { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.4); }
.card-violet:hover { background: rgba(139, 92, 246, 0.18); border-color: rgba(139, 92, 246, 0.45); }
.card-cyan:hover { background: rgba(6, 182, 212, 0.15); border-color: rgba(6, 182, 212, 0.4); }
.card-rose:hover { background: rgba(244, 63, 94, 0.15); border-color: rgba(244, 63, 94, 0.4); }

/* ── CONFIG CARDS (SETTINGS) ── */
.config-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-caption {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.theme-deck {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--canvas-input);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-btn.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.2));
  border-color: rgba(129, 140, 248, 0.5);
  color: #fff;
}

.theme-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.swatch-studio { background: #6366f1; }
.swatch-cyber { background: #d946ef; }
.swatch-stealth { background: rgba(255, 255, 255, 0.4); }
.swatch-oled { background: #000; border: 1px solid #555; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.setting-desc {
  flex: 1;
}
.setting-desc strong {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: #fff;
}
.setting-desc span {
  display: block;
  font-size: 0.71rem;
  color: var(--text-dim);
  margin-top: 1px;
}

.range-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 170px;
}

.range-wrapper input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  outline: none;
}

.range-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #a5b4fc;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
  cursor: pointer;
}

.range-display {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-dim);
  min-width: 40px;
  text-align: right;
}

.studio-select {
  width: 170px;
  background: var(--canvas-input);
  border: 1px solid var(--border-light);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  display: block;
  width: 42px;
  height: 24px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s ease;
  position: relative;
}
.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s var(--ease-snappy);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
.switch input:checked + .switch-track {
  background: linear-gradient(135deg, var(--brand-indigo), var(--brand-violet));
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}
.switch input:checked + .switch-track .switch-thumb {
  transform: translateX(18px);
}

.btn-audition-chime {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-audition-chime:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.meta-cert-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(6, 182, 212, 0.06));
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.cert-pill {
  display: inline-block;
  background: linear-gradient(135deg, var(--brand-indigo), var(--brand-cyan));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.meta-cert-card p {
  font-size: 0.74rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.brand-studio-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand-cyan);
  margin-top: 8px;
  text-decoration: none;
  display: inline-block;
  transition: color 0.2s ease, transform 0.2s ease;
}
.brand-studio-badge:hover {
  color: #fff;
  transform: translateY(-1px);
}

/* ── UTILITY ── */
.hidden {
  display: none !important;
}

/* ── RESPONSIVE BREAKPOINTS ── */
@media (max-width: 600px) {
  .brand-breadcrumbs { display: none; }
  .deck-tabs-nav span:not(.tab-badge-pulse) { display: none; }
  .nav-tab { padding: 7px 10px; }
  .streamer-quick-row { display: none; }
  .drawer-panel { max-width: 100%; }
}