/* ==========================================================================
   Career Fair: Every Career Speaks English — Design System & Stylesheet
   Crafted with distinctive typography, opinionated palettes & 4 live themes
   ========================================================================== */

/* ─── 1. DESIGN TOKEN PALETTES & THEMES ───────────────────────────────────── */
:root {
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sub: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── LIGHT MODE (Corporate Clean & Scholastic — Primary Light Palette) ─── */
[data-theme="light"], [data-theme="corporate"], :root {
  --bg-canvas: #f8fafc;
  --bg-subtle: #f1f5f9;
  --surface-card: #ffffff;
  --surface-hover: #e2e8f0;
  --surface-raised: #ffffff;
  --border: #cbd5e1;
  --border-strong: #1d4ed8;
  --border-glow: 0 0 16px rgba(37, 99, 235, 0.2);
  --text-main: #090d16;
  --text-muted: #334155;
  --text-dim: #475569;
  
  --accent-cyan: #0284c7;
  --accent-magenta: #e11d48;
  --accent-gold: #d97706;
  --accent-emerald: #059669;
  --accent-brand: #2563eb;
  --brand-gradient: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #0284c7 100%);
  --hero-glow: radial-gradient(circle at 50% 30%, rgba(37, 99, 235, 0.08) 0%, transparent 60%);
  --card-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);

  --scrollbar-thumb: #2563eb;
  --scrollbar-thumb-hover: #1d4ed8;
  --scrollbar-track: rgba(37, 99, 235, 0.08);
}

/* ─── DARK MODE (Humanoid Obsidian Dark — Natural Warm Graphite & Charcoal) ─── */
[data-theme="dark"], [data-theme="cinematic"] {
  --bg-canvas: #0b0c10;
  --bg-subtle: #13151b;
  --surface-card: #191c24;
  --surface-hover: #212632;
  --surface-raised: #282e3c;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(56, 189, 248, 0.4);
  --border-glow: 0 0 20px rgba(0, 0, 0, 0.7);
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;
  
  --accent-cyan: #38bdf8;
  --accent-magenta: #fb7185;
  --accent-gold: #fbbf24;
  --accent-emerald: #34d399;
  --accent-brand: #3b82f6;
  --brand-gradient: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
  --hero-glow: radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.03) 0%, rgba(37, 99, 235, 0.04) 35%, transparent 70%);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.4);

  --scrollbar-thumb: #3f3f46;
  --scrollbar-thumb-hover: #52525b;
  --scrollbar-track: rgba(0, 0, 0, 0.2);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ambient glow background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--hero-glow);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4, .brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

p {
  max-width: 75ch;
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent-brand);
  outline-offset: 3px;
}

/* ─── 3. TOP BROADCAST BAR & SCHOOL BRANDING ──────────────────────────────── */
.top-broadcast-bar {
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
  padding: 6px 16px;
  font-size: 13px;
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.school-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sub);
  font-weight: 700;
  color: var(--accent-brand);
  letter-spacing: 0.02em;
}

.school-tag .school-badge {
  background: rgba(37, 99, 235, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  border: 1px solid var(--border);
}

.broadcast-alert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  font-weight: 500;
}

.broadcast-alert .live-pulse {
  width: 8px;
  height: 8px;
  background: var(--accent-magenta);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-magenta);
  animation: pulse 1.8s infinite;
}

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

.timer-pill {
  background: rgba(255, 42, 133, 0.15);
  color: var(--accent-magenta);
  border: 1px solid rgba(255, 42, 133, 0.3);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ─── 4. SITE HEADER & NAVIGATION ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .site-header,
[data-theme="corporate"] .site-header {
  background: rgba(248, 250, 252, 0.92);
}

[data-theme="dark"] .site-header,
[data-theme="cinematic"] .site-header {
  background: rgba(12, 13, 16, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
}

.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  border: 1.5px solid var(--border-strong);
  display: grid;
  place-items: center;
  padding: 4px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  transition: var(--transition);
  overflow: hidden;
}

.brand-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
  transition: transform var(--transition);
}

.brand-icon:hover .brand-logo-img {
  transform: scale(1.08);
}

.brand-copy .brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.brand-copy .brand-subtitle {
  font-size: 10.5px;
  font-family: var(--font-sub);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

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

/* =========================================================================
   ANIMATED THEME SWITCHER (Physical Sliding Pill & Micro-Animations)
   ========================================================================= */
.theme-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: var(--surface-raised, #f1f5f9);
  border: 1px solid var(--border, #cbd5e1);
  border-radius: var(--radius-full, 9999px);
  padding: 3px;
  user-select: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

[data-theme="dark"] .theme-switcher {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

/* Sliding Glider Pill */
.theme-switcher-slider {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  background: #ffffff;
  border-radius: var(--radius-full, 9999px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14), 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.38s cubic-bezier(0.34, 1.45, 0.64, 1),
              background-color 0.35s ease,
              box-shadow 0.35s ease,
              width 0.2s ease;
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}

/* Dark mode position of the glider */
.theme-switcher[data-active-theme="dark"] .theme-switcher-slider {
  transform: translateX(100%);
  background: #1e293b;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45), 0 0 12px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Tactile Elastic Stretch while in transit */
.theme-switcher.theme-switching[data-active-theme="dark"] .theme-switcher-slider {
  animation: sliderElasticRight 0.38s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.theme-switcher.theme-switching[data-active-theme="light"] .theme-switcher-slider {
  animation: sliderElasticLeft 0.38s cubic-bezier(0.34, 1.45, 0.64, 1);
}

@keyframes sliderElasticRight {
  0% { transform: translateX(0) scaleX(1); }
  45% { transform: translateX(50%) scaleX(1.18); }
  100% { transform: translateX(100%) scaleX(1); }
}

@keyframes sliderElasticLeft {
  0% { transform: translateX(100%) scaleX(1); }
  45% { transform: translateX(50%) scaleX(1.18); }
  100% { transform: translateX(0) scaleX(1); }
}

/* Button items (sit on top of the sliding glider) */
.theme-btn {
  position: relative;
  z-index: 2;
  background: transparent !important;
  border: none;
  padding: 5px 14px;
  border-radius: var(--radius-full, 9999px);
  color: var(--text-muted, #64748b);
  font-size: 12.5px;
  font-family: var(--font-sub);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color 0.25s ease, transform 0.15s ease;
  box-shadow: none !important;
  outline: none;
  flex: 1;
  text-align: center;
}

.theme-btn:active {
  transform: scale(0.93);
}

.theme-btn.active {
  color: var(--accent-brand, #2563eb);
  font-weight: 700;
}

[data-theme="dark"] .theme-btn.active {
  color: var(--accent-cyan, #38bdf8);
}

/* Icon rotation & spring pulse animations */
.theme-btn-icon {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease, opacity 0.25s ease;
}

/* Sun spins and glows when activated */
.theme-btn[data-theme-val="light"].active .theme-btn-icon {
  transform: rotate(360deg) scale(1.18);
  filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.7));
  opacity: 1;
}

.theme-btn[data-theme-val="light"]:not(.active) .theme-btn-icon {
  transform: rotate(0deg) scale(0.92);
  opacity: 0.65;
}

/* Moon rotates into a crescent angle and glows */
.theme-btn[data-theme-val="dark"].active .theme-btn-icon {
  transform: rotate(-18deg) scale(1.18);
  filter: drop-shadow(0 0 5px rgba(129, 140, 248, 0.8));
  opacity: 1;
}

.theme-btn[data-theme-val="dark"]:not(.active) .theme-btn-icon {
  transform: rotate(0deg) scale(0.92);
  opacity: 0.65;
}

@media (prefers-reduced-motion: reduce) {
  .theme-switcher-slider {
    transition: none !important;
    animation: none !important;
  }
  .theme-btn-icon {
    transition: none !important;
    transform: none !important;
  }
}


/* Audio Greeting Button */
.audio-greeting-btn {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid var(--border-strong);
  color: var(--accent-cyan);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.greeting-text-desktop {
  display: inline;
}

.greeting-text-mobile {
  display: none;
}

.audio-greeting-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  transform: translateY(-1px);
}

.audio-greeting-btn.playing {
  background: rgba(255, 42, 133, 0.15);
  border-color: var(--accent-magenta);
  color: var(--accent-magenta);
  animation: pulseGreeting 1.4s infinite alternate;
}

@keyframes pulseGreeting {
  0% { box-shadow: 0 0 0 0 rgba(255, 42, 133, 0.4); }
  100% { box-shadow: 0 0 14px 4px rgba(255, 42, 133, 0.2); }
}

/* ─── 5. STICKY SUB-NAVBAR TABS ───────────────────────────────────────────── */
.sub-navbar {
  position: sticky;
  top: 65px;
  z-index: 80;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
  transition: background var(--transition);
}

.sub-navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  position: relative;
  width: 100%;
}

.nav-tabs-wrapper {
  flex: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: 6px 2px 8px 2px;
  margin-bottom: 0 !important;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.nav-tabs-wrapper.grabbing {
  cursor: grabbing;
  user-select: none;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 8px 15px;
  border-radius: var(--radius-md);
  font-family: var(--font-sub);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  -webkit-user-select: none;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-main);
  background: var(--surface-hover);
}

.tab-btn.active {
  color: var(--text-main);
  background: var(--surface-card);
  border-color: var(--border-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tab-btn.active .tab-badge {
  background: var(--accent-brand);
  color: #07090e;
}

.tab-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

/* ─── 6. MAIN CONTENT & SECTIONS ──────────────────────────────────────────── */
main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  position: relative;
  z-index: 10;
}

.section-shell {
  margin-bottom: 48px;
  animation: fadeIn 0.3s ease;
}

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

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.section-label {
  font-family: var(--font-sub);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-brand);
  margin-bottom: 6px;
}

.section-title {
  font-size: clamp(24px, 4vw, 36px);
  color: var(--text-main);
}

.section-desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 60ch;
}

/* ─── 7. BUTTONS & UI CONTROLS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-sub);
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  user-select: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background: var(--surface-card);
  border: 1px solid var(--border);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent-magenta);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(255, 42, 133, 0.3);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 42, 133, 0.4);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ─── 8. INPUTS, SELECTS & CONTROLS ───────────────────────────────────────── */
input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px; /* 16px prevents automatic zoom-in on iOS Safari & Android Chrome */
  min-height: 44px; /* Accessible 44px touch target on mobile */
  transition: var(--transition);
}

/* CRITICAL BUG FIX: Ensure select options always have dark text on light backgrounds or high-contrast background */
select option {
  background-color: #1e293b;
  color: #f8fafc;
  padding: 8px 12px;
}
[data-theme="light"] select option,
[data-theme="corporate"] select option {
  background-color: #ffffff;
  color: #0f172a;
}

[data-theme="dark"] select option,
[data-theme="cinematic"] select option {
  background-color: #181a1f;
  color: #f4f4f5;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* ─── 9. CARDS & GRID LAYOUTS ─────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 24px;
  flex-shrink: 0;
}

.card-title {
  font-size: 19px;
  line-height: 1.25;
}

.card-body {
  font-size: 14.5px;
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: 16px;
}

.card-footer {
  border-top: 1px dashed var(--border);
  padding-top: 14px;
  margin-top: auto;
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ─── 10. ACCREDITATION BADGES (COLLEGES SYSTEM) ─────────────────────────── */
.accreditation-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid transparent;
}

.badge-naac {
  background: rgba(0, 245, 155, 0.12);
  color: var(--accent-emerald);
  border-color: rgba(0, 245, 155, 0.3);
}

.badge-nirf {
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(0, 240, 255, 0.3);
}

.badge-reg {
  background: rgba(255, 183, 3, 0.12);
  color: var(--accent-gold);
  border-color: rgba(255, 183, 3, 0.3);
}

.badge-global {
  background: rgba(121, 40, 202, 0.15);
  color: #bf8eff;
  border-color: rgba(121, 40, 202, 0.35);
}

/* Filter pills row & Shelf scroll track */
.filter-row,
.shelf-scroll-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding-bottom: 10px;
  margin-bottom: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* Custom themed scrollbars across navigation & game shelves */
.sub-navbar::-webkit-scrollbar,
.nav-tabs-wrapper::-webkit-scrollbar,
.shelf-scroll-track::-webkit-scrollbar,
.filter-row::-webkit-scrollbar {
  height: 6px;
  display: block;
}

.sub-navbar::-webkit-scrollbar-track,
.nav-tabs-wrapper::-webkit-scrollbar-track,
.shelf-scroll-track::-webkit-scrollbar-track,
.filter-row::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: var(--radius-full);
}

.sub-navbar::-webkit-scrollbar-thumb,
.nav-tabs-wrapper::-webkit-scrollbar-thumb,
.shelf-scroll-track::-webkit-scrollbar-thumb,
.filter-row::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px var(--border-strong, rgba(0, 240, 255, 0.4));
  transition: background 0.22s ease, box-shadow 0.22s ease;
}

.sub-navbar::-webkit-scrollbar-thumb:hover,
.nav-tabs-wrapper::-webkit-scrollbar-thumb:hover,
.shelf-scroll-track::-webkit-scrollbar-thumb:hover,
.filter-row::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  filter: brightness(1.2);
}

/* Shelf Scroll Device (Arrow Buttons & Smooth Track) */
.shelf-scroll-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  width: 100%;
}

.shelf-scroll-arrow {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--surface-card);
  border: 1.5px solid var(--scrollbar-thumb);
  color: var(--scrollbar-thumb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
  user-select: none;
  -webkit-user-select: none;
}

.shelf-scroll-arrow:hover {
  background: var(--scrollbar-thumb);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 0 16px var(--border-strong);
}

.shelf-scroll-arrow:active {
  transform: scale(0.95);
}

.shelf-scroll-arrow.disabled {
  opacity: 0.2;
  pointer-events: none;
  border-color: var(--border);
  color: var(--text-dim);
  box-shadow: none;
}

.shelf-scroll-track {
  flex: 1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: 6px 2px 10px 2px;
  margin-bottom: 0 !important;
  cursor: grab;
}

.shelf-scroll-track.grabbing {
  cursor: grabbing;
  user-select: none;
}

.filter-chip {
  background: var(--surface-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-sub);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  transition: var(--transition);
}
.filter-chip.active, .filter-chip:hover {
  background: var(--surface-hover);
  color: var(--text-main);
  border-color: var(--border-strong);
}
.filter-chip.active {
  background: var(--accent-brand);
  color: #07090e;
  font-weight: 700;
}

/* ─── 11. HERO STAGE SECTION ──────────────────────────────────────────────── */
.hero-stage {
  padding: 40px 0 30px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-stage {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sub);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-brand);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.4vw, 50px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  word-break: normal;
  overflow-wrap: break-word;
}

.hero-heading .gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 28px;
}

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

@media (max-width: 900px) {
  .hero-actions {
    justify-content: center;
  }
}

/* Hero Live Stream Showcase Card */
.hero-visualizer-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: border-color var(--trans-fast);
}

.hero-visualizer-card:hover {
  border-color: var(--border-strong);
}

.hero-stream-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #090a0c;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.hero-stream-frame-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.hero-stream-standby {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 24px 16px;
  text-align: center;
  background: radial-gradient(circle at 50% 40%, rgba(13, 21, 39, 0.95) 0%, rgba(4, 6, 12, 0.98) 100%);
  color: var(--text-main);
  user-select: none;
}

.hero-stream-standby .standby-icon {
  font-size: 36px;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  animation: pulse-stream-icon 2.2s infinite ease-in-out;
}

@keyframes pulse-stream-icon {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.1); opacity: 1; }
}

.badge-live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-family: var(--font-sub);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  user-select: none;
}

.badge-live-pulse::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: live-blink 1.2s infinite;
}

@keyframes live-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.7); }
}

.badge-standby {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-dim);
  border: 1px solid rgba(148, 163, 184, 0.28);
  font-family: var(--font-sub);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  user-select: none;
}

.hero-canvas {
  width: 100%;
  height: 160px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
  display: block;
}

.hero-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.hero-stat-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}
.hero-stat-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--accent-brand);
}
.hero-stat-box span {
  font-size: 11px;
  color: var(--text-dim);
}

/* ─── 12. SPEECH LAB & PRONUNCIATION (SPEAK TAB) ──────────────────────────── */
.speech-studio-layout {
  max-width: 840px;
  margin: 0 auto;
  width: 100%;
}

.speech-lab-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 960px) {
  .speech-lab-layout { grid-template-columns: 1fr; }
}

/* Pronunciation Ladder Rungs */
.ladder-box {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.ladder-rungs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 6px;
}

.rung-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  transition: var(--transition);
}

.rung-item.active {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--accent-cyan);
  font-weight: 700;
}
.rung-item.completed {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

/* Microphone Recording Orb */
.record-orb-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
}

.record-orb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--brand-gradient);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: var(--transition);
}
.record-orb.recording {
  animation: orbRecordPulse 1.4s infinite;
  background: linear-gradient(135deg, #ff2a85 0%, #f72585 100%);
  box-shadow: 0 0 34px rgba(255, 42, 133, 0.6);
}

@keyframes orbRecordPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* WPM Pace Meter */
.wpm-gauge-container {
  margin: 16px 0;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.wpm-track {
  height: 10px;
  border-radius: var(--radius-full);
  background: linear-gradient(to right, #ffb703 0%, #00f59b 35%, #00f59b 65%, #ff2a85 100%);
  position: relative;
  margin: 12px 0 6px;
}

.wpm-needle {
  position: absolute;
  top: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--accent-brand);
  transform: translateX(-50%);
  transition: left 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.wpm-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

/* 6-Dimension Score Cards */
.dimensions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}
@media (max-width: 600px) {
  .dimensions-grid { grid-template-columns: repeat(2, 1fr); }
}

.dim-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
}
.dim-card .dim-score {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-brand);
}
.dim-card .dim-name {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── 13. MOCK INTERVIEW & NEWS ANCHOR TELEPROMPTER ───────────────────────── */
.broadcast-stage-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 20px;
}
@media (max-width: 900px) {
  .broadcast-stage-grid { grid-template-columns: 1fr; }
}

.video-frame-container {
  position: relative;
  background: #060b18;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#anchor-video {
  transform: scaleX(-1); /* Mirror camera feed */
}

#anchor-idle-canvas {
  transform: none; /* No mirror on canvas animation */
  display: block;
}

/* Moving Sentence Teleprompter HUD Bar */
.teleprompter-ticker-container {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  height: 56px;
  background: rgba(18, 20, 24, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  padding: 0 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
  z-index: 10;
}

.teleprompter-ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid rgba(0, 240, 255, 0.5);
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: #00f0ff;
  letter-spacing: 0.08em;
  flex-shrink: 0;
  margin-right: 12px;
}

.teleprompter-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00f0ff;
  box-shadow: 0 0 8px #00f0ff;
  animation: prompterDotBlink 1.2s infinite ease-in-out;
}

@keyframes prompterDotBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}

.teleprompter-ticker-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  mask-image: linear-gradient(to right, transparent, black 24px, black calc(100% - 24px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 24px, black calc(100% - 24px), transparent);
}

.teleprompter-ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
}

.teleprompter-sentence-text {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  color: #fef08a; /* High-contrast broadcast prompter gold */
  letter-spacing: 0.3px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 12px rgba(254, 240, 138, 0.25);
  white-space: nowrap;
}

.teleprompter-ticker-sep {
  margin: 0 32px;
  color: #00f0ff;
  font-size: 14px;
  opacity: 0.8;
}

.teleprompter-center-guide {
  display: none !important;
}
.teleprompter-center-guide::before {
  content: '';
  position: absolute;
  top: 1px;
  left: -4px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #ff2a85;
}
.teleprompter-center-guide::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: -4px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid #ff2a85;
}

/* Breaking News Lower-Third Banner */
.news-lower-third {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  background: linear-gradient(90deg, #ff2a85 0%, #b5179e 40%, rgba(14, 20, 38, 0.96) 100%);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 10;
}

.lower-third-tag {
  background: #ffffff;
  color: #ff2a85;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.lower-third-headline {
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

/* Pulsing Active Recording Button */
.btn-recording {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.75);
  animation: pulseRecording 1.3s infinite !important;
}

@keyframes pulseRecording {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.8); }
  70% { box-shadow: 0 0 0 14px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* ─── 14. SEMANTRIS ARCADE (JOBTRIS SEMANTIC STACK) ─────────────────────── */
.semantris-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.semantris-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.semantris-header-title h3 {
  font-size: 20px;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.semantris-header-title span {
  font-size: 13px;
  color: var(--text-dim);
}

.semantris-stats-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
}

.semantris-stat-badge {
  background: var(--surface-card);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.semantris-combo-pill {
  background: rgba(255, 42, 133, 0.15);
  border: 1px solid rgba(255, 42, 133, 0.4);
  color: #ff2a85;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  animation: semantrisComboPulse 1.4s infinite;
}

@keyframes semantrisComboPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); box-shadow: 0 0 12px rgba(255, 42, 133, 0.5); }
}

/* Multi-platform Responsive Grid */
.semantris-stage-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 20px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 860px) {
  .semantris-stage-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Semantris Well Tower */
.semantris-well-wrapper {
  position: relative;
  width: 100%;
  background: #06080d;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.85), 0 8px 30px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

.semantris-danger-line {
  position: absolute;
  top: 55px;
  left: 0;
  right: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, #ef4444, #ef4444 8px, transparent 8px, transparent 16px);
  z-index: 10;
  pointer-events: none;
  opacity: 0.45;
  transition: opacity 0.3s ease;
}

.semantris-danger-line.active {
  opacity: 1;
  background: #ef4444;
  box-shadow: 0 0 14px #ef4444;
  animation: dangerBlink 0.6s infinite alternate;
}

@keyframes dangerBlink {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

.semantris-danger-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: #ef4444;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(239, 68, 68, 0.15);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(239, 68, 68, 0.35);
  z-index: 12;
  pointer-events: none;
  display: none;
}

.semantris-danger-badge.active {
  display: inline-block;
  animation: dangerBlink 0.6s infinite alternate;
}

.semantris-well {
  position: relative;
  width: 100%;
  height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  gap: 8px;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 600px) {
  .semantris-well {
    height: 430px;
    padding: 8px;
    gap: 6px;
  }
}

/* Individual Semantris Block */
.semantris-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease, opacity 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.semantris-block:hover {
  transform: scale(1.015);
  filter: brightness(1.15);
}

@media (max-width: 600px) {
  .semantris-block {
    padding: 8px 12px;
    min-height: 40px;
    font-size: 13px;
  }
}

.semantris-block-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.semantris-block-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Color Categories (Semantris Vibrant Palette) */
.semantris-color-cyan {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25) 0%, rgba(3, 105, 161, 0.45) 100%);
  border: 1.5px solid #00f0ff;
  color: #e0f2fe;
}
.semantris-color-cyan .semantris-badge {
  background: rgba(0, 240, 255, 0.25);
  color: #38bdf8;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.semantris-color-emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(6, 95, 70, 0.45) 100%);
  border: 1.5px solid #10b981;
  color: #d1fae5;
}
.semantris-color-emerald .semantris-badge {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.semantris-color-purple {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(107, 33, 168, 0.45) 100%);
  border: 1.5px solid #a855f7;
  color: #f3e8ff;
}
.semantris-color-purple .semantris-badge {
  background: rgba(168, 85, 247, 0.25);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.semantris-color-amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(146, 64, 14, 0.45) 100%);
  border: 1.5px solid #f59e0b;
  color: #fef3c7;
}
.semantris-color-amber .semantris-badge {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.semantris-color-pink {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.25) 0%, rgba(157, 23, 77, 0.45) 100%);
  border: 1.5px solid #ec4899;
  color: #fce7f3;
}
.semantris-color-pink .semantris-badge {
  background: rgba(236, 72, 153, 0.25);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.semantris-color-orange {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.25) 0%, rgba(154, 52, 18, 0.45) 100%);
  border: 1.5px solid #f97316;
  color: #ffedd5;
}
.semantris-color-orange .semantris-badge {
  background: rgba(249, 115, 22, 0.25);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

/* Popping animation: Semantris particle bursting */
@keyframes semantrisPopEffect {
  0% {
    transform: scale(1);
    filter: brightness(1);
    opacity: 1;
  }
  30% {
    transform: scale(1.09);
    filter: brightness(2.6);
    box-shadow: 0 0 32px #ffffff;
  }
  100% {
    transform: scale(1.28) translateY(-10px);
    opacity: 0;
    filter: brightness(3.5);
  }
}

.semantris-block.popping {
  animation: semantrisPopEffect 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
  pointer-events: none;
  z-index: 25;
}

/* Drop-in animation when new block drops from top */
@keyframes semantrisDropIn {
  0% {
    transform: translateY(-40px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.semantris-block.dropping {
  animation: semantrisDropIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.semantris-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  margin-left: 8px;
  flex-shrink: 0;
}

/* Right-side / Mobile-bottom Console */
.semantris-console {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.semantris-input-box-wrapper {
  background: var(--surface-card);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.semantris-input-box-wrapper:focus-within {
  border-color: var(--accent-brand);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.25);
}

.semantris-input-box-wrapper.shake {
  animation: semantrisShake 0.4s ease;
  border-color: #ef4444;
}

@keyframes semantrisShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.semantris-input-box-wrapper input {
  font-size: 15px;
  padding: 12px 14px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.semantris-input-box-wrapper input:focus {
  border-color: var(--accent-brand);
}

.semantris-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  font-weight: 800;
  font-size: 15px;
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 240, 255, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.semantris-submit-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.semantris-submit-btn:active {
  transform: translateY(1px);
}

.semantris-clues-shelf {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.semantris-clue-chip {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.semantris-clue-chip:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--accent-brand);
  color: var(--text-main);
  transform: translateY(-1px);
}

.semantris-floating-score {
  position: absolute;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #00f0ff;
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.8), 0 2px 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 35;
  animation: semantrisFloatScore 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes semantrisFloatScore {
  0% { opacity: 1; transform: translateY(0) scale(0.8); }
  60% { opacity: 1; transform: translateY(-30px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-55px) scale(1.35); }
}

.semantris-gameover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 13, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  z-index: 50;
  box-sizing: border-box;
}

/* ─── 15. ARCADE & GAMES SUITE ────────────────────────────────────────────── */
.games-shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.game-thumb-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.game-thumb-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--card-shadow);
}
.game-thumb-card.active-game {
  border-color: var(--accent-brand);
  background: var(--surface-hover);
}

/* Wordle 6x5 Grid */
.wordle-board {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 6px;
  max-width: 310px;
  margin: 16px auto;
}

.wordle-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.wordle-tile {
  width: 52px;
  height: 52px;
  border: 2px solid var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--surface-raised);
  color: var(--text-main);
  transition: transform 0.2s, background-color 0.2s;
}

.wordle-tile.correct { background: #059669; border-color: #059669; color: #fff; }
.wordle-tile.present { background: #d97706; border-color: #d97706; color: #fff; }
.wordle-tile.absent  { background: #334155; border-color: #334155; color: #94a3b8; }

/* ─── 16. LEADERBOARD TABLE ───────────────────────────────────────────────── */
.table-wrapper {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--card-shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  text-align: left;
}

th {
  background: var(--bg-subtle);
  padding: 14px 18px;
  font-family: var(--font-sub);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-hover); }

.rank-badge {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 13px;
}
.rank-1 { background: #ffb703; color: #07090e; }
.rank-2 { background: #cbd5e1; color: #07090e; }
.rank-3 { background: #b45309; color: #ffffff; }

/* ─── 17. ADMIN CONTROL ROOM MODAL ────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  padding: 28px;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-main);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  transition: var(--transition);
}
.modal-close-btn:hover {
  background: var(--accent-magenta);
  color: #fff;
}

.toggle-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

/* ─── 18. TOAST NOTIFICATIONS ─────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  animation: slideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ─── 18. ADMIN CONTROL ROOM & GATE ────────────────────────────────────────── */
#admin-gate-screen {
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), var(--border-glow);
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  max-width: 480px;
  margin: 30px auto;
  text-align: center;
  position: relative;
  z-index: 10;
}

.admin-lock-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 16px;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.25);
}

.admin-pwd-wrapper {
  position: relative;
  margin: 8px 0 18px;
}

#admin-pwd-input {
  width: 100%;
  padding: 13px 44px 13px 16px;
  background: rgba(7, 9, 14, 0.9);
  border: 2px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.08em;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
}

[data-theme="light"] #admin-pwd-input,
[data-theme="corporate"] #admin-pwd-input {
  background: #ffffff;
  color: #0f172a;
}

[data-theme="dark"] #admin-pwd-input,
[data-theme="cinematic"] #admin-pwd-input {
  background: #181a1f;
  color: #f4f4f5;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

#admin-pwd-input:focus {
  outline: none;
  border-color: var(--accent-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.btn-toggle-pwd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 6px;
  line-height: 1;
}

.admin-view-panel {
  animation: fadeIn 0.2s ease-out;
}

/* ─── 20. REAL-WORLD SITE FOOTER ─────────────────────────────────────────── */
.site-footer {
  background: var(--surface-raised);
  border-top: 1px solid var(--border);
  padding: 48px 20px 28px;
  position: relative;
  z-index: 20;
}

.footer-container {
  max-width: 1320px;
  margin: 0 auto;
}

.footer-main-grid {
  display: grid;
  grid-template-columns: 2fr 1.1fr 1.1fr;
  gap: 36px;
  margin-bottom: 32px;
}

.footer-col-brand .footer-tagline {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 440px;
  margin-bottom: 14px;
}

.footer-school-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-main);
  font-weight: 500;
}

.footer-heading {
  font-family: var(--font-sub);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin-bottom: 14px;
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  transition: var(--transition);
}

.footer-links-list a:hover {
  color: var(--accent-brand);
  transform: translateX(4px);
  display: inline-block;
}

.footer-accred-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.footer-accred-title {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-accred-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}

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

/* ─── 19. RESPONSIVE BREAKPOINTS (CROSS-PLATFORM MOBILE & TABLET) ────────── */
@media (max-width: 768px) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
  .top-broadcast-bar {
    font-size: 11.5px;
    padding: 6px max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
    justify-content: center;
    text-align: center;
  }
  .header-container {
    padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  .header-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }
  .site-brand {
    gap: 8px;
    min-width: 0;
    flex-shrink: 1;
  }
  .brand-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }
  .brand-copy .brand-name {
    font-size: clamp(13px, 3.8vw, 15px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand-copy .brand-subtitle {
    display: none;
  }
  .audio-greeting-btn {
    padding: 5px 10px;
    font-size: 12px;
    height: 32px;
    flex-shrink: 0;
    white-space: nowrap;
    gap: 4px;
  }
  .greeting-text-desktop {
    display: none;
  }
  .greeting-text-mobile {
    display: inline;
    font-weight: 700;
  }
  .audio-greeting-btn .greeting-btn-text {
    font-size: 11.5px;
  }
  .header-actions-row {
    width: 100%;
  }
  .theme-switcher {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding: 3px;
    gap: 2px;
    background: var(--surface-raised);
    border-radius: var(--radius-full);
  }
  .theme-btn {
    width: 100%;
    text-align: center;
    padding: 5px 2px;
    font-size: 11px;
    border-radius: var(--radius-full);
  }
  .sub-navbar {
    top: 92px;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .tab-btn {
    padding: 8px 12px;
    font-size: 13px;
    min-height: 42px;
  }
  main {
    padding: 16px max(12px, env(safe-area-inset-right)) 60px max(12px, env(safe-area-inset-left));
  }
  .hero-stage {
    padding: 20px 0 16px;
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }
  .hero-heading {
    font-size: clamp(22px, 6.2vw, 32px);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
  }
  .hero-sub {
    font-size: 15px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .card {
    padding: 16px;
    border-radius: var(--radius-md);
  }
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .speech-lab-layout,
  .broadcast-stage-grid,
  .debate-stage {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .dimensions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .btn {
    min-height: 44px;
  }
  #admin-gate-screen {
    padding: 24px 16px;
    margin: 16px auto;
  }
  .site-footer {
    padding: 32px 16px 20px;
  }
  .footer-main-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .footer-accred-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─── AI TELEPROMPTER SCREEN & PASS-AWAY SENTENCE STREAM ──────────── */
.teleprompter-glass-screen, .ai-prompt-screen {
  background: var(--surface-card);
  border: 2px solid var(--accent-cyan);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.teleprompter-glass-screen::before, .ai-prompt-screen::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-magenta), transparent);
}

.teleprompter-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.teleprompter-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.prompter-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulseGreeting 1s infinite alternate;
}

.teleprompter-stage-viewport {
  position: relative;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 10px;
  overflow: hidden;
}

.teleprompter-track {
  width: 100%;
  position: relative;
}

.teleprompter-sentence {
  font-family: var(--font-display, var(--font-body));
  font-size: clamp(20px, 3.2vw, 27px);
  font-weight: 700;
  line-height: 1.55;
  color: #f1f5f9;
  letter-spacing: -0.01em;
  text-align: center;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease, filter 0.45s ease;
  user-select: none;
}

/* Passing away animation: Smooth upward glide with blur and fade */
.teleprompter-sentence.passing-away {
  transform: translateY(-60px) scale(0.96) !important;
  opacity: 0 !important;
  filter: blur(6px) !important;
}

/* Entering animation: Glide up smoothly into viewport */
.teleprompter-sentence.entering {
  transform: translateY(50px) scale(0.96);
  opacity: 0;
  filter: blur(4px);
}

/* Fluid teleprompter word highlighting (no box chips) */
.prompter-word, .speech-lab-word {
  display: inline;
  transition: color 0.18s ease, text-shadow 0.18s ease, background 0.18s ease;
  padding: 1px 3px;
  border-radius: 4px;
  color: #94a3b8;
  font-weight: 600;
}

.prompter-word.spoken, .speech-lab-word.passed {
  color: #34d399 !important;
  text-shadow: 0 0 14px rgba(52, 211, 153, 0.7);
  font-weight: 800 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.prompter-word.target, .speech-lab-word.current-target {
  color: #ffffff !important;
  text-shadow: none !important;
  background: rgba(37, 99, 235, 0.12) !important;
  border-bottom: 2.5px solid var(--accent-cyan);
  box-shadow: none !important;
  animation: pulseWordTarget 1.5s infinite;
}

.teleprompter-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 10px;
}

.teleprompter-live-heard {
  color: var(--text-muted);
  font-style: italic;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes pulseWordTarget {
  0%, 100% { border-color: rgba(37, 99, 235, 0.4); }
  50% { border-color: rgba(37, 99, 235, 1); }
}

.speech-lab-screen-complete {
  border-color: var(--accent-emerald) !important;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.45) !important;
}

.speaking-active {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #fff !important;
  border-color: #f87171 !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.45) !important;
}

/* ─── 20. FAIR FEEDBACK & REVIEW WALL (MOBILE & PC RESPONSIVE) ──────────── */
.feedback-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

.feedback-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.feedback-controls-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media (max-width: 600px) {
  .feedback-controls-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.star-rating-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.star-rating-group .star-btn {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-main);
}

.star-rating-group .star-btn:hover {
  border-color: var(--accent-brand);
}

.star-rating-group .star-btn.active {
  background: var(--brand-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(0, 240, 255, 0.3);
}

.feedback-reflections-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.feedback-empty-state {
  text-align: center;
  padding: 36px 16px;
  background: var(--bg-subtle);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
}

.feedback-empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
}

.feedback-empty-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.feedback-empty-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.4;
}

.feedback-item {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border);
  transition: border-color var(--transition);
}

.feedback-item:hover {
  border-color: var(--border-strong);
}

.feedback-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.feedback-item-author {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.feedback-item-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--accent-brand);
  font-weight: 600;
}

.feedback-item-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12.5px;
  font-weight: 700;
  color: #f59e0b;
}

.feedback-item-comment {
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.feedback-item-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ── FUTURE BUSINESS CARD GENERATOR STYLING ── */
.bizcard-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 820px) {
  .bizcard-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.biz-card-render {
  background: radial-gradient(circle at 10% 20%, #151e36 0%, #0a0f1d 90%);
  border: 2px solid var(--accent-cyan);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: #fff;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 230px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.biz-card-render::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-magenta), transparent);
}

.biz-card-render.biz-card-pulse {
  animation: bizCardGlow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bizCardGlow {
  0% { transform: scale(1); box-shadow: 0 16px 36px rgba(0,0,0,0.65), 0 0 24px rgba(0, 240, 255, 0.15); }
  50% { transform: scale(1.02); border-color: var(--accent-emerald); box-shadow: 0 20px 48px rgba(0,0,0,0.8), 0 0 35px rgba(52, 211, 153, 0.55); }
  100% { transform: scale(1); box-shadow: 0 16px 36px rgba(0,0,0,0.65), 0 0 24px rgba(0, 240, 255, 0.15); }
}

.biz-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.biz-card-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.biz-card-name {
  font-family: var(--font-display, var(--font-body));
  font-size: clamp(22px, 3.2vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0;
  line-height: 1.25;
  word-break: break-word;
}

.biz-card-title {
  color: var(--accent-cyan);
  font-family: var(--font-sub, var(--font-body));
  font-size: 14.5px;
  font-weight: 700;
  margin-top: 5px;
  line-height: 1.4;
  word-break: break-word;
}

.biz-card-qr-box {
  background: #ffffff;
  padding: 6px;
  border-radius: 10px;
  width: 78px;
  height: 78px;
  min-width: 78px;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.biz-card-qr-box:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.biz-card-qr-box svg, .biz-card-qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.biz-card-bottom {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.biz-card-creds {
  font-size: 12.5px;
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
}

.biz-card-school {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Accessibility & Loading State Polish */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

:focus-visible {
  outline: 2px solid var(--accent-brand);
  outline-offset: 2px;
}

.spinner-sm {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 240, 255, 0.25);
  border-top-color: var(--accent-brand);
  border-radius: 50%;
  animation: spinnerRotate 0.75s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spinnerRotate {
  to { transform: rotate(360deg); }
}

/* ── THE GAMING HALL & 3D ARC CAROUSEL ── */
.arc-stage {
  position: relative;
  width: 100%;
  padding: 10px 0 16px;
}
.arc-carousel {
  position: relative;
  height: 270px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  overflow: hidden;
  margin: 16px 0;
}
.arc-card {
  position: absolute;
  width: 250px;
  min-height: 200px;
  padding: 20px 18px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease, border-color 0.3s, box-shadow 0.3s;
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.arc-card.active {
  border-color: var(--accent-cyan);
  box-shadow: 0 12px 32px rgba(0, 240, 255, 0.25);
  background: var(--surface);
}
.arc-card .rn {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--accent-magenta);
  line-height: 1;
}
.arc-card .quest-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-cyan);
  margin-top: 4px;
}
.arc-card h3 {
  font-size: 17px;
  margin: 6px 0;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}
.arc-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}
.arc-nav-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

/* Quest Stage Arena */
.quest-arena {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 16px;
  box-shadow: var(--card-shadow);
}
.quest-output-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-main);
  white-space: pre-wrap;
  min-height: 120px;
  margin: 16px 0;
}
.quest-options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.quest-choice-btn {
  text-align: left;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.quest-choice-btn:hover {
  border-color: var(--accent-cyan);
  background: var(--surface-hover);
  transform: translateX(4px);
}

/* Ink Cipher Illuminated Lens */
.archive-case-lens {
  position: relative;
  background: #090a0f;
  color: #d1d5db;
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid rgba(0, 240, 255, 0.2);
  min-height: 200px;
  overflow: hidden;
  --cx: -200px;
  --cy: -200px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
}
.archive-case-lens::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 140px at var(--cx) var(--cy), rgba(0, 240, 255, 0.22), rgba(0, 0, 0, 0.88) 78%);
  pointer-events: none;
}

/* Hologram Divination Card */
.holo-divination-card {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(255, 42, 133, 0.08));
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.18);
  margin-top: 16px;
}


/* ==========================================================================
   MOBILE RESPONSIVENESS, ERGONOMICS & HIGH-DOPAMINE GAME STYLES (v6.4)
   ========================================================================== */

/* Universal Touch & Contrast Guardrails */
button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

::placeholder {
  color: var(--text-dim) !important;
  opacity: 0.85;
}

/* ── 15-SECOND WORD BLITZ (HIGH-DOPAMINE SPEED LEXICAL RUSH) ── */
.blitz-arena {
  background: var(--surface-card);
  border: 2px solid var(--accent-cyan);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 240, 255, 0.14);
}

.blitz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.blitz-timer-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 18px;
}

.blitz-timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #10b981, #00f0ff, #ff2a85);
  transition: width 0.1s linear, background 0.3s ease;
}

.blitz-hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-main);
}

.blitz-streak-active {
  color: #fbbf24 !important;
  border-color: #fbbf24 !important;
  animation: streakFlame 0.8s infinite alternate;
}

@keyframes streakFlame {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px #fbbf24); }
  100% { transform: scale(1.06); filter: drop-shadow(0 0 8px #f59e0b); }
}

.blitz-word-stage {
  text-align: center;
  padding: 24px 16px;
  margin-bottom: 18px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  position: relative;
}

.blitz-target-word {
  font-family: var(--font-display);
  font-size: clamp(28px, 6.5vw, 42px);
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.blitz-question-sub {
  font-size: 14.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.blitz-choices-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.blitz-choice-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 12px;
  min-height: 58px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--text-main);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.blitz-choice-btn:active {
  transform: scale(0.96);
}

.blitz-choice-btn.correct-burst {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10b981 !important;
  color: #10b981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.blitz-choice-btn.wrong-burst {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}

/* ── 20-SECOND GRAMMAR SLAP (REFLEX SURVIVAL) ── */
.slap-arena {
  background: var(--surface-card);
  border: 2px solid var(--accent-magenta);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 12px 36px rgba(255, 42, 133, 0.14);
}

.slap-card-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  margin: 16px 0 20px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.slap-sentence-text {
  font-size: clamp(17px, 4.4vw, 22px);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.45;
}

.slap-buttons-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn-slap-valid {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  min-height: 64px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3);
  transition: transform 0.12s ease;
}

.btn-slap-error {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  min-height: 64px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.3);
  transition: transform 0.12s ease;
}

.btn-slap-valid:active, .btn-slap-error:active {
  transform: scale(0.95);
}

/* ── MOBILE VIEWPORT REFINEMENTS (<= 640px) ── */
@media (max-width: 640px) {
  .blitz-choices-grid {
    grid-template-columns: 1fr;
  }
  
  .arc-carousel {
    height: 230px;
  }
  
  .arc-card {
    width: 210px;
    min-height: 170px;
    padding: 16px 14px;
  }
  
  .arc-card h3 {
    font-size: 15px;
  }
  
  .arc-card p {
    font-size: 11.5px;
  }
  
  .quest-arena {
    padding: 16px;
  }
  
  .quest-output-box {
    padding: 14px;
    font-size: 14px;
  }
  
  .quest-choice-btn {
    min-height: 48px;
    padding: 10px 14px;
    font-size: 13px;
  }

  /* Table Horizontal Scrolling with Finger Polish */
  .table-wrapper {
    margin: 0 -12px;
    padding: 0 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 540px;
  }

  /* Mobile bottom actions padding to avoid home bar overlap */
  body {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}
