/* ==========================================================================
   CODE ETERNAL — CINEMATIC 3D CYBERPUNK DESIGN SYSTEM
   Aesthetic Specification: antigravity-radio-design & Dribbble Next-Gen HUD
   ========================================================================== */

:root {
  /* Deep void bases */
  --bg-base: #07080c;
  --bg-void: #050507;
  --bg-surface: rgba(18, 24, 34, 0.52);
  --bg-surface-hover: rgba(26, 36, 50, 0.72);
  --bg-surface-active: rgba(36, 48, 66, 0.85);

  /* Accents & Neon Signatures */
  --accent-primary: #66fcf1;   /* Neon Cyan */
  --accent-secondary: #45a29e; /* Cyber Teal */
  --accent-matrix: #39ff14;    /* Electric Lime / Running Code */
  --accent-warm: #ff2a54;      /* On-Air Neon Red */
  --accent-gold: #ffb800;      /* Arweave Amber / Sol Gold */
  --accent-purple: #c77dff;    /* Quantum Violet */

  /* Active dynamic accent */
  --accent: var(--accent-primary);
  --accent2: var(--accent-secondary);

  /* Typography */
  --text-primary: #f0f4f8;
  --text-secondary: #c5c6c7;
  --text-muted: #8a99a8;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* Glassmorphism & Borders */
  --border-glass: rgba(102, 252, 241, 0.16);
  --border-glass-bright: rgba(102, 252, 241, 0.45);
  --shadow-neon: 0 0 25px rgba(102, 252, 241, 0.28);
  --shadow-warm: 0 0 30px rgba(255, 42, 84, 0.35);
  --shadow-glass: 0 16px 48px 0 rgba(0, 0, 0, 0.65);
  --glow-subtle: 0 0 14px rgba(102, 252, 241, 0.18);

  /* HUD coordinates */
  --hud-mx: 50vw;
  --hud-my: 40vh;
}

/* Theme overrides */
body.theme-matrix {
  --accent: #39ff14;
  --accent2: #00f0ff;
  --border-glass: rgba(57, 255, 20, 0.18);
  --shadow-neon: 0 0 25px rgba(57, 255, 20, 0.3);
}

body.theme-solar {
  --accent: #ffb800;
  --accent2: #ff2a54;
  --border-glass: rgba(255, 184, 0, 0.18);
  --shadow-neon: 0 0 25px rgba(255, 184, 0, 0.3);
}

body.theme-violet {
  --accent: #c77dff;
  --accent2: #66fcf1;
  --border-glass: rgba(199, 125, 255, 0.18);
  --shadow-neon: 0 0 25px rgba(199, 125, 255, 0.3);
}

/* Core reset & smooth canvas */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-base);
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.68;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Moving animated background gradient */
@keyframes cyberGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 18% 22%, rgba(102, 252, 241, 0.08) 0%, transparent 45%),
              radial-gradient(circle at 82% 78%, rgba(69, 162, 158, 0.07) 0%, transparent 50%),
              radial-gradient(circle at 50% 50%, rgba(199, 125, 255, 0.04) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
  animation: cyberGradient 24s ease infinite;
}

/* Three.js / Canvas matrix container */
#cyber-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100vw;
  height: 100vh;
}

/* Holographic scanlines layer */
.hologram-scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.22) 50%),
              linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
  background-size: 100% 3px, 4px 100%;
  opacity: 0.55;
}

/* CRT Light beam pass */
@keyframes sweepBeam {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(120vh); }
}

.hologram-beam {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 160px;
  background: linear-gradient(180deg, transparent, rgba(102, 252, 241, 0.07) 50%, transparent);
  pointer-events: none;
  z-index: 1;
  animation: sweepBeam 12s linear infinite;
}

/* Scrim for maximum reading contrast */
.reader-scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 85% at 50% 45%, rgba(7, 8, 12, 0.88) 0%, rgba(7, 8, 12, 0.6) 55%, rgba(7, 8, 12, 0.2) 100%);
}

/* Top Progress HUD */
.hud-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 999;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent-warm));
  transform: scaleX(0);
  transform-origin: 0 50%;
  box-shadow: 0 0 12px var(--accent);
  transition: transform 0.1s cubic-bezier(0.1, 1, 0.1, 1);
}

/* Global Content Wrapper */
.hud-wrapper {
  position: relative;
  z-index: 10;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* HUD Top Navigation */
.hud-header {
  padding: 24px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-glass);
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-primary);
}

.hud-brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: rgba(0, 0, 0, 0.65);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-neon);
  position: relative;
  overflow: hidden;
}

.hud-brand-logo svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
}

.hud-brand-text {
  display: flex;
  flex-direction: column;
}

.hud-brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
}

.hud-brand-title span {
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent);
}

.hud-brand-sub {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Navigation items */
.hud-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  font-weight: 500;
}

.hud-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color 0.25s ease;
}

.hud-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hud-nav a:hover,
.hud-nav a.active {
  color: var(--accent);
}

.hud-nav a:hover::after,
.hud-nav a.active::after {
  width: 100%;
}

/* HUD Controls Bar (Right) */
.hud-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Glass Pill Buttons */
.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-glass);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hud-pill:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-neon);
  transform: translateY(-1px);
}

/* "On Air" / Radio Indicator Pill */
@keyframes onAirPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 42, 84, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(255, 42, 84, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 42, 84, 0); }
}

.hud-pill.radio-live {
  border-color: rgba(255, 42, 84, 0.4);
  color: #fff;
}

.hud-pill.radio-live .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-warm);
  animation: onAirPulse 2s infinite;
}

/* Equalizer Bars Animation */
.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.eq-bars span {
  width: 2px;
  height: 100%;
  background: var(--accent-warm);
  border-radius: 1px;
  animation: eqJump 1.2s ease-in-out infinite alternate;
}

.eq-bars span:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.eq-bars span:nth-child(2) { height: 90%; animation-delay: 0.3s; }
.eq-bars span:nth-child(3) { height: 60%; animation-delay: 0.2s; }
.eq-bars span:nth-child(4) { height: 100%; animation-delay: 0.4s; }

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

/* ── CINEMATIC HERO & AIFA VIDEO PORTAL ──────────────────────────────────── */

.hero-cinematic {
  padding: 60px 0 50px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 960px) {
  .hero-cinematic {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 40px 0;
  }
}

.hero-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(102, 252, 241, 0.08);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 22px;
  box-shadow: 0 0 16px rgba(102, 252, 241, 0.2);
}

.hero-title {
  font-size: clamp(38px, 5.5vw, 68px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent) 0%, #ffffff 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(102, 252, 241, 0.4);
}

.hero-lead {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 34px;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-cyber-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg-void);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 0 32px rgba(102, 252, 241, 0.45);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-cyber-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 48px rgba(102, 252, 241, 0.7);
}

.btn-cyber-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(16px);
  transition: all 0.3s ease;
}

.btn-cyber-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-neon);
}

/* AIFA HOLOGRAPHIC VIDEO PORTAL */
.aifa-portal {
  position: relative;
  border-radius: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass-bright);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glass), var(--shadow-neon);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

.aifa-portal:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glass), 0 0 38px rgba(102, 252, 241, 0.45);
}

.aifa-portal-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(11, 12, 16, 0.75);
}

.portal-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.portal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-matrix);
  box-shadow: 0 0 8px var(--accent-matrix);
  animation: onAirPulse 1.8s infinite;
}

.portal-telemetry {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.aifa-video-box {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #000;
  overflow: hidden;
}

.aifa-video-box video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  filter: contrast(1.08) brightness(1.05);
}

.aifa-video-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 8, 12, 0.1) 0%, transparent 60%, rgba(7, 8, 12, 0.7) 100%);
  border-bottom: 1px solid var(--border-glass);
}

.portal-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
  pointer-events: none;
  z-index: 5;
}

.portal-corner.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.portal-corner.tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.portal-corner.bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.portal-corner.br { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.aifa-portal-footer {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 12, 16, 0.85);
  font-size: 12px;
  color: var(--text-secondary);
}

.portal-caption {
  font-weight: 500;
}

.portal-clip-switch {
  display: flex;
  gap: 6px;
}

.portal-clip-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.portal-clip-btn:hover,
.portal-clip-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* ── STATS COUNTER STRIP ─────────────────────────────────────────────────── */

.hud-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin: 50px 0;
}

.hud-stat-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-glass);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
}

.hud-stat-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hud-stat-box:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.hud-stat-box:hover::before {
  opacity: 1;
}

.hud-stat-num {
  font-size: 34px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px rgba(102, 252, 241, 0.35);
  margin-bottom: 6px;
}

.hud-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ── GRAND READING CHAMBERS GRID (100,000+ Words Feature) ───────────────── */

.chambers-section {
  padding: 60px 0 30px;
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 46px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

.chambers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.chamber-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 34px 30px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glass);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.chamber-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(380px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(102, 252, 241, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.chamber-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow-glass), var(--shadow-neon);
}

.chamber-card:hover::before {
  opacity: 1;
}

.chamber-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.chamber-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  font-weight: 700;
  background: rgba(102, 252, 241, 0.08);
  border: 1px solid var(--border-glass);
  padding: 4px 10px;
  border-radius: 6px;
}

.chamber-words {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chamber-card h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  color: #fff;
  transition: color 0.25s ease;
}

.chamber-card:hover h3 {
  color: var(--accent);
}

.chamber-card p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.chamber-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chamber-cta-arrow {
  transition: transform 0.3s ease;
}

.chamber-card:hover .chamber-cta-arrow {
  transform: translateX(5px);
}

/* ── HUD 3D READING ROOM ARTICLES HUB (16 Reading Rooms) ─────────────────── */

.rooms-hub-section {
  padding: 60px 0;
}

.rooms-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.rooms-search-box {
  position: relative;
  flex: 1;
  max-width: 440px;
}

.rooms-search-input {
  width: 100%;
  padding: 12px 18px 12px 42px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  backdrop-filter: blur(16px);
  outline: none;
  transition: all 0.3s ease;
}

.rooms-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(102, 252, 241, 0.25);
}

.rooms-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
}

.rooms-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-chip:hover,
.filter-chip.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}

.room-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-glass);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.room-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-glass), var(--shadow-neon);
}

.room-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.room-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
}

.room-domain {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.room-card h4 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
  color: #ffffff;
}

.room-topic {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin-bottom: 16px;
}

.room-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.room-langs {
  display: flex;
  gap: 6px;
}

.room-langs span {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

/* ── DEEP LONG-FORM READER ENGINE LAYOUT ─────────────────────────────────── */

.reader-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 50px;
  margin-top: 40px;
  align-items: flex-start;
}

@media (max-width: 992px) {
  .reader-container {
    grid-template-columns: 1fr;
  }
  .reader-sidebar {
    display: none;
  }
}

.reader-sidebar {
  position: sticky;
  top: 90px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glass);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.sidebar-title {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
}

.sidebar-toc {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-toc a {
  display: block;
  font-size: 13.5px;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: all 0.25s ease;
}

.sidebar-toc a:hover,
.sidebar-toc a.active {
  color: var(--accent);
  background: rgba(102, 252, 241, 0.06);
  border-left-color: var(--accent);
}

.reader-article {
  max-width: 780px;
  font-size: 17.5px;
  line-height: 1.82;
  color: var(--text-secondary);
}

.reader-article h1 {
  font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: #fff;
}

.reader-article h2 {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 700;
  margin: 54px 0 20px;
  color: #fff;
  position: relative;
  letter-spacing: -0.01em;
}

.reader-article h2::before {
  content: '§';
  color: var(--accent);
  margin-right: 12px;
  font-weight: 400;
  font-size: 0.9em;
}

.reader-article h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 36px 0 16px;
  color: var(--accent);
}

.reader-article p {
  margin-bottom: 24px;
}

.reader-article strong {
  color: #ffffff;
}

.reader-article blockquote {
  border-left: 3px solid var(--accent);
  padding: 20px 28px;
  margin: 36px 0;
  background: var(--bg-surface);
  border-radius: 0 16px 16px 0;
  font-style: italic;
  font-size: 19px;
  color: #fff;
  backdrop-filter: blur(12px);
}

.reader-article blockquote span {
  display: block;
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 10px;
}

/* Callout Box */
.reader-callout {
  background: rgba(102, 252, 241, 0.05);
  border: 1px solid var(--border-glass-bright);
  border-radius: 18px;
  padding: 26px;
  margin: 36px 0;
  backdrop-filter: blur(16px);
}

.reader-callout h4 {
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.reader-callout p {
  margin-bottom: 0;
  font-size: 15.5px;
}

/* Code & ASCII Spec Blocks */
.reader-code {
  background: #030406;
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 24px;
  margin: 32px 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: #66fcf1;
  line-height: 1.6;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

/* Comparison Tables */
.reader-table-wrap {
  overflow-x: auto;
  margin: 36px 0;
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
}

.reader-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.reader-table th,
.reader-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-glass);
}

.reader-table th {
  background: rgba(0, 0, 0, 0.4);
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reader-table tr:hover td {
  background: rgba(102, 252, 241, 0.04);
}

/* ── OFFICIAL ECOSYSTEM FOOTER (MANDATORY 4 SITES) ───────────────────────── */

.hud-footer {
  margin-top: 100px;
  padding: 60px 0 40px;
  border-top: 1px solid var(--border-glass);
}

.footer-official-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 36px;
  margin-bottom: 50px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glass);
  text-align: center;
}

.footer-official-title {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-official-heading {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #fff;
}

.footer-portals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.footer-portal-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-glass);
  text-decoration: none;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-portal-link:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-neon);
}

.portal-link-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 6px;
}

.portal-link-name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}

.portal-link-url {
  font-size: 11px;
  color: var(--text-muted);
}

.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-copyright {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Reduced Motion Compliance */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  #cyber-canvas, .hologram-beam {
    display: none !important;
  }
}

/* ==========================================================================
   NEXT-GEN 3D INTERACTIVE & MULTI-SIMULATOR EXTENSIONS
   ========================================================================== */

/* 3D Holographic Core Canvas Container */
.canvas-3d-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  max-height: 480px;
  border-radius: 28px;
  background: radial-gradient(circle at 50% 50%, rgba(18, 24, 38, 0.75) 0%, rgba(5, 5, 8, 0.95) 100%);
  border: 1px solid var(--border-glass-bright);
  box-shadow: var(--shadow-glass), var(--shadow-neon);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#aifa-3d-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#aifa-3d-canvas:active {
  cursor: grabbing;
}

.canvas-3d-hud {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  z-index: 5;
}

.topology-btn {
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(102, 252, 241, 0.25);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.topology-btn:hover {
  color: #fff;
  border-color: var(--accent);
}

.topology-btn.active {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent);
}

/* Video Stargate Container */
.video-stargate-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  max-height: 480px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--border-glass-bright);
  background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), var(--shadow-neon);
}

.video-stargate-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.08) brightness(1.03);
}

.video-telemetry-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, transparent 40%, rgba(0, 0, 0, 0.7) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

.video-controls-bar {
  pointer-events: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(16px);
  padding: 10px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.video-channel-pill {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 5px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.video-channel-pill:hover {
  color: #fff;
  border-color: var(--accent);
}

.video-channel-pill.active {
  background: rgba(102, 252, 241, 0.2);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(102, 252, 241, 0.3);
}

/* Multi-Simulator Tabs & Stepper */
.sim-tabs-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-glass);
}

.sim-tab-item {
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-tab-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.sim-tab-item.active {
  color: #000;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(102, 252, 241, 0.35);
  font-weight: 700;
}

.sim-step {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.45);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sim-step.pending {
  border-color: rgba(255, 255, 255, 0.07);
  opacity: 0.6;
}

.sim-step.active {
  border-color: var(--accent);
  background: rgba(102, 252, 241, 0.15);
  box-shadow: 0 0 20px rgba(102, 252, 241, 0.35);
  transform: translateY(-3px) scale(1.02);
}

.sim-step.passed {
  border-color: rgba(69, 162, 158, 0.4);
  background: rgba(69, 162, 158, 0.08);
}

/* Custom Cyber Range Slider */
input[type="range"].cyber-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: background 0.2s;
}

input[type="range"].cyber-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 12px var(--accent);
  border: 2px solid #000;
  transition: transform 0.1s ease;
}

input[type="range"].cyber-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.chamber-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(18px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.chamber-modal-backdrop:not(.hidden) {
  display: flex !important;
}

.chamber-modal-content {
  background: linear-gradient(135deg, rgba(16, 22, 32, 0.96) 0%, rgba(7, 9, 14, 0.98) 100%);
  border: 1px solid var(--border-glass-bright);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), var(--shadow-neon);
  border-radius: 28px;
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
  position: relative;
  animation: modalEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalEnter {
  0% { opacity: 0; transform: scale(0.95) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--accent-warm);
  border-color: var(--accent-warm);
  box-shadow: 0 0 15px var(--accent-warm);
}

/* ==========================================================================
   DISPLAY & TAILWIND-COMPATIBLE UTILITIES
   ========================================================================== */
.hidden {
  display: none !important;
}

.chamber-modal-backdrop.hidden {
  display: none !important;
}

.font-mono {
  font-family: var(--font-mono), monospace !important;
}

.font-bold {
  font-weight: 700 !important;
}

.text-xs {
  font-size: 11px !important;
}

.text-cyan-200 { color: #a5f3fc !important; }
.text-cyan-300 { color: #67e8f9 !important; }
.text-cyan-400 { color: #22d3ee !important; }
.text-emerald-400 { color: #34d399 !important; }
.text-gray-400 { color: #9ca3af !important; }
.text-gray-500 { color: #6b7280 !important; }
.text-red-300 { color: #fca5a5 !important; }
.text-amber-300 { color: #fcd34d !important; }
.text-lime-300 { color: #bef264 !important; }
.text-purple-300 { color: #d8b4fe !important; }

.bg-cyan-950\/80 { background-color: rgba(8, 51, 68, 0.8) !important; }
.bg-red-950\/80 { background-color: rgba(69, 10, 10, 0.8) !important; }
.bg-amber-950\/80 { background-color: rgba(69, 26, 3, 0.8) !important; }
.bg-lime-950\/80 { background-color: rgba(26, 46, 5, 0.8) !important; }
.bg-purple-950\/80 { background-color: rgba(59, 7, 100, 0.8) !important; }
.bg-black\/40 { background-color: rgba(0, 0, 0, 0.4) !important; }
.bg-black\/60 { background-color: rgba(0, 0, 0, 0.6) !important; }

.border { border-width: 1px !important; border-style: solid !important; }
.border-cyan-400 { border-color: #22d3ee !important; }
.border-cyan-800 { border-color: #155e75 !important; }
.border-cyan-800\/50 { border-color: rgba(21, 94, 117, 0.5) !important; }
.border-gray-800 { border-color: #1f2937 !important; }
.border-red-800 { border-color: #991b1b !important; }
.border-amber-800 { border-color: #92400e !important; }
.border-lime-800 { border-color: #3f6212 !important; }
.border-purple-800 { border-color: #6b21a8 !important; }

.rounded-lg { border-radius: 10px !important; }
.rounded-xl { border-radius: 14px !important; }
.rounded-full { border-radius: 9999px !important; }

.p-3 { padding: 12px !important; }
.px-2\.5 { padding-left: 10px !important; padding-right: 10px !important; }
.px-3 { padding-left: 12px !important; padding-right: 12px !important; }
.py-1 { padding-top: 4px !important; padding-bottom: 4px !important; }

.items-center { align-items: center !important; }
.gap-3 { gap: 12px !important; }
.opacity-50 { opacity: 0.5 !important; }

@media (min-width: 1024px) {
  .lg\:flex {
    display: flex !important;
  }
}

/* ==========================================================================
   LANGUAGE SWITCHER CAPSULE (RU | EN | ES | ZH)
   ========================================================================== */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--border-glass-bright);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 20;
}

.lang-pill {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 14px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.lang-pill.active {
  background: var(--accent);
  color: #000 !important;
  font-weight: 800;
  box-shadow: 0 0 14px var(--accent);
}

/* ==========================================================================
   UNIVERSAL RESPONSIVE ENGINE (IOS, ANDROID, TABLET, DESKTOP)
   ========================================================================== */

/* Hero 2-Column Responsive Stargate Grid */
.hero-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin: 44px 0 32px;
  align-items: stretch;
}

/* iOS Safe Area & Notch Insets */
@supports (padding: env(safe-area-inset-top)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .hud-header {
    padding-top: max(20px, env(safe-area-inset-top));
  }
  footer, .hud-footer {
    padding-bottom: max(36px, env(safe-area-inset-bottom));
  }
}

/* Tablet & Medium Screen Optimization (641px - 1024px) */
@media (max-width: 1024px) {
  .hud-wrapper {
    padding: 0 20px 60px;
  }
  .hero-visual-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 32px 0 24px;
  }
  .video-stargate-container,
  .canvas-3d-wrapper {
    aspect-ratio: 16 / 9;
    max-height: 420px;
    min-height: 280px;
  }
  .chamber-cards-grid,
  .grid-simulator-steps,
  .footer-portals-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .reader-container {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .reader-sidebar {
    display: none;
  }
}

/* Smartphone Adaptation (Android & Apple iOS <= 768px) */
@media (max-width: 768px) {
  .hud-header {
    padding: 16px 0 12px;
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
  }
  .hud-brand {
    justify-content: flex-start;
  }
  .hud-brand-title {
    font-size: 16px;
  }
  .hud-brand-sub {
    font-size: 9px;
  }
  
  /* Horizontal swipeable navigation rail with momentum scroll */
  .hud-nav {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    padding: 6px 2px 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hud-nav::-webkit-scrollbar {
    display: none;
  }
  .hud-nav a {
    flex-shrink: 0;
    font-size: 13px;
  }

  .hud-controls {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .lang-switcher {
    padding: 2px;
  }
  .lang-pill {
    padding: 5px 8px;
    font-size: 11px;
    min-height: 30px;
  }

  .hero-cinematic {
    padding: 28px 0 20px;
    gap: 24px;
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: clamp(24px, 6.5vw, 36px) !important;
    line-height: 1.16;
  }
  .hero-lead {
    font-size: 15px;
    line-height: 1.62;
  }
  .hero-actions {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .hero-actions .btn-cyber-primary,
  .hero-actions .btn-cyber-ghost {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 12px 18px;
  }

  .video-stargate-container,
  .canvas-3d-wrapper {
    aspect-ratio: 16 / 9;
    width: 100%;
    min-height: 210px;
    max-height: 320px;
    border-radius: 18px;
  }

  .video-telemetry-overlay {
    padding: 12px;
  }
  .video-controls-bar {
    padding: 6px 8px;
    gap: 4px;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .video-channel-pill {
    padding: 4px 7px;
    font-size: 10px;
    border-radius: 8px;
  }

  .aifa-portal {
    border-radius: 18px;
  }
  .aifa-portal-header,
  .aifa-portal-footer {
    padding: 10px 14px;
  }
  .portal-telemetry {
    font-size: 9px;
  }
  .portal-clip-switch {
    gap: 4px;
  }
  .portal-clip-btn {
    padding: 4px 8px;
    font-size: 10px;
  }

  .chamber-cards-grid,
  .grid-simulator-steps,
  .chambers-showcase-grid,
  .footer-portals-grid,
  .bionic-spec-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .reader-content {
    font-size: 16px;
    line-height: 1.72;
  }
  .reader-content h2 {
    font-size: 24px;
  }
  .reader-content h3 {
    font-size: 20px;
  }
}

/* Compact Mobile Screens (Android 360px & iPhone SE 375px) */
@media (max-width: 430px) {
  .hud-wrapper {
    padding: 0 14px 44px;
  }
  .hud-brand-logo {
    width: 34px;
    height: 34px;
  }
  .hud-brand-logo svg {
    width: 18px;
    height: 18px;
  }
  .hud-brand-title {
    font-size: 15px;
  }
  .hud-pill {
    padding: 6px 10px;
    font-size: 11px;
  }
  .video-stargate-container,
  .canvas-3d-wrapper {
    min-height: 190px;
    max-height: 260px;
    border-radius: 14px;
  }
  .video-controls-bar {
    gap: 4px;
  }
  .video-channel-pill {
    font-size: 9px;
    padding: 3px 6px;
  }
}

/* Touch Ergonomics for Mobile & Tablet (Apple & Google Standards) */
@media (pointer: coarse) {
  .lang-pill {
    min-height: 34px;
    padding: 6px 10px;
  }
  .hud-pill,
  .portal-clip-btn,
  .video-channel-pill,
  .topology-btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .hud-nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
}
