/* ==========================================================================
   SECRET ARCADE (AURASHIELD) — HYPER-POLISHED CYBER-ARCADE UI (AAA TIER)
   ==========================================================================
   • Conic-gradient animated neon borders & holographic glassmorphism
   • 3D spatial card depth with translateZ hover effects
   • Dynamic aurora particle matrix & cyber-mesh perspective grid
   • Metallic medal reflections, golden host halos, and interactive sound waves
   • 100% responsive, high-performance 60fps GPU-accelerated styling
   ========================================================================== */

/* ---- DESIGN TOKENS & SYSTEM VARIABLES ---- */
:root {
  --bg:              #05060d;
  --bg-deep:         #020307;
  --bg-soft:         #0a0c1a;
  --surface:         rgba(15, 18, 38, 0.72);
  --surface-solid:   #0f1228;
  --surface-hover:   rgba(26, 31, 64, 0.88);
  --surface-bright:  rgba(35, 42, 85, 0.9);
  
  --panel:           rgba(16, 20, 44, 0.76);
  --panel-solid:     #121634;
  --panel-hover:     #191f48;
  
  /* Cyber Glass Border Gradients */
  --line:            rgba(167, 139, 250, 0.14);
  --line-strong:     rgba(167, 139, 250, 0.32);
  --line-bright:     rgba(192, 132, 252, 0.55);
  --line-cyan:       rgba(34, 211, 238, 0.45);
  --line-gold:       rgba(251, 191, 36, 0.5);
  
  /* Typography */
  --text:            #f8fafc;
  --text-secondary:  #94a3b8;
  --muted:           #64748b;
  --faint:           #334155;
  
  /* Hyper Neon Palette */
  --accent:          #a855f7;
  --accent-strong:   #7c3aed;
  --accent-light:    #c084fc;
  --accent-glow:     rgba(168, 85, 247, 0.45);
  --accent-glow-high:rgba(168, 85, 247, 0.75);
  --accent-soft:     rgba(168, 85, 247, 0.14);
  
  --cyan:            #06b6d4;
  --cyan-bright:     #22d3ee;
  --cyan-glow:       rgba(6, 182, 212, 0.5);
  --cyan-soft:       rgba(6, 182, 212, 0.14);
  
  --green:           #10b981;
  --green-bright:    #34d399;
  --green-glow:      rgba(16, 185, 129, 0.5);
  --green-soft:      rgba(16, 185, 129, 0.14);
  
  --yellow:          #f59e0b;
  --yellow-bright:   #fbbf24;
  --yellow-glow:     rgba(245, 158, 11, 0.5);
  
  --danger:          #f43f5e;
  --danger-bright:   #fb7185;
  --danger-glow:     rgba(244, 63, 94, 0.5);
  
  --pink:            #ec4899;
  --pink-glow:       rgba(236, 72, 153, 0.5);
  
  /* Holographic Gradients */
  --grad-main:       linear-gradient(135deg, #7c3aed 0%, #3b82f6 50%, #06b6d4 100%);
  --grad-sunset:     linear-gradient(135deg, #f43f5e 0%, #fb923c 50%, #fbbf24 100%);
  --grad-emerald:    linear-gradient(135deg, #059669 0%, #10b981 50%, #22d3ee 100%);
  --grad-cyber:      linear-gradient(135deg, #c084fc 0%, #38bdf8 100%);
  --grad-gold:       linear-gradient(135deg, #fef08a 0%, #fbbf24 45%, #b45309 100%);
  --grad-silver:     linear-gradient(135deg, #f8fafc 0%, #cbd5e1 50%, #64748b 100%);
  --grad-bronze:     linear-gradient(135deg, #fed7aa 0%, #f97316 50%, #7c2d12 100%);
  
  /* Dimensional Shadows */
  --shadow-sm:       0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-md:       0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(124, 58, 237, 0.15);
  --shadow-lg:       0 24px 64px rgba(0, 0, 0, 0.75), 0 0 50px rgba(124, 58, 237, 0.25);
  --shadow-neon:     0 0 30px var(--accent-glow), 0 0 60px rgba(6, 182, 212, 0.2);
  
  --radius-xs:       8px;
  --radius-sm:       12px;
  --radius:          18px;
  --radius-lg:       26px;
  --radius-full:     9999px;
  
  /* Fonts */
  --font-display:    'Outfit', 'Space Grotesk', -apple-system, sans-serif;
  --font-body:       'Inter', -apple-system, sans-serif;
  --font-mono:       'JetBrains Mono', 'Fira Code', monospace;
  
  /* Motion Curves */
  --ease-elastic:    cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:     cubic-bezier(0.16, 1, 0.3, 1);
  --transition:      0.28s var(--ease-smooth);
}

/* ---- RESETS & 3D ROOT SETUP ---- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  perspective: 1400px;
}

/* Animated Cyber Grid Matrix with Perspective Horizon */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.08) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.08) 1.5px, transparent 1.5px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse at 50% 25%, black 20%, transparent 80%);
  z-index: 0;
  animation: gridPerspectiveShift 40s linear infinite;
}

@keyframes gridPerspectiveShift {
  0%   { background-position: 0 0; }
  100% { background-position: 54px 54px; }
}

/* Hyper-Orbital Atmospheric Aurora */
body::after {
  content: "";
  position: fixed;
  top: -240px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 900px;
  background:
    radial-gradient(circle at 25% 30%, rgba(124, 58, 237, 0.48) 0%, transparent 55%),
    radial-gradient(circle at 75% 35%, rgba(6, 182, 212, 0.38) 0%, transparent 55%),
    radial-gradient(circle at 50% 70%, rgba(236, 72, 153, 0.28) 0%, transparent 60%);
  filter: blur(85px);
  pointer-events: none;
  opacity: 0.75;
  z-index: 0;
  animation: auroraBreathing 18s ease-in-out infinite alternate;
}

@keyframes auroraBreathing {
  0% {
    transform: translateX(-50%) translateY(0) scale(1) rotate(0deg);
    opacity: 0.65;
  }
  50% {
    transform: translateX(-46%) translateY(45px) scale(1.12) rotate(4deg);
    opacity: 0.85;
  }
  100% {
    transform: translateX(-54%) translateY(20px) scale(0.95) rotate(-4deg);
    opacity: 0.7;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.35), rgba(6, 182, 212, 0.35));
  border-radius: 6px;
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent), var(--cyan));
}

button, a {
  font: inherit;
  color: inherit;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  background: transparent;
}

input, select {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4, p {
  margin-top: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--cyan-bright);
  outline-offset: 3px;
  box-shadow: 0 0 20px var(--cyan-glow);
}

/* ---- APP CONTAINER ---- */
.app-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ---- TOPBAR (FLOATING AERODYNAMIC DOCK) ---- */
.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: relative;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all var(--transition);
}

.topbar::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, var(--accent), var(--cyan-bright), transparent 95%);
  opacity: 0.85;
}

/* Brand Identity */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  transition: transform var(--ease-elastic);
}

.brand:hover {
  transform: scale(1.05);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-strong), var(--cyan));
  border-radius: 14px;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 0 28px var(--accent-glow), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  position: relative;
  transition: all var(--ease-elastic);
}

.brand:hover .brand-mark {
  transform: rotate(15deg) scale(1.15);
  box-shadow: 0 0 40px var(--cyan-glow), inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.14em;
  background: linear-gradient(135deg, #fff 40%, var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--cyan);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 18px;
  transition: all var(--ease-elastic);
  backdrop-filter: blur(14px);
}

.icon-button:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 10px 28px var(--accent-glow);
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 18px 4px 6px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--ease-elastic);
  backdrop-filter: blur(14px);
}

.profile-chip:hover {
  border-color: var(--accent-light);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--accent-glow);
  color: #fff;
}

.level-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent-strong), var(--cyan));
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 0 18px var(--accent-glow);
  animation: levelDotGlow 3s ease-in-out infinite alternate;
}

@keyframes levelDotGlow {
  0%   { box-shadow: 0 0 12px var(--accent-glow); }
  100% { box-shadow: 0 0 24px var(--cyan-glow); }
}

.header-username {
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ---- SPA VIEWS & TRANSITIONS ---- */
.view {
  display: none;
  padding: 44px 0 96px;
  animation: viewEntrance 0.42s var(--ease-smooth) both;
}

.view.active {
  display: block;
}

.hidden {
  display: none !important;
}

@keyframes viewEntrance {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ---- CYBER-GLASS CARDS & CONIC-GRADIENT BORDERS ---- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

/* Sweeping Holographic Laser Line */
.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.03) 45%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 55%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
  transition: left 0.8s ease;
}

.panel:hover::before {
  left: 150%;
}

/* ---- TYPOGRAPHY & HIGHLIGHTS ---- */
.eyebrow {
  color: var(--accent-light);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.24em;
  margin: 0 0 12px;
  text-transform: uppercase;
  text-shadow: 0 0 20px var(--accent-glow);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.muted {
  color: var(--muted);
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25), 0 0 14px var(--green-glow);
  animation: radarPulse 2s ease-in-out infinite;
}

@keyframes radarPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25), 0 0 14px var(--green-glow);
  }
  50% {
    transform: scale(1.4);
    opacity: 0.7;
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.08), 0 0 24px var(--green-glow);
  }
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(40px, 6.5vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 900;
}

h1 em {
  font-style: normal;
  background: var(--grad-main);
  background-size: 250% 250%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradShift 5s ease-in-out infinite;
  filter: drop-shadow(0 0 35px var(--accent-glow));
}

@keyframes gradShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

h2 {
  margin-bottom: 8px;
  font-size: 26px;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.hero-lead {
  max-width: 540px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
}

.page-heading {
  margin-bottom: 34px;
}

/* ---- HYPER ACTION BUTTONS ---- */
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 32px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: linear-gradient(135deg, var(--accent-strong), #9333ea 50%, var(--cyan) 100%);
  background-size: 200% 200%;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  border: none;
  box-shadow: 0 10px 30px var(--accent-glow), inset 0 1px 1px rgba(255, 255, 255, 0.45);
  transition: all var(--ease-elastic);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: btnFlow 4s ease infinite;
}

@keyframes btnFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.primary-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 20%, rgba(255, 255, 255, 0.25) 50%, transparent 80%);
  opacity: 0;
  transition: opacity var(--transition);
}

.primary-button:hover::after {
  opacity: 1;
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 18px 45px var(--accent-glow), 0 0 55px rgba(6, 182, 212, 0.35);
  filter: brightness(1.15);
}

.primary-button:active:not(:disabled) {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.primary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.6);
  box-shadow: none;
}

.primary-button.full-width {
  width: 100%;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  color: var(--text-secondary);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: all var(--ease-elastic);
  backdrop-filter: blur(12px);
}

.secondary-button:hover {
  color: #fff;
  border-color: var(--accent-light);
  background: var(--accent-soft);
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.25);
}

.text-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 0;
  transition: color var(--transition);
}

.text-link:hover {
  color: var(--text);
}

.text-link strong {
  color: var(--accent-light);
}

.danger-button {
  padding: 12px 22px;
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: var(--radius-xs);
  color: var(--danger-bright);
  background: rgba(244, 63, 94, 0.08);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  transition: all var(--transition);
}

.danger-button:hover {
  background: rgba(244, 63, 94, 0.22);
  border-color: var(--danger);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--danger-glow);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  margin-bottom: 12px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  transition: all var(--transition);
}

.back-button:hover {
  color: var(--accent-light);
  transform: translateX(-5px);
}

/* ---- AUTH VIEWS (CYBER SHIELD ENTRANCE) ---- */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 460px;
  margin: 0 auto;
  padding: 24px 0 64px;
}

.auth-hero {
  text-align: center;
  margin-bottom: 38px;
}

.auth-logo {
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--accent-strong), var(--cyan));
  color: #fff;
  font-size: 40px;
  font-weight: 900;
  margin-bottom: 26px;
  box-shadow: 0 0 70px var(--accent-glow-high), 0 0 110px rgba(6, 182, 212, 0.25);
  position: relative;
}

.auth-hero h1 {
  font-size: 48px;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 10px;
}

.auth-tagline {
  color: var(--text-secondary);
  font-size: 16px;
}

.auth-card {
  width: 100%;
  padding: 42px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-bright);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(124, 58, 237, 0.15);
}

.auth-card h2 {
  margin-bottom: 26px;
  font-size: 24px;
}

.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* ---- FORMS & INPUTS ---- */
.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.form-group input,
.form-group select {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 15px;
  transition: all var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent-light);
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 30px var(--accent-glow);
  background: #111428;
}

.form-group input::placeholder {
  color: var(--faint);
}

.form-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.form-error {
  min-height: 0;
  margin-bottom: 14px;
  color: var(--danger-bright);
  font-size: 13px;
  font-weight: 600;
}

.form-error:empty {
  display: none;
}

.form-success {
  margin-bottom: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-xs);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--green-bright);
  font-size: 13px;
  font-weight: 600;
}

/* ---- HOME VIEW (HERO & 3D STAT TILES) ---- */
.hero-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  padding: 48px 0 72px;
}

.hero-stats {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.mini-stat-card {
  padding: 22px 28px;
  text-align: center;
  min-width: 110px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition: all var(--ease-elastic);
}

.mini-stat-card:hover {
  transform: translateY(-10px) scale(1.06);
  border-color: var(--accent-light);
  box-shadow: 0 18px 40px var(--accent-glow);
}

.mini-stat-label {
  display: block;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  margin-bottom: 6px;
}

.mini-stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.05em;
  background: var(--grad-main);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradShift 4s ease infinite;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 26px;
}

/* ---- GAME CARDS GRID (TRUE 3D DEPTH ON HOVER) ---- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 24px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(23, 27, 56, 0.82), rgba(13, 15, 32, 0.9));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(24px);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s ease, border-color 0.4s ease;
  cursor: pointer;
}

/* 3D Spatial Elevation */
.game-card:hover {
  transform: translateY(-10px) rotateX(4deg) rotateY(-3deg);
  border-color: var(--accent-light);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 45px var(--accent-glow);
}

.game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transition: left 0.75s ease;
  pointer-events: none;
}

.game-card:hover::before {
  left: 120%;
}

.game-card::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  right: -60px;
  top: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.25;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.game-card:hover::after {
  transform: scale(1.5);
  opacity: 0.65;
}

.game-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
  transform: translateZ(20px);
}

.game-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(167, 139, 250, 0.4);
  font-size: 30px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  transition: transform var(--ease-elastic);
}

.game-card:hover .game-icon {
  transform: scale(1.18) rotate(-8deg);
  box-shadow: 0 0 30px var(--accent-glow);
}

.game-badge {
  padding: 6px 14px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  border: 1px solid;
}

.game-badge.ready {
  color: var(--green-bright);
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
}

.game-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 2;
  transform: translateZ(15px);
}

.game-card .game-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 24px;
  flex: 1;
  position: relative;
  z-index: 2;
}

.game-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  position: relative;
  z-index: 2;
}

.game-card-meta strong {
  color: var(--yellow-bright);
}

.play-button {
  margin-top: 18px;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  transition: all var(--ease-elastic);
  position: relative;
  z-index: 2;
}

.play-button:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  border-color: var(--accent-light);
  box-shadow: 0 10px 28px var(--accent-glow);
  transform: translateY(-3px);
}

/* Quick Join Widget */
.quick-join {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 26px;
  max-width: 460px;
}

.code-input {
  flex: 1;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-align: center;
  transition: all var(--transition);
}

.code-input:focus {
  border-color: var(--accent-light);
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 30px var(--accent-glow);
}

/* Navigation Grid */
.home-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px 18px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  transition: all var(--ease-elastic);
  cursor: pointer;
  border-radius: var(--radius);
}

.nav-card:hover {
  border-color: var(--accent-light);
  background: var(--surface-hover);
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 16px 36px var(--accent-glow);
}

.nav-icon {
  font-size: 36px;
  transition: transform var(--ease-elastic);
}

.nav-card:hover .nav-icon {
  transform: scale(1.25) rotate(-10deg);
}

/* ============================================================
   GAME CONFIGURATION & SEGMENTED TACTICAL CONTROLS
   ============================================================ */
.game-select-container {
  max-width: 800px;
  margin: 0 auto;
  animation: viewEntrance 0.4s var(--ease-smooth);
}

.game-select-card {
  padding: 34px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-bright);
  background: linear-gradient(180deg, rgba(24, 28, 58, 0.94), rgba(14, 16, 36, 0.96));
  box-shadow: var(--shadow-lg), 0 0 45px rgba(124, 58, 237, 0.16);
  position: relative;
}

.select-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.select-step-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-xs);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent-light);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.select-section-header h3 {
  font-size: 21px;
  font-weight: 800;
  margin: 0;
  color: #fff;
}

/* Mode Selection Cards (Symmetric 3D) */
.game-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.game-mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid var(--line-strong);
  text-align: left;
  transition: all var(--ease-elastic);
  cursor: pointer;
  overflow: hidden;
}

.game-mode-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.game-mode-card.selected {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.14), rgba(124, 58, 237, 0.14));
  border-color: var(--cyan-bright);
  box-shadow: 0 0 30px var(--cyan-glow), inset 0 0 15px rgba(6, 182, 212, 0.1);
  transform: translateY(-2px);
}

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

.mode-icon {
  font-size: 34px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.mode-tag {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid;
}

.mode-tag.solo-tag {
  color: var(--cyan-bright);
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.1);
}

.mode-tag.room-tag {
  color: var(--yellow-bright);
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
}

.mode-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.mode-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.mode-radio-check {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: transparent;
  transition: all var(--transition);
}

.game-mode-card.selected .mode-radio-check {
  border-color: var(--cyan-bright);
  background: var(--cyan-bright);
  color: #030712;
  box-shadow: 0 0 15px var(--cyan-glow);
}

/* Tactical Segmented Parameter Blocks */
.config-block {
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
}

.config-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.config-block-header label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.config-selected-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--cyan-bright);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  padding: 3px 10px;
  border-radius: 6px;
}

.segments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
  gap: 10px;
}

.segment-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  gap: 4px;
  transition: all var(--ease-elastic);
  cursor: pointer;
}

.segment-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateY(-2px);
}

.segment-btn.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(6, 182, 212, 0.2));
  border-color: var(--accent-light);
  box-shadow: 0 0 22px var(--accent-glow);
  transform: scale(1.04);
}

.seg-num {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  color: #fff;
}

.seg-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.segment-btn.active .seg-label {
  color: var(--cyan-bright);
}

/* ---- LOBBY & WAITING ROOM (AAA MULTIPLAYER EXPERIENCE) ---- */
.lobby-wrapper {
  max-width: 860px;
  margin: 0 auto;
  animation: viewEntrance 0.4s var(--ease-smooth);
}

.lobby-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.lobby-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--green-bright);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.live-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 14px var(--green-bright);
  animation: radarPulse 1.6s ease-in-out infinite;
}

.lobby-card {
  padding: 42px;
  background: linear-gradient(180deg, rgba(24, 27, 54, 0.96), rgba(14, 16, 34, 0.98));
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(124, 58, 237, 0.22);
  backdrop-filter: blur(28px);
  position: relative;
}

.lobby-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-light), var(--cyan-bright), transparent);
}

.lobby-game-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.lobby-game-icon {
  font-size: 54px;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(6, 182, 212, 0.25));
  border: 1px solid rgba(167, 139, 250, 0.45);
  box-shadow: 0 0 35px var(--accent-glow);
  flex-shrink: 0;
  transition: transform var(--ease-elastic);
}

.lobby-card:hover .lobby-game-icon {
  transform: rotate(-6deg) scale(1.08);
}

.lobby-game-title {
  font-size: 32px;
  font-weight: 900;
  margin: 4px 0 10px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lobby-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lobby-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 15px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text-secondary);
}

.lobby-pill.host-pill {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.45);
  color: var(--yellow-bright);
  font-weight: 700;
}

.lobby-pill.guest-pill {
  background: rgba(6, 182, 212, 0.18);
  border-color: rgba(6, 182, 212, 0.45);
  color: var(--cyan-bright);
}

/* Big Holographic Room Code Box */
.lobby-code-box {
  margin: 32px 0;
  padding: 32px;
  border-radius: 20px;
  background: radial-gradient(ellipse at 50% 0%, rgba(124, 58, 237, 0.25), rgba(12, 14, 30, 0.95));
  border: 2px dashed rgba(167, 139, 250, 0.45);
  text-align: center;
  transition: border-color var(--transition);
}

.lobby-code-box:hover {
  border-color: var(--accent-light);
}

.code-box-eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--accent-light);
  margin-bottom: 16px;
}

.code-box-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.code-letters-display {
  font-family: var(--font-mono);
  font-size: 46px;
  font-weight: 900;
  letter-spacing: 0.26em;
  color: #fff;
  padding: 14px 32px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(167, 139, 250, 0.5);
  text-shadow: 0 0 30px var(--accent-glow-high), 0 0 60px rgba(124, 58, 237, 0.5);
  user-select: all;
  animation: codePulse 3s ease-in-out infinite alternate;
}

@keyframes codePulse {
  0% {
    border-color: rgba(167, 139, 250, 0.4);
    box-shadow: 0 0 25px rgba(124, 58, 237, 0.3);
  }
  100% {
    border-color: #c084fc;
    box-shadow: 0 0 50px rgba(192, 132, 252, 0.7), inset 0 0 24px rgba(167, 139, 250, 0.3);
  }
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-strong), #9061f9);
  box-shadow: 0 0 28px rgba(124, 58, 237, 0.45);
  transition: all var(--ease-elastic);
}

.copy-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 45px rgba(124, 58, 237, 0.75);
}

.copy-btn.copied {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 0 30px var(--green-glow);
}

.code-box-subtext {
  font-size: 14px;
  color: var(--muted);
  margin: 16px 0 0;
}

/* Roster of Connected Players */
.lobby-players-area {
  margin: 32px 0;
}

.players-area-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.players-area-header h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}

.refresh-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 8px;
}

.player-lobby-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  transition: all var(--ease-elastic);
  animation: playerPopIn 0.38s var(--ease-elastic) both;
}

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

.player-lobby-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.player-lobby-card.is-host {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.4);
}

.player-avatar-slot {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.player-lobby-card.is-host .player-avatar-slot {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 16px var(--yellow-glow);
}

.player-name-text {
  display: block;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.player-role-tag {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.player-lobby-card.is-host .player-role-tag {
  color: var(--yellow-bright);
  font-weight: 700;
}

/* Lobby Actions */
.lobby-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.leave-room-btn {
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--danger-bright);
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.35);
  transition: all var(--transition);
}

.leave-room-btn:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: var(--danger);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--danger-glow);
}

.start-game-btn {
  min-height: 54px;
  padding: 16px 36px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 0 35px var(--green-glow);
  transition: all var(--ease-elastic);
}

.start-game-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 0 55px rgba(16, 185, 129, 0.85);
}

.pulse-glow {
  animation: hostLaunchPulse 2s infinite;
}

@keyframes hostLaunchPulse {
  0%, 100% { box-shadow: 0 0 25px rgba(16, 185, 129, 0.4); }
  50%      { box-shadow: 0 0 55px rgba(16, 185, 129, 0.85); }
}

.waiting-for-host-box {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: var(--cyan-bright);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

/* ================================================================
   COUNTDOWN SCREEN (HIGH-TECH ARCADE ARENA STAGE)
   ================================================================ */
.game-countdown-stage {
  position: relative;
  max-width: 580px;
  margin: 30px auto;
  padding: 56px 40px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.85) 0%, rgba(10, 15, 30, 0.95) 100%);
  border: 1px solid var(--line-bright);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 50px rgba(6, 182, 212, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px);
  text-align: center;
  overflow: hidden;
  animation: countdownStageEntry 0.6s var(--ease-elastic) both;
}

@keyframes countdownStageEntry {
  from { opacity: 0; transform: scale(0.92) translateY(24px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.countdown-ambient-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, rgba(139, 92, 246, 0.15) 50%, transparent 75%);
  pointer-events: none;
  filter: blur(40px);
  animation: ambientPulse 3s ease-in-out infinite alternate;
}

@keyframes ambientPulse {
  0%   { transform: translate(-50%, -50%) scale(0.85); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.countdown-game-badge {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  margin-bottom: 34px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.countdown-game-icon {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 0 12px var(--cyan-glow));
}

.countdown-game-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #ffffff 30%, var(--cyan-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.countdown-orbit {
  position: relative;
  z-index: 2;
  width: 200px;
  height: 200px;
  margin: 0 auto 34px;
  display: grid;
  place-items: center;
}

.countdown-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.countdown-ring-outer {
  border: 2px dashed rgba(6, 182, 212, 0.45);
  animation: orbitSpin 14s linear infinite;
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.2);
}

.countdown-ring-inner {
  inset: 12px;
  border: 2px solid rgba(139, 92, 246, 0.35);
  border-top-color: var(--cyan-bright);
  border-bottom-color: var(--accent-light);
  animation: orbitSpinReverse 8s linear infinite;
}

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes orbitSpinReverse {
  from { transform: rotate(360deg); }
  to   { transform: rotate(0deg); }
}

.countdown-number {
  position: relative;
  z-index: 3;
  font-family: var(--font-display);
  font-size: 96px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 40px var(--cyan-glow), 0 0 80px rgba(6, 182, 212, 0.5);
  line-height: 1;
}

.countdown-number.countdown-go {
  font-size: 70px;
  color: var(--green-bright);
  text-shadow: 0 0 50px var(--green-glow), 0 0 90px rgba(16, 185, 129, 0.6);
  animation: countdownGoExplosion 0.5s var(--ease-elastic) both;
}

@keyframes countdownGoExplosion {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.pulse-anim {
  animation: numberTick 0.75s ease-out;
}

@keyframes numberTick {
  0%   { transform: scale(1.6); opacity: 0; filter: blur(8px); }
  40%  { transform: scale(0.95); opacity: 1; filter: blur(0); }
  70%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.countdown-status-card {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-radar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan-bright);
  box-shadow: 0 0 12px var(--cyan-glow);
  animation: radarPulse 1.2s infinite ease-in-out;
}

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

.countdown-sub {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-bright);
  margin: 0;
}


/* ================================================================
   IN-GAME HUD COCKPIT BAR (FUTURISTIC DASHBOARD)
   ================================================================ */
.game-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  margin-bottom: 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.88) 0%, rgba(13, 19, 36, 0.94) 100%);
  border: 1px solid var(--line-bright);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 30px rgba(6, 182, 212, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  gap: 16px;
}

/* Left: Game & Round Capsule */
.hud-left {
  display: flex;
  align-items: center;
  flex: 1;
}

.hud-game-capsule {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 6px 16px 6px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hud-game-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.25));
  border: 1px solid rgba(6, 182, 212, 0.4);
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.3);
  flex-shrink: 0;
}

.hud-round-info {
  display: flex;
  flex-direction: column;
}

.hud-round-label {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
  margin-bottom: 4px;
}

.hud-round-val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.hud-round-slash {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.hud-round-total {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
}

/* Center: Chronometer & Timer Bar */
.hud-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1.2;
}

.hud-timer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 220px;
}

.hud-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.2);
  transition: all 0.3s ease;
}

.hud-timer-badge.panic {
  background: rgba(244, 63, 94, 0.18);
  border-color: var(--danger-bright);
  box-shadow: 0 0 25px var(--danger-glow);
  animation: timerPanicPulse 0.4s infinite alternate;
}

@keyframes timerPanicPulse {
  0%   { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.08); filter: brightness(1.25); }
}

.hud-timer-icon {
  font-size: 14px;
  line-height: 1;
}

.hud-timer-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--cyan-bright);
  letter-spacing: -0.02em;
  line-height: 1;
}

.hud-timer-badge.panic .hud-timer-text {
  color: var(--danger-bright);
}

.hud-timer-unit {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.hud-timer-bar-wrap {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.hud-timer-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--cyan-bright);
  box-shadow: 0 0 12px var(--cyan-glow);
  transition: width 0.08s linear, background 0.3s ease;
}

.hud-mp-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 700;
}

/* Right: Streak & Score Pills */
.hud-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1;
}

.hud-streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(239, 68, 68, 0.22));
  border: 1px solid rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.hud-streak-icon {
  font-size: 16px;
  line-height: 1;
}

.hud-streak-val {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  color: #fbbf24;
}

.hud-score-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 6px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hud-score-label {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
  margin-bottom: 4px;
}

.hud-score-val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  transition: transform 0.2s ease;
}

.score-pop {
  animation: scoreBounce 0.4s var(--ease-elastic);
}

@keyframes scoreBounce {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.4); color: var(--yellow-bright); text-shadow: 0 0 20px var(--yellow-glow); }
  100% { transform: scale(1); }
}


/* ================================================================
   GAMEPLAY ROUND BODY & QUESTION CARD (3D PEDESTAL SHOWCASE)
   ================================================================ */
.game-play-layout {
  position: relative;
  width: 100%;
}

.game-area {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.game-question-card {
  position: relative;
  padding: 44px 36px 36px;
  margin-bottom: 26px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(21, 28, 50, 0.8) 0%, rgba(13, 17, 34, 0.94) 100%);
  border: 1px solid var(--line-bright);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 45px rgba(6, 182, 212, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px);
  animation: cardEntranceDrop 0.5s var(--ease-smooth) both;
  overflow: hidden;
}

@keyframes cardEntranceDrop {
  from { opacity: 0; transform: translateY(-20px) scale(0.96); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* 3D Showcase Pedestal for Item Icon (No more bare/boring emoji!) */
.item-showcase-pedestal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  width: 140px;
  height: 120px;
}

.pedestal-ambient-glow {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, rgba(139, 92, 246, 0.15) 55%, transparent 75%);
  filter: blur(20px);
  pointer-events: none;
}

.pedestal-ring {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) rotateX(68deg);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid rgba(6, 182, 212, 0.5);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.35), inset 0 0 15px rgba(6, 182, 212, 0.2);
  pointer-events: none;
}

.pedestal-icon-box {
  position: relative;
  z-index: 2;
  font-size: 68px;
  line-height: 1;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.6));
  animation: none !important;
  transform: none !important;
  user-select: none;
  display: block;
}

.pedestal-icon-box,
.game-emoji,
.hud-game-icon,
.hud-streak-icon,
.countdown-game-icon {
  animation: none !important;
  transform: none !important;
}

.pedestal-category-badge {
  position: relative;
  z-index: 3;
  margin-top: 10px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--cyan-bright);
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.item-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Digital Price Ticket Showcase */
.price-showcase-ticket {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 32px;
  margin-bottom: 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.08) 0%, rgba(245, 158, 11, 0.12) 100%);
  border: 1px solid rgba(250, 204, 21, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 30px rgba(250, 204, 21, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.price-ticket-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #fbbf24;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.price-display {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  color: #fef08a;
  text-shadow: 0 0 25px rgba(250, 204, 21, 0.5);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.question-prompt-strip {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.question-text {
  color: var(--text-secondary);
  font-size: 17px;
  margin: 0;
}

.question-text strong {
  color: #fff;
  font-weight: 800;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}


/* ================================================================
   DELUXE CHOICE BUTTONS (MAYOR O MENOR HIGH-OCTANE CYBER BUTTONS)
   ================================================================ */
.game-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 620px;
  margin: 0 auto;
}

.choice-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  border: 2px solid;
  cursor: pointer;
  transition: all 0.25s var(--ease-elastic);
  backdrop-filter: blur(16px);
  user-select: none;
  overflow: hidden;
}

/* Higher: Emerald/Cyan Neon Action */
.choice-button.choice-higher {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(6, 78, 59, 0.35) 100%);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(16, 185, 129, 0.15);
}

.choice-button.choice-higher:hover:not(:disabled) {
  border-color: var(--green-bright);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(6, 78, 59, 0.55) 100%);
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 40px var(--green-glow);
}

.choice-button.choice-higher .choice-arrow {
  color: var(--green-bright);
  text-shadow: 0 0 16px var(--green-glow);
}

/* Lower: Rose/Pink Neon Action */
.choice-button.choice-lower {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.14) 0%, rgba(136, 19, 55, 0.35) 100%);
  border-color: rgba(244, 63, 94, 0.45);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(244, 63, 94, 0.15);
}

.choice-button.choice-lower:hover:not(:disabled) {
  border-color: var(--danger-bright);
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.28) 0%, rgba(136, 19, 55, 0.55) 100%);
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 40px var(--danger-glow);
}

.choice-button.choice-lower .choice-arrow {
  color: var(--danger-bright);
  text-shadow: 0 0 16px var(--danger-glow);
}

.choice-arrow {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.choice-button:hover:not(:disabled) .choice-arrow {
  transform: scale(1.2);
}

.choice-label-group {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex: 1;
  margin-left: 14px;
}

.choice-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #fff;
  line-height: 1.1;
}

.choice-subtext {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 3px;
}

.choice-keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.choice-button:active:not(:disabled) {
  transform: translateY(2px) scale(0.98);
}

.choice-button.selected {
  outline: 2px solid #fff;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
}

.choice-button.correct-answer {
  border-color: var(--green-bright) !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.4) 0%, rgba(6, 78, 59, 0.8) 100%) !important;
  box-shadow: 0 0 40px var(--green-glow), 0 0 70px rgba(16, 185, 129, 0.4) !important;
  transform: scale(1.04) !important;
  opacity: 1 !important;
}

.choice-button.wrong-answer {
  border-color: var(--danger-bright) !important;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.35) 0%, rgba(136, 19, 55, 0.75) 100%) !important;
  box-shadow: 0 0 30px var(--danger-glow) !important;
  opacity: 0.85 !important;
}

.choice-button:disabled {
  cursor: default;
}

/* In-Card Real Answer Reveal Badge */
.real-price-revealed {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 14px;
  padding: 10px 22px;
  border-radius: var(--radius);
  animation: revealPop 0.4s var(--ease-elastic) both;
}

@keyframes revealPop {
  0%   { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.real-price-revealed.real-correct {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid var(--green-bright);
  box-shadow: 0 0 25px var(--green-glow);
}

.real-price-revealed.real-wrong {
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid var(--danger-bright);
  box-shadow: 0 0 25px var(--danger-glow);
}

.real-price-revealed .rp-tag {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.9;
  margin-bottom: 2px;
}

.real-price-revealed.real-correct .rp-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  color: var(--green-bright);
  text-shadow: 0 0 20px var(--green-glow);
}

.real-price-revealed.real-wrong .rp-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  color: #fca5a5;
  text-shadow: 0 0 20px var(--danger-glow);
}


/* ================================================================
   ESTIMATION PRECISION TERMINAL
   ================================================================ */
.estimation-pedestal .pedestal-ring {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 22px rgba(139, 92, 246, 0.35);
}

.estimation-unit-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  margin-bottom: 24px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.2);
}

.unit-banner-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

.unit-banner-val {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--cyan-bright);
  text-shadow: 0 0 15px var(--cyan-glow);
}

.estimation-input-area {
  max-width: 520px;
  margin: 0 auto;
}

.estimation-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-lg);
  border: 2px solid var(--line-strong);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.7);
  transition: all 0.25s ease;
  overflow: hidden;
}

.estimation-input-wrapper:focus-within {
  border-color: var(--cyan-bright);
  box-shadow: 0 0 35px rgba(6, 182, 212, 0.35), inset 0 2px 10px rgba(0, 0, 0, 0.7);
}

.estimation-input {
  flex: 1;
  min-width: 0;
  min-height: 68px;
  padding: 0 18px;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 800;
  text-align: center;
  outline: none;
}

.estimation-input::placeholder {
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
  opacity: 0.6;
}

.estimation-unit-badge {
  padding: 10px 18px;
  margin-right: 10px;
  border-radius: var(--radius-sm);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: var(--cyan-bright);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.15);
}

.estimation-input-tip {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 18px;
}

.estimation-input-tip strong {
  color: var(--cyan-bright);
}

.est-submit-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
}

.est-submit-btn .choice-keycap {
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}


/* ================================================================
   MULTIPLAYER SYNC LOCKED BANNER
   ================================================================ */
.answer-locked-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
  padding: 20px 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 78, 59, 0.4));
  border: 1px solid rgba(16, 185, 129, 0.5);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55), 0 0 30px var(--green-glow);
  animation: playerPopIn 0.35s var(--ease-elastic) both;
}

.answer-locked-banner .locked-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 0 22px var(--green-glow);
}

.answer-locked-banner strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  color: #fff;
  margin-bottom: 3px;
}

.answer-locked-banner p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.feedback-mp-stat {
  margin: 14px 0;
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-secondary);
}

.feedback-mp-stat strong {
  color: var(--cyan-bright);
}

/* ---- ROUND RESULT NOTIFICATION (NON-BLOCKING FLOATING HUD TOAST) ---- */
.round-notification-container {
  position: fixed;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 620px;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.round-notification-toast {
  pointer-events: auto;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: roundNotifDrop 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

@keyframes roundNotifDrop {
  0%   { opacity: 0; transform: translateY(-30px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.round-notification-toast.fb-correct {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(6, 78, 59, 0.9));
  border: 1.5px solid rgba(16, 185, 129, 0.75);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px var(--green-glow);
}

.round-notification-toast.fb-wrong {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.28), rgba(80, 10, 10, 0.92));
  border: 1.5px solid rgba(239, 68, 68, 0.75);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(239, 68, 68, 0.4);
}

.rnt-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.fb-correct .rnt-icon {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 0 20px var(--green-glow);
}

.fb-wrong .rnt-icon {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.rnt-body {
  flex: 1;
  min-width: 0;
}

.rnt-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.rnt-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.fb-correct .rnt-title {
  color: #34d399;
  text-shadow: 0 0 16px rgba(52, 211, 153, 0.4);
}

.fb-wrong .rnt-title {
  color: #f87171;
  text-shadow: 0 0 16px rgba(248, 113, 113, 0.4);
}

.rnt-pts {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.rnt-streak {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: var(--yellow-bright);
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid rgba(250, 204, 21, 0.35);
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rnt-expl {
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
  margin: 4px 0 0;
  opacity: 0.95;
}

.rnt-mp {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-block;
}

/* ---- RESULTS & 3D PODIUM ---- */
.results-container {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.results-header {
  padding: 48px 36px;
  margin-bottom: 22px;
  text-align: center;
  border-radius: var(--radius-lg);
}

.results-header h1 {
  font-size: 42px;
  margin-bottom: 10px;
}

.results-header .results-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
}

/* Real 3D Podium Columns */
.results-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 28px;
  perspective: 800px;
}

.podium-item {
  padding: 30px 22px;
  text-align: center;
  min-width: 140px;
  border-radius: var(--radius);
  transition: transform var(--ease-elastic);
  position: relative;
}

.podium-item:nth-child(1) {
  /* 🥇 Winner elevated highest in 3D */
  order: 2;
  transform: translateY(-16px);
  background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.25), var(--surface));
  border: 1px solid var(--line-gold);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 35px var(--yellow-glow);
}

.podium-item:nth-child(2) {
  /* 🥈 Second place */
  order: 1;
  transform: translateY(0);
  background: radial-gradient(circle at 50% 0%, rgba(203, 213, 225, 0.15), var(--surface));
  border: 1px solid rgba(203, 213, 225, 0.35);
}

.podium-item:nth-child(3) {
  /* 🥉 Third place */
  order: 3;
  transform: translateY(10px);
  background: radial-gradient(circle at 50% 0%, rgba(249, 115, 22, 0.15), var(--surface));
  border: 1px solid rgba(249, 115, 22, 0.35);
}

.podium-item:hover {
  transform: translateY(-22px) scale(1.04);
}

.podium-medal {
  font-size: 42px;
  margin-bottom: 10px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
}

.podium-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 4px;
}

.podium-score {
  font-family: var(--font-display);
  color: var(--cyan-bright);
  font-size: 21px;
  font-weight: 900;
}

.results-personal {
  padding: 28px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--accent-light);
  background: var(--accent-soft);
  text-align: center;
  box-shadow: 0 0 35px var(--accent-glow);
}

.results-personal .your-rank {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  color: var(--accent-light);
}

.results-personal .your-score-label {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}

.results-personal .your-score {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
}

.results-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Countdown Screen Pop */
.countdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(5, 6, 15, 0.95);
  backdrop-filter: blur(18px);
}

.countdown-number {
  font-family: var(--font-display);
  font-size: 140px;
  font-weight: 900;
  color: var(--accent-light);
  text-shadow: 0 0 60px var(--accent-glow-high), 0 0 120px var(--cyan-glow);
  animation: countdownPop 0.8s ease;
}

@keyframes countdownPop {
  0%   { transform: scale(2.4); opacity: 0; filter: blur(12px); }
  50%  { transform: scale(1); opacity: 1; filter: blur(0); }
  100% { transform: scale(1); }
}

/* ---- RANKING VIEW (METALLIC TIERS & ACTIVE USER HIGHLIGHT) ---- */
.ranking-tabs {
  display: flex;
  gap: 14px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  transition: all var(--ease-elastic);
}

.tab-btn:hover {
  background: var(--surface-hover);
  border-color: var(--line-strong);
  color: #fff;
  transform: translateY(-2px);
}

.tab-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent-light);
  color: #fff;
  box-shadow: 0 0 25px var(--accent-glow);
}

.ranking-table-header {
  display: grid;
  grid-template-columns: 80px 1fr 140px;
  padding: 14px 22px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

.ranking-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 80px 1fr 140px;
  align-items: center;
  padding: 16px 22px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all var(--ease-smooth);
}

.ranking-row:hover {
  background: var(--surface-hover);
  border-color: var(--line-strong);
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

.ranking-row-current {
  background: var(--accent-soft) !important;
  border-color: var(--accent-light) !important;
  box-shadow: 0 0 30px var(--accent-glow);
}

.rank-gold {
  border-color: rgba(245, 158, 11, 0.45) !important;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.14), transparent) !important;
}

.rank-silver {
  border-color: rgba(148, 163, 184, 0.45) !important;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.1), transparent) !important;
}

.rank-bronze {
  border-color: rgba(217, 119, 6, 0.45) !important;
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.1), transparent) !important;
}

.ranking-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.user-name-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.you-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  background: rgba(6, 182, 212, 0.25);
  border: 1px solid var(--cyan-bright);
  color: var(--cyan-bright);
}

.ranking-score-box {
  text-align: right;
}

.ranking-score {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 900;
  color: var(--cyan-bright);
  letter-spacing: -0.01em;
}

/* ---- PROFILE VIEW (AVATAR VAULT & STAT TILES) ---- */
.profile-header {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 36px;
  margin-bottom: 28px;
  border-radius: var(--radius-lg);
  background: radial-gradient(ellipse at top left, rgba(124, 58, 237, 0.28), var(--surface));
  border: 1px solid var(--line-bright);
  box-shadow: var(--shadow-md);
}

.profile-avatar-large {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.4), rgba(6, 182, 212, 0.4));
  border: 3px solid var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  box-shadow: 0 0 35px var(--accent-glow-high);
  flex-shrink: 0;
}

.profile-main-meta {
  flex: 1;
}

.profile-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.profile-level-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(124, 58, 237, 0.35);
  border: 1px solid var(--accent-light);
  color: #fff;
}

.profile-rank-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: var(--yellow-bright);
}

.profile-username {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.profile-email {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Avatar Vault Grid */
.profile-avatar-picker-card {
  padding: 28px;
  margin-bottom: 28px;
  border-radius: var(--radius);
}

.picker-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}

.picker-header h3 {
  font-size: 19px;
  margin: 2px 0 0;
}

.picker-tip {
  font-size: 13px;
  color: var(--text-secondary);
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 14px;
}

.avatar-option-btn {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease-elastic);
}

.avatar-option-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.15) rotate(-5deg);
}

.avatar-option-btn.selected {
  background: rgba(124, 58, 237, 0.35);
  border: 2px solid var(--accent-light);
  box-shadow: 0 0 24px var(--accent-glow-high);
  transform: scale(1.08);
}

/* XP Progress Bar */
.xp-section {
  padding: 26px 28px;
  margin-bottom: 28px;
  border-radius: var(--radius);
}

.xp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.xp-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

.xp-numbers {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan-bright);
}

.xp-bar {
  width: 100%;
  height: 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: 10px;
}

.xp-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent), var(--cyan-bright));
  box-shadow: 0 0 20px var(--cyan-glow);
  transition: width 0.7s var(--ease-smooth);
}

.xp-footer {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.xp-footer strong {
  color: #fff;
}

/* Profile / Stats Grid */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stat-card {
  padding: 24px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--ease-elastic);
}

.stat-card:hover {
  background: var(--surface-hover);
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  font-size: 28px;
  margin-bottom: 4px;
}

.stat-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ---- STATISTICS VIEW ---- */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  margin: 8px 0;
  overflow: hidden;
}

.stat-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #10b981, #06b6d4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.stats-games-breakdown {
  padding: 32px;
  border-radius: var(--radius-lg);
}

.breakdown-header {
  margin-bottom: 24px;
}

.breakdown-header h3 {
  font-size: 22px;
  margin: 2px 0 0;
}

.game-breakdown-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.game-stat-card {
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: all var(--ease-elastic);
}

.game-stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

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

.gsc-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.gsc-top h4 {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
  color: #fff;
}

.gsc-top p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 2px 0 0;
}

.gsc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: rgba(0, 0, 0, 0.35);
  padding: 16px;
  border-radius: 14px;
}

.gsc-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gsc-lbl {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
}

.gsc-val {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--cyan-bright);
}

/* ---- ACHIEVEMENTS & BADGES ("LOGOS") VIEW ---- */
.achievement-summary {
  padding: 30px 36px;
  border-radius: var(--radius-lg);
  background: radial-gradient(ellipse at top left, rgba(16, 185, 129, 0.22), var(--surface));
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: var(--shadow-md);
}

.summary-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.summary-top h2 {
  font-size: 26px;
  margin: 4px 0 0;
}

.summary-count-badge {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: #fff;
}

.summary-count-badge strong {
  color: var(--green-bright);
}

.summary-count-badge span {
  color: var(--text-secondary);
}

.summary-bar-wrap {
  width: 100%;
  height: 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: 12px;
}

.summary-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #10b981, #06b6d4);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.6);
  transition: width 0.7s var(--ease-smooth);
}

.summary-footer {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.achievement-card {
  padding: 24px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all var(--ease-elastic);
}

.ach-unlocked {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), var(--surface));
  border: 1px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.ach-unlocked:hover {
  border-color: var(--green-bright);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.35);
}

.ach-locked {
  background: var(--surface);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  opacity: 0.65;
}

.ach-locked:hover {
  opacity: 0.92;
  border-color: rgba(255, 255, 255, 0.35);
}

.ach-icon-circle {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.ach-unlocked .ach-icon-circle {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 20px var(--green-glow);
}

.ach-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ach-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ach-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.ach-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.45;
}

.ach-status-badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ach-status-badge.unlocked {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid var(--green-bright);
  color: var(--green-bright);
}

.ach-status-badge.locked {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text-secondary);
}

.ach-reward-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan-bright);
  margin-top: 3px;
}

/* ---- SETTINGS VIEW ---- */
.settings-list {
  overflow: hidden;
  border-radius: var(--radius);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
  transition: background var(--transition);
}

.setting-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-label strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
}

.setting-label span {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 13px;
}

.toggle {
  position: relative;
  width: 52px;
  height: 28px;
  flex: 0 0 52px;
  border-radius: 20px;
  background: var(--line-strong);
  transition: var(--ease-elastic);
  cursor: pointer;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--muted);
  transition: var(--ease-elastic);
}

.toggle.on {
  background: var(--accent-strong);
  box-shadow: 0 0 20px var(--accent-glow);
}

.toggle.on::after {
  left: 27px;
  background: #fff;
}

/* ---- TOAST & MODAL SYSTEM ---- */
.toast-region {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 50;
  display: grid;
  gap: 12px;
}

.toast {
  max-width: 400px;
  padding: 18px 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: rgba(19, 23, 48, 0.96);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(20px);
  animation: toastIn 0.38s var(--ease-elastic) both;
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: var(--shadow-lg), 0 0 25px var(--green-glow);
}

.toast.error {
  border-color: rgba(244, 63, 94, 0.55);
  box-shadow: var(--shadow-lg), 0 0 25px var(--danger-glow);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 5, 12, 0.85);
  backdrop-filter: blur(12px);
  animation: viewEntrance 0.25s ease;
}

.modal {
  width: min(480px, 100%);
  padding: 36px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: var(--shadow-lg);
}

.modal h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.modal p {
  color: var(--text-secondary);
  font-size: 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 28px;
}

.modal-actions button {
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-xs);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.modal-cancel {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}

.modal-confirm {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 0 20px var(--danger-glow);
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  place-content: center;
  gap: 18px;
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--line);
  border-top-color: var(--accent-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 20px var(--accent-glow);
}

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

/* ---- FOOTER ---- */
.footer {
  display: flex;
  justify-content: space-between;
  padding: 26px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.footer b {
  color: var(--accent-light);
}

.footer nav {
  display: flex;
  gap: 22px;
}

.footer button {
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  transition: color var(--transition);
}

.footer button:hover {
  color: var(--text);
}

/* ---- RESPONSIVE BREAKPOINTS ---- */
@media (max-width: 768px) {
  .app-shell { width: min(100% - 24px, 1160px); }
  .hero-section { flex-direction: column; align-items: flex-start; gap: 24px; padding: 28px 0 44px; }
  .game-grid { grid-template-columns: 1fr; }
  .game-mode-grid { grid-template-columns: 1fr; }
  .game-select-card { padding: 22px; }
  .segments-grid { grid-template-columns: repeat(2, 1fr); }
  .home-nav-grid { grid-template-columns: repeat(3, 1fr); }
  .achievement-grid { grid-template-columns: 1fr; }
  .profile-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .game-choices { grid-template-columns: 1fr; }
  .results-podium { flex-direction: column; align-items: center; }
  .podium-item { width: 100%; transform: none !important; }
  .lobby-card { padding: 24px; }
  .code-letters-display { font-size: 30px; padding: 10px 18px; }
  .lobby-footer-actions { flex-direction: column; width: 100%; }
  .leave-room-btn, .start-game-btn, .waiting-for-host-box { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .topbar { height: 72px; }
  .header-username { display: none; }
  .view { padding: 26px 0 64px; }
  h1 { font-size: 36px; }
  .home-nav-grid { grid-template-columns: repeat(2, 1fr); }
  .ranking-row { grid-template-columns: 40px 1fr auto; padding: 14px 16px; }
  .footer { flex-direction: column; gap: 14px; }
  .footer nav { flex-wrap: wrap; gap: 14px; }
  .code-box-main { flex-direction: column; }
  .copy-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
