/* ==========================================================================
   MOBILE & MEDIATEK GPU 60FPS PERFORMANCE OPTIMIZATIONS (v215.0)
   ========================================================================== */
* {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button, .pill-btn, .choice-btn, .numpad-btn, .arcade-category-card, .btn-action, .key-btn, .room-card {
  touch-action: manipulation;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

/* GPU Hardware Layer Promotion for super smooth 60fps rendering on mobile */
.game-card,
.puzzle-container,
.modal-overlay,
.cyber-modal,
.arcade-grid,
.arcade-category-card,
.choice-btn,
.numpad-btn,
.interactive-area {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Contain layout recalculations to individual interactive areas */
.puzzle-left-panel,
.puzzle-right-panel,
.interactive-area,
.arcade-grid {
  contain: layout style paint;
}

/* ==========================================================================
   POLCASCAPE - Mind Escape: 100 Doors Survival
   Design Theme: Real Atmospheric Cyberpunk Escape Room Vault (OVERHAUL v2.1)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;800;900&family=Rajdhani:wght@500;600;700&family=Share+Tech+Mono&family=Outfit:wght@400;600;700&display=swap');

/* ==========================================================================
   1. GLOBAL UTILITIES & STATE VISIBILITY
   ========================================================================== */
.hidden,
.modal-overlay.hidden,
.hint-box.hidden,
.memory-submit-btn.hidden {
  display: none !important;
}

:root {
  --bg-dark: #030611;
  --bg-vault: #0a0f1d;
  --bg-chamber: #0d1527;
  --card-bg: rgba(13, 21, 39, 0.92);
  --card-border: rgba(6, 182, 212, 0.45);
  
  --neon-cyan: #06b6d4;
  --neon-cyan-bright: #00f3ff;
  --neon-cyan-glow: rgba(0, 243, 255, 0.4);
  --electric-violet: #8b5cf6;
  --electric-violet-bright: #a78bfa;
  --electric-violet-glow: rgba(139, 92, 246, 0.45);
  --warning-red: #ef4444;
  --warning-red-glow: rgba(239, 68, 68, 0.5);
  --checkpoint-gold: #f59e0b;
  --emerald-green: #10b981;
  --emerald-green-bright: #34d399;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --font-mono: 'Share Tech Mono', monospace;
  --font-sci-fi: 'Orbitron', sans-serif;
  --font-heading: 'Rajdhani', sans-serif;
  --font-body: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #06b6d4 rgba(10, 17, 32, 0.75);
}

/* ==========================================================================
   GLOBAL FUTURISTIC & CYBERPUNK SCROLLBAR SYSTEM
   ========================================================================== */

/* WebKit & Blink Browsers (Chrome, Edge, Safari, Opera, Brave, Android WebView) */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
  background-color: transparent;
}

::-webkit-scrollbar-track {
  background: rgba(10, 17, 32, 0.75);
  border-radius: 8px;
  border: 1px solid rgba(0, 243, 255, 0.15);
  margin: 3px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00f3ff 0%, #0284c7 100%);
  border-radius: 8px;
  border: 1px solid rgba(0, 243, 255, 0.4);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
  transition: all 0.25s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #38bdf8 0%, #00f3ff 100%);
  box-shadow: 0 0 16px rgba(0, 243, 255, 0.9);
  border-color: #00f3ff;
}

::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.9);
  border-color: #fbbf24;
}

/* Remove default clumsy Windows triangle arrow buttons completely */
::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

.hidden {
  display: none !important;
}

html {
  min-height: 100vh;
  height: auto;
  background-color: #030611 !important;
}

html, body {
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body {
  background-color: #030611 !important;
  background-image: 
    radial-gradient(circle at 50% 10%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(circle at 80% 90%, rgba(6, 182, 212, 0.18), transparent 70%),
    linear-gradient(rgba(3, 6, 17, 0.94), rgba(3, 6, 17, 0.94)) !important;
  color: var(--text-main);
  font-family: var(--font-body);
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Always start from top so header is NEVER clipped off-screen! */
  padding: max(16px, env(safe-area-inset-top)) 10px max(24px, env(safe-area-inset-bottom)) 10px;
  position: relative;
  transition: background 0.5s ease;
  box-sizing: border-box;
}

body.in-arcade-mode {
  background-color: #030611 !important;
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(0, 243, 255, 0.16), transparent 65%),
    radial-gradient(circle at 80% 85%, rgba(139, 92, 246, 0.14), transparent 70%),
    linear-gradient(rgba(3, 6, 17, 0.90), rgba(3, 6, 17, 0.90)) !important;
}

/* Inside Escape Room Vault Interior Background Mode (Main Mission Gameplay) */
body.in-vault-room .spaceship-window-overlay,
body.in-arcade-mode .spaceship-window-overlay {
  display: none !important;
}

body.in-vault-room #space-starfield-canvas {
  opacity: 0.45;
  filter: blur(1px);
}

body.in-arcade-mode #space-starfield-canvas {
  opacity: 1 !important;
  filter: none !important;
}

body.in-vault-room {
  background-color: #040817;
  background-image: 
    radial-gradient(circle at 50% 30%, rgba(0, 243, 255, 0.22), transparent 70%),
    radial-gradient(circle at 50% 85%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(circle at 10% 50%, rgba(6, 182, 212, 0.12), transparent 50%),
    radial-gradient(circle at 90% 50%, rgba(6, 182, 212, 0.12), transparent 50%),
    linear-gradient(rgba(4, 8, 23, 0.82), rgba(4, 8, 23, 0.82)),
    repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(0, 243, 255, 0.04) 35px, rgba(0, 243, 255, 0.04) 36px),
    repeating-linear-gradient(90deg, transparent, transparent 35px, rgba(0, 243, 255, 0.04) 35px, rgba(0, 243, 255, 0.04) 36px);
}

/* Atmospheric CRT Scanline Overlay */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.3) 50%);
  background-size: 100% 4px;
  opacity: 0.35;
  z-index: 999;
}

/* ==========================================================================
   DEEP SPACE CANVAS STARFIELD & SPACESHIP WINDOW OVERLAY
   ========================================================================== */

#space-starfield-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -5;
  pointer-events: none;
}

.spaceship-window-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  border: 12px solid rgba(15, 23, 42, 0.85);
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.9), inset 0 0 50px rgba(0, 243, 255, 0.15);
}

.cockpit-hud-bar {
  position: absolute;
  top: 14px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(56, 189, 248, 0.75);
  letter-spacing: 1.5px;
  border-bottom: 1px solid rgba(0, 243, 255, 0.2);
  padding-bottom: 8px;
}

/* Red Pulsing Space Alert / Hazard Vignette Overlay */
.space-hazard-vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  pointer-events: none;
  border-radius: 0;
  animation: pulseSpaceRedAlert 2.6s infinite ease-in-out;
}

@keyframes pulseSpaceRedAlert {
  0%, 100% {
    opacity: 0.35;
    box-shadow: inset 0 0 80px rgba(239, 68, 68, 0.3), inset 0 0 35px rgba(239, 68, 68, 0.18);
  }
  50% {
    opacity: 0.95;
    box-shadow: inset 0 0 160px rgba(239, 68, 68, 0.65), inset 0 0 70px rgba(239, 68, 68, 0.45);
  }
}

.hud-alert-red-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 12px #ef4444;
  margin-right: 6px;
  animation: pulseRedDot 0.8s infinite alternate ease-in-out;
}

@keyframes pulseRedDot {
  0% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0.3; transform: scale(0.7); }
}

.hud-live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  margin-right: 6px;
  animation: pulseGreenDot 1.5s infinite ease-in-out;
}

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

.cockpit-corner-bracket {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(0, 243, 255, 0.4);
}

.cockpit-corner-bracket.top-left {
  top: 45px; left: 24px;
  border-right: none; border-bottom: none;
}

.cockpit-corner-bracket.top-right {
  top: 45px; right: 24px;
  border-left: none; border-bottom: none;
}

.cockpit-corner-bracket.bottom-left {
  bottom: 24px; left: 24px;
  border-right: none; border-top: none;
}

.cockpit-corner-bracket.bottom-right {
  bottom: 24px; right: 24px;
  border-left: none; border-top: none;
}

.space-window-glass-sheen {
  position: absolute;
  top: 0; right: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

/* ==========================================================================
   2. MAIN MENU SCREEN (LANDING PAGE & LEVEL SELECTOR)
   ========================================================================== */

#app {
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Compact Main Menu Screen (Fits 100% inside Viewport) */
.main-menu-container {
  width: 100%;
  max-width: 650px;
  background: var(--bg-vault);
  border: 1.5px solid var(--card-border);
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px var(--neon-cyan-glow);
  /* backdrop-filter optimized for GPU */
  /* -webkit- backdrop-filter optimized for GPU */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  position: relative;
  overflow: visible;
  box-sizing: border-box;
}

.main-menu-top-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.main-menu-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.menu-badge {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  background: rgba(6, 182, 212, 0.12);
  color: var(--neon-cyan-bright);
  border: 1.5px solid rgba(0, 243, 255, 0.5);
  font-family: var(--font-sci-fi);
  font-weight: 800;
  font-size: 0.75rem;
  border-radius: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.2);
  box-sizing: border-box;
}

.btn-top-leaderboard {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 12px;
  background: rgba(245, 158, 11, 0.15);
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-weight: 800;
  font-size: 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
  transition: all 0.25s ease;
  flex-shrink: 0;
  box-sizing: border-box;
}

.btn-top-leaderboard:hover {
  background: rgba(245, 158, 11, 0.3);
  border-color: #f59e0b;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
}

.btn-settings-top-icon {
  background: rgba(30, 41, 59, 0.85);
  border: 1.5px solid rgba(0, 243, 255, 0.4);
  color: var(--neon-cyan-bright);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s ease;
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.2);
  flex-shrink: 0;
  box-sizing: border-box;
}

.btn-settings-top-icon:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: #00f3ff;
  box-shadow: 0 0 18px rgba(0, 243, 255, 0.5);
  transform: rotate(45deg) scale(1.08);
}

@media (max-width: 480px) {
  .main-menu-top-bar {
    gap: 4px;
  }
  .menu-badge {
    padding: 0 8px;
    height: 32px;
    font-size: 0.65rem;
    letter-spacing: 0.5px;
  }
  .btn-top-leaderboard {
    height: 32px;
    padding: 0 8px;
    font-size: 0.65rem;
    gap: 3px;
  }
  .btn-settings-top-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
}

/* ==========================================================================
   DYNAMIC PLAYER IDENTITY BAR & NICKNAME QUICK SETUP MODAL
   ========================================================================== */
.player-identity-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  max-width: 580px;
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  box-sizing: border-box;
  margin: 2px auto 6px auto;
  border: none;
}

.player-identity-bar.default-name {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.25));
  border: 1.5px solid #f59e0b !important;
  color: #fde68a;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45);
}

.player-identity-bar.default-name:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.7);
  border-color: #fbbf24 !important;
}

.player-identity-bar.custom-name {
  background: rgba(6, 182, 212, 0.12);
  border: 1.5px solid rgba(0, 243, 255, 0.45) !important;
  color: #e2e8f0;
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.2);
}

.player-identity-bar.custom-name:hover {
  background: rgba(6, 182, 212, 0.22);
  border-color: #00f3ff !important;
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(0, 243, 255, 0.45);
}

.player-identity-bar .id-badge-icon {
  font-size: 1.05rem;
  flex-shrink: 0;
}

.player-identity-bar .id-badge-text {
  flex: 1;
  text-align: left;
  letter-spacing: 0.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-identity-bar .id-badge-text strong {
  color: #00f3ff;
}

.player-identity-bar .id-badge-action {
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .player-identity-bar {
    padding: 6px 10px;
    font-size: 0.68rem;
  }
  .player-identity-bar .id-badge-action {
    font-size: 0.62rem;
    padding: 2px 6px;
  }
}

/* Quick Nickname Setup Modal Box */
.quick-nickname-modal-box {
  width: 92%;
  max-width: 440px;
  text-align: center;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1.5px solid #00f3ff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(0, 243, 255, 0.4);
}

.quick-nick-body {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.quick-nick-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 12px #00f3ff);
}

.quick-nick-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.1rem;
  font-weight: 900;
  color: #fde68a;
  letter-spacing: 1px;
  margin: 0;
}

.quick-nick-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
  max-width: 360px;
}

.quick-nick-input-box {
  width: 100%;
  margin-top: 4px;
}

.quick-nick-field {
  width: 100%;
  height: 46px;
  text-align: center;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.05rem;
  font-weight: 800;
  color: #00f3ff;
  background: rgba(4, 8, 23, 0.95);
  border: 2px solid rgba(0, 243, 255, 0.5);
  border-radius: 12px;
  box-shadow: inset 0 0 15px rgba(0, 243, 255, 0.15);
  box-sizing: border-box;
}

.quick-nick-field:focus {
  border-color: #00f3ff;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.5), inset 0 0 15px rgba(0, 243, 255, 0.25);
  outline: none;
}

.quick-nick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

/* Leaderboard Sub-Row Nick Pill */
.lb-hero-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lb-nick-pill-btn {
  background: rgba(0, 243, 255, 0.15);
  border: 1px solid rgba(0, 243, 255, 0.45);
  color: #00f3ff;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lb-nick-pill-btn:hover {
  background: rgba(0, 243, 255, 0.3);
  border-color: #00f3ff;
  transform: scale(1.05);
}

/* ==========================================================================
   MINI GAMES: SEPARATE TOP HEADER & DEDICATED FILTER PANEL CARD
   ========================================================================== */
.arcade-top-header-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Tier 1: Standalone Centered Title Header */
.arcade-title-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2px;
}

.arcade-main-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #00f3ff;
  text-shadow: 0 0 16px rgba(0, 243, 255, 0.6);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.arcade-section-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 1px;
}

/* Tier 2: Feature Action Buttons */
.arcade-feature-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  box-sizing: border-box;
}

.btn-feature-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.btn-battle-action {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.18), rgba(139, 92, 246, 0.18));
  border: 1.5px solid rgba(244, 63, 94, 0.55);
  color: #fda4af;
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.2);
}

.btn-battle-action:hover {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.35), rgba(139, 92, 246, 0.35));
  border-color: #f43f5e;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.5);
}

.btn-rank-action {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(234, 88, 12, 0.18));
  border: 1.5px solid rgba(245, 158, 11, 0.55);
  color: #fde68a;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
}

.btn-rank-action:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(234, 88, 12, 0.35));
  border-color: #f59e0b;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

/* ==========================================================================
   DEDICATED CATEGORY FILTER PANEL CARD (SEPARATE CONTAINER WITH GAP)
   ========================================================================== */
.arcade-filter-panel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 780px;
  margin: 14px auto 16px auto;
  padding: 10px 14px 12px 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(0, 243, 255, 0.25);
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.filter-panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
  box-sizing: border-box;
}

.f-panel-tag {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.68rem;
  font-weight: 800;
  color: #00f3ff;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.f-panel-hint {
  font-size: 0.65rem;
  color: #94a3b8;
  font-style: italic;
}

.arcade-filter-pills-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  width: 100%;
}

.filter-tab-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.2px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 4px 9px;
  border-radius: 16px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  box-sizing: border-box;
  white-space: nowrap;
}

.filter-tab-pill:hover {
  background: rgba(30, 41, 59, 0.95);
  color: #ffffff;
  border-color: rgba(0, 243, 255, 0.5);
  transform: translateY(-1.5px);
  box-shadow: 0 3px 10px rgba(0, 243, 255, 0.25);
}

.filter-tab-pill .f-ico {
  font-size: 0.72rem;
}

.filter-tab-pill .f-count {
  font-size: 0.55rem;
  padding: 0 4px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-weight: 600;
}

/* Active states per category group */
.filter-tab-pill.active {
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.3), rgba(139, 92, 246, 0.3));
  border-color: #00f3ff;
  color: #00f3ff;
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.4);
}

.filter-tab-pill.filter-akademis.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(37, 99, 235, 0.3));
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.filter-tab-pill.filter-wawasan.active {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.3), rgba(16, 185, 129, 0.3));
  border-color: #34d399;
  color: #34d399;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
}

.filter-tab-pill.filter-agama.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(16, 185, 129, 0.3));
  border-color: #10b981;
  color: #6ee7b7;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.filter-tab-pill.filter-hiburan.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(234, 88, 12, 0.3));
  border-color: #f59e0b;
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.filter-tab-pill.filter-fandom.active {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.3), rgba(239, 68, 68, 0.3));
  border-color: #f43f5e;
  color: #fda4af;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.4);
}

.filter-tab-pill.active .f-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Leaderboard SVG Icon Styling */
.select-cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.select-cat-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--cat-color, #00f3ff);
  filter: drop-shadow(0 0 6px var(--cat-color, #00f3ff));
}

.cat-picker-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 6px;
}

.cat-picker-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--cat-color, #00f3ff);
  filter: drop-shadow(0 0 8px var(--cat-color, #00f3ff));
  transition: transform 0.25s ease;
}

.cat-picker-card:hover .cat-picker-icon svg {
  transform: scale(1.2);
}

@media (max-width: 480px) {
  .arcade-top-header-box {
    gap: 8px;
  }
  .arcade-main-title {
    font-size: 1.1rem;
  }
  .arcade-section-title {
    font-size: 0.62rem;
    padding: 2px 6px;
  }
  .arcade-feature-actions-row {
    gap: 8px;
  }
  .btn-feature-action {
    height: 34px;
    padding: 0 8px;
    font-size: 0.68rem;
    gap: 4px;
  }
  .arcade-filter-panel-card {
    margin: 10px auto 12px auto;
    padding: 8px 10px;
    border-radius: 12px;
  }
  .f-panel-tag {
    font-size: 0.62rem;
  }
  .f-panel-hint {
    font-size: 0.58rem;
  }
  .arcade-filter-pills-row {
    gap: 3px;
  }
  .filter-tab-pill {
    padding: 3px 6px;
    font-size: 0.56rem;
    gap: 3px;
    border-radius: 12px;
  }
  .filter-tab-pill .f-ico {
    font-size: 0.65rem;
  }
  .filter-tab-pill .f-count {
    font-size: 0.48rem;
    padding: 0 3px;
  }
}

.menu-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.menu-title {
  font-family: var(--font-sci-fi);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  line-height: 1.25;
  background: linear-gradient(135deg, #ffffff 0%, var(--neon-cyan-bright) 50%, var(--electric-violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
  margin: 0;
}

.menu-subtitle {
  color: var(--text-muted);
  font-size: 0.78rem;
  max-width: 520px;
  line-height: 1.35;
  margin: 0;
}

/* ==========================================================================
   2-BUTTON GRID MODE SELECTOR (MISI UTAMA & MINI GAMES)
   ========================================================================== */
.mode-select-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 580px;
  margin: 10px auto 0 auto;
}

@media (max-width: 560px) {
  .mode-select-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.mode-select-card {
  background: rgba(13, 21, 39, 0.85);
  border: 1.5px solid rgba(0, 243, 255, 0.35);
  border-radius: 16px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  /* backdrop-filter optimized for GPU */
  /* -webkit- backdrop-filter optimized for GPU */
}

.mode-select-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #00f3ff, #8b5cf6);
  opacity: 0.8;
}

.mode-select-card.mode-campaign-card::before {
  background: linear-gradient(90deg, #38bdf8, #2563eb);
}

.mode-select-card.mode-arcade-card::before {
  background: linear-gradient(90deg, #f59e0b, #06b6d4);
}

.mode-select-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: #00f3ff;
  box-shadow: 0 15px 35px rgba(0, 243, 255, 0.25), inset 0 0 20px rgba(0, 243, 255, 0.1);
  background: rgba(15, 23, 42, 0.95);
}

.mode-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.mode-card-icon-frame {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 243, 255, 0.12);
  border: 1px solid rgba(0, 243, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00f3ff;
}

.mode-card-icon-frame svg {
  width: 24px;
  height: 24px;
}

.mode-campaign-card .mode-card-icon-frame {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.mode-arcade-card .mode-card-icon-frame {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.mode-card-badge {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 6px;
}

.badge-campaign {
  background: rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #93c5fd;
}

.badge-arcade {
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fde68a;
}

.mode-card-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.mode-card-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
  margin: 0;
}

.mode-card-tagline {
  font-family: var(--font-heading, 'Rajdhani', sans-serif);
  font-size: 0.85rem;
  font-weight: 700;
  color: #00f3ff;
}

.mode-arcade-card .mode-card-tagline {
  color: #fbbf24;
}

.mode-card-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.35;
  margin: 4px 0 0 0;
}

.mode-card-cta {
  width: 100%;
  height: 38px;
  border-radius: 10px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border: none;
}

.btn-cta-campaign {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-cta-arcade {
  background: linear-gradient(135deg, #0284c7, #00f3ff);
  color: #040711;
  box-shadow: 0 4px 12px rgba(0, 243, 255, 0.4);
}

.mode-select-card:hover .mode-card-cta {
  transform: scale(1.02);
  filter: brightness(1.15);
}

.level-selector-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.level-section-title {
  font-family: var(--font-sci-fi);
  font-size: 0.8rem;
  color: var(--neon-cyan-bright);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.level-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.level-card {
  background: rgba(13, 21, 39, 0.8);
  border: 1.5px solid var(--card-border);
  border-radius: 14px;
  padding: 10px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all 0.25s ease;
  position: relative;
  box-sizing: border-box;
}

.level-card:hover {
  transform: translateY(-3px);
  border-color: var(--neon-cyan-bright);
  box-shadow: 0 8px 20px var(--neon-cyan-glow), inset 0 0 15px rgba(0, 243, 255, 0.15);
  background: rgba(13, 21, 39, 0.95);
}

.level-card.selected {
  border-color: var(--neon-cyan-bright);
  box-shadow: 0 0 20px var(--neon-cyan-glow), inset 0 0 15px rgba(0, 243, 255, 0.25);
  background: rgba(6, 182, 212, 0.15);
}

.level-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.diff-badge-svg {
  width: 36px;
  height: 36px;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 0 6px rgba(0, 243, 255, 0.4));
}

.level-card:hover .diff-badge-svg {
  transform: scale(1.14);
}

.level-card[data-diff="beginner"] .diff-badge-svg {
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.6));
}

.level-card[data-diff="medium"] .diff-badge-svg {
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
}

.level-card[data-diff="expert"] .diff-badge-svg {
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.6));
}

.inline-cyber-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: -2.5px;
  margin-right: 5px;
  flex-shrink: 0;
}

.trophy-icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.checkpoint-icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.level-name {
  font-family: var(--font-sci-fi);
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1px;
}

.level-desc {
  font-size: 0.66rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.level-best-time-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.64rem;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 8px;
  padding: 2px 6px;
  width: 90%;
  margin: 1px 0;
}

.level-checkpoint-info {
  margin-top: 2px;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--checkpoint-gold);
  background: rgba(245, 158, 11, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--checkpoint-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.menu-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

.btn-start-game,
.btn-start-minigames {
  flex: 1;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
}

.btn-start-game {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  border: 2px solid #60a5fa;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.btn-start-game:hover {
  transform: translateY(-2px) scale(1.01);
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}

.btn-start-minigames {
  background: linear-gradient(135deg, #0284c7, #00f3ff);
  border: 2px solid #38bdf8;
  color: #040711;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
}

.btn-start-minigames:hover {
  transform: translateY(-2px) scale(1.01);
  background: linear-gradient(135deg, #00f3ff, #38bdf8);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.8);
}

.btn-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  background: rgba(30, 41, 59, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #e2e8f0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-icon:hover {
  transform: translateY(-3px) rotate(45deg);
  border-color: #00f3ff;
  color: #00f3ff;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
}

/* ==========================================================================
   3. IMMERSIVE VAULT ROOM & CANVASED DOOR FRAME
   ========================================================================== */

.game-wrapper {
  width: 100%;
  max-width: 680px;
  background: var(--bg-vault);
  border: 1.5px solid var(--card-border);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 35px var(--neon-cyan-glow);
  /* backdrop-filter optimized for GPU */
  /* -webkit- backdrop-filter optimized for GPU */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.3s ease;
  margin: 0 auto;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(10, 15, 29, 0.95);
  border-bottom: 1px solid var(--card-border);
  flex-wrap: wrap;
  gap: 8px;
}

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

.btn-menu-back {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-menu-back:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--neon-cyan-bright);
}

.header-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 180px;
}

.room-indicator {
  font-family: var(--font-sci-fi);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.room-count {
  color: var(--neon-cyan-bright);
  font-size: 1.35rem;
  text-shadow: 0 0 12px var(--neon-cyan-glow);
}

.room-total {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.progress-bar-container {
  width: 100%;
  max-width: 180px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-top: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan-bright), var(--electric-violet));
  border-radius: 10px;
  transition: width 0.4s ease-out;
}

.hearts-display {
  display: flex;
  gap: 4px;
  font-size: 1.3rem;
}

.heart {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.heart.active {
  display: inline-block;
  animation: heartPulse 2s infinite ease-in-out;
}

.heart.lost {
  opacity: 0.3;
  filter: grayscale(100%);
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ==========================================================================
   MINI GAMES HUD BAR & STATUS INDICATOR SPACING
   ========================================================================== */
.mini-game-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px;
  width: 100%;
  box-sizing: border-box;
  background: rgba(10, 15, 29, 0.95);
  border-bottom: 1px solid var(--card-border);
}

.mini-game-header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.mini-game-header-hud-row {
  width: 100%;
  display: flex;
  justify-content: center;
}

.mini-game-hud-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: nowrap;
  width: 100%;
}

@media (max-width: 480px) {
  .mini-game-hud-bar {
    gap: 6px;
    justify-content: space-between;
  }
  .mini-game-hud-bar .hud-item {
    font-size: 0.74rem;
    gap: 3px;
  }
  .mini-game-hud-bar .hud-item.hud-timer {
    padding: 2px 6px;
  }
}

.mini-game-hud-bar .hud-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.88rem;
  white-space: nowrap;
}

.mini-game-hud-bar .hud-item.hud-cat {
  color: #ffffff;
  font-weight: 700;
}

.mini-game-hud-bar .hud-item.hud-timer {
  background: rgba(0, 243, 255, 0.12);
  border: 1px solid rgba(0, 243, 255, 0.35);
  border-radius: 8px;
  padding: 3px 10px;
  color: #00f3ff;
  font-weight: 800;
}

.mini-game-hud-bar .hud-item.hud-timer.warning-timer {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  animation: pulse 1s infinite alternate;
}

.mini-game-hud-bar .hud-item.hud-score {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 8px;
  padding: 3px 10px;
  color: #f1f5f9;
}

.mini-game-hud-bar .hud-label {
  color: #94a3b8;
  font-size: 0.76rem;
  margin-right: 2px;
}

.mini-game-hud-bar .hud-value-score {
  color: #00f3ff;
  font-weight: 800;
}

.mini-game-hud-bar .hud-item.hud-streak {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  padding: 3px 10px;
  color: #f59e0b;
}

.mini-game-hud-bar .hud-value-streak {
  color: #f59e0b;
  font-weight: 800;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  font-size: 1.2rem;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--neon-cyan-bright);
}

.main-stage {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-image: 
    linear-gradient(rgba(6, 182, 212, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

.vault-door-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  margin: 0 auto;
}

#door-canvas {
  width: 100%;
  max-width: 620px;
  height: 70px;
  max-height: 75px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.85), 0 0 15px rgba(6, 182, 212, 0.25);
}

.door-status {
  position: absolute;
  bottom: -10px;
  background: #040711;
  border: 1.5px solid var(--card-border);
  padding: 2px 14px;
  border-radius: 16px;
  font-family: var(--font-sci-fi);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.7);
}

.door-status.locked {
  color: var(--warning-red);
  border-color: var(--warning-red-glow);
  animation: lockPulse 2s infinite ease-in-out;
}

@keyframes lockPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.8); }
}

.door-status.unlocked {
  color: var(--emerald-green-bright);
  border-color: var(--emerald-green);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
}

/* Card Utama Control Panel */
.puzzle-container .game-card,
.campaign-card-frame,
.puzzle-card {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(6, 182, 212, 0.08);
  /* backdrop-filter optimized for GPU */
  /* -webkit- backdrop-filter optimized for GPU */
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.puzzle-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-badge {
  font-family: var(--font-sci-fi);
  background: rgba(139, 92, 246, 0.2);
  color: var(--electric-violet-bright);
  border: 1px solid var(--electric-violet);
  padding: 5px 14px;
  border-radius: 12px;
  letter-spacing: 1px;
}

.help-buttons-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-help {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-help.btn-clue {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--checkpoint-gold);
  color: var(--checkpoint-gold);
}

.btn-help.btn-clue:hover {
  background: rgba(245, 158, 11, 0.3);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

.btn-help.btn-book {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--emerald-green-bright);
  color: var(--emerald-green-bright);
}

.btn-help.btn-book:hover {
  background: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

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

.hint-box {
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid var(--checkpoint-gold);
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
}

.hint-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--checkpoint-gold);
  display: block;
  margin-bottom: 4px;
}

.solution-box {
  background: rgba(16, 185, 129, 0.1);
  border-left: 4px solid var(--emerald-green-bright);
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.solution-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--emerald-green-bright);
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.solution-highlight-key {
  display: inline-block;
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid var(--emerald-green-bright);
  color: #34d399;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.puzzle-question-area {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.question-box-panel {
  width: 100%;
}

.puzzle-question-area h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.5;
  color: #ffffff;
  text-align: left;
  width: 100%;
}

/* ==========================================================================
   FORMATTED QUESTION & READING PASSAGE SYSTEM
   ========================================================================== */
.formatted-question-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  text-align: left;
}

.q-topic-tag {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.74rem;
  color: #00f3ff;
  letter-spacing: 0.5px;
  font-weight: 800;
  background: rgba(0, 243, 255, 0.12);
  border: 1px solid rgba(0, 243, 255, 0.35);
  border-radius: 6px;
  padding: 3px 10px;
  width: fit-content;
  margin-bottom: 2px;
}

.q-dataset-card {
  background: rgba(10, 17, 32, 0.9);
  border: 1.5px solid rgba(6, 182, 212, 0.5);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(6, 182, 212, 0.1);
}

.q-dataset-badge {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  color: #f59e0b;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.q-dataset-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.q-dataset-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #f1f5f9;
  background: rgba(30, 41, 59, 0.6);
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 3px solid #00f3ff;
}

.q-dataset-num {
  font-family: var(--font-mono, 'Share Tech Mono', monospace);
  font-weight: 800;
  color: #00f3ff;
  flex-shrink: 0;
}

.q-dataset-val {
  flex: 1;
}

.q-reading-passage {
  background: rgba(15, 23, 42, 0.85);
  border-left: 4px solid #a855f7;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #e2e8f0;
  font-style: italic;
}

.reading-quote-mark {
  color: #c084fc;
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0 2px;
}

.q-premis-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.q-premis-item {
  padding: 6px 10px;
  font-size: 0.9rem;
  color: #f8fafc;
  line-height: 1.5;
  border-left: 3px solid #a855f7;
  background: rgba(30, 41, 59, 0.45);
  border-radius: 4px;
}

.premis-tag {
  color: #c084fc;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.78rem;
  margin-right: 6px;
}

.q-callout-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: rgba(0, 243, 255, 0.1);
  border: 1px solid rgba(0, 243, 255, 0.35);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 4px;
}

.q-callout-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.q-callout-text {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.45;
  text-align: left;
}

.q-callout-label {
  color: #38bdf8;
  margin-right: 4px;
}

.q-paragraph {
  font-size: 1.05rem;
  line-height: 1.55;
  color: #ffffff;
  margin-bottom: 4px;
  text-align: left;
}

/* Spatial Visual SVG Diagram Display Box */
.spatial-diagram-container {
  width: 100%;
  max-width: 380px;
  background: rgba(4, 7, 17, 0.85);
  border: 1.5px solid var(--neon-cyan);
  border-radius: 18px;
  padding: 16px;
  margin: 10px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.15), 0 0 18px rgba(6, 182, 212, 0.25);
  box-sizing: border-box;
}

.spatial-diagram-container.hidden,
.spatial-diagram-container:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  height: 0 !important;
  min-height: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.spatial-diagram-container svg {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   4. CYBERPUNK TERMINAL & SUBMIT BUTTON STYLING
   ========================================================================== */

.cyber-terminal-form {
  background: #030712;
  border: 2px solid var(--neon-cyan-bright);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.2), 0 0 25px rgba(0, 243, 255, 0.25);
  max-width: 460px;
  margin: 0 auto;
  width: 100%;
}

.terminal-header-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(6, 182, 212, 0.3);
  padding-bottom: 8px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--neon-cyan-bright);
  margin-left: 6px;
  letter-spacing: 1px;
}

.terminal-prompt {
  font-family: var(--font-mono);
  color: var(--emerald-green-bright);
  font-size: 0.9rem;
  text-align: left;
  letter-spacing: 1px;
}

.blinking-cursor {
  animation: blink 1s infinite;
  color: var(--neon-cyan-bright);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.cyber-input {
  width: 100%;
  background: #000000;
  border: 1.5px solid var(--neon-cyan-bright);
  color: #00f3ff;
  padding: 14px 18px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 2px;
  outline: none;
  box-shadow: inset 0 0 12px rgba(0, 243, 255, 0.25);
  transition: all 0.2s ease;
}

.cyber-input:focus {
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.7), inset 0 0 15px rgba(0, 243, 255, 0.4);
}

.cyber-unlock-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--electric-violet));
  border: none;
  color: #ffffff;
  font-family: var(--font-sci-fi);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 16px 24px;
  border-radius: 12px;
  cursor: pointer;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.cyber-unlock-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.7);
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
}

/* General & Memory Submit Buttons */
.btn-submit,
.memory-submit-btn {
  background: linear-gradient(135deg, var(--neon-cyan), var(--electric-violet));
  border: none;
  color: #ffffff;
  font-family: var(--font-sci-fi);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 16px 28px;
  border-radius: 14px;
  cursor: pointer;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover,
.memory-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.75);
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
}

.btn-submit:active,
.memory-submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.8);
}

/* Secondary & Danger Settings Buttons */
.btn-secondary {
  background: rgba(6, 182, 212, 0.15);
  border: 1.5px solid var(--neon-cyan-bright);
  color: var(--neon-cyan-bright);
  font-family: var(--font-sci-fi);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-secondary:hover {
  background: rgba(6, 182, 212, 0.3);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1.5px solid var(--warning-red);
  color: var(--warning-red);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

.puzzle-question-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.puzzle-question-area h2 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
  text-align: center;
  margin: 2px 0;
}

/* Numpad Container & Grid */
.numpad-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 4px auto 0 auto;
}

.numpad-display {
  width: 100%;
  max-width: 220px;
  background: #040711;
  border: 1.5px solid var(--neon-cyan-bright);
  color: var(--neon-cyan-bright);
  font-family: var(--font-sci-fi);
  font-size: 1.3rem;
  font-weight: 800;
  text-align: center;
  padding: 6px 12px;
  border-radius: 10px;
  letter-spacing: 3px;
  box-shadow: inset 0 0 10px rgba(6, 182, 212, 0.3), 0 0 12px rgba(0, 243, 255, 0.35);
  outline: none;
}

.numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
}

.btn-numpad {
  background: rgba(13, 21, 39, 0.85);
  border: 1.5px solid var(--neon-cyan-bright);
  color: #ffffff;
  font-family: var(--font-sci-fi);
  font-size: 1.1rem;
  font-weight: 800;
  padding: 8px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-numpad:hover {
  background: rgba(6, 182, 212, 0.3);
  border-color: var(--neon-cyan-bright);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.6), inset 0 0 10px rgba(0, 243, 255, 0.3);
  transform: translateY(-2px);
}

.btn-numpad:active {
  transform: translateY(1px) scale(0.97);
  background: rgba(6, 182, 212, 0.5);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.8);
}

.btn-numpad-c {
  border-color: var(--warning-red);
  color: var(--warning-red);
}

.btn-numpad-c:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #f87171;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

.btn-numpad-ok {
  background: linear-gradient(135deg, var(--neon-cyan), var(--electric-violet));
  border: none;
  color: #ffffff;
}

.btn-numpad-ok:hover {
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.7);
}

/* Multiple Choice Buttons with Neon Glow */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.btn-option {
  background: rgba(13, 21, 39, 0.85);
  border: 1.5px solid rgba(6, 182, 212, 0.4);
  color: #f8fafc;
  padding: 16px 20px;
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.opt-letter {
  background: rgba(6, 182, 212, 0.2);
  color: var(--neon-cyan-bright);
  border: 1px solid var(--neon-cyan-bright);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sci-fi);
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.btn-option:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: var(--neon-cyan-bright);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.45), inset 0 0 10px rgba(0, 243, 255, 0.2);
}

.btn-option:active {
  transform: translateY(1px);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.7);
}

/* Memory Matrix */
.memory-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.memory-status {
  font-family: var(--font-sci-fi);
  font-weight: 700;
  color: var(--checkpoint-gold);
  letter-spacing: 1px;
}

.memory-timer-container {
  width: 100%;
  max-width: 300px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.memory-timer-fill {
  height: 100%;
  background: var(--checkpoint-gold);
}

.memory-grid-matrix {
  display: grid;
  gap: 10px;
  margin: 10px 0;
}

.grid-size-3 { grid-template-columns: repeat(3, 70px); }
.grid-size-4 { grid-template-columns: repeat(4, 60px); }
.grid-size-5 { grid-template-columns: repeat(5, 50px); }

.memory-tile {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid var(--card-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.memory-tile.highlight,
.memory-tile.highlight-cyan {
  background: var(--neon-cyan-bright);
  border-color: #00f3ff;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.95);
  transform: scale(1.05);
}

.memory-tile.highlight-purple {
  background: #a78bfa;
  border-color: #c084fc;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.95);
  transform: scale(1.05);
}

.memory-tile.highlight-yellow {
  background: #f59e0b;
  border-color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.95);
  transform: scale(1.05);
}

.memory-tile.selected {
  background: #34d399;
  border-color: #10b981;
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.85);
}

/* Symbol Cards */
.symbol-card {
  aspect-ratio: 1;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.symbol-card.symbol-revealed {
  background: rgba(6, 182, 212, 0.2);
  border: 2px solid var(--neon-cyan-bright);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

.symbol-card.symbol-hidden {
  background: #0f172a;
  border: 2px solid var(--card-border);
  color: var(--checkpoint-gold);
  font-family: var(--font-sci-fi);
  font-size: 1.1rem;
  font-weight: 800;
}

.symbol-card.symbol-hidden:hover {
  border-color: var(--neon-cyan-bright);
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
}

.symbol-card.selected {
  border-color: #34d399 !important;
  background: rgba(52, 211, 153, 0.3) !important;
  box-shadow: 0 0 25px rgba(52, 211, 153, 0.8) !important;
}

/* Dual 6-Digit Sequence Memory Display */
.memory-sequence-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.code-sequence-display {
  background: #000000;
  border: 1.5px solid var(--neon-cyan-bright);
  padding: 16px 24px;
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 0 15px rgba(0, 243, 255, 0.2);
}

.code-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 1.1rem;
}

.code-tag {
  color: var(--checkpoint-gold);
  font-weight: 700;
  font-size: 0.95rem;
}

.code-digits {
  color: #00f3ff;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 4px;
}

.code-line-hidden {
  font-family: var(--font-sci-fi);
  color: var(--checkpoint-gold);
  font-size: 1rem;
  text-align: center;
  letter-spacing: 2px;
  padding: 12px;
}

/* Footer */
.game-footer {
  padding: 16px 24px;
  background: rgba(10, 15, 29, 0.95);
  border-top: 1px solid var(--card-border);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==========================================================================
   5. FLOATING MODAL OVERLAYS (STRICTLY VIEWPORT FIXED CENTERING)
   ========================================================================== */

.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(3, 6, 17, 0.88) !important;
  /* backdrop-filter optimized for GPU */
  /* -webkit- backdrop-filter optimized for GPU */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 999999 !important;
  padding: 8px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

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

.modal-content {
  background: var(--bg-vault);
  border: 2px solid var(--neon-cyan-bright);
  padding: 30px 24px;
  border-radius: 26px;
  max-width: 480px;
  width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
  margin: auto !important;
  text-align: center;
  box-shadow: 0 25px 75px rgba(0, 0, 0, 0.95), 0 0 45px var(--neon-cyan-glow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Cyberpunk Terminal Typewriter Screen Overlay */
.cyberpunk-terminal-box {
  background: rgba(4, 7, 17, 0.96) !important;
  border: 2px solid var(--neon-cyan-bright) !important;
  box-shadow: 0 0 50px rgba(0, 243, 255, 0.35), inset 0 0 30px rgba(0, 243, 255, 0.08) !important;
  position: relative;
  overflow-y: auto !important;
  max-height: 88vh;
}

.terminal-header-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.9);
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  margin-bottom: 4px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-cyan-bright);
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-left: 6px;
}

.cyber-typewriter-box {
  background: rgba(10, 15, 29, 0.95);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 18px 20px;
  text-align: left;
  font-family: var(--font-mono);
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.6;
  min-height: 140px;
  position: relative;
  cursor: pointer;
}

.typewriter-content {
  white-space: pre-wrap;
  display: inline;
}

.blinking-cursor {
  color: var(--neon-cyan-bright);
  font-weight: bold;
  animation: blinkCursor 0.8s infinite;
  display: inline-block;
  margin-left: 2px;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typewriter-line {
  margin-bottom: 12px;
}

.typewriter-line:last-child {
  margin-bottom: 0;
}

.highlight-alert {
  color: var(--warning-red);
  font-weight: bold;
}

.highlight-crew {
  color: var(--checkpoint-gold);
}

.highlight-task {
  color: var(--emerald-green-bright);
}

.pulse-ready {
  animation: pulseGlowBtn 1.5s infinite;
}

@keyframes pulseGlowBtn {
  0%, 100% { box-shadow: 0 0 15px rgba(0, 243, 255, 0.4); transform: scale(1); }
  50% { box-shadow: 0 0 10px rgba(0, 243, 255, 0.8); transform: scale(1.02); }
}

.modal-title {
  font-family: var(--font-sci-fi);
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 1px;
}

.gold-glow { color: var(--checkpoint-gold); text-shadow: 0 0 15px rgba(245, 158, 11, 0.5); }
.red-glow { color: var(--warning-red); text-shadow: 0 0 15px rgba(239, 68, 68, 0.5); }
.cyan-glow { color: var(--neon-cyan-bright); text-shadow: 0 0 15px var(--neon-cyan-glow); }

.btn-action {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: none;
  font-family: var(--font-sci-fi);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  letter-spacing: 1.5px;
  transition: all 0.2s ease;
}

.btn-gold { background: var(--checkpoint-gold); color: #0f172a; }
.btn-red { background: var(--warning-red); color: #ffffff; }
.btn-cyan { background: var(--neon-cyan-bright); color: #0f172a; }
.btn-slate { background: rgba(255, 255, 255, 0.1); color: var(--text-main); }

.btn-action:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.difficulty-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.btn-diff {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-family: var(--font-sci-fi);
  font-weight: 700;
  cursor: pointer;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.settings-group input[type="range"] {
  width: 100%;
  accent-color: var(--neon-cyan-bright);
}

.divider {
  border: 0;
  height: 1px;
  background: var(--card-border);
}

/* Shake & Red Strobe Animation on Wrong Answer */
.shake-red {
  animation: shakeRedAnim 0.4s ease-in-out;
  border-color: var(--warning-red) !important;
  box-shadow: 0 0 35px var(--warning-red-glow) !important;
}

.strobe-red {
  animation: redFlashAnim 0.5s ease-in-out;
}

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

@keyframes redFlashAnim {
  0%, 100% { box-shadow: 0 25px 75px rgba(0, 0, 0, 0.9), 0 0 45px var(--neon-cyan-glow); }
  50% { box-shadow: inset 0 0 80px rgba(239, 68, 68, 0.8), 0 0 60px rgba(239, 68, 68, 0.9); }
}

/* ==========================================================================
   6. 100% FULLSCREEN MOBILE VIEWPORT FIT (NO-SCROLL ULTIMATE RESPONSIVE)
   ========================================================================== */

html, body {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  margin: 0;
  padding: 0;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

#app {
  width: 100%;
  max-width: 760px;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 70px 16px 36px 16px;
  margin: 0 auto;
  box-sizing: border-box;
}

.level-card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 8px;
}

.level-card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 769px) {
  #app {
    padding: 75px 20px 40px 20px !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .main-menu-container {
    max-width: 680px !important;
    margin: auto 0 !important;
    padding: 22px 24px !important;
    gap: 12px !important;
  }

  .cockpit-hud-bar {
    top: 16px !important;
    left: 30px !important;
    right: 30px !important;
  }
}

@media (max-width: 768px) {
  html, body {
    width: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    position: relative !important;
    align-items: flex-start !important;
  }

  #app {
    padding: max(16px, env(safe-area-inset-top)) 10px max(30px, env(safe-area-inset-bottom)) 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
  }

  .game-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 auto 20px auto !important;
  }

  /* Main Menu Screen Mobile Overhaul */
  .main-menu-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 18px 12px !important;
    gap: 14px !important;
    border-radius: 20px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
  }

  .menu-hero {
    gap: 6px !important;
  }

  .menu-badge {
    font-size: 0.65rem !important;
    padding: 3px 10px !important;
  }

  .menu-title {
    font-size: 1.45rem !important;
    line-height: 1.2 !important;
    letter-spacing: 1px !important;
  }

  .menu-subtitle {
    font-size: 0.8rem !important;
    line-height: 1.35 !important;
    color: #94a3b8 !important;
  }

  .level-selector-section {
    gap: 8px !important;
    width: 100% !important;
  }

  .level-section-title {
    font-size: 0.8rem !important;
    letter-spacing: 1px !important;
  }

  .level-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .level-card {
    padding: 12px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
  }

  .level-card-header-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    gap: 6px !important;
  }

  .level-card-title-group {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .level-icon {
    font-size: 1.3rem !important;
  }

  .level-name {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
  }

  .level-desc {
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    width: 100% !important;
  }

  .level-checkpoint-info {
    position: static !important;
    margin: 0 !important;
    padding: 3px 8px !important;
    font-size: 0.65rem !important;
    flex-shrink: 0 !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
  }

  .menu-actions {
    width: 100% !important;
    margin-top: 10px !important;
    display: flex !important;
    gap: 8px !important;
  }

  .btn-start-game {
    flex: 1 !important;
    padding: 14px 16px !important;
    font-size: 0.95rem !important;
    border-radius: 14px !important;
    letter-spacing: 1px !important;
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4) !important;
  }

  .btn-menu-settings {
    padding: 12px 14px !important;
    border-radius: 14px !important;
  }

  /* Compact Game Header */
  .game-header {
    padding: 10px 12px !important;
    gap: 6px !important;
  }

  .header-left, .header-right {
    gap: 6px !important;
  }

  .room-title {
    font-size: 1rem !important;
  }

  .btn-menu-back, .btn-settings, .btn-help {
    padding: 4px 10px !important;
    font-size: 0.75rem !important;
    border-radius: 10px !important;
  }

  .lives-container {
    gap: 3px !important;
  }

  .heart-icon {
    font-size: 1rem !important;
  }

  /* Compact Vault Door Frame */
  .vault-door-container {
    padding: 8px 12px 0 12px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  #door-canvas {
    height: 70px !important;
    max-height: 75px !important;
    border-radius: 12px !important;
  }

  .door-status {
    position: relative !important;
    bottom: auto !important;
    margin-top: 6px !important;
    padding: 3px 12px !important;
    font-size: 0.68rem !important;
  }

  /* Compact Game Card & Question Area */
  .game-card, .puzzle-card {
    padding: 14px 12px !important;
    gap: 12px !important;
    border-radius: 18px !important;
    margin-top: 4px !important;
  }

  .puzzle-card-header {
    margin-bottom: 2px !important;
  }

  .category-badge {
    font-size: 0.75rem !important;
    padding: 3px 10px !important;
  }

  .puzzle-question-area {
    gap: 10px !important;
  }

  .question-text {
    font-size: 0.95rem !important;
    line-height: 1.45 !important;
  }

  /* 2x2 Grid for Options on Mobile */
  .options-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .option-btn {
    padding: 10px 10px !important;
    font-size: 0.9rem !important;
    border-radius: 12px !important;
    min-height: 42px !important;
  }

  .option-badge {
    width: 22px !important;
    height: 22px !important;
    font-size: 0.78rem !important;
  }

  /* Compact Keypad for Mobile */
  .virtual-keypad {
    gap: 6px !important;
    max-width: 300px !important;
    margin: 0 auto !important;
  }

  .keypad-row {
    gap: 6px !important;
  }

  .key-btn {
    height: 40px !important;
    font-size: 1.2rem !important;
    border-radius: 10px !important;
  }

  .key-btn-clear, .key-btn-submit {
    font-size: 0.85rem !important;
  }

  .display-box {
    padding: 8px 14px !important;
    font-size: 1.35rem !important;
    border-radius: 10px !important;
  }

  /* Compact Cyber Terminal Text Input */
  .cyber-input-wrapper {
    padding: 10px 12px !important;
    gap: 8px !important;
    border-radius: 14px !important;
  }

  .cyber-text-input {
    padding: 8px 12px !important;
    font-size: 1rem !important;
  }

  .btn-submit-text {
    padding: 10px !important;
    font-size: 0.85rem !important;
  }

  /* Compact Symbol Memory Grid */
  .memory-symbol-grid {
    gap: 6px !important;
    max-width: 300px !important;
  }

  .symbol-card {
    height: 54px !important;
    font-size: 1.35rem !important;
    border-radius: 10px !important;
  }

  /* Compact Solution & Clue Box */
  .solution-box, .hint-box {
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
  }

  /* Mobile Backstory & Cyberpunk Terminal Responsive Scaling */
  .modal-content, .backstory-modal {
    padding: 16px 14px !important;
    gap: 10px !important;
    max-height: 88dvh !important;
    width: 95vw !important;
    overflow-y: auto !important;
  }

  .cyberpunk-terminal-box {
    overflow-y: auto !important;
  }

  .modal-title {
    font-size: 1.15rem !important;
    line-height: 1.3 !important;
  }

  .mission-icon {
    font-size: 1.6rem !important;
    margin-bottom: 2px !important;
  }

  .terminal-header-bar {
    padding: 5px 10px !important;
    margin-bottom: 2px !important;
  }

  .terminal-title {
    font-size: 0.62rem !important;
  }

  .cyber-typewriter-box {
    padding: 12px 14px !important;
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
    min-height: auto !important;
  }

  .typewriter-line {
    margin-bottom: 8px !important;
  }

  .btn-action {
    padding: 12px 14px !important;
    font-size: 0.85rem !important;
    border-radius: 12px !important;
  }
}

/* ==========================================================================
   MOBILE SAFARI TOUCH & CLICK COMPATIBILITY FIXES
   ========================================================================== */
button,
input,
.btn-action,
.btn-option,
.btn-numpad,
.btn-submit,
.memory-grid-tile,
.card-level,
.nav-tab,
.btn-hint,
.btn-solution,
.memory-skip-btn,
.cyberpunk-skip-btn {
  -webkit-tap-highlight-color: transparent !important;
  touch-action: manipulation !important;
  cursor: pointer !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 10 !important;
}

/* Prevent container overlays from blocking touch events on small iOS screens */
.game-container,
.main-card,
.modal-content,
.cyberpunk-terminal-box {
  -webkit-overflow-scrolling: touch !important;
}

@media (max-width: 480px) {
  .modal-content, .backstory-modal {
    max-height: 85dvh !important;
    padding-bottom: 24px !important;
  }
  
  .numpad-container {
    padding: 10px 8px !important;
  }
  
  .btn-numpad {
    min-height: 48px !important;
    font-size: 1.2rem !important;
  }

  /* MOBILE SCROLL FIX: main stage and game-wrapper must allow scrolling */
  .game-wrapper {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    max-height: none !important;
    height: auto !important;
  }

  .main-stage {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 20px !important;
  }

  /* MOBILE DUAL SECTION: stack left-right panels vertically on very small screens */
  @media (max-width: 480px) {
    .game-card.holographic-card.dual-section-layout {
      grid-template-columns: 1fr !important;
    }

    .puzzle-right-panel {
      overflow-y: visible !important;
      max-height: none !important;
    }

    .numpad-container {
      max-width: 280px !important;
      margin: 0 auto !important;
    }

    .puzzle-right-panel .numpad-container {
      max-width: 280px !important;
    }
  }
}

/* ==========================================================================
   CINEMATIC SCI-FI VAULT DOOR ROOM TRANSITION OVERLAY
   ========================================================================== */

.game-wrapper {
  position: relative;
}

.vault-cinematic-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

.vault-cinematic-overlay.hidden {
  display: none !important;
}

/* Dual Steel Door Halves with Satin Smooth Cubic-Bezier Easing */
.vault-door-half {
  position: absolute;
  top: 0;
  width: 50.5%;
  height: 100%;
  background: linear-gradient(135deg, #090d16 0%, #1e293b 50%, #040711 100%);
  border: 3px solid #00f3ff;
  box-shadow: inset 0 0 50px rgba(0, 243, 255, 0.4), 0 0 60px rgba(0, 0, 0, 0.95);
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 601;
}

.vault-door-half.door-left {
  left: 0;
  border-right: 4px solid #34d399;
  transform: translateX(-100%);
}

.vault-door-half.door-right {
  right: 0;
  border-left: 4px solid #34d399;
  transform: translateX(100%);
}

/* Door closing state (Doors slam shut smoothly) */
.vault-cinematic-overlay.active-closing .door-left,
.vault-cinematic-overlay.active-closing .door-right {
  transform: translateX(0);
}

/* Door opening state (Doors slide wide open to sides) */
.vault-cinematic-overlay.active-opening .door-left {
  transform: translateX(-100%);
}

.vault-cinematic-overlay.active-opening .door-right {
  transform: translateX(100%);
}

/* Heavy Steel Plate Details */
.steel-plate {
  position: absolute;
  inset: 12px;
  border: 2px dashed rgba(0, 243, 255, 0.35);
  background: repeating-linear-gradient(
    45deg,
    rgba(15, 23, 42, 0.7),
    rgba(15, 23, 42, 0.7) 12px,
    rgba(30, 41, 59, 0.7) 12px,
    rgba(30, 41, 59, 0.7) 24px
  );
  border-radius: 12px;
}

.cyan-neon-strip {
  position: absolute;
  width: 4px;
  height: 80%;
  background: #00f3ff;
  box-shadow: 0 0 20px #00f3ff, 0 0 40px #00f3ff;
}

.hydraulic-piston {
  position: absolute;
  width: 60px;
  height: 12px;
  background: linear-gradient(90deg, #64748b, #94a3b8, #334155);
  border: 1px solid #00f3ff;
  border-radius: 4px;
}

.hydraulic-piston.top-piston { top: 20%; }
.hydraulic-piston.bottom-piston { bottom: 20%; }

/* Center Mechanical Gear & Status Core */
.vault-center-core {
  position: absolute;
  z-index: 602;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.vault-wheel-gear {
  font-size: 4.5rem;
  filter: drop-shadow(0 0 30px #34d399);
  animation: gearSpin 1.2s infinite linear;
}

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

.vault-overlay-status {
  margin-top: 12px;
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid #34d399;
  padding: 10px 28px;
  border-radius: 30px;
  color: #34d399;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 2px;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.6);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   HOLOGRAPHIC SCI-FI QUESTION CARD & MATERIALIZE ANIMATIONS
   ========================================================================== */

.game-card.holographic-card {
  background: rgba(10, 20, 38, 0.8) !important;
  /* backdrop-filter optimized for GPU */
  border: 1.5px solid rgba(0, 243, 255, 0.45) !important;
  box-shadow: 
    0 0 35px rgba(0, 243, 255, 0.25),
    inset 0 0 25px rgba(0, 243, 255, 0.12),
    0 20px 50px rgba(0, 0, 0, 0.85) !important;
  position: relative;
  overflow: hidden;
}

/* Moving Holographic Scanlines Overlay */
.game-card.holographic-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0),
    rgba(255,255,255,0) 50%,
    rgba(0, 243, 255, 0.05) 50%,
    rgba(0, 243, 255, 0.05)
  );
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.7;
}

/* Hologram Corner Brackets */
.hologram-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid #00f3ff;
  pointer-events: none;
  z-index: 5;
  box-shadow: 0 0 10px #00f3ff;
}

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

/* Sweeping Hologram Light Beam */
.hologram-light-beam {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 243, 255, 0.2),
    transparent
  );
  transform: skewX(-25deg);
  pointer-events: none;
  z-index: 2;
  animation: beamSweep 3s infinite ease-in-out;
}

@keyframes beamSweep {
  0% { left: -100%; }
  35% { left: 140%; }
  100% { left: 140%; }
}

/* Hologram Dematerialize Exit Animation */
.hologram-dematerialize {
  opacity: 0 !important;
  transform: scale(0.93) translateY(20px) !important;
  filter: brightness(2.2) blur(8px) contrast(180%) !important;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Hologram Materialize Enter Animation */
.hologram-materialize {
  animation: hologramMaterialize 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes hologramMaterialize {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(18px);
    filter: brightness(2.5) blur(10px) drop-shadow(0 0 25px #00f3ff);
  }
  35% {
    opacity: 0.85;
    filter: brightness(1.6) blur(3px) drop-shadow(0 0 12px #00f3ff);
  }
  75% {
    opacity: 0.95;
    filter: brightness(1.1) blur(0px);
    transform: scale(1.01) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: brightness(1) blur(0);
  }
}

/* ==========================================================================
   ELEGANT 2-COLUMN SIDE-BY-SIDE LANDSCAPE GAMEPLAY LAYOUT & COMPACT MODAL
   ========================================================================== */

#app {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-wrapper {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  border-radius: 20px;
  box-sizing: border-box;
}

.main-stage {
  padding: 10px 14px;
  gap: 10px;
}

#door-canvas {
  height: 55px;
  max-height: 60px;
}

/* 2-Section Side-by-Side Grid Layout */
.game-card.holographic-card.dual-section-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
  align-items: start;
  padding: 14px 18px;
  border-radius: 18px;
  box-sizing: border-box;
  overflow: visible;
}

.puzzle-left-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  justify-content: center;
  width: 100%;
}

.puzzle-left-panel .puzzle-card-header {
  margin-bottom: 2px;
}

/* Question Dark Box Panel Frame */
.question-box-panel {
  background: rgba(3, 7, 18, 0.88);
  border: 1.5px solid rgba(0, 243, 255, 0.35);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: inset 0 0 15px rgba(0, 243, 255, 0.08);
  width: 100%;
  box-sizing: border-box;
}

.question-box-panel h2 {
  font-size: 0.92rem;
  line-height: 1.45;
  color: #f1f5f9;
  margin: 0;
  text-align: left;
}

/* Compact Icon Help Buttons */
.btn-help {
  padding: 4px 10px;
  font-size: 0.78rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
}

.btn-help svg {
  width: 14px;
  height: 14px;
}

/* Typewriter Blinking Cursor */
.blinking-cursor {
  display: inline-block;
  color: #00f3ff;
  font-weight: bold;
  animation: blinkCursor 0.8s infinite;
  margin-left: 2px;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.puzzle-left-panel .puzzle-question-area {
  gap: 6px;
  align-items: flex-start;
}

.puzzle-left-panel .spatial-diagram-container {
  margin: 6px auto;
  width: 100%;
  max-width: 360px;
  max-height: 220px;
  padding: 8px;
  border-radius: 12px;
}

.puzzle-left-panel .spatial-diagram-container svg {
  max-height: 200px;
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
}

.puzzle-right-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 100%;
}

.puzzle-right-panel .interactive-area {
  width: 100%;
}

.puzzle-right-panel .numpad-container {
  margin: 0 auto;
  gap: 6px;
  width: 100%;
  max-width: 220px;
}

.puzzle-right-panel .numpad-display {
  font-size: 1.25rem;
  padding: 5px 10px;
  border-radius: 8px;
}

.puzzle-right-panel .numpad-grid {
  gap: 5px;
  max-width: 220px;
}

.puzzle-right-panel .btn-numpad {
  padding: 8px 0;
  font-size: 1.1rem;
  border-radius: 8px;
}

.puzzle-right-panel .cyber-terminal-form {
  padding: 12px;
  gap: 8px;
}

.puzzle-right-panel .options-grid {
  gap: 8px;
  grid-template-columns: 1fr;
}

.puzzle-right-panel .btn-option {
  padding: 8px 12px;
  font-size: 0.82rem;
}

/* High-Tech Cyberpunk LED Digital Digit Badges (No ASCII Brackets!) */
.code-sequence-panel {
  background: rgba(3, 7, 18, 0.94);
  border: 1.5px solid rgba(0, 243, 255, 0.4);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 0 20px rgba(0, 243, 255, 0.08);
  width: 100%;
  box-sizing: border-box;
  margin: 6px 0;
}

.code-line-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.code-tag-badge {
  font-family: var(--font-sci-fi);
  font-weight: 700;
  font-size: 0.76rem;
  padding: 4px 8px;
  border-radius: 8px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.code-tag-badge.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: var(--neon-cyan-bright);
  border: 1px solid var(--neon-cyan-bright);
}

.code-tag-badge.gold {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid #f59e0b;
}

.digital-digits-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.digital-digit-badge {
  background: #060b19;
  border: 1.5px solid var(--neon-cyan-bright);
  color: #00f3ff;
  font-family: var(--font-sci-fi);
  font-weight: 800;
  font-size: 1.2rem;
  width: 32px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.25);
  text-shadow: 0 0 8px #00f3ff;
}

/* Holographic Glass Card Base for Modals */
.modal-content,
.arcade-results-wrapper {
  background: var(--bg-vault) !important;
  border: 1.5px solid var(--card-border) !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 35px var(--neon-cyan-glow) !important;
  /* backdrop-filter optimized for GPU */
  /* -webkit- backdrop-filter optimized for GPU */
}

/* Sleek 2-Section Landscape Modals & Results Screen (NO SCROLLBARS) */
.modal-content.dual-section-landscape,
.arcade-results-wrapper.dual-section-landscape {
  display: flex !important;
  flex-direction: column !important;
  max-width: 640px !important;
  width: 100% !important;
  padding: 16px 20px !important;
  border-radius: 20px !important;
  max-height: 90vh !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

.terminal-header-bar.full-width-header {
  width: 100%;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid rgba(0, 243, 255, 0.2);
}

.config-modal-body-2panel.dual-section-landscape {
  display: grid !important;
  grid-template-columns: 1fr 1.3fr !important;
  gap: 16px !important;
  align-items: center !important;
  width: 100% !important;
}

.modal-left-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding-right: 12px;
  border-right: 1.5px solid rgba(0, 243, 255, 0.2);
  width: 100%;
}

.modal-right-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  text-align: left;
  width: 100%;
}

/* Universal High-Tech Compact Modals & Backstory Transmission Fix */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.88);
  /* backdrop-filter optimized for GPU */
  /* -webkit- backdrop-filter optimized for GPU */
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.modal-content {
  background: rgba(10, 18, 36, 0.98);
  border: 1.5px solid rgba(0, 243, 255, 0.4);
  border-radius: 20px;
  padding: 20px 24px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow: visible;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(0, 243, 255, 0.3);
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.backstory-modal {
  max-width: 440px !important;
  padding: 18px 22px !important;
  text-align: center !important;
  box-sizing: border-box;
}

.backstory-modal .modal-title {
  font-size: 1.15rem !important;
  margin-bottom: 8px !important;
}

.backstory-modal .mission-icon {
  font-size: 2rem !important;
  margin-bottom: 2px !important;
}

.backstory-modal .story-box {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin-bottom: 12px !important;
  font-size: 0.85rem !important;
  line-height: 1.45 !important;
  color: #cbd5e1;
  max-height: none !important;
  overflow: visible !important;
  text-align: center !important;
}

.backstory-modal .typewriter-line {
  margin-bottom: 6px !important;
}

.backstory-modal .btn-action {
  margin-top: 4px !important;
  padding: 12px 16px !important;
  font-size: 0.85rem !important;
  width: 100% !important;
}

.checkpoint-modal.cyberpunk-terminal-box {
  background: rgba(8, 14, 28, 0.95) !important;
  border: 2px solid #f59e0b !important;
  box-shadow: 
    0 0 50px rgba(245, 158, 11, 0.4),
    0 0 100px rgba(0, 243, 255, 0.2),
    inset 0 0 35px rgba(245, 158, 11, 0.15) !important;
  border-radius: 20px !important;
  padding: 24px 28px !important;
  max-width: 480px !important;
  width: 90% !important;
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Terminal Header Bar */
.terminal-header-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.8);
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  margin-bottom: 18px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-dot.green { background: #10b981; box-shadow: 0 0 8px #10b981; }
.terminal-dot.yellow { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.terminal-dot.cyan { background: #00f3ff; box-shadow: 0 0 8px #00f3ff; }

.terminal-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.75rem;
  color: #38bdf8;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-left: 6px;
}

/* Astronaut Hero Avatar & Holographic Pulsing Rings */
.rescue-hero-container {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rescue-astronaut-badge {
  font-size: 3.5rem;
  z-index: 3;
  filter: drop-shadow(0 0 18px rgba(245, 158, 11, 0.8));
  animation: floatBounce 2.5s infinite ease-in-out;
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.06); }
}

.avatar-glow-ring {
  position: absolute;
  inset: -6px;
  border: 2px dashed #f59e0b;
  border-radius: 50%;
  animation: ringRotate 8s infinite linear;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.avatar-glow-ring.ring-outer {
  inset: -14px;
  border: 2px solid #00f3ff;
  animation: ringRotateReverse 12s infinite linear;
  opacity: 0.6;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

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

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

.rescue-sparkle-stars {
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 1.6rem;
  animation: starPulse 1.5s infinite alternate;
}

@keyframes starPulse {
  0% { transform: scale(0.8) rotate(0deg); opacity: 0.6; }
  100% { transform: scale(1.3) rotate(20deg); opacity: 1; filter: drop-shadow(0 0 12px #f59e0b); }
}

/* Gold Cyber Title Glow */
.modal-title.gold-cyber-glow {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fff, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 25px rgba(245, 158, 11, 0.8);
  letter-spacing: 2px;
  margin-bottom: 10px;
}

/* Story Banner */
.cp-story-banner {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(0, 243, 255, 0.4);
  border-radius: 12px;
  padding: 10px 16px;
  color: #e2e8f0;
  font-size: 0.92rem;
  line-height: 1.4;
  margin-bottom: 20px;
  box-shadow: inset 0 0 15px rgba(0, 243, 255, 0.1);
}

.cp-story-banner strong {
  color: #38bdf8;
}

/* Reward Glassmorphic Cards Stack */
.checkpoint-reward-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.reward-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 10px 16px;
  /* backdrop-filter optimized for GPU */
  text-align: left;
  transition: all 0.3s ease;
}

.reward-card:hover {
  transform: translateX(4px);
  border-color: #00f3ff;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.reward-card.reward-hearts { border-left: 4px solid #ef4444; }
.reward-card.reward-items { border-left: 4px solid #00f3ff; }
.reward-card.reward-save { border-left: 4px solid #10b981; }

.reward-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

.reward-info {
  display: flex;
  flex-direction: column;
}

.reward-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.85rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 1px;
}

.reward-sub {
  font-size: 0.78rem;
  color: #94a3b8;
}

.reward-sub strong {
  color: #34d399;
}

/* Sequential Pop-in Entrance Animations */
.active-celebration .anim-pop-1 {
  animation: rewardPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.15s forwards;
  opacity: 0;
}

.active-celebration .anim-pop-2 {
  animation: rewardPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s forwards;
  opacity: 0;
}

.active-celebration .anim-pop-3 {
  animation: rewardPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.45s forwards;
  opacity: 0;
}

@keyframes rewardPop {
  0% {
    opacity: 0;
    transform: scale(0.85) translateY(15px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Glowing Gold Button with Continuous Pulse Sheen */
.btn-action.glowing-gold-btn {
  width: 100%;
  padding: 14px 20px !important;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  letter-spacing: 1.5px !important;
  background: linear-gradient(135deg, #f59e0b, #d97706, #b45309) !important;
  color: #040711 !important;
  border: 2px solid #fbbf24 !important;
  border-radius: 30px !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.6) !important;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease !important;
}

.btn-action.glowing-gold-btn:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.9) !important;
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706) !important;
}

.pulse-sheen::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  animation: sheenSweep 2.5s infinite ease-in-out;
}

@keyframes sheenSweep {
  0% { left: -100%; }
  40% { left: 140%; }
  100% { left: 140%; }
}

/* ==========================================================================
   MINI GAMES ARCADE MODE STYLES
   ========================================================================== */

.btn-start-minigames {
  padding: 14px 28px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1rem;
  font-weight: 800;
  color: #040711;
  background: linear-gradient(135deg, #00f3ff, #0284c7);
  border: 2px solid #38bdf8;
  border-radius: 30px;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 1px;
}

.btn-start-minigames:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.8);
  background: linear-gradient(135deg, #38bdf8, #00f3ff);
}

.arcade-menu-wrapper {
  max-width: 960px;
  margin: 20px auto;
  padding: 24px 30px;
  background: rgba(10, 17, 32, 0.92);
  border: 1.5px solid rgba(0, 243, 255, 0.35);
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.arcade-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(0, 243, 255, 0.2);
  padding-bottom: 16px;
}

.btn-back-home {
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-back-home:hover {
  color: #fff;
  border-color: #00f3ff;
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.4);
}

/* Sleek Compact Integrated Arcade Top Navigation Bar */
.arcade-header-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 16px;
  background: rgba(10, 15, 29, 0.95);
  border: 1px solid rgba(0, 243, 255, 0.25);
  border-radius: 16px;
  margin-bottom: 14px;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.btn-arcade-nav-back {
  background: rgba(30, 41, 59, 0.8);
  border: 1.5px solid rgba(0, 243, 255, 0.3);
  color: #00f3ff;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-arcade-nav-back:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: #00f3ff;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.arcade-title-compact {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.15rem;
  font-weight: 900;
  color: #f8fafc;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.arcade-pagination-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(0, 243, 255, 0.2);
  padding: 4px 8px;
  border-radius: 12px;
}

.btn-page-compact {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(0, 243, 255, 0.4);
  color: #00f3ff;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-page-compact:hover:not(.disabled) {
  background: #00f3ff;
  color: #040711;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.btn-page-compact.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-badge-compact {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.75rem;
  font-weight: 800;
  color: #f8fafc;
  min-width: 32px;
  text-anchor: middle;
}

.cyber-svg-icon.play-icon {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  color: #040711;
  vertical-align: middle;
}

.arcade-sub {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-top: 4px;
}

.arcade-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.arcade-pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-page-arrow {
  background: rgba(6, 182, 212, 0.15);
  color: #00f3ff;
  border: 1px solid #00f3ff;
  padding: 6px 14px;
  border-radius: 12px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-page-arrow:hover:not(.disabled) {
  background: #00f3ff;
  color: #030617;
  box-shadow: 0 0 14px rgba(0, 243, 255, 0.6);
  transform: translateY(-2px);
}

.btn-page-arrow.disabled {
  opacity: 0.35;
  border-color: rgba(255, 255, 255, 0.2);
  color: #64748b;
  cursor: not-allowed;
}

.page-indicator-badge {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.78rem;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.8);
  padding: 4px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Arcade Config Popup Modal - Pixel Perfect Clean Containment */
.arcade-config-modal {
  max-width: 600px;
  width: 92%;
  max-height: 90vh;
  max-height: 90dvh;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(10, 17, 32, 0.96);
  border: 1.5px solid rgba(0, 243, 255, 0.4);
  box-shadow: 0 25px 75px rgba(0, 0, 0, 0.95), 0 0 40px rgba(0, 243, 255, 0.35);
  box-sizing: border-box;
  margin: auto;
  position: relative;
}

.arcade-config-modal .terminal-header-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(0, 243, 255, 0.2);
}

.arcade-config-modal .modal-body {
  padding: 18px 22px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.config-modal-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.config-modal-cat-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid rgba(0, 243, 255, 0.2);
  width: 100%;
}

.config-modal-badge-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(6, 182, 212, 0.15);
  border: 2px solid var(--cat-color, #00f3ff);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px var(--cat-color, rgba(0, 243, 255, 0.4));
  flex-shrink: 0;
}

.config-modal-badge-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--cat-color, #00f3ff);
}

.modal-cat-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.config-modal-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.5px;
}

.config-modal-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.35;
}

.custom-rules-box,
.utbk-rules-container,
.ski-rules-container,
.sufi-rules-container,
.ling-rules-container,
.marvel-rules-container,
.ts-rules-container,
.mlbb-rules-container {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(0, 243, 255, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #e2e8f0;
}

.custom-rules-box div,
.utbk-rules-container div,
.ski-rules-container div,
.sufi-rules-container div,
.ling-rules-container div,
.marvel-rules-container div,
.ts-rules-container div,
.mlbb-rules-container div {
  margin-bottom: 4px;
}

.custom-rules-box div:last-child,
.utbk-rules-container div:last-child,
.ski-rules-container div:last-child,
.sufi-rules-container div:last-child,
.ling-rules-container div:last-child,
.marvel-rules-container div:last-child,
.ts-rules-container div:last-child,
.mlbb-rules-container div:last-child {
  margin-bottom: 0;
}

.btn-close-modal {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  margin-left: auto;
  transition: all 0.2s ease;
}

.btn-close-modal:hover {
  background: #ef4444;
  color: #fff;
  transform: scale(1.1);
}

.arcade-launch-row {
  margin-top: 4px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.btn-arcade-start {
  width: 100%;
  max-width: 480px;
  padding: 13px 20px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 1px;
  border-radius: 14px;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 1.5px solid #fbbf24;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
  transition: all 0.25s ease;
}

.btn-arcade-start:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.9);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.arc-cat-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.6);
  padding: 6px 10px;
  border-radius: 8px;
}

.arc-cat-stats strong {
  color: #38bdf8;
}

/* Step 2 Panel Styling */
.step-2-placeholder {
  background: rgba(15, 23, 42, 0.6);
  border: 2px dashed rgba(0, 243, 255, 0.3);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.step-2-active-panel {
  background: rgba(15, 23, 42, 0.92);
  border: 2px solid #00f3ff;
  border-radius: 18px;
  padding: 24px;
  margin-top: 10px;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.35);
  animation: fadeInStep2 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.step-2-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 243, 255, 0.2);
}

.step-2-badge {
  background: rgba(0, 243, 255, 0.2);
  color: #00f3ff;
  border: 1px solid #00f3ff;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.step-2-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

/* Config Control Row */
.arcade-config-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.config-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 18px;
  border-radius: 14px;
}

.config-label {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.8rem;
  font-weight: 800;
  color: #f59e0b;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.config-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.pill-btn:hover {
  color: #fff;
  border-color: #00f3ff;
}

.pill-btn.active {
  background: #00f3ff;
  color: #040711;
  border-color: #00f3ff;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
  font-weight: 900;
}

/* Launch Button */
.btn-arcade-start {
  max-width: 400px;
  margin: 0 auto;
  display: block;
}

/* Mini Games Gameplay HUD Bar */
.mini-game-hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 18px;
  background: rgba(10, 17, 32, 0.9);
  border: 1px solid rgba(0, 243, 255, 0.3);
  border-radius: 16px;
  margin-bottom: 14px;
}

.hud-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.9rem;
  font-weight: 800;
  color: #f8fafc;
}

.hud-timer.warning-timer {
  color: #ef4444;
  animation: pulseWarn 0.8s infinite alternate;
}

@keyframes pulseWarn {
  from { transform: scale(1); filter: drop-shadow(0 0 5px #ef4444); }
  to { transform: scale(1.1); filter: drop-shadow(0 0 15px #ef4444); }
}

.hud-streak.active-flame {
  color: #f59e0b;
  text-shadow: 0 0 10px #f59e0b;
}

/* Arcade Results Screen */
.arcade-results-wrapper {
  max-width: 500px;
  margin: 30px auto;
  padding: 30px;
}

.results-hero-box {
  margin-bottom: 20px;
}

.results-rank-badge {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 4.5rem;
  font-weight: 900;
  color: var(--rank-color, #f59e0b);
  text-shadow: 0 0 35px var(--rank-color, #f59e0b);
  margin-bottom: 6px;
}

.results-cat-badge {
  font-size: 1rem;
  color: #38bdf8;
  font-weight: 700;
}

.new-record-banner {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: #040711;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-weight: 900;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
}

.results-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 8px;
}

.stat-num {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.2rem;
  font-weight: 900;
  color: #00f3ff;
}

.stat-label {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 700;
}

.results-actions-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  padding: 12px 20px;
  border-radius: 30px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #fff;
  border-color: #00f3ff;
}

/* Cyberpunk Vector SVG Icon Utilities */
.cyber-svg-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
  transition: transform 0.25s ease;
}

.btn-start-game:hover .cyber-svg-icon,
.btn-start-minigames:hover .cyber-svg-icon,
.btn-back-home:hover .cyber-svg-icon {
  transform: scale(1.18);
}

.cyber-svg-icon.pin-icon {
  width: 15px;
  height: 15px;
  margin-right: 4px;
  color: #00f3ff;
}

/* Comprehensive Mobile Responsive Overhaul (max-width: 768px) */
@media (max-width: 768px) {
  /* Hide top cockpit window bar and HUD overlays on mobile screens so content is never covered */
  .spaceship-window-overlay,
  .space-hazard-vignette,
  .cockpit-hud-bar,
  .cockpit-corner-bracket {
    display: none !important;
  }

  body {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: max(16px, env(safe-area-inset-top)) 8px max(30px, env(safe-area-inset-bottom)) 8px !important;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  #app {
    margin: 0 auto !important;
    padding: 0 0 20px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
  }

  /* Main Menu Mobile Layout */
  .main-menu-container {
    padding: 20px 14px;
    gap: 18px;
    border-radius: 20px;
    width: 100%;
  }

  .menu-title {
    font-size: 1.55rem;
    letter-spacing: 1px;
    line-height: 1.3;
  }

  .menu-subtitle {
    font-size: 0.85rem;
    line-height: 1.45;
  }

  .menu-badge {
    font-size: 0.7rem;
    padding: 4px 12px;
  }

  .level-section-title {
    font-size: 0.85rem;
    text-align: center;
  }

  .level-cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .level-card {
    padding: 12px 14px;
    border-radius: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
  }

  .level-card .level-desc {
    display: none;
  }

  .level-card .level-name {
    font-size: 1rem;
  }

  .level-checkpoint-info {
    font-size: 0.75rem;
    padding: 3px 8px;
    margin-top: 0;
  }

  .menu-actions {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
  }

  .btn-start-game,
  .btn-start-minigames {
    width: 100%;
    height: 48px;
    font-size: 0.85rem;
    border-radius: 16px;
  }

  .btn-icon {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    align-self: center;
  }

  /* Arcade Selection Mobile Layout & Uncovered Header Fix */
  .arcade-menu-wrapper {
    padding: 14px 12px !important;
    border-radius: 20px !important;
    margin: 0 auto !important;
    width: 100% !important;
    overflow: visible !important;
  }

  .arcade-bottom-actions {
    width: 100%;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1.5px solid rgba(0, 243, 255, 0.25);
    display: flex;
    justify-content: center;
  }

  .btn-back-bottom {
    width: 100% !important;
    max-width: 480px !important;
    padding: 12px 18px !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98)) !important;
    border: 1.5px solid var(--neon-cyan-bright) !important;
    color: var(--neon-cyan-bright) !important;
    box-shadow: 0 0 16px rgba(0, 243, 255, 0.35) !important;
    border-radius: 14px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
  }

  .btn-back-bottom:hover {
    background: rgba(6, 182, 212, 0.25) !important;
    border-color: #00f3ff !important;
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.6) !important;
    transform: translateY(-2px) !important;
  }

  .arcade-main-title {
    font-size: 1.25rem;
    text-align: center;
  }

  .arcade-section-header {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .arcade-section-title {
    font-size: 0.85rem;
    text-anchor: middle;
  }

  .arcade-pagination-controls {
    width: 100%;
    justify-content: space-between;
  }

  .btn-page-arrow {
    padding: 6px 12px;
    font-size: 0.75rem;
  }



  /* Gameplay HUD on Mobile */
  .mini-game-hud-bar {
    flex-wrap: wrap;
    gap: 6px;
    justify-content: space-around;
    padding: 6px 10px;
  }

  .hud-item {
    font-size: 0.72rem;
  }

  /* Ultra-Compact Mobile Portrait Rules (Samsung Chrome & iOS Safari Fit) */
  body.in-vault-room .vault-door-container {
    display: none !important;
  }

  .game-card.holographic-card.dual-section-layout {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 8px 10px;
  }

  .puzzle-left-panel {
    gap: 4px;
  }

  .question-box-panel {
    padding: 6px 10px !important;
  }

  .question-box-panel h2 {
    font-size: 0.8rem !important;
    line-height: 1.35 !important;
  }

  .puzzle-left-panel .spatial-diagram-container {
    max-height: 160px !important;
    margin: 4px auto !important;
    padding: 6px !important;
  }

  .puzzle-left-panel .spatial-diagram-container svg {
    max-height: 145px !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
  }

  .puzzle-right-panel .numpad-container {
    max-width: 175px !important;
    gap: 3px !important;
  }

  .puzzle-right-panel .numpad-display {
    font-size: 1rem !important;
    padding: 3px 6px !important;
  }

  .puzzle-right-panel .numpad-grid {
    gap: 3px !important;
  }

  .puzzle-right-panel .btn-numpad {
    padding: 4px 0 !important;
    font-size: 0.95rem !important;
    height: 32px !important;
    border-radius: 6px !important;
  }

  .game-wrapper {
    border-radius: 18px;
    margin: 2px auto;
  }

  .game-header {
    padding: 8px 12px;
  }

  /* Arcade Mobile Grid Fit (No horizontal scrolling!) */
  .arcade-grid.grid-3x2 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    overflow-x: visible !important;
  }

  .arc-cat-card {
    padding: 10px 8px !important;
  }

  /* =========================================================
     RESPONSIVE MOBILE ARCADE CONFIG MODAL (Portrait & Mobile)
     ========================================================= */
  .arcade-config-modal {
    max-width: 95% !important;
    width: 95% !important;
    max-height: 90vh !important;
    max-height: 90dvh !important;
    border-radius: 18px !important;
    margin: auto !important;
  }

  .arcade-config-modal .modal-body {
    padding: 12px 14px 16px 14px !important;
    gap: 10px !important;
    overflow-y: auto !important;
    max-height: calc(90dvh - 46px) !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .config-modal-container {
    gap: 10px !important;
  }

  .config-modal-cat-banner {
    gap: 10px !important;
    padding-bottom: 8px !important;
  }

  .config-modal-badge-icon {
    width: 42px !important;
    height: 42px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
  }

  .config-modal-badge-icon svg {
    width: 22px !important;
    height: 22px !important;
  }

  .config-modal-title {
    font-size: 0.92rem !important;
    line-height: 1.25 !important;
    margin: 0 0 2px 0 !important;
    color: #ffffff !important;
  }

  .config-modal-desc {
    font-size: 0.72rem !important;
    line-height: 1.3 !important;
    color: #94a3b8 !important;
    margin: 0 !important;
  }

  .config-box {
    padding: 10px 12px !important;
    margin-bottom: 2px !important;
    border-radius: 10px !important;
  }

  .config-label {
    font-size: 0.68rem !important;
    margin-bottom: 6px !important;
    letter-spacing: 0.05em !important;
    color: #f59e0b !important;
    font-weight: 700 !important;
  }

  .custom-rules-box,
  .utbk-rules-container,
  .ski-rules-container,
  .sufi-rules-container,
  .ling-rules-container {
    padding: 8px 10px !important;
    font-size: 0.74rem !important;
    line-height: 1.45 !important;
    margin-bottom: 0 !important;
    border-radius: 8px !important;
  }

  .custom-rules-box div,
  .utbk-rules-container div,
  .ski-rules-container div,
  .sufi-rules-container div,
  .ling-rules-container div {
    margin-bottom: 3px !important;
  }

  .config-pills {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .config-pills.utbk-pills {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 5px !important;
  }

  @media (max-width: 480px) {
    .config-pills.utbk-pills {
      grid-template-columns: repeat(2, 1fr) !important;
    }
    .config-pills.utbk-pills button:last-child {
      grid-column: span 2 !important;
    }
  }

  .pill-btn {
    padding: 8px 6px !important;
    font-size: 0.72rem !important;
    border-radius: 8px !important;
    text-align: center !important;
    justify-content: center !important;
    white-space: normal !important;
    line-height: 1.2 !important;
  }

  .arcade-launch-row {
    margin-top: 4px !important;
  }

  .btn-arcade-start {
    width: 100% !important;
    padding: 12px 14px !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    letter-spacing: 0.5px !important;
  }
}

/* ==========================================================================
   URGENT COUNTDOWN TIMER RUSHED ANIMATION (10 Seconds Remaining)
   ========================================================================== */
.hud-timer.warning-timer {
  background: rgba(239, 68, 68, 0.35) !important;
  border-color: #ef4444 !important;
  color: #ff0055 !important;
  animation: pulse-urgent-timer 0.4s infinite alternate !important;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.9) !important;
}

@keyframes pulse-urgent-timer {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
  }
  100% {
    transform: scale(1.14);
    box-shadow: 0 0 10px rgba(255, 0, 85, 1);
  }
}

/* ==========================================================================
   MEMORY GRID MATRIX & TILE COLOR GLOW STYLES
   ========================================================================== */
.memory-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.memory-status {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--neon-cyan-bright);
  text-align: center;
  background: rgba(6, 182, 212, 0.12);
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  width: 100%;
}

/* Phase-based Input Lockout Styles for Memory Engine */
.memory-grid-matrix.phase-hafalan,
.memory-sequence-wrapper.phase-hafalan,
.memory-wrapper.phase-hafalan {
  pointer-events: none !important;
  user-select: none !important;
}

.memory-grid-matrix.phase-input,
.memory-sequence-wrapper.phase-input,
.memory-wrapper.phase-input {
  pointer-events: auto !important;
}

.memory-status.status-hafalan {
  color: #facc15 !important;
  border-color: rgba(250, 204, 21, 0.5) !important;
  background: rgba(250, 204, 21, 0.12) !important;
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.2) !important;
}

.memory-status.status-input {
  color: #22d3ee !important;
  border-color: rgba(34, 211, 238, 0.5) !important;
  background: rgba(34, 211, 238, 0.12) !important;
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.2) !important;
}

.memory-timer-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.memory-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #a855f7);
  border-radius: 8px;
}

.memory-grid-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1 / 1;
  padding: 12px;
  background: rgba(10, 15, 29, 0.95);
  border: 1.5px solid var(--card-border);
  border-radius: 16px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.85);
}

.memory-tile {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.memory-tile:hover {
  border-color: var(--neon-cyan-bright);
  transform: scale(1.04);
}

.memory-tile.selected {
  border-color: #ffffff !important;
  box-shadow: 0 0 16px #ffffff, inset 0 0 10px rgba(255, 255, 255, 0.5) !important;
  transform: scale(0.95);
}

/* VIBRANT HIGH-GLOW COLOR CLASSES FOR ALL MEMORY TILES */
.memory-tile.highlight-cyan {
  background: radial-gradient(circle, #22d3ee 0%, #0891b2 100%) !important;
  border-color: #67e8f9 !important;
  box-shadow: 0 0 20px #22d3ee, inset 0 0 12px #cffaff !important;
}

.memory-tile.highlight-purple {
  background: radial-gradient(circle, #c084fc 0%, #7e22ce 100%) !important;
  border-color: #e9d5ff !important;
  box-shadow: 0 0 20px #c084fc, inset 0 0 12px #f3e8ff !important;
}

.memory-tile.highlight-yellow {
  background: radial-gradient(circle, #facc15 0%, #ca8a04 100%) !important;
  border-color: #fef08a !important;
  box-shadow: 0 0 20px #facc15, inset 0 0 12px #fef9c3 !important;
}

.memory-tile.highlight-red {
  background: radial-gradient(circle, #f87171 0%, #dc2626 100%) !important;
  border-color: #fca5a5 !important;
  box-shadow: 0 0 20px #f87171, inset 0 0 12px #fee2e2 !important;
}

.memory-tile.highlight-green {
  background: radial-gradient(circle, #4ade80 0%, #15803d 100%) !important;
  border-color: #86efac !important;
  box-shadow: 0 0 20px #4ade80, inset 0 0 12px #dcfce7 !important;
}


/* =========================================================
   DAILY CHALLENGE CARD - Premium Gold Style (Card #1)
   ========================================================= */

.daily-challenge-card {
  background: linear-gradient(135deg, rgba(10, 14, 26, 0.95) 0%, rgba(24, 18, 8, 0.95) 100%);
  border: 2px solid rgba(251, 191, 36, 0.6);
  border-radius: 20px;
  padding: 20px 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(251, 191, 36, 0.15), inset 0 1px 0 rgba(251, 191, 36, 0.2);
}

/* Top gold shimmer bar */
.daily-challenge-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #fbbf24 30%, #fef08a 50%, #fbbf24 70%, transparent 100%);
  animation: shimmer-gold 2.5s ease-in-out infinite;
}

/* Floating sparkle particles */
.daily-challenge-card::after {
  content: '✨';
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 1.2rem;
  animation: float-sparkle 2s ease-in-out infinite;
  opacity: 0.8;
}

@keyframes shimmer-gold {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes float-sparkle {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.8; }
  50% { transform: translateY(-4px) rotate(10deg); opacity: 1; }
}

.daily-challenge-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.95);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 35px rgba(251, 191, 36, 0.35);
}

.daily-challenge-card.played {
  opacity: 0.7;
  cursor: default;
  pointer-events: none;
  filter: saturate(0.5);
}

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

.dc-icon-frame {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(251,191,36,0.2) 0%, rgba(245,158,11,0.12) 100%);
  border: 2px solid rgba(251, 191, 36, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.dc-title-block {
  flex: 1;
}

.dc-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #fbbf24;
  text-transform: uppercase;
  margin-bottom: 4px;
  opacity: 0.9;
}

.dc-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.1rem;
  font-weight: 800;
  color: #fef3c7;
  line-height: 1.2;
  margin: 0;
}

.dc-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.dc-meta-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: rgba(254, 243, 199, 0.8);
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 20px;
  padding: 3px 10px;
}

.dc-meta-chip strong {
  color: #fbbf24;
  font-weight: 700;
}

.dc-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dc-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
}

.dc-status-badge.ready {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1c1107;
}

.dc-status-badge.done {
  background: rgba(100, 116, 139, 0.3);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.4);
}

.dc-last-score {
  font-size: 0.72rem;
  color: rgba(254, 243, 199, 0.65);
}

.dc-history-btn {
  background: none;
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
}

.dc-history-btn:hover {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.6);
}

/* Daily Challenge History Modal */
.modal-daily-history {
  max-width: 440px;
  width: 92%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0,0,0,0.95), 0 0 40px rgba(251, 191, 36, 0.3);
  border: 1.5px solid rgba(251, 191, 36, 0.3);
}

.dc-history-header {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, rgba(10, 14, 26, 0.98) 100%);
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dc-history-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1rem;
  font-weight: 800;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dc-history-body {
  padding: 18px 24px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dc-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  transition: background 0.2s;
}

.dc-history-row:hover {
  background: rgba(251, 191, 36, 0.06);
}

.dc-history-date {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}

.dc-history-score {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.95rem;
  font-weight: 800;
  color: #fbbf24;
}

.dc-history-correct {
  font-size: 0.72rem;
  color: #64748b;
}

.dc-history-empty {
  text-align: center;
  color: #475569;
  font-size: 0.85rem;
  padding: 24px;
}

/* Arcade Menu Title & Stats bar for Daily Challenge */
.arcade-dc-section {
  margin-bottom: 4px;
}

.arcade-section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.arcade-section-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 116, 139, 0.4), transparent);
}

.arcade-section-divider-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #64748b;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Floating -3 DETIK Time Penalty Toast Animation */
.time-penalty-toast-pop {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #ffffff;
  border: 2px solid #fca5a5;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.85), inset 0 0 12px rgba(255, 255, 255, 0.4);
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.35rem;
  font-weight: 900;
  padding: 10px 22px;
  border-radius: 30px;
  z-index: 99999;
  pointer-events: none;
  animation: penaltyPopFade 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes penaltyPopFade {
  0% {
    opacity: 0;
    transform: translate(-50%, -20%) scale(0.6);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
  }
  35% {
    transform: translate(-50%, -50%) scale(1);
  }
  75% {
    opacity: 1;
    transform: translate(-50%, -60%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -85%) scale(0.75);
  }
}

/* =========================================================
   CYBERPUNK HIGH-TECH MODAL DIALOGS (Replaces Native Popups)
   ========================================================= */

.cyber-dialog-overlay {
  z-index: 9999999 !important; /* Always on top of Settings modal (999999) & all other overlays */
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: rgba(3, 7, 18, 0.92) !important;
  /* backdrop-filter optimized for GPU */
  /* -webkit- backdrop-filter optimized for GPU */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
}

.cyber-dialog-box {
  max-width: 440px !important;
  width: 95% !important;
  background: rgba(10, 15, 29, 0.98) !important;
  border: 1.5px solid var(--accent-color, #00f3ff) !important;
  border-radius: 20px !important;
  padding: 22px 24px !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.95), 0 0 35px var(--accent-color, rgba(0, 243, 255, 0.3)) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  animation: cyberModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cyberModalPop {
  0% { opacity: 0; transform: scale(0.85) translateY(15px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.cyber-dialog-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}

.cyber-dialog-icon {
  font-size: 1.5rem;
}

.cyber-dialog-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.cyber-dialog-body {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.cyber-dialog-msg {
  margin: 0;
}

.cyber-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}

.cyber-dialog-actions.dual {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
}

.btn-cyber-action {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  border: none;
}

.btn-cyber-action.primary {
  background: var(--btn-accent, #00f3ff);
  color: #040817;
  box-shadow: 0 0 16px var(--btn-accent, rgba(0, 243, 255, 0.4));
}

.btn-cyber-action.primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.btn-cyber-action.secondary {
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-cyber-action.secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #ffffff;
}









/* ==========================================================================
   MEMORY PUZZLE 3x3 GRID & CODE SEQUENCE LAYOUT ENHANCEMENTS
   ========================================================================== */

.memory-wrapper {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}

.memory-grid-matrix {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 290px;
  margin: 0 auto;
  box-sizing: border-box;
  justify-content: center;
}

.memory-grid-matrix.grid-size-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.memory-grid-matrix.grid-size-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.symbol-card {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(6, 11, 25, 0.95);
  border: 1.5px solid var(--neon-cyan-bright);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: inset 0 0 10px rgba(0, 243, 255, 0.1);
  box-sizing: border-box;
  overflow: hidden;
}

.symbol-icon {
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.symbol-card:hover {
  transform: scale(1.04);
  border-color: #34d399;
  box-shadow: 0 0 15px rgba(52, 211, 153, 0.4);
}

.symbol-card.selected {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.2);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

.symbol-card.symbol-hidden {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(0, 243, 255, 0.35);
}

.symbol-number {
  font-family: var(--font-sci-fi);
  font-size: 0.85rem;
  font-weight: 700;
  color: #00f3ff;
}

.code-sequence-panel {
  background: rgba(3, 7, 18, 0.94);
  border: 1.5px solid rgba(0, 243, 255, 0.4);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: inset 0 0 20px rgba(0, 243, 255, 0.08);
  width: 100%;
  max-width: 280px;
  box-sizing: border-box;
  margin: 6px auto;
}

.code-line-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.digital-digits-row {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap;
}

.digital-digit-badge {
  background: #060b19;
  border: 1.5px solid var(--neon-cyan-bright);
  color: #00f3ff;
  font-family: var(--font-sci-fi);
  font-weight: 800;
  font-size: 1.1rem;
  width: 30px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.25);
  text-shadow: 0 0 8px #00f3ff;
}


/* ==========================================================================
   BULLETPROOF BACK BUTTON CLICKABILITY & Z-INDEX FIX
   ========================================================================== */

.btn-menu-back,
.btn-back-home,
#btn-back-menu,
#btn-arcade-hud-back,
#btn-arcade-back {
  position: relative !important;
  z-index: 1000 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}


/* ==========================================================================
   SPEEDRUN TIMER & BEST TIME HUD STYLES
   ========================================================================== */
.story-timer-hud {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(0, 243, 255, 0.4);
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.25);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: var(--font-sci-fi, Orbitron, sans-serif);
  font-size: 0.88rem;
}

.hud-timer-icon {
  font-size: 1.1rem;
  animation: timerPulse 2s infinite ease-in-out;
}

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

.hud-timer-val {
  color: #00f3ff;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.6);
}

.hud-best-val {
  color: #f59e0b;
  font-size: 0.78rem;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.level-best-time {
  font-size: 0.8rem;
  color: #f59e0b;
  font-weight: 600;
  margin-top: 4px;
  font-family: var(--font-sci-fi, Orbitron, sans-serif);
}

/* Victory Time Container */
.victory-time-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
  width: 100%;
}

.victory-time-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(0, 243, 255, 0.35);
  padding: 10px 16px;
  border-radius: 8px;
}

.victory-time-card.main-time {
  border-color: #00f3ff;
  box-shadow: 0 0 16px rgba(0, 243, 255, 0.3);
}

.victory-time-card .v-lbl {
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 600;
}

.victory-time-card .v-val {
  color: #00f3ff;
  font-family: Orbitron, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}

.new-record-badge.pulsing-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-family: Orbitron, sans-serif;
  font-weight: 900;
  text-align: center;
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.7);
  animation: goldPulse 1.5s infinite alternate;
  letter-spacing: 1px;
}

@keyframes goldPulse {
  0% { transform: scale(0.98); box-shadow: 0 0 15px rgba(245, 158, 11, 0.6); }
  100% { transform: scale(1.03); box-shadow: 0 0 10px rgba(245, 158, 11, 0.9); }
}


/* Level Best Time Badge on Main Menu Cards */
.level-best-time-badge {
  font-family: var(--font-sci-fi, Orbitron, sans-serif);
  font-size: 0.82rem;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 4px 10px;
  border-radius: 6px;
  margin: 6px 0;
  display: inline-block;
  letter-spacing: 0.3px;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

/* High-Visibility Speedrun Timer HUD */
.story-timer-hud {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(15, 23, 42, 0.88) !important;
  border: 1.5px solid #00f3ff !important;
  box-shadow: 0 0 14px rgba(0, 243, 255, 0.4) !important;
  border-radius: 8px !important;
  padding: 6px 14px !important;
  font-family: var(--font-sci-fi, Orbitron, sans-serif) !important;
  margin-right: 8px !important;
}

.hud-timer-val {
  color: #00f3ff !important;
  font-weight: 800 !important;
  font-size: 1.05rem !important;
  letter-spacing: 1px !important;
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.8) !important;
}

.hud-best-val {
  color: #f59e0b !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  padding-left: 8px !important;
  border-left: 1.5px solid rgba(255, 255, 255, 0.25) !important;
}


/* PWA & Shareable Victory Card Styles */
.btn-share-card {
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.2), rgba(168, 85, 247, 0.3)) !important;
  border: 1.5px solid #00f3ff !important;
  color: #ffffff !important;
  font-family: var(--font-sci-fi, Orbitron, sans-serif) !important;
  font-weight: 700 !important;
  box-shadow: 0 0 16px rgba(0, 243, 255, 0.4) !important;
}

.btn-share-card:hover {
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.4), rgba(168, 85, 247, 0.5)) !important;
  box-shadow: 0 0 24px rgba(0, 243, 255, 0.8) !important;
}

.share-card-modal-box {
  max-width: 520px !important;
  width: 92% !important;
  padding: 0 !important;
  background: rgba(3, 6, 17, 0.96) !important;
  border: 1.5px solid #00f3ff !important;
  box-shadow: 0 0 40px rgba(0, 243, 255, 0.5) !important;
}

.share-card-content {
  padding: 20px;
}

.cyber-trophy-card {
  position: relative;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(3, 6, 17, 0.98));
  border: 1.5px solid rgba(0, 243, 255, 0.6);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 243, 255, 0.15);
  margin-bottom: 20px;
}

.card-bg-glow {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--rank-color, #00f3ff) 0%, transparent 70%);
  opacity: 0.25;
  filter: blur(40px);
  pointer-events: none;
}

.card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.card-brand-badge {
  color: #00f3ff;
  font-family: var(--font-sci-fi, Orbitron, sans-serif);
  font-weight: bold;
}

.card-main-hero {
  margin-bottom: 20px;
}

.card-trophy-icon {
  font-size: 3.5rem;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.8));
}

.card-rank-title {
  font-family: var(--font-sci-fi, Orbitron, sans-serif);
  font-size: 2rem;
  font-weight: 900;
  margin: 0;
  letter-spacing: 1px;
  text-shadow: 0 0 16px rgba(0, 243, 255, 0.6);
}

.card-sub-badge {
  font-size: 0.85rem;
  color: #cbd5e1;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.card-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.c-stat-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(0, 243, 255, 0.25);
  border-radius: 10px;
  padding: 10px;
}

.c-stat-lbl {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-bottom: 4px;
}

.c-stat-val {
  font-family: var(--font-sci-fi, Orbitron, sans-serif);
  font-size: 1.1rem;
  font-weight: bold;
}

.card-footer-branding {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0, 243, 255, 0.05);
  border: 1px dashed rgba(0, 243, 255, 0.3);
  border-radius: 10px;
  padding: 10px;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.c-qr-placeholder {
  font-size: 1.6rem;
}

.c-watermark-text strong {
  color: #00f3ff;
}

.share-card-actions {
  display: flex;
  gap: 12px;
}


/* =========================================================================
   BATTLE SHARE CARD - Head-to-Head Layout
   ========================================================================= */
.battle-share-card .card-stats-grid { display: none; }

.battle-h2h-card {
  background: rgba(10, 15, 29, 0.85);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  overflow: hidden;
  margin: 8px 0;
}

.h2h-card-header {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: center;
  padding: 10px 12px;
  background: rgba(0, 243, 255, 0.07);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 6px;
}

.h2h-card-name {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.h2h-card-name.you { color: #34d399; text-align: left; }
.h2h-card-name.opp { color: #f87171; text-align: right; }
.h2h-you-tag {
  display: inline-block;
  background: #34d399;
  color: #040711;
  font-size: 0.5rem;
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 3px;
  vertical-align: middle;
}
.h2h-card-vs {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.72rem;
  font-weight: 900;
  color: #f59e0b;
  text-align: center;
}

.h2h-card-row {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  gap: 4px;
}
.h2h-card-row:last-child { border-bottom: none; }

.h2h-card-val {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.8rem;
  font-weight: 800;
  color: #94a3b8;
  text-align: center;
}
.h2h-card-val:first-child { text-align: left; }
.h2h-card-val:last-child { text-align: right; }
.h2h-winner-val {
  color: #fde68a;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.h2h-card-metric {
  font-size: 0.6rem;
  font-weight: 700;
  color: #64748b;
  text-align: center;
  letter-spacing: 0.3px;
}
/* ============================================================
   ARCADE GRID — SCI-FI HUD FRAMES & PAGINATED CARDS
   ============================================================ */

/* ── Category Color Custom Properties ───────────────────────── */
.category-verbal { --category-color: #34d399; }
.category-linguistik { --category-color: #06b6d4; }
.category-logika_formal { --category-color: #8b5cf6; }
.category-matematika { --category-color: #f59e0b; }
.category-pola { --category-color: #00f3ff; }
.category-kriptografi { --category-color: #00f3ff; }
.category-spasial { --category-color: #38bdf8; }
.category-memori { --category-color: #a78bfa; }
.category-paradoks { --category-color: #a78bfa; }
.category-utbk { --category-color: #38bdf8; }
.category-geografi { --category-color: #ec4899; }
.category-inggris { --category-color: #60a5fa; }
.category-trivia { --category-color: #38bdf8; }
.category-sejarah_indo { --category-color: #ef4444; }
.category-sejarah_dunia { --category-color: #fbbf24; }
.category-sejarah_islam { --category-color: #10b981; }
.category-tasawuf { --category-color: #a855f7; }
.category-movie_global { --category-color: #f59e0b; }
.category-marvel_trivia { --category-color: #ef4444; }
.category-disney_trivia { --category-color: #f472b6; }
.category-kpop_trivia { --category-color: #f9a8d4; }
.category-musik_global { --category-color: #60a5fa; }
.category-taylor_swift { --category-color: #f43f5e; }
.category-movie_indo { --category-color: #ec4899; }
.category-musik_indo { --category-color: #34d399; }
.category-daily { --category-color: #f59e0b; }

/* ── Main Outer Wrapper: Glassmorphism Hologram Panel ───────── */
body.in-arcade-mode #app,
#app:has(.arcade-menu-wrapper),
#app:has(.arcade-grid) {
  max-width: 1040px !important;
  width: 94vw !important;
  padding: 10px 6px !important;
  margin: 0 auto !important;
}

.arcade-menu-wrapper,
.arcade-menu-wrapper.hologram-panel {
  position: relative !important;
  width: 100% !important;
  max-width: 1020px !important;
  margin: 0 auto !important;
  min-height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  background: rgba(3, 8, 20, 0.08) !important; /* Ultra-transparent floating hologram */
  /* backdrop-filter optimized for GPU */
  /* -webkit- backdrop-filter optimized for GPU */
  border: 1px solid rgba(0, 243, 255, 0.25) !important;
  box-shadow:
    inset 0 0 25px rgba(0, 243, 255, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.25),
    0 0 20px rgba(0, 243, 255, 0.1) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  animation: panel-holo-flicker 10s ease-in-out infinite;
}

@keyframes panel-holo-flicker {
  0%, 100% { opacity: 1; }
  49% { opacity: 1; }
  50% { opacity: 0.96; }
  51% { opacity: 1; }
  85% { opacity: 0.98; }
  86% { opacity: 1; }
}

/* ── Panel Corner Brackets "⌐" Style ───────────────────────── */
.panel-bracket {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: #00f3ff;
  border-style: solid;
  pointer-events: none;
  z-index: 10;
  filter: drop-shadow(0 0 6px #00f3ff);
}
.panel-bracket-tl { top: 2px; left: 2px; border-width: 2px 0 0 2px; }
.panel-bracket-tr { top: 2px; right: 2px; border-width: 2px 2px 0 0; }
.panel-bracket-bl { bottom: 2px; left: 2px; border-width: 0 0 2px 2px; }
.panel-bracket-br { bottom: 2px; right: 2px; border-width: 0 2px 2px 0; }

/* ── Subtle Hologram Scanlines (Removed dark overlay) ──────── */
.panel-scanlines {
  display: none !important;
}

/* ── Header ─────────────────────────────────────────────────── */
.arcade-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 8px;
  border-bottom: 1px solid rgba(0, 243, 255, 0.12);
  background: rgba(0, 243, 255, 0.03) !important;
  flex-shrink: 0;
  z-index: 2;
}

.arcade-title-box { flex: 1; }

.arcade-main-title {
  font-family: var(--font-sci-fi, Orbitron, sans-serif);
  font-size: clamp(0.84rem, 2vw, 1.1rem);
  font-weight: 700;
  color: #00f3ff;
  letter-spacing: 0.08em;
  text-shadow: 0 0 14px rgba(0, 243, 255, 0.5);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Categories Section ─────────────────────────────────────── */
.arcade-categories-section {
  position: relative;
  flex: 1;
  padding: 10px 14px 8px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 243, 255, 0.2) transparent;
  z-index: 2;
}

.arcade-categories-section::-webkit-scrollbar { width: 4px; }
.arcade-categories-section::-webkit-scrollbar-thumb {
  background: rgba(0, 243, 255, 0.25);
  border-radius: 4px;
}

/* ── Grid Wrapper & Grid Container (3x2 Desktop, 2x3 Mobile) ── */
.games-grid-wrapper {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 1000px !important;
  margin: 0 auto !important;
  padding: 2px 2px !important;
  box-sizing: border-box !important;
}

.games-grid,
.arcade-grid,
#arcade-grid-container {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  grid-auto-rows: min-content !important;
  row-gap: 16px !important;
  column-gap: 18px !important;
  gap: 16px 18px !important;
  width: 100% !important;
  max-width: 1060px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  transition: opacity 0.15s ease;
}

@media (max-width: 960px) {
  .games-grid,
  .arcade-grid,
  #arcade-grid-container {
    grid-template-columns: repeat(2, 1fr) !important;
    row-gap: 14px !important;
    column-gap: 14px !important;
    gap: 14px !important;
  }
}

@media (max-width: 680px) {
  body.in-arcade-mode #app,
  #app:has(.arcade-menu-wrapper),
  #app:has(.arcade-grid) {
    max-width: 100% !important;
    width: 100% !important;
    padding: 8px 6px !important;
  }
  .arcade-menu-wrapper.hologram-panel {
    border-radius: 0 !important;
  }
  .arcade-categories-section {
    padding: 8px 4px 12px !important;
  }
  .games-grid-wrapper {
    padding: 0 !important;
  }
  /* Single-column full-width landscape cards on mobile to eliminate all text truncation */
  .games-grid,
  .arcade-grid,
  #arcade-grid-container {
    grid-template-columns: 1fr !important;
    row-gap: 10px !important;
    column-gap: 0 !important;
    gap: 10px !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   1. SCI-FI HUD FOLDER CARD (COMPACT SLEEK PROPORTIONS)
───────────────────────────────────────────────────────────── */
.arcade-grid .game-card,
.games-grid .game-card,
.arc-cat-card,
.arc-hud-card {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 1.5px !important; /* Continuous 1.5px glowing neon border */
  aspect-ratio: 16 / 7.6 !important;
  min-height: 106px !important;
  max-height: 122px !important;
  background: linear-gradient(135deg, var(--category-color, #00f3ff) 0%, rgba(0, 243, 255, 0.4) 40%, var(--category-color, #00f3ff) 100%) !important;
  /* Exact silhouette of Image 3: Left tab (y=6px) + diagonal step up to main top (y=0) + chamfers */
  clip-path: polygon(
    0 16px,
    12px 6px,
    calc(30% - 8px) 6px,
    30% 0px,
    calc(100% - 18px) 0px,
    100% 18px,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    12px 100%,
    0 calc(100% - 12px)
  ) !important;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--category-color, #00f3ff) 40%, transparent)) !important;
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease !important;
  user-select: none !important;
  overflow: hidden !important;
}

@media (max-width: 680px) {
  .arcade-grid .game-card,
  .games-grid .game-card,
  .arc-cat-card,
  .arc-hud-card {
    aspect-ratio: auto !important;
    min-height: 98px !important;
    max-height: none !important;
    clip-path: polygon(
      0 14px,
      10px 5px,
      calc(32% - 6px) 5px,
      32% 0px,
      calc(100% - 16px) 0px,
      100% 16px,
      100% calc(100% - 10px),
      calc(100% - 10px) 100%,
      10px 100%,
      0 calc(100% - 10px)
    ) !important;
  }
}

/* Inner HUD folder panel with cyber grid and bottom tray clearance */
.game-card .card-folder-inner {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box !important;
  padding: 8px 12px 26px 12px !important;
  background-color: #070c18 !important;
  background-image:
    linear-gradient(rgba(0, 243, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.08) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 120%, color-mix(in srgb, var(--category-color, #00f3ff) 26%, transparent), transparent 70%) !important;
  background-size: 14px 14px, 14px 14px, 100% 100% !important;
  clip-path: polygon(
    0 15px,
    11px 5px,
    calc(30% - 7px) 5px,
    30% 0px,
    calc(100% - 17px) 0px,
    100% 17px,
    100% calc(100% - 11px),
    calc(100% - 11px) 100%,
    11px 100%,
    0 calc(100% - 11px)
  ) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  overflow: hidden !important;
}

@media (max-width: 680px) {
  .game-card .card-folder-inner {
    padding: 8px 10px 24px 10px !important;
    clip-path: polygon(
      0 13px,
      9px 4px,
      calc(32% - 5px) 4px,
      32% 0px,
      calc(100% - 15px) 0px,
      100% 15px,
      100% calc(100% - 9px),
      calc(100% - 9px) 100%,
      9px 100%,
      0 calc(100% - 9px)
    ) !important;
  }
}

/* Hover State */
.arcade-grid .game-card:hover,
.games-grid .game-card:hover,
.arc-cat-card:hover,
.arc-hud-card:hover {
  transform: translateY(-3px) scale(1.02) !important;
  background: linear-gradient(135deg, #ffffff 0%, var(--category-color, #00f3ff) 50%, #ffffff 100%) !important;
  filter: drop-shadow(0 0 4px #ffffff) drop-shadow(0 0 14px color-mix(in srgb, var(--category-color, #00f3ff) 75%, transparent)) !important;
}

.game-card:hover .card-folder-inner {
  background-color: #0a1122 !important;
}

/* Top Light Glow Sheen matching Image 3 */
.folder-top-glow {
  position: absolute !important;
  top: 0 !important;
  left: 30% !important;
  right: 18px !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, #ffffff 50%, var(--category-color, #00f3ff) 80%, transparent) !important;
  box-shadow: 0 0 6px #ffffff, 0 0 12px var(--category-color, #00f3ff) !important;
  z-index: 5 !important;
  pointer-events: none !important;
}

/* Tab Hatch Marks (////) on the raised left tab */
.hud-hatch-marks {
  position: absolute !important;
  top: 0px !important;
  left: 12px !important;
  width: 30px !important;
  height: 5px !important;
  background: repeating-linear-gradient(
    -45deg,
    var(--category-color, #00f3ff),
    var(--category-color, #00f3ff) 2px,
    transparent 2px,
    transparent 5px
  ) !important;
  opacity: 0.9 !important;
  pointer-events: none !important;
  z-index: 5 !important;
}

/* L-shape bracket "⌐" at top-left corner */
.hud-bracket-tl {
  position: absolute !important;
  top: 6px !important;
  left: 3px !important;
  width: 7px !important;
  height: 7px !important;
  border-top: 1.5px solid var(--category-color, #00f3ff) !important;
  border-left: 1.5px solid var(--category-color, #00f3ff) !important;
  pointer-events: none !important;
  z-index: 5 !important;
  transition: all 0.2s ease !important;
}

/* ── Card Header (System Tag & Online Status) ───────────────── */
.game-card .card-header,
.arc-hud-card .card-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  margin-bottom: 3px !important;
  padding-left: 36px !important; /* Room for tab hatch marks */
  padding-right: 16px !important; /* Room for folder notch */
  z-index: 3 !important;
}

.header-right-badges {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
}

.game-card .sys-tag,
.arc-hud-card .sys-tag {
  color: var(--category-color, #00f3ff) !important;
  font-family: var(--font-sci-fi, Orbitron, monospace) !important;
  font-size: 0.50rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.hud-mod-code {
  font-family: var(--font-sci-fi, Orbitron, monospace) !important;
  font-size: 0.44rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  opacity: 0.8 !important;
}

.game-card .status-online,
.arc-hud-card .status-online {
  color: #34d399 !important;
  font-family: var(--font-sci-fi, Orbitron, monospace) !important;
  font-size: 0.44rem !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
  white-space: nowrap !important;
}

.game-card .status-online::before,
.arc-hud-card .status-online::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 4px #34d399;
  display: inline-block;
}

.status-online.status-done {
  color: #fbbf24 !important;
}

.status-online.status-done::before {
  background: #fbbf24 !important;
  box-shadow: 0 0 4px #fbbf24 !important;
}

/* ── Horizontal Landscape Card Body (Rich, Informative, Zero Waste) ── */
.card-body-landscape {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  flex: 1 !important;
  z-index: 3 !important;
}

/* ── Card Icon Frame ────────────────────────────────────────── */
.game-card .card-icon,
.arc-hud-card .card-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 10px !important;
  background: color-mix(in srgb, var(--category-color, #00f3ff) 14%, rgba(10, 15, 30, 0.95)) !important;
  border: 1px solid color-mix(in srgb, var(--category-color, #00f3ff) 45%, transparent) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  box-shadow: 0 0 10px color-mix(in srgb, var(--category-color, #00f3ff) 22%, transparent) !important;
  z-index: 3 !important;
}

@media (max-width: 680px) {
  .game-card .card-icon,
  .arc-hud-card .card-icon {
    width: 38px !important;
    height: 38px !important;
  }
}

.game-card .card-icon svg,
.arc-hud-card .card-icon svg {
  width: 24px !important;
  height: 24px !important;
  color: var(--category-color, #00f3ff) !important;
  stroke: var(--category-color, #00f3ff) !important;
  transition: transform 0.2s ease !important;
}

@media (max-width: 680px) {
  .game-card .card-icon svg,
  .arc-hud-card .card-icon svg {
    width: 20px !important;
    height: 20px !important;
  }
}

.game-card:hover .card-icon,
.arc-hud-card:hover .card-icon {
  transform: scale(1.06) !important;
  box-shadow: 0 0 14px color-mix(in srgb, var(--category-color, #00f3ff) 60%, transparent) !important;
}

/* ── Card Info Column (Title + Detailed Subtitle) ───────────── */
.card-info-col {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-width: 0 !important;
  gap: 2px !important;
  z-index: 3 !important;
}

.game-card .card-title,
.arc-hud-card .card-title {
  font-family: var(--font-sci-fi, Orbitron, sans-serif) !important;
  font-size: clamp(0.76rem, 1vw, 0.88rem) !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  letter-spacing: 0.02em !important;
  line-height: 1.2 !important;
  text-align: left !important;
  margin: 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8) !important;
  transition: color 0.2s ease, text-shadow 0.2s ease !important;
}

@media (max-width: 680px) {
  .game-card .card-title,
  .arc-hud-card .card-title {
    font-size: 0.80rem !important;
    line-height: 1.2 !important;
  }
}

.game-card:hover .card-title,
.arc-hud-card:hover .card-title {
  color: #ffffff !important;
  text-shadow: 0 0 8px color-mix(in srgb, var(--category-color, #00f3ff) 60%, transparent) !important;
}

.card-desc-text {
  font-size: 0.67rem !important;
  color: rgba(148, 163, 184, 0.85) !important;
  line-height: 1.22 !important;
  margin: 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

@media (max-width: 680px) {
  .card-desc-text {
    font-size: 0.65rem !important;
    -webkit-line-clamp: 1 !important;
    line-clamp: 1 !important;
  }
}

/* ── Bottom-Right Angled Inset Tray (Matching Image 3 Inset Tray) ── */
.hud-stats-tray {
  position: absolute !important;
  bottom: 0 !important;
  right: 0 !important;
  min-width: 145px !important;
  height: 22px !important;
  background: rgba(3, 7, 18, 0.95) !important;
  border-top: 1.5px solid color-mix(in srgb, var(--category-color, #00f3ff) 70%, transparent) !important;
  border-left: 1.5px solid color-mix(in srgb, var(--category-color, #00f3ff) 70%, transparent) !important;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 0 12px 0 18px !important;
  box-sizing: border-box !important;
  z-index: 4 !important;
}

@media (max-width: 680px) {
  .hud-stats-tray {
    min-width: 135px !important;
    height: 20px !important;
    padding: 0 10px 0 16px !important;
  }
}

.stats-tray-content {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-family: var(--font-sci-fi, Orbitron, monospace) !important;
  font-size: 0.58rem !important;
  font-weight: 700 !important;
  color: #f1f5f9 !important;
  white-space: nowrap !important;
}

.stat-score-item {
  color: #fbbf24 !important;
}

.stat-streak-item {
  color: #f43f5e !important;
}

/* ─────────────────────────────────────────────────────────────
   3. DAILY CHALLENGE CARD (STANDOUT GOLD GLOW)
───────────────────────────────────────────────────────────── */
.arcade-grid .game-card.category-daily,
.games-grid .game-card.category-daily,
.arcade-grid .game-card.arc-daily-card,
.games-grid .game-card.arc-daily-card,
.arc-cat-card.category-daily,
.arc-cat-card.arc-daily-card {
  grid-column: span 1 !important;
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f59e0b 100%) !important;
  animation: daily-pulse-glow 2.5s ease-in-out infinite !important;
}

.game-card.category-daily .card-folder-inner {
  background-color: #160f04 !important;
  background-image:
    linear-gradient(rgba(245, 158, 11, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 158, 11, 0.08) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 120%, rgba(245, 158, 11, 0.35), transparent 70%) !important;
  background-size: 14px 14px, 14px 14px, 100% 100% !important;
}

@keyframes daily-pulse-glow {
  0%, 100% {
    filter: drop-shadow(0 0 2px #f59e0b) drop-shadow(0 0 8px rgba(245, 158, 11, 0.45));
  }
  50% {
    filter: drop-shadow(0 0 3px #fbbf24) drop-shadow(0 0 18px rgba(245, 158, 11, 0.85));
  }
}

.daily-featured-badge {
  font-family: var(--font-sci-fi, Orbitron, monospace) !important;
  font-size: 0.42rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  padding: 2px 5px !important;
  border-radius: 10px !important;
  background: rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.7) !important;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.45);
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.hud-stats-tray.daily-tray {
  border-top-color: rgba(245, 158, 11, 0.8) !important;
  border-left-color: rgba(245, 158, 11, 0.8) !important;
  background: rgba(20, 14, 4, 0.95) !important;
}

.dc-chip {
  font-size: 0.55rem !important;
  font-weight: 700 !important;
  padding: 1px 7px !important;
  border-radius: 10px !important;
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* ─────────────────────────────────────────────────────────────
   PAGINATION CONTROLS (HUD STYLE)
───────────────────────────────────────────────────────────── */
.pagination-controls {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  margin-top: 14px !important;
  padding: 4px !important;
  width: 100% !important;
}

.btn-hud-page {
  font-family: var(--font-sci-fi, Orbitron, sans-serif) !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  padding: 6px 16px !important;
  color: #00f3ff !important;
  background: rgba(10, 18, 36, 0.85) !important;
  border: 1px solid rgba(0, 243, 255, 0.35) !important;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  user-select: none !important;
}

.btn-hud-page:hover:not(:disabled) {
  background: rgba(0, 243, 255, 0.22) !important;
  box-shadow: 0 0 14px rgba(0, 243, 255, 0.45) !important;
  border-color: #00f3ff !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.btn-hud-page:disabled {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
  border-color: rgba(100, 116, 139, 0.3) !important;
  color: #64748b !important;
  box-shadow: none !important;
  transform: none !important;
}

.hud-page-indicator {
  font-family: var(--font-sci-fi, Orbitron, monospace) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #f59e0b !important;
  letter-spacing: 0.12em !important;
  padding: 6px 14px !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  border-radius: 4px !important;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.4) !important;
}

/* ── Bottom Bar ────────────────────────────────────────────── */
.arcade-bottom-actions {
  position: relative !important;
  padding: 10px 14px 14px !important;
  border-top: 1px solid rgba(0, 243, 255, 0.08) !important;
  flex-shrink: 0 !important;
  display: flex !important;
  justify-content: center !important;
  z-index: 2 !important;
}

/* ============================================================
   LOGIKA SPASIAL — HUD VISUAL WIDGETS & DIAGRAM SYSTEM
   ============================================================ */
.spatial-visual-box {
  width: 100% !important;
  min-height: 120px !important;
  max-height: 160px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(3, 7, 18, 0.85) !important;
  border: 1px solid rgba(6, 182, 212, 0.4) !important;
  border-radius: 12px !important;
  padding: 10px !important;
  margin-bottom: 12px !important;
  box-shadow: inset 0 0 20px rgba(0, 243, 255, 0.08) !important;
  position: relative !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.spatial-diagram-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

.spatial-diagram-container.hidden,
.spatial-diagram-container:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  height: 0 !important;
  min-height: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Flex & Grid layout utilities for spatial rendering */
.grid { display: grid !important; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }

.gap-1 { gap: 4px !important; }
.gap-1\.5 { gap: 6px !important; }
.gap-2 { gap: 8px !important; }
.gap-4 { gap: 16px !important; }

.w-28 { width: 112px !important; }
.h-28 { height: 112px !important; }
.w-36 { width: 144px !important; }
.h-36 { height: 144px !important; }
.w-12 { width: 48px !important; }
.h-20 { height: 80px !important; }
.w-14 { width: 56px !important; }
.w-16 { width: 64px !important; }
.w-20 { width: 80px !important; }
.h-24 { height: 96px !important; }
.w-5 { width: 20px !important; }
.w-6 { width: 24px !important; }
.h-6 { height: 24px !important; }
.h-8 { height: 32px !important; }
.h-12 { height: 48px !important; }
.h-16 { height: 64px !important; }
.w-10 { width: 40px !important; }
.h-10 { height: 40px !important; }
.w-2\.5 { width: 10px !important; }
.h-2\.5 { height: 10px !important; }
.w-px { width: 1px !important; }
.h-px { height: 1px !important; }

.flex { display: flex !important; }
.flex-col { flex-direction: column !important; }
.flex-col-reverse { flex-direction: column-reverse !important; }
.items-center { align-items: center !important; }
.items-end { align-items: flex-end !important; }
.justify-center { justify-content: center !important; }

/* Color fills */
.bg-red-500 { background-color: #ef4444 !important; }
.bg-blue-500 { background-color: #3b82f6 !important; }
.bg-blue-500\/30 { background-color: rgba(59, 130, 246, 0.3) !important; }
.bg-blue-500\/60 { background-color: rgba(59, 130, 246, 0.6) !important; }
.bg-cyan-300 { background-color: #67e8f9 !important; }
.bg-cyan-400 { background-color: #22d3ee !important; }
.bg-cyan-500 { background-color: #06b6d4 !important; }
.bg-cyan-500\/20 { background-color: rgba(6, 182, 212, 0.2) !important; }
.bg-cyan-500\/50 { background-color: rgba(6, 182, 212, 0.5) !important; }
.bg-cyan-600 { background-color: #0891b2 !important; }
.bg-cyan-700 { background-color: #0e7490 !important; }
.bg-cyan-800 { background-color: #155e75 !important; }
.bg-pink-500 { background-color: #ec4899 !important; }
.bg-slate-800 { background-color: #1e293b !important; }
.bg-slate-900 { background-color: #0f172a !important; }
.bg-slate-950 { background-color: #020617 !important; }
.bg-indigo-500\/20 { background-color: rgba(99, 102, 241, 0.2) !important; }
.bg-emerald-500\/40 { background-color: rgba(16, 185, 129, 0.4) !important; }
.bg-amber-500\/40 { background-color: rgba(245, 158, 11, 0.4) !important; }
.bg-purple-500\/30 { background-color: rgba(168, 85, 247, 0.3) !important; }
.bg-green-500\/30 { background-color: rgba(34, 197, 94, 0.3) !important; }
.bg-orange-500\/30 { background-color: rgba(249, 115, 22, 0.3) !important; }
.bg-yellow-500\/60 { background-color: rgba(234, 179, 8, 0.6) !important; }

/* Borders & Rounding */
.rounded { border-radius: 4px !important; }
.rounded-lg { border-radius: 8px !important; }
.rounded-xl { border-radius: 12px !important; }
.rounded-full { border-radius: 9999px !important; }
.rounded-l-xl { border-radius: 12px 0 0 12px !important; }
.rounded-r-xl { border-radius: 0 12px 12px 0 !important; }

.border { border-width: 1px !important; border-style: solid !important; }
.border-2 { border-width: 2px !important; border-style: solid !important; }
.border-dashed { border-style: dashed !important; }
.border-cyan-300 { border-color: #67e8f9 !important; }
.border-cyan-400 { border-color: #22d3ee !important; }
.border-cyan-500 { border-color: #06b6d4 !important; }
.border-cyan-500\/40 { border-color: rgba(6, 182, 212, 0.4) !important; }
.border-indigo-400 { border-color: #818cf8 !important; }
.border-emerald-400 { border-color: #34d399 !important; }
.border-amber-400 { border-color: #fbbf24 !important; }
.border-blue-400 { border-color: #60a5fa !important; }
.border-purple-400 { border-color: #c084fc !important; }
.border-green-400 { border-color: #4ade80 !important; }
.border-orange-400 { border-color: #fb923c !important; }
.border-white\/20 { border-color: rgba(255, 255, 255, 0.2) !important; }
.border-white\/30 { border-color: rgba(255, 255, 255, 0.3) !important; }

/* Typography & Transforms */
.text-white { color: #ffffff !important; }
.text-black { color: #000000 !important; }
.text-cyan-200 { color: #a5f3fc !important; }
.text-cyan-300 { color: #67e8f9 !important; }
.text-cyan-400 { color: #22d3ee !important; }
.text-yellow-400 { color: #facc15 !important; }
.text-emerald-200 { color: #a7f3d0 !important; }
.text-amber-200 { color: #fde68a !important; }
.text-blue-200 { color: #bfdbfe !important; }
.text-purple-200 { color: #e9d5ff !important; }
.text-green-200 { color: #bbf7d0 !important; }
.text-orange-200 { color: #fed7aa !important; }

.font-mono { font-family: var(--font-mono, 'Share Tech Mono', monospace) !important; }
.font-bold { font-weight: 700 !important; }
.text-xs { font-size: 0.75rem !important; }
.text-sm { font-size: 0.875rem !important; }
.text-lg { font-size: 1.125rem !important; }
.text-xl { font-size: 1.25rem !important; }
.text-\[10px\] { font-size: 10px !important; }
.text-\[9px\] { font-size: 9px !important; }

.rotate-12 { transform: rotate(12deg) !important; }
.rotate-45 { transform: rotate(45deg) !important; }
.-rotate-45 { transform: rotate(-45deg) !important; }
.rotate-90 { transform: rotate(90deg) !important; }
.rotate-180 { transform: rotate(180deg) !important; }
.scale-x-\[-1\] { transform: scaleX(-1) !important; }

.mix-blend-screen { mix-blend-mode: screen !important; }

/* =========================================================================
   ⚔️ 1V1 PVP BATTLE MULTIPLAYER STYLES
   ========================================================================= */

.pill-btn-battle {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(244, 63, 94, 0.35)) !important;
  border: 1px solid rgba(244, 63, 94, 0.6) !important;
  color: #fecdd3 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.25) !important;
  transition: all 0.25s ease !important;
}

.pill-btn-battle:hover, .pill-btn-battle.active {
  background: linear-gradient(135deg, #ef4444, #f43f5e) !important;
  color: #ffffff !important;
  border-color: #fda4af !important;
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.6) !important;
  transform: translateY(-2px) scale(1.03);
}

/* Battle HUD Dual Bar */
.battle-hud-dual-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 900px;
  background: rgba(15, 23, 42, 0.85);
  /* backdrop-filter optimized for GPU */
  /* -webkit- backdrop-filter optimized for GPU */
  border: 1px solid rgba(0, 243, 255, 0.3);
  border-radius: 16px;
  padding: 6px 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  gap: 8px;
}

.battle-player-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.battle-player-badge.opp-badge {
  flex-direction: row;
  justify-content: flex-end;
}

.battle-avatar-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(15, 23, 42, 0.9);
  flex-shrink: 0;
}

.battle-avatar-ring.cyan-glow {
  border: 2px solid #00f3ff;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.battle-avatar-ring.rose-glow {
  border: 2px solid #f43f5e;
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.4);
}

.battle-meta-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.battle-player-name {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-cyan { color: #00f3ff !important; }
.text-rose { color: #f43f5e !important; }

.battle-score-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.battle-pts {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.15rem;
  font-weight: 900;
  color: #34d399;
}

.battle-pts.opp-pts {
  color: #fbbf24;
}

.battle-combo-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  transition: all 0.2s ease;
}

.battle-combo-badge.active-flame {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(239, 68, 68, 0.4));
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* Center VS & Timer */
.battle-vs-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
}

.battle-cat-tag {
  font-size: 0.7rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.battle-timer-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(0, 243, 255, 0.5);
  padding: 3px 10px;
  border-radius: 20px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.95rem;
  font-weight: 800;
  color: #00f3ff;
}

.battle-timer-bubble.urgent-timer-anim {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #f87171;
  animation: urgentHeartbeat 0.6s infinite alternate;
}

.battle-vs-sub {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.65rem;
  font-weight: 900;
  color: #f43f5e;
  letter-spacing: 1px;
}

/* Opponent Score Floater */
.opp-score-floater {
  position: absolute;
  top: -24px;
  right: -8px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-weight: 900;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 6px;
  pointer-events: none;
  z-index: 50;
  transition: all 0.3s ease;
}

.opp-score-floater.visible.pts-gain {
  color: #34d399;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

.opp-score-floater.visible.pts-miss {
  color: #f87171;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  transform: translateY(-8px) scale(1.05);
}

/* Battle Lobby Box */
.battle-lobby-box, .battle-waiting-box {
  max-width: 520px;
  width: 92%;
  margin: auto !important;
  position: relative !important;
  z-index: 1000000 !important;
  animation: modalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.battle-lobby-content {
  padding: 20px 24px;
}

.battle-lobby-header {
  text-align: center;
  margin-bottom: 18px;
}

.battle-lobby-icon {
  font-size: 2.8rem;
  margin-bottom: 4px;
}

.battle-lobby-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 4px;
}

.battle-lobby-sub {
  font-size: 0.85rem;
  color: #94a3b8;
}

.battle-tab-switcher {
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 18px;
}

.battle-tab-btn {
  flex: 1;
  padding: 10px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
}

.battle-tab-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(59, 130, 246, 0.4));
  color: #00f3ff;
  border: 1px solid rgba(0, 243, 255, 0.5);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.battle-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.battle-input-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.cyber-input {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(0, 243, 255, 0.3);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 1rem;
  color: #f8fafc;
  outline: none;
  transition: all 0.2s ease;
}

.cyber-input:focus {
  border-color: #00f3ff;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.cyber-input.room-code-field {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  color: #34d399;
}

.battle-rules-mini {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 14px;
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.6;
}

/* Room Code Card */
.room-code-display-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8));
  border: 2px solid rgba(0, 243, 255, 0.5);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.room-code-lbl {
  font-size: 0.8rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 1px;
}

.room-code-giant {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: #34d399;
  text-shadow: 0 0 20px rgba(52, 211, 153, 0.6);
  margin: 6px 0 12px;
}

.btn-copy-code {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid #00f3ff;
  color: #00f3ff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-code:hover {
  background: #00f3ff;
  color: #040711;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
}

/* Cyber Radar Animation */
.radar-scan-container {
  padding: 16px 0;
}

.radar-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid rgba(0, 243, 255, 0.3);
  position: relative;
  margin: 0 auto 12px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 243, 255, 0.2);
}

.radar-sweep {
  position: absolute;
  width: 100%;
  height: 100%;
  background: conic-gradient(from 0deg, transparent 70%, rgba(0, 243, 255, 0.6) 100%);
  animation: radarRotate 2s linear infinite;
  border-radius: 50%;
}

.radar-dot {
  position: absolute;
  top: 35%;
  left: 65%;
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 10px #34d399;
  animation: dotBlink 1.5s infinite;
}

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

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

.radar-status-text {
  font-size: 0.95rem;
  font-weight: 800;
  color: #00f3ff;
}

.radar-subtext {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 4px;
}

/* Opponent Joined Card */
.opponent-joined-card {
  background: rgba(15, 23, 42, 0.8);
  border: 2px solid rgba(52, 211, 153, 0.5);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.2);
}

.match-ready-tag {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.9rem;
  font-weight: 900;
  color: #34d399;
  letter-spacing: 1px;
}

.match-vs-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 10px;
}

.match-player {
  font-weight: 800;
  font-size: 1rem;
}

.match-vs-badge {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.1rem;
  font-weight: 900;
  color: #f43f5e;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
}

/* Fullscreen Countdown */
.battle-countdown-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 17, 0.92);
  /* backdrop-filter optimized for GPU */
}

.countdown-center-card {
  position: relative;
  z-index: 2;
  text-align: center;
}

.countdown-vs-head {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.countdown-vs-fire {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  color: #fbbf24;
  font-size: 1.4rem;
  font-weight: 900;
}

.countdown-number {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 6rem;
  font-weight: 900;
  color: #00f3ff;
  text-shadow: 0 0 40px rgba(0, 243, 255, 0.8);
  line-height: 1;
  margin-bottom: 16px;
  transition: transform 0.2s ease;
}

.countdown-number.pulse-pop {
  transform: scale(1.35);
  color: #fbbf24;
}

.countdown-tagline {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #cbd5e1;
}

/* Battle Results Wrapper */
.battle-results-wrapper {
  max-width: 720px;
  width: 92%;
  margin: 20px auto;
}

.battle-results-body {
  padding: 24px;
  text-align: center;
}

.battle-result-hero {
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.battle-result-hero.victory-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(6, 182, 212, 0.25));
  border: 2px solid #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.4);
}

.battle-result-hero.defeat-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(15, 23, 42, 0.8));
  border: 2px solid #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.battle-result-hero.draw-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(15, 23, 42, 0.8));
  border: 2px solid #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.hero-icon {
  font-size: 3.5rem;
  margin-bottom: 4px;
}

.hero-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 4px;
}

.hero-sub {
  font-size: 0.95rem;
  color: #cbd5e1;
}

/* Head to Head Matrix Grid */
.h2h-grid-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px;
}

.h2h-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.h2h-row.h2h-header {
  background: rgba(6, 182, 212, 0.15);
  font-weight: 800;
}

.h2h-col {
  flex: 1;
  text-align: center;
  font-weight: 700;
}

.h2h-col.col-metric {
  font-size: 0.78rem;
  color: #94a3b8;
  letter-spacing: 1px;
}

.h2h-col.col-label {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 800;
}

.h2h-col.col-val {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.1rem;
  color: #f8fafc;
}

.h2h-col.highlight-win {
  color: #34d399;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

/* Rematch Toast Notification */
.rematch-toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  max-width: 440px;
  width: 90%;
  border: 2px solid #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
  border-radius: 14px;
}

.rematch-toast-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  gap: 12px;
}

.toast-avatar {
  font-size: 1.8rem;
}

.toast-text {
  font-size: 0.9rem;
  color: #ffffff;
  line-height: 1.4;
  flex: 1;
}

.toast-btns {
  display: flex;
  gap: 6px;
}

.btn-xs {
  padding: 6px 10px !important;
  font-size: 0.75rem !important;
}

/* ==========================================================================
   ARCADE HEADER & QUICK ACTION BAR (BATTLE ROOM & LEADERBOARD)
   ========================================================================== */

.arcade-header {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 10px 14px 10px !important;
  border-bottom: 1px solid rgba(0, 243, 255, 0.18) !important;
  background: rgba(8, 14, 28, 0.6) !important;
  box-sizing: border-box !important;
}

.arcade-header-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.btn-arcade-back-top {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.75rem;
  font-weight: 800;
  color: #00f3ff;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(0, 243, 255, 0.4);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}

.btn-arcade-back-top:hover {
  background: rgba(0, 243, 255, 0.18);
  border-color: #00f3ff;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(0, 243, 255, 0.5);
  transform: translateY(-1px);
}

.arcade-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

.arcade-main-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.92rem;
  font-weight: 900;
  color: #00f3ff;
  letter-spacing: 0.06em;
  text-shadow: 0 0 12px rgba(0, 243, 255, 0.5);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.arcade-section-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  color: #67e8f9;
  letter-spacing: 0.5px;
  white-space: nowrap;
  background: rgba(0, 243, 255, 0.08);
  border: 1px solid rgba(0, 243, 255, 0.25);
  padding: 3px 8px;
  border-radius: 6px;
}

.arcade-nav-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.btn-direct-battle {
  flex: 1;
  height: 36px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(244, 63, 94, 0.45));
  border: 1.5px solid rgba(244, 63, 94, 0.75);
  color: #ffffff;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 0 12px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.25);
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
}

.btn-direct-battle:hover {
  background: linear-gradient(135deg, #ef4444, #f43f5e);
  border-color: #fda4af;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.6);
  transform: translateY(-1px);
}

.btn-direct-leaderboard {
  flex: 1;
  height: 36px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.35));
  border: 1.5px solid rgba(245, 158, 11, 0.7);
  color: #fde68a;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 0 12px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
}

.btn-direct-leaderboard:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fef08a;
  color: #040711;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .arcade-header {
    padding: 8px 10px 10px !important;
    gap: 8px !important;
  }
  .btn-arcade-back-top {
    height: 34px;
    padding: 0 10px;
    font-size: 0.72rem;
  }
  .arcade-main-title {
    font-size: 0.85rem;
  }
  .arcade-section-title {
    font-size: 0.62rem;
    padding: 2px 6px;
  }
  .arcade-nav-actions-row {
    gap: 8px;
  }
  .btn-direct-battle,
  .btn-direct-leaderboard {
    height: 35px;
    font-size: 0.72rem;
    padding: 0 8px;
    letter-spacing: 0.3px;
  }
}

/* ==========================================================================
   CYBERPUNK SETTINGS CONTROL HUB MODAL
   ========================================================================== */

.settings-modal {
  max-width: 540px !important;
  width: 92% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  padding: 0 !important;
  background: rgba(6, 11, 25, 0.96) !important;
  border: 2px solid var(--neon-cyan-bright) !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.95), 0 0 50px rgba(0, 243, 255, 0.25) !important;
  margin: auto !important;
  position: relative !important;
  z-index: 1000000 !important;
  animation: modalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.settings-modal-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.settings-hero-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-hero-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 14px rgba(0, 243, 255, 0.6));
  animation: spinSlow 20s linear infinite;
}

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

.settings-hero-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  margin: 0 0 4px 0;
  text-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.settings-hero-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.35;
}

.settings-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(0, 243, 255, 0.2);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.settings-card:hover {
  border-color: rgba(0, 243, 255, 0.45);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.12);
}

.settings-card-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.8px;
}

.settings-badge-tag {
  font-size: 0.65rem;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.settings-nickname-row {
  display: flex !important;
  flex-direction: row !important;
  gap: 10px !important;
  align-items: center !important;
  width: 100% !important;
}

.settings-nickname-row .cyber-input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: 100% !important;
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(0, 243, 255, 0.4) !important;
  color: #ffffff !important;
  font-size: 0.95rem !important;
  padding: 12px 14px !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
}

.settings-nickname-row .cyber-input:focus {
  border-color: #00f3ff !important;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.4) !important;
}

.settings-nickname-row #btn-save-nickname {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 100px !important;
  padding: 12px 18px !important;
  background: linear-gradient(135deg, #00f3ff, #0284c7) !important;
  color: #030712 !important;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  border-radius: 10px !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.4) !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.settings-nickname-row #btn-save-nickname:hover {
  background: linear-gradient(135deg, #38bdf8, #00f3ff) !important;
  box-shadow: 0 0 25px rgba(0, 243, 255, 0.7) !important;
  transform: translateY(-2px) !important;
}

.settings-diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.settings-diff-grid .btn-diff {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-diff-grid .btn-diff:hover {
  background: rgba(51, 65, 85, 0.9);
  transform: translateY(-2px);
  border-color: rgba(0, 243, 255, 0.4);
}

.settings-diff-grid .btn-diff.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.35), rgba(59, 130, 246, 0.45));
  border-color: #00f3ff;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(0, 243, 255, 0.35);
}

.diff-icon {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.diff-label {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.78rem;
  font-weight: 800;
}

.diff-sub {
  font-size: 0.68rem;
  color: #94a3b8;
}

.settings-audio-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
}

.slider-value-badge {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.75rem;
  font-weight: 800;
  color: #00f3ff;
  background: rgba(0, 243, 255, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(0, 243, 255, 0.35);
  min-width: 44px;
  text-align: center;
}

/* Custom Cyberpunk Range Slider */
.cyber-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: rgba(30, 41, 59, 0.95);
  border-radius: 6px;
  outline: none;
  border: 1px solid rgba(0, 243, 255, 0.3);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.cyber-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 20%, #00f3ff 70%);
  border: 2px solid #ffffff;
  box-shadow: 0 0 14px rgba(0, 243, 255, 0.9);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cyber-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 22px rgba(0, 243, 255, 1);
}

.cyber-range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 20%, #00f3ff 70%);
  border: 2px solid #ffffff;
  box-shadow: 0 0 14px rgba(0, 243, 255, 0.9);
  cursor: pointer;
}

.btn-mute-toggle {
  width: 100%;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-mute-toggle:hover {
  background: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.35);
}

.btn-mute-toggle.is-muted {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
}

.btn-mute-toggle.is-muted:hover {
  background: rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 18px rgba(248, 113, 113, 0.35);
}

.settings-danger-zone {
  background: rgba(35, 10, 15, 0.6);
  border-color: rgba(239, 68, 68, 0.35);
}

.settings-danger-zone:hover {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
}

.settings-danger-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-reset-level {
  background: rgba(185, 28, 28, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  padding: 10px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset-level:hover {
  background: rgba(220, 38, 38, 0.4);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.btn-clear-all {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
  border: 1px solid #ef4444;
  color: #ffffff;
  padding: 10px 8px;
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.35);
  transition: all 0.2s ease;
}

.btn-clear-all:hover {
  background: linear-gradient(135deg, #991b1b, #dc2626);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

.settings-footer-row {
  margin-top: 4px;
}

.settings-footer-row .btn-arcade-start {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 800;
}

@media (max-width: 500px) {
  .settings-danger-actions {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   🏆 GLOBAL LEADERBOARD CONTROL HUB & PODIUM STYLING (SUPABASE TOP 50)
   ========================================================================== */

/* Top header buttons */
.main-menu-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-top-leaderboard {
  height: 36px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.25));
  border: 1.5px solid rgba(245, 158, 11, 0.65);
  color: #fde68a;
  padding: 0 14px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-top-leaderboard:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fef08a;
  color: #040711;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
  transform: translateY(-1px);
}

/* ==========================================================================
   🏆 GLOBAL LEADERBOARD CONTROL HUB & PODIUM STYLING (SUPABASE TOP 50)
   ========================================================================== */

/* Top header buttons */
.main-menu-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-top-leaderboard {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.35));
  border: 1px solid rgba(245, 158, 11, 0.6);
  color: #fde68a;
  padding: 6px 14px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-top-leaderboard:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #040711;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.7);
  transform: translateY(-2px);
}

.btn-direct-leaderboard {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(234, 88, 12, 0.3));
  border: 1px solid rgba(245, 158, 11, 0.6);
  color: #fde68a;
  padding: 6px 14px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-direct-leaderboard:hover {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #040711;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
  transform: translateY(-2px);
}

/* =========================================================================
   🏆 GLOBAL LEADERBOARD MODAL & PODIUM STYLING (RESPONSIVE CYBERPUNK)
   ========================================================================= */

/* Modal Dialog Container */
.leaderboard-hub-modal {
  width: 96% !important;
  max-width: 640px !important;
  max-height: 92vh !important;
  padding: 0 !important;
  margin: auto !important;
  border-radius: 16px !important;
  border: 1.5px solid rgba(0, 243, 255, 0.4) !important;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.95), 0 0 35px rgba(0, 243, 255, 0.25) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.leaderboard-hub-content,
.lb-modal-body {
  padding: 10px 12px 14px 12px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
}

.lb-header-banner,
.lb-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.lb-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.lb-header-icon,
.lb-hero-icon {
  font-size: 1.8rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.8));
  flex-shrink: 0;
}

.lb-hero-text {
  flex: 1;
  min-width: 0;
}

.lb-header-title,
.lb-hero-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: clamp(0.78rem, 2.5vw, 1rem);
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 2px 0;
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-header-sub,
.lb-hero-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  margin: 0;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.lb-player-badge-top {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(0, 243, 255, 0.3);
  padding: 4px 8px;
  border-radius: 20px;
  flex-shrink: 0;
  max-width: 140px;
}

.lb-badge-icon {
  font-size: 1rem;
}

.lb-badge-name {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.7rem;
  font-weight: 800;
  color: #00f3ff;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-edit-nick {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.btn-edit-nick:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Tabs - Always Side by Side in 1 Row */
.lb-tab-switcher,
.lb-main-tabs {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 4px !important;
  background: rgba(15, 23, 42, 0.85);
  padding: 4px !important;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.lb-filter-bar {
  width: 100%;
  box-sizing: border-box;
}

.lb-arcade-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.lb-content-area {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.lb-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 10px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.lb-footer-row {
  margin-top: 4px;
  width: 100%;
  box-sizing: border-box;
}

.lb-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  padding: 7px 2px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: clamp(0.62rem, 1.9vw, 0.75rem);
  font-weight: 800;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.lb-tab-btn .tab-ico {
  flex-shrink: 0;
  font-size: 0.85rem;
}

.lb-tab-btn .tab-txt-full {
  display: none;
}

.lb-tab-btn .tab-txt-short {
  display: none;
}

/* tab-lbl: always visible short label */
.lb-tab-btn .tab-lbl {
  font-size: clamp(0.6rem, 1.8vw, 0.72rem);
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.5px;
}

.lb-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.lb-tab-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(234, 88, 12, 0.35));
  border-color: #f59e0b;
  color: #fde68a;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

/* Category Selector Card & Dropdown */
.lb-cat-selector-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(0, 243, 255, 0.25);
  border-radius: 12px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  box-sizing: border-box;
}

.lb-filter-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.lb-filter-lbl {
  font-size: 0.72rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

/* Big Interactive Cyberpunk Category Selector Card */
.btn-select-cat-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(10, 15, 29, 0.95);
  border: 1.5px solid rgba(0, 243, 255, 0.4);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  text-align: left;
  margin-top: 2px;
}

.btn-select-cat-card:hover {
  background: rgba(15, 23, 42, 0.98);
  border-color: #00f3ff;
  box-shadow: 0 0 16px rgba(0, 243, 255, 0.35);
  transform: translateY(-1px);
}

.btn-select-cat-card.selected {
  border-color: var(--cat-color, #00f3ff);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  box-shadow: 0 0 14px var(--cat-color, rgba(0, 243, 255, 0.3));
}

.btn-select-cat-card.not-selected {
  border: 1.5px dashed rgba(0, 243, 255, 0.7);
  background: rgba(6, 182, 212, 0.1);
  animation: pulseGlowCyan 2.5s infinite alternate;
}

.btn-select-cat-card .select-cat-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.btn-select-cat-card .select-cat-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.btn-select-cat-card .select-cat-text {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: clamp(0.78rem, 2.4vw, 0.86rem);
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-select-cat-card .select-cat-text.placeholder-txt {
  color: #00f3ff;
  letter-spacing: 0.5px;
}

.btn-select-cat-card .select-cat-action {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: clamp(0.62rem, 1.8vw, 0.68rem);
  font-weight: 800;
  color: #00f3ff;
  background: rgba(0, 243, 255, 0.15);
  border: 1px solid rgba(0, 243, 255, 0.4);
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

/* Prompt State Box when no category chosen */
.lb-prompt-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(0, 243, 255, 0.35);
  border-radius: 14px;
  padding: 24px 16px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* 25-Grid Category Modal Overlay */
.modal-cat-grid-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(2, 6, 23, 0.88) !important;
  /* backdrop-filter optimized for GPU */
  /* -webkit- backdrop-filter optimized for GPU */
  z-index: 1000000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px !important;
  box-sizing: border-box !important;
}

.modal-cat-grid-overlay.hidden {
  display: none !important;
}

.modal-cat-grid-box {
  background: rgba(11, 19, 43, 0.98) !important;
  border: 1.5px solid rgba(0, 243, 255, 0.5) !important;
  border-radius: 18px !important;
  width: 96% !important;
  max-width: 580px !important;
  max-height: 86vh !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(0, 243, 255, 0.25) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.modal-cat-grid-body {
  padding: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.cat-search-field {
  width: 100% !important;
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1.5px solid rgba(0, 243, 255, 0.4) !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  color: #ffffff !important;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.85rem !important;
  box-sizing: border-box !important;
}

.cat-search-field:focus {
  border-color: #00f3ff !important;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.4) !important;
  outline: none !important;
}

.cat-grid-cards-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  max-height: 52vh !important;
  overflow-y: auto !important;
  padding: 2px !important;
}

.cat-picker-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  box-sizing: border-box;
}

.cat-picker-card:hover {
  border-color: var(--cat-color, #00f3ff);
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 14px var(--cat-color, rgba(0, 243, 255, 0.3));
  transform: translateY(-2px);
}

.cat-picker-card.selected-cat {
  border-color: var(--cat-color, #00f3ff);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.25));
  box-shadow: 0 0 18px var(--cat-color, rgba(0, 243, 255, 0.4));
}

.cat-picker-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.cat-picker-name {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  word-break: break-word;
}

/* Compact inline filter: label + pills in one tight row */
.lb-compact-filter {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  box-sizing: border-box;
}

.lb-filter-lbl-sm {
  font-size: 0.62rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.lb-diff-row {
  width: 100%;
  box-sizing: border-box;
}

.lb-diff-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
}

.lb-diff-pills.arcade-pills {
  grid-template-columns: repeat(4, 1fr);
}

.lb-diff-pills.story-pills {
  grid-template-columns: repeat(3, 1fr);
}

.lb-diff-pills .pill-btn {
  padding: 6px 2px;
  font-size: clamp(0.62rem, 1.8vw, 0.68rem);
  font-weight: 800;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.lb-diff-pills .pill-btn.active {
  background: rgba(0, 243, 255, 0.25);
  border-color: #00f3ff;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.35);
}

.lb-daily-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.lb-daily-filter-row .lb-date-picker {
  flex: 1;
  max-width: 170px;
  padding: 6px 8px;
  font-size: 0.8rem;
  box-sizing: border-box;
}

/* 26-Grid Visual Picker Modal Overlay */
.modal-cat-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 7, 18, 0.94);
  /* backdrop-filter optimized for GPU */
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 16px;
  box-sizing: border-box;
}

.modal-cat-grid-overlay.hidden {
  display: none !important;
}

.modal-cat-grid-box {
  width: 100%;
  max-width: 580px;
  max-height: 82vh;
  background: rgba(15, 23, 42, 0.98) !important;
  border: 2px solid #00f3ff !important;
  border-radius: 14px !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.35);
  box-sizing: border-box;
}

.modal-cat-grid-body {
  padding: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.cat-search-field {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.82rem;
  border-radius: 8px;
  background: rgba(10, 15, 29, 0.9);
  border: 1px solid rgba(0, 243, 255, 0.3);
  color: #ffffff;
  outline: none;
  box-sizing: border-box;
}

.cat-search-field:focus {
  border-color: #00f3ff;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.cat-grid-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 6px;
  max-height: 52vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  box-sizing: border-box;
}

.cat-picker-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 7px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.cat-picker-card:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: var(--cat-color, #00f3ff);
  transform: translateY(-2px);
  box-shadow: 0 0 14px var(--cat-color, rgba(0, 243, 255, 0.4));
}

.cat-picker-card.selected-cat {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.35), rgba(59, 130, 246, 0.45));
  border-color: var(--cat-color, #00f3ff);
  box-shadow: 0 0 18px var(--cat-color, #00f3ff);
}

.cat-picker-icon {
  font-size: 1.3rem;
}

.cat-picker-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.15;
}

/* =========================================================================
   TOP 3 PODIUM & CARDS
   ========================================================================= */

.lb-podium-container {
  display: flex;
  gap: 8px;
  margin: 6px 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.podium-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 8px;
  display: flex;
  position: relative;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.podium-crown-badge-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.podium-rank-badge {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.podium-avatar {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.podium-main-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.podium-user-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.podium-name {
  font-weight: 800;
  font-size: 0.82rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.podium-score-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.podium-score {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.88rem;
  font-weight: 900;
  white-space: nowrap;
}

.podium-sub {
  font-size: 0.65rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Rank 1 Gold Neon */
.podium-gold {
  border-color: #f59e0b !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(15, 23, 42, 0.92) 100%) !important;
}

.podium-gold .podium-crown {
  font-size: 1.1rem;
  filter: drop-shadow(0 0 8px #f59e0b);
  animation: pulseGold 2s infinite ease-in-out;
}

.podium-gold .podium-rank-badge {
  background: #f59e0b;
  color: #040711;
}

.podium-gold .podium-score {
  color: #fde68a;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

/* Rank 2 Silver */
.podium-silver {
  border-color: #94a3b8 !important;
  box-shadow: 0 0 16px rgba(148, 163, 184, 0.25);
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.15) 0%, rgba(15, 23, 42, 0.92) 100%) !important;
}

.podium-silver .podium-rank-badge {
  background: #94a3b8;
  color: #040711;
}

.podium-silver .podium-score {
  color: #e2e8f0;
}

/* Rank 3 Bronze */
.podium-bronze {
  border-color: #d97706 !important;
  box-shadow: 0 0 16px rgba(217, 119, 6, 0.25);
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.15) 0%, rgba(15, 23, 42, 0.92) 100%) !important;
}

.podium-bronze .podium-rank-badge {
  background: #d97706;
  color: #ffffff;
}

.podium-bronze .podium-score {
  color: #fed7aa;
}

/* Desktop 3-Column Podium Arrangement */
@media (min-width: 561px) {
  .lb-podium-container {
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    margin: 8px 0 6px 0;
  }

  .podium-card {
    flex: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 8px;
  }

  .podium-silver {
    order: 1;
  }

  .podium-gold {
    order: 2;
    transform: translateY(-8px);
    padding-top: 14px;
  }

  .podium-bronze {
    order: 3;
  }

  .podium-main-info {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
  }

  .podium-user-block {
    align-items: center;
    width: 100%;
  }

  .podium-score-block {
    align-items: center;
    margin-top: 4px;
    width: 100%;
  }
}

/* Mobile 1-Column Sequential Podium Card Arrangement (#1 on TOP) */
@media (max-width: 560px) {
  .lb-podium-container {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin: 4px 0;
  }

  .podium-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    gap: 8px;
  }

  .podium-gold {
    order: 1;
  }

  .podium-silver {
    order: 2;
  }

  .podium-bronze {
    order: 3;
  }

  .podium-main-info {
    flex: 1;
    min-width: 0;
    gap: 6px;
  }

  .podium-user-block {
    flex: 1;
    min-width: 0;
  }

  .podium-name {
    font-size: 0.78rem;
    max-width: 130px;
  }

  .podium-avatar {
    font-size: 1.3rem;
  }

  .podium-score {
    font-size: 0.82rem;
  }
}

/* =========================================================================
   TABLE (#4 - #50) - FLUID & ZERO OVERFLOW
   ========================================================================= */

.lb-table-wrapper {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

.lb-table-header {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  background: rgba(30, 41, 59, 0.85);
  font-size: 0.68rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  box-sizing: border-box;
}

.lb-table-row {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
  gap: 6px;
}

.lb-table-row:hover {
  background: rgba(56, 189, 248, 0.08);
}

.lb-col-rank {
  flex: 0 0 34px;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-size: 0.78rem;
  font-weight: 800;
  color: #38bdf8;
  flex-shrink: 0;
}

.lb-col-player {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.lb-player-name {
  font-weight: 700;
  font-size: 0.8rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-player-detail {
  font-size: 0.63rem;
  color: #94a3b8;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}

.lb-col-score {
  flex: 0 0 80px;
  text-align: right;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-weight: 800;
  font-size: 0.78rem;
  color: #fde68a;
  white-space: nowrap;
  flex-shrink: 0;
}

.lb-row-me {
  background: rgba(0, 243, 255, 0.12) !important;
  border-left: 3px solid #00f3ff;
}

.lb-me-tag {
  display: inline-block;
  background: #00f3ff;
  color: #040711;
  font-size: 0.55rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

.highlight-me {
  color: #00f3ff !important;
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.6);
}

.lb-empty-box {
  text-align: center;
  padding: 20px 12px;
  width: 100%;
  box-sizing: border-box;
}

/* Result End Rank Celebratory Badge */
.global-rank-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  animation: slideInDown 0.4s ease-out;
  box-sizing: border-box;
  width: 100%;
}

.rank-banner-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.rank-banner-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif);
  font-weight: 900;
  font-size: 0.88rem;
  letter-spacing: 0.5px;
}

.rank-banner-sub {
  font-size: 0.72rem;
  color: #cbd5e1;
  margin-top: 1px;
}

.rank-badge-gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.4));
  border: 2px solid #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  color: #fde68a;
}

.rank-badge-silver {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.25), rgba(71, 85, 105, 0.4));
  border: 2px solid #94a3b8;
  box-shadow: 0 0 20px rgba(148, 163, 184, 0.4);
  color: #f8fafc;
}

.rank-badge-bronze {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.25), rgba(180, 83, 9, 0.4));
  border: 2px solid #d97706;
  box-shadow: 0 0 20px rgba(217, 119, 6, 0.4);
  color: #fed7aa;
}

.rank-badge-top50 {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(59, 130, 246, 0.35));
  border: 2px solid #00f3ff;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.35);
  color: #ffffff;
}

.rank-badge-general {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

@keyframes pulseGold {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px #f59e0b); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 16px #f59e0b); }
}

/* Mobile Responsive - Narrow Screens (<= 480px) */
@media (max-width: 480px) {
  .leaderboard-hub-modal {
    width: 100% !important;
    max-height: 96vh !important;
    border-radius: 14px !important;
  }

  .leaderboard-hub-content,
  .lb-modal-body {
    padding: 8px 10px 12px 10px;
    gap: 7px;
  }

  .lb-header-banner,
  .lb-hero-header {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .lb-title-wrap {
    gap: 6px;
  }

  .lb-header-icon,
  .lb-hero-icon {
    font-size: 1.4rem;
  }

  .lb-header-title,
  .lb-hero-title {
    font-size: clamp(0.7rem, 3.5vw, 0.88rem);
  }

  .lb-header-sub,
  .lb-hero-sub {
    display: none;
  }

  .lb-player-badge-top {
    padding: 3px 7px;
    max-width: 120px;
  }

  .lb-badge-name {
    max-width: 65px;
    font-size: 0.65rem;
  }

  .lb-tab-btn .tab-txt-full {
    display: none !important;
  }

  .lb-tab-btn .tab-txt-short {
    display: inline !important;
  }

  .lb-tab-btn {
    font-size: 0.65rem;
    padding: 7px 2px;
    gap: 3px;
  }

  .lb-tab-btn .tab-ico {
    font-size: 0.85rem;
  }

  .podium-card {
    padding: 8px 10px;
    gap: 7px;
  }

  .podium-name {
    max-width: 110px;
    font-size: 0.76rem;
  }

  .podium-score {
    font-size: 0.8rem;
  }

  .lb-col-rank {
    flex: 0 0 30px;
    font-size: 0.72rem;
  }

  .lb-col-score {
    flex: 0 0 70px;
    font-size: 0.72rem;
  }

  .lb-player-name {
    font-size: 0.76rem;
  }

  .lb-table-wrapper {
    max-height: 200px;
  }
}

/* Extra Mobile Refinements for Very Narrow Screens (<= 360px) */
@media (max-width: 360px) {
  .leaderboard-hub-modal {
    width: 100% !important;
    max-height: 98vh !important;
    border-radius: 10px !important;
  }

  .lb-header-title,
  .lb-hero-title {
    font-size: 0.68rem;
  }

  .lb-header-icon,
  .lb-hero-icon {
    font-size: 1.2rem;
  }

  .lb-tab-btn .tab-ico {
    font-size: 0.78rem;
  }

  .lb-tab-btn .tab-txt-short {
    font-size: 0.58rem;
  }

  .podium-avatar {
    font-size: 1.1rem;
  }

  .podium-name {
    max-width: 90px;
    font-size: 0.7rem;
  }

  .podium-score {
    font-size: 0.75rem;
  }

  .lb-col-score {
    flex: 0 0 65px;
    font-size: 0.68rem;
  }

  .lb-col-rank {
    flex: 0 0 28px;
    font-size: 0.68rem;
  }
}






/* =========================================================================
   ⚔️ 1V1 PVP BATTLE ARENA & MULTIPLAYER MODAL SYSTEM
   ========================================================================= */

#modal-battle-lobby {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 999999 !important;
  background: rgba(4, 9, 20, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  margin: 0 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
}

#modal-battle-lobby.hidden {
  display: none !important;
}

.battle-lobby-box,
.battle-waiting-box {
  width: 100% !important;
  max-width: 520px !important;
  margin: auto !important;
  background: linear-gradient(135deg, rgba(13, 22, 45, 0.95), rgba(7, 12, 28, 0.98)) !important;
  border: 1.5px solid rgba(0, 243, 255, 0.4) !important;
  border-radius: 18px !important;
  box-shadow: 0 0 40px rgba(0, 243, 255, 0.25), 0 20px 50px rgba(0, 0, 0, 0.8) !important;
  animation: cyberModalPop 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.battle-lobby-content {
  padding: 20px 24px 24px;
}

.battle-lobby-header {
  text-align: center;
  margin-bottom: 18px;
}

.battle-lobby-icon {
  font-size: 2.8rem;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.6));
}

.battle-lobby-title {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.8px;
}

.battle-lobby-sub {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 6px 0 0;
}

/* Tab Switcher */
.battle-tab-switcher {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(0, 243, 255, 0.25);
  border-radius: 12px;
  padding: 4px;
  gap: 6px;
  margin-bottom: 18px;
}

.battle-tab-btn {
  flex: 1;
  padding: 10px 8px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.battle-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.2), rgba(168, 85, 247, 0.25));
  border: 1px solid #00f3ff;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.35);
}

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

.battle-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  margin-bottom: 12px;
}

.battle-input-label {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #00f3ff;
  letter-spacing: 0.5px;
}

.battle-rules-mini {
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(0, 243, 255, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px 0;
}

.room-code-field {
  text-align: center;
  font-family: var(--font-sci-fi, 'Orbitron'), monospace;
  font-size: 1.3rem !important;
  letter-spacing: 3px !important;
  font-weight: 800;
  color: #fbbf24 !important;
  text-transform: uppercase;
}

/* Room Code Card */
.room-code-display-card {
  background: rgba(15, 23, 42, 0.75);
  border: 2px solid #fbbf24;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.25);
}

.room-code-lbl {
  display: block;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 0.75rem;
  color: #fbbf24;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 4px;
}

.room-code-giant {
  font-family: var(--font-sci-fi, 'Orbitron'), monospace;
  font-size: 2.4rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 4px;
  text-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
  margin-bottom: 10px;
}

.btn-copy-code {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.3));
  border: 1px solid #fbbf24;
  color: #fbbf24;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-copy-code:hover {
  background: #fbbf24;
  color: #0b1021;
}

/* Radar Scan */
.radar-scan-container {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.radar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(0, 243, 255, 0.4);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
  margin-bottom: 12px;
}

.radar-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: conic-gradient(from 0deg, rgba(0, 243, 255, 0.4) 0deg, transparent 90deg, transparent 360deg);
  animation: radarSweepAnim 2s linear infinite;
  border-radius: 50%;
}

@keyframes radarSweepAnim {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.radar-dot {
  position: absolute;
  top: 36px;
  left: 36px;
  width: 8px;
  height: 8px;
  background: #00f3ff;
  border-radius: 50%;
  box-shadow: 0 0 10px #00f3ff;
  animation: pulseDot 1s ease-in-out infinite alternate;
}

@keyframes pulseDot {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 1; }
}

.radar-status-text {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #00f3ff;
}

.radar-subtext {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 4px 0 0;
}

/* Opponent Joined Card */
.opponent-joined-card {
  background: rgba(6, 78, 59, 0.35);
  border: 2px solid #34d399;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 0 30px rgba(52, 211, 153, 0.3);
  animation: cyberModalPop 0.3s ease;
}

.match-ready-tag {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  color: #34d399;
  letter-spacing: 1px;
}

.match-vs-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 10px;
}

.match-player {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.match-vs-badge {
  background: #ef4444;
  color: #ffffff;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-weight: 900;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

/* 3..2..1 Countdown Overlay */
.battle-countdown-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1000000 !important;
  background: rgba(3, 7, 18, 0.92) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

.battle-countdown-fullscreen.hidden {
  display: none !important;
}

.countdown-center-card {
  text-align: center;
}

.countdown-vs-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
}

.countdown-vs-fire {
  color: #ef4444;
  text-shadow: 0 0 15px rgba(239, 68, 68, 0.8);
}

.countdown-number {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 6.5rem;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 40px rgba(251, 191, 36, 0.8);
  margin: 10px 0;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.countdown-number.pulse-pop {
  transform: scale(1.35);
}

.countdown-tagline {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #00f3ff;
  letter-spacing: 2px;
}

/* Battle Dual HUD */
.battle-hud-dual-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 16, 35, 0.92);
  border-bottom: 2px solid rgba(0, 243, 255, 0.3);
  padding: 8px 16px;
  position: relative;
  z-index: 100;
}

.battle-player-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.battle-avatar-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: rgba(15, 23, 42, 0.8);
}

.cyan-glow {
  border: 2px solid #00f3ff;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.rose-glow {
  border: 2px solid #f43f5e;
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.4);
}

.battle-meta-col {
  display: flex;
  flex-direction: column;
}

.battle-player-name {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
}

.battle-score-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.battle-pts {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  color: #ffffff;
}

.opp-pts {
  color: #fda4af;
}

.battle-combo-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.battle-combo-badge.active-flame {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

.opp-score-floater {
  position: absolute;
  top: -10px;
  right: -10px;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 0.85rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.opp-score-floater.hidden {
  opacity: 0;
  transform: translateY(0);
}

.opp-score-floater.visible.pts-gain {
  opacity: 1;
  transform: translateY(-20px);
  background: #34d399;
  color: #064e3b;
  box-shadow: 0 0 10px #34d399;
}

.opp-score-floater.visible.pts-miss {
  opacity: 1;
  transform: translateY(-20px);
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 10px #ef4444;
}

.battle-vs-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.battle-cat-tag {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: #00f3ff;
}

.battle-timer-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid #00f3ff;
  border-radius: 20px;
  padding: 3px 12px;
  font-family: var(--font-sci-fi, 'Orbitron'), monospace;
  font-size: 0.95rem;
  font-weight: 900;
  color: #ffffff;
}

.battle-timer-bubble.urgent-timer-anim {
  border-color: #ef4444;
  color: #f87171;
  animation: urgentTimerPulse 0.5s infinite alternate;
}

@keyframes urgentTimerPulse {
  0% { transform: scale(1); box-shadow: 0 0 5px #ef4444; }
  100% { transform: scale(1.1); box-shadow: 0 0 18px #ef4444; }
}

.battle-vs-sub {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
}

/* Battle Results Screen */
.battle-results-wrapper {
  width: 95%;
  max-width: 680px;
  margin: 20px auto;
  border-radius: 20px;
  overflow: hidden;
  border: 1.5px solid rgba(0, 243, 255, 0.4);
}

.battle-results-body {
  padding: 24px;
}

.battle-result-hero {
  text-align: center;
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 20px;
}

.victory-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.4));
  border: 2px solid #34d399;
  box-shadow: 0 0 30px rgba(52, 211, 153, 0.35);
}

.draw-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.4));
  border: 2px solid #fbbf24;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.35);
}

.defeat-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(185, 28, 28, 0.4));
  border: 2px solid #f87171;
  box-shadow: 0 0 30px rgba(248, 113, 113, 0.35);
}

.hero-icon {
  font-size: 3.5rem;
  margin-bottom: 6px;
}

.hero-title {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 2px;
  margin: 0;
  color: #ffffff;
}

.hero-sub {
  font-size: 0.95rem;
  color: #e2e8f0;
  margin: 6px 0 0;
}

/* Head to Head Grid */
.h2h-grid-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(10, 16, 35, 0.8);
  border: 1px solid rgba(0, 243, 255, 0.2);
  border-radius: 14px;
  padding: 12px;
}

.h2h-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
}

.h2h-row.h2h-header {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.h2h-col {
  flex: 1;
  text-align: center;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
}

.col-player {
  font-weight: 800;
}

.col-metric, .col-label {
  color: #94a3b8;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
}

.col-val {
  font-size: 1.1rem;
  color: #ffffff;
}

.col-val.highlight-win {
  color: #34d399;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.6);
}

/* Rematch Toast */
.rematch-toast-container {
  position: fixed !important;
  bottom: 24px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 999999 !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.98)) !important;
  border: 2px solid #fbbf24 !important;
  border-radius: 16px !important;
  padding: 14px 20px !important;
  box-shadow: 0 0 35px rgba(251, 191, 36, 0.4) !important;
  animation: cyberModalPop 0.3s ease !important;
}

.rematch-toast-container.hidden {
  display: none !important;
}

.rematch-toast-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.toast-avatar {
  font-size: 1.8rem;
}

.toast-text {
  font-size: 0.9rem;
  color: #ffffff;
}

.toast-btns {
  display: flex;
  gap: 8px;
}

.btn-xs {
  padding: 6px 12px !important;
  font-size: 0.75rem !important;
}

/* ==========================================================================
   FLOATING REQUEST CATEGORY COMPACT ICON & MODAL
   ========================================================================== */
.floating-req-cat-btn {
  position: fixed !important;
  bottom: 24px !important;
  right: 20px !important;
  z-index: 9999 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0px !important;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.4), rgba(6, 182, 212, 0.45)) !important;
  border: 1.5px solid #00f3ff !important;
  border-radius: 50px !important;
  color: #ffffff !important;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  cursor: pointer !important;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.5), inset 0 0 10px rgba(16, 185, 129, 0.3) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  overflow: hidden !important;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease, transform 0.2s ease, box-shadow 0.25s ease !important;
  animation: floatReqBtn 3s ease-in-out infinite alternate !important;
}

.floating-req-cat-btn .req-ico {
  font-size: 1.25rem !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  height: 42px !important;
  filter: drop-shadow(0 0 6px #00f3ff) !important;
}

.floating-req-cat-btn .req-txt {
  max-width: 0 !important;
  opacity: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  transition: max-width 0.3s ease, opacity 0.25s ease, margin 0.3s ease !important;
  margin-right: 0 !important;
}

/* Hover or Active Expansion */
.floating-req-cat-btn:hover, .floating-req-cat-btn:focus, .floating-req-cat-btn.expanded {
  width: auto !important;
  padding: 0 16px 0 6px !important;
  transform: translateY(-3px) scale(1.04) !important;
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.8), inset 0 0 16px rgba(16, 185, 129, 0.6) !important;
  border-color: #34d399 !important;
}

.floating-req-cat-btn:hover .req-txt, .floating-req-cat-btn:focus .req-txt, .floating-req-cat-btn.expanded .req-txt {
  max-width: 160px !important;
  opacity: 1 !important;
  margin-left: 2px !important;
  margin-right: 6px !important;
}

@keyframes floatReqBtn {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-5px); }
}

@media (max-width: 640px) {
  .floating-req-cat-btn {
    bottom: 16px !important;
    right: 14px !important;
    width: 40px !important;
    height: 40px !important;
  }
  .floating-req-cat-btn .req-ico {
    font-size: 1.1rem !important;
    width: 38px !important;
    height: 38px !important;
  }
}

/* Header Button for Request Category */
.btn-req-action {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(6, 182, 212, 0.3)) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  color: #34d399 !important;
}

.btn-req-action:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.45), rgba(6, 182, 212, 0.5)) !important;
  border-color: #00f3ff !important;
  color: #ffffff !important;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.5) !important;
}

.req-cat-modal {
  max-width: 520px !important;
  width: 92% !important;
  border: 1.5px solid rgba(0, 243, 255, 0.6) !important;
  box-shadow: 0 0 40px rgba(0, 243, 255, 0.35), inset 0 0 20px rgba(16, 185, 129, 0.2) !important;
  border-radius: 12px !important;
}

.req-cat-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  text-align: left !important;
}

.req-form-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}

.req-form-label {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #00f3ff !important;
  letter-spacing: 0.05em !important;
}

.req-form-label .req-star {
  color: #f43f5e !important;
}

.req-form-input, .req-form-textarea {
  width: 100% !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(0, 243, 255, 0.35) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  color: #ffffff !important;
  font-size: 0.88rem !important;
  font-family: inherit !important;
  outline: none !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  box-sizing: border-box !important;
}

.req-form-input:focus, .req-form-textarea:focus {
  border-color: #00f3ff !important;
  box-shadow: 0 0 14px rgba(0, 243, 255, 0.45) !important;
}

.req-form-textarea {
  min-height: 75px !important;
  resize: vertical !important;
}

.req-info-notice {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-size: 0.82rem !important;
  line-height: 1.5 !important;
  color: #d1fae5 !important;
  margin-top: 4px !important;
}

.req-info-notice .req-notice-icon {
  font-size: 1.2rem !important;
  line-height: 1 !important;
}

.req-success-card {
  text-align: center !important;
  padding: 10px 8px !important;
  animation: cyberModalPop 0.3s ease !important;
}

.req-success-icon {
  font-size: 3.2rem !important;
  margin-bottom: 8px !important;
}

.req-success-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 1.2rem !important;
  color: #34d399 !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 10px !important;
}

.req-success-desc {
  font-size: 0.88rem !important;
  color: #cbd5e1 !important;
  line-height: 1.6 !important;
  max-width: 440px !important;
  margin: 0 auto 20px auto !important;
}


/* ==========================================================================
   ⚔️ BATTLE HEAD-TO-HEAD SHARE CARD STYLES
   ========================================================================== */
.battle-share-card {
  border-color: rgba(0, 243, 255, 0.4) !important;
}

.battle-h2h-card {
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(0, 243, 255, 0.35) !important;
  border-radius: 14px !important;
  padding: 16px 18px !important;
  margin: 16px 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.h2h-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-bottom: 12px !important;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.12) !important;
}

.h2h-card-name {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-weight: 800 !important;
  font-size: 1.05rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.h2h-card-name.you {
  color: #00f3ff !important;
}

.h2h-card-name.opp {
  color: #f43f5e !important;
}

.h2h-you-tag {
  font-size: 0.62rem !important;
  background: rgba(0, 243, 255, 0.25) !important;
  color: #00f3ff !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(0, 243, 255, 0.5) !important;
}

.h2h-card-vs {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-weight: 900 !important;
  font-size: 0.95rem !important;
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.2) !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

.h2h-card-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: rgba(2, 6, 23, 0.6) !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.h2h-card-val {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-weight: 800 !important;
  font-size: 1rem !important;
  color: #e2e8f0 !important;
  flex: 1 !important;
}

.h2h-card-val:last-child {
  text-align: right !important;
}

.h2h-card-val.h2h-winner-val {
  color: #34d399 !important;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.5) !important;
}

.h2h-card-metric {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-align: center !important;
  flex: 1.3 !important;
}



/* ==========================================================================
   🏆 ULTRA-PREMIUM CYBERPUNK SHAREABLE VICTORY & BATTLE CARD
   ========================================================================== */
.share-card-overlay {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(3, 7, 18, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 10000 !important;
  padding: 12px !important;
  box-sizing: border-box !important;
}

.share-card-modal-box {
  width: 100% !important;
  max-width: 440px !important;
  max-height: 92vh !important;
  overflow-y: auto !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(3, 7, 18, 0.98)) !important;
  border: 1.5px solid rgba(0, 243, 255, 0.4) !important;
  border-radius: 18px !important;
  box-shadow: 0 0 35px rgba(0, 243, 255, 0.25), inset 0 0 20px rgba(0, 243, 255, 0.05) !important;
  padding: 0 !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.terminal-header-bar {
  display: flex !important;
  align-items: center !important;
  padding: 10px 14px !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border-bottom: 1px solid rgba(0, 243, 255, 0.2) !important;
  border-radius: 18px 18px 0 0 !important;
  gap: 8px !important;
  box-sizing: border-box !important;
}

.terminal-dot {
  width: 9px !important;
  height: 9px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}
.terminal-dot.green { background: #10b981 !important; box-shadow: 0 0 6px #10b981 !important; }
.terminal-dot.yellow { background: #f59e0b !important; box-shadow: 0 0 6px #f59e0b !important; }
.terminal-dot.cyan { background: #00f3ff !important; box-shadow: 0 0 6px #00f3ff !important; }

.terminal-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.05em !important;
  flex: 1 !important;
  margin-left: 4px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.terminal-close-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #cbd5e1 !important;
  font-size: 1.2rem !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: all 0.2s !important;
}
.terminal-close-btn:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  color: #ef4444 !important;
  border-color: #ef4444 !important;
}

.share-card-content {
  padding: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

/* 🏆 CYBER TROPHY CARD CONTAINER */
.cyber-trophy-card {
  position: relative !important;
  background: radial-gradient(circle at 50% 20%, rgba(30, 41, 59, 0.85), rgba(3, 7, 18, 0.95)) !important;
  border: 1.5px solid rgba(0, 243, 255, 0.4) !important;
  border-radius: 16px !important;
  padding: 16px 12px !important;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 243, 255, 0.08) !important;
  overflow: hidden !important;
  text-align: center !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.card-bg-glow {
  position: absolute !important;
  top: -40px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 220px !important;
  height: 180px !important;
  background: radial-gradient(circle, var(--rank-color, #00f3ff) 0%, transparent 70%) !important;
  opacity: 0.25 !important;
  filter: blur(30px) !important;
  pointer-events: none !important;
}

.card-corner {
  position: absolute !important;
  width: 12px !important;
  height: 12px !important;
  border-color: #00f3ff !important;
  border-style: solid !important;
  pointer-events: none !important;
}
.corner-tl { top: 6px; left: 6px; border-width: 2.5px 0 0 2.5px !important; }
.corner-tr { top: 6px; right: 6px; border-width: 2.5px 2.5px 0 0 !important; }
.corner-bl { bottom: 6px; left: 6px; border-width: 0 0 2.5px 2.5px !important; }
.corner-br { bottom: 6px; right: 6px; border-width: 0 2.5px 2.5px 0 !important; }

.card-header-bar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding-bottom: 10px !important;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12) !important;
  margin-bottom: 12px !important;
}

.card-brand-badge {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  color: #00f3ff !important;
  letter-spacing: 0.04em !important;
}

.card-date-badge {
  font-size: 0.68rem !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
}

/* HERO SECTION */
.card-main-hero {
  margin: 6px 0 12px 0 !important;
}

.card-trophy-icon {
  font-size: 3rem !important;
  line-height: 1 !important;
  margin-bottom: 6px !important;
  filter: drop-shadow(0 0 14px rgba(251, 191, 36, 0.6)) !important;
}

.card-rank-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 1.45rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  margin: 0 0 6px 0 !important;
  text-shadow: 0 0 12px currentColor !important;
}

.card-sub-badge {
  display: inline-block !important;
  background: rgba(0, 243, 255, 0.1) !important;
  border: 1px solid rgba(0, 243, 255, 0.3) !important;
  color: #e2e8f0 !important;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  padding: 3px 12px !important;
  border-radius: 20px !important;
  letter-spacing: 0.03em !important;
  max-width: 90% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* STATS GRID 2X2 */
.card-stats-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  margin: 12px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.c-stat-box {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-top: 2px solid rgba(0, 243, 255, 0.6) !important;
  border-radius: 10px !important;
  padding: 10px 6px !important;
  text-align: center !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.c-stat-lbl {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.03em !important;
  margin-bottom: 4px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.c-stat-val {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
  line-height: 1.25 !important;
  word-break: break-word !important;
}

/* 🌟 EYE-CATCHING PROMINENT RESPONSIVE FOOTER CTA */
.card-footer-branding {
  margin-top: 14px !important;
  padding: 12px 10px !important;
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.12), rgba(168, 85, 247, 0.12)) !important;
  border: 1.5px solid rgba(0, 243, 255, 0.45) !important;
  border-radius: 12px !important;
  box-shadow: 0 0 16px rgba(0, 243, 255, 0.15) !important;
  text-align: center !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.c-footer-game-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  letter-spacing: 0.04em !important;
  margin-bottom: 8px !important;
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.6) !important;
}

.c-footer-cta-pill {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 4px 6px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: linear-gradient(90deg, #fbbf24, #f59e0b) !important;
  color: #030712 !important;
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.85rem !important;
  font-weight: 900 !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.45) !important;
  margin: 0 auto 6px auto !important;
}

.c-footer-cta-pill .cta-tag {
  font-size: 0.78rem !important;
  opacity: 0.9 !important;
}

.c-footer-cta-pill .cta-url {
  font-size: 0.92rem !important;
  letter-spacing: 0.02em !important;
  text-decoration: underline !important;
}

.c-footer-subtext {
  font-size: 0.72rem !important;
  color: #cbd5e1 !important;
  font-weight: 600 !important;
  margin-top: 4px !important;
  line-height: 1.3 !important;
}

.share-card-actions {
  display: flex !important;
  gap: 10px !important;
  margin-top: 4px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}


/* ==========================================================================
   ULTRA-RESPONSIVE 1V1 BATTLE RESULTS & SHARE CARD MODAL STYLES (MOBILE-FIRST)
   ========================================================================== */
.h2h-grid-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 16px 0 !important;
}

.h2h-row {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(0, 243, 255, 0.15) !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.h2h-row.h2h-header {
  background: rgba(11, 19, 38, 0.95) !important;
  border-color: rgba(0, 243, 255, 0.35) !important;
  padding: 10px 14px !important;
}

.h2h-col.col-player {
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.h2h-col.col-player .h2h-sub-tag {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  opacity: 0.8 !important;
}

.h2h-col.col-player:first-child {
  text-align: left !important;
}

.h2h-col.col-player.text-right,
.h2h-col.col-player:last-child {
  text-align: right !important;
}

.h2h-col.col-metric {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.75rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  text-align: center !important;
  padding: 2px 10px !important;
  background: rgba(251, 191, 36, 0.15) !important;
  border-radius: 6px !important;
}

.h2h-col.col-label {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.h2h-col.col-val {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #e2e8f0 !important;
}

.h2h-col.col-val:first-child { text-align: left !important; }
.h2h-col.col-val:last-child { text-align: right !important; }
.h2h-col.col-val.highlight-win { color: #34d399 !important; font-weight: 900 !important; }

/* 1v1 Battle Share Card Component */
.battle-h2h-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 12px 0 !important;
}

.h2h-card-header {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(11, 19, 38, 0.95) !important;
  border: 1px solid rgba(0, 243, 255, 0.25) !important;
  border-radius: 10px !important;
  padding: 8px 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.h2h-card-name {
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.h2h-card-name.you { text-align: left !important; }
.h2h-card-name.opp { text-align: right !important; color: #f43f5e !important; }

.h2h-card-vs {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  text-align: center !important;
  padding: 2px 8px !important;
  background: rgba(251, 191, 36, 0.15) !important;
  border-radius: 6px !important;
}

.h2h-card-row {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.h2h-card-val {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  color: #e2e8f0 !important;
}

.h2h-card-val:first-child { text-align: left !important; }
.h2h-card-val:last-child { text-align: right !important; }
.h2h-card-val.h2h-winner-val { color: #34d399 !important; font-weight: 900 !important; }

.h2h-card-metric {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

/* Card Footer Branding (Vertical Stack, No Collision) */
.card-footer-branding {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 12px 10px !important;
  margin-top: 14px !important;
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(0, 243, 255, 0.3) !important;
  border-radius: 14px !important;
  gap: 6px !important;
}

.card-footer-branding .c-footer-game-title {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.85rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  letter-spacing: 0.05em !important;
  text-align: center !important;
  width: 100% !important;
}

.card-footer-branding .c-footer-cta-pill {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 260px !important;
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  color: #030712 !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.4) !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

.card-footer-branding .c-footer-cta-pill .cta-tag {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

.card-footer-branding .c-footer-cta-pill .cta-url {
  font-family: var(--font-sci-fi, 'Orbitron', sans-serif) !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
  text-decoration: underline !important;
}

.card-footer-branding .c-footer-subtext {
  font-size: 0.68rem !important;
  color: #94a3b8 !important;
  text-align: center !important;
  width: 100% !important;
}

/* ==========================================================================
   📸 LEADERBOARD TOP 3 SHARE CARD BUTTON
   ========================================================================== */
.lb-share-card-trigger-box {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
  width: 100%;
}
.btn-share-top3-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.35) 100%);
  border: 1px solid #fbbf24;
  color: #fef08a;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
  transition: all 0.2s ease;
}
.btn-share-top3-action:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.45) 0%, rgba(217, 119, 6, 0.55) 100%);
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.5);
}

/* ==========================================================================
   📸 LEADERBOARD FOOTER INLINE BUTTONS
   ========================================================================== */
.lb-footer-row {
  display: flex !important;
  flex-direction: row !important;
  gap: 12px !important;
  width: 100% !important;
  margin-top: 14px !important;
}
.btn-gold-action {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.4) 100%) !important;
  border: 1px solid #fbbf24 !important;
  color: #fef08a !important;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.84rem !important;
  letter-spacing: 0.5px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3) !important;
  transition: all 0.2s ease !important;
}
.btn-gold-action:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.45) 0%, rgba(217, 119, 6, 0.6) 100%) !important;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.5) !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   🏆 ARCADE CONFIG MODAL: LEADERBOARD SHORTCUT & LAUNCH BUTTONS
   ========================================================================== */
.arcade-launch-row {
  display: flex !important;
  flex-direction: row !important;
  gap: 12px !important;
  width: 100% !important;
  margin-top: 18px !important;
}
.btn-arcade-lb-shortcut {
  flex: 1 !important;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(2, 132, 199, 0.35) 100%) !important;
  border: 1px solid #38bdf8 !important;
  color: #bae6fd !important;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.86rem !important;
  letter-spacing: 0.5px !important;
  padding: 13px 14px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25) !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
}
.btn-arcade-lb-shortcut:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.35) 0%, rgba(2, 132, 199, 0.5) 100%) !important;
  border-color: #00f3ff !important;
  color: #ffffff !important;
  box-shadow: 0 0 25px rgba(0, 243, 255, 0.45) !important;
  transform: translateY(-1px) !important;
}
.arcade-launch-row .btn-action {
  width: auto !important;
}
.arcade-launch-row .btn-arcade-start {
  flex: 1.4 !important;
  width: auto !important;
}

/* ==========================================================================
   🎮 CAMPAIGN DIFFICULTY SELECTOR - PREMIUM CYBERPUNK STYLING
   ========================================================================== */
.campaign-selector-container {
  max-width: 860px !important;
  width: 95% !important;
  margin: 20px auto !important;
  background: rgba(10, 16, 32, 0.94) !important;
  border: 1.5px solid rgba(0, 243, 255, 0.35) !important;
  border-radius: 20px !important;
  box-shadow: 0 0 40px rgba(0, 243, 255, 0.15), inset 0 0 30px rgba(0, 243, 255, 0.05) !important;
  backdrop-filter: blur(16px) !important;
  padding: 24px 28px !important;
}

.campaign-top-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  margin-bottom: 18px !important;
  gap: 12px !important;
}

.btn-top-back-cyber {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  color: #bae6fd !important;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  letter-spacing: 1px !important;
  padding: 8px 18px !important;
  border-radius: 20px !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2) !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  width: auto !important;
}

.btn-top-back-cyber:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.3) 0%, rgba(2, 132, 199, 0.5) 100%) !important;
  border-color: #00f3ff !important;
  color: #ffffff !important;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.4) !important;
  transform: translateX(-2px) !important;
}

.campaign-mode-badge {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  letter-spacing: 1.5px !important;
  color: #38bdf8 !important;
  background: rgba(14, 165, 233, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  padding: 6px 16px !important;
  border-radius: 20px !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.campaign-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
  margin: 22px 0 !important;
  width: 100% !important;
}

@media (max-width: 768px) {
  .campaign-cards-grid {
    grid-template-columns: 1fr !important;
  }
}

.level-card {
  background: rgba(13, 21, 39, 0.85) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
  padding: 20px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  overflow: hidden !important;
}

.level-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  background: rgba(18, 30, 56, 0.95) !important;
}

.level-card.selected[data-diff="beginner"] {
  border-color: #10b981 !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35), inset 0 0 15px rgba(16, 185, 129, 0.15) !important;
  background: rgba(6, 44, 34, 0.5) !important;
}

.level-card.selected[data-diff="medium"] {
  border-color: #f59e0b !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.35), inset 0 0 15px rgba(245, 158, 11, 0.15) !important;
  background: rgba(56, 35, 6, 0.5) !important;
}

.level-card.selected[data-diff="expert"] {
  border-color: #ef4444 !important;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.35), inset 0 0 15px rgba(239, 68, 68, 0.15) !important;
  background: rgba(58, 11, 11, 0.5) !important;
}

.level-card .level-icon {
  font-size: 1.8rem !important;
  margin-bottom: 10px !important;
}

.level-card .level-name {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif !important;
  font-size: 1.1rem !important;
  font-weight: 900 !important;
  letter-spacing: 1px !important;
  color: #ffffff !important;
  margin-bottom: 10px !important;
}

.level-card[data-diff="beginner"] .level-name { color: #34d399 !important; }
.level-card[data-diff="medium"] .level-name { color: #fbbf24 !important; }
.level-card[data-diff="expert"] .level-name { color: #f87171 !important; }

.level-card .level-checkpoint-info {
  font-size: 0.78rem !important;
  color: #94a3b8 !important;
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 4px 10px !important;
  border-radius: 12px !important;
  margin-bottom: 8px !important;
  width: 100% !important;
}

.level-card .level-best-time-badge {
  font-size: 0.76rem !important;
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.1) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  padding: 5px 10px !important;
  border-radius: 8px !important;
  margin-bottom: 12px !important;
  width: 100% !important;
}

.level-card .level-desc {
  font-size: 0.8rem !important;
  color: #cbd5e1 !important;
  line-height: 1.45 !important;
}

.btn-campaign-launch-gold {
  width: 100% !important;
  height: 48px !important;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  letter-spacing: 1.5px !important;
  background: linear-gradient(135deg, #f59e0b, #d97706, #b45309) !important;
  color: #040711 !important;
  border: 2px solid #fbbf24 !important;
  border-radius: 30px !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.5) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.25s ease !important;
}

.btn-campaign-launch-gold:hover {
  transform: translateY(-2px) scale(1.01) !important;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.8) !important;
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706) !important;
}

/* ==========================================================================
   🎮 CAMPAIGN HUD SPACE THEME (MATCHING MINI GAMES HUD CARDS)
   ========================================================================== */
.campaign-hud-wrapper {
  max-width: 980px !important;
  width: 95% !important;
  margin: 18px auto !important;
}

.campaign-hud-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
  margin: 18px 0 24px 0 !important;
  width: 100% !important;
}

@media (max-width: 768px) {
  .campaign-hud-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

.campaign-level-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.campaign-level-card:hover {
  transform: translateY(-3px) !important;
}

.campaign-level-card.selected {
  transform: translateY(-5px) scale(1.02) !important;
  filter: drop-shadow(0 0 14px var(--category-color)) !important;
}

.campaign-level-card.selected .card-folder-inner {
  border-color: var(--category-color) !important;
  box-shadow: 0 0 25px color-mix(in srgb, var(--category-color) 45%, transparent), inset 0 0 15px color-mix(in srgb, var(--category-color) 20%, transparent) !important;
}

/* ==========================================================================
   🎮 CAMPAIGN HUD HEADER & LAYOUT SPECIFICATION
   ========================================================================== */
.campaign-hud-wrapper {
  max-width: 1020px !important;
  width: 95% !important;
  margin: 20px auto !important;
  padding: 24px 28px !important;
  box-sizing: border-box !important;
}

.campaign-header-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  margin-bottom: 22px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid rgba(0, 243, 255, 0.2) !important;
  position: relative !important;
}

.header-col-left {
  flex: 0 0 140px !important;
  display: flex !important;
  justify-content: flex-start !important;
}

.header-col-center {
  flex: 1 !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
}

.header-col-right {
  flex: 0 0 140px !important;
  display: flex !important;
  justify-content: flex-end !important;
}

.btn-hud-back {
  background: rgba(10, 20, 40, 0.85) !important;
  border: 1px solid #00f3ff !important;
  color: #00f3ff !important;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  letter-spacing: 1px !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.25) !important;
  white-space: nowrap !important;
}

.btn-hud-back:hover {
  background: rgba(0, 243, 255, 0.25) !important;
  color: #ffffff !important;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.6) !important;
  transform: translateX(-2px) !important;
}

.btn-settings-hud {
  width: 38px !important;
  height: 38px !important;
  background: rgba(10, 20, 40, 0.85) !important;
  border: 1px solid rgba(0, 243, 255, 0.4) !important;
  color: #00f3ff !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.2) !important;
}

.btn-settings-hud:hover {
  background: rgba(0, 243, 255, 0.25) !important;
  color: #ffffff !important;
  transform: rotate(45deg) !important;
  box-shadow: 0 0 18px rgba(0, 243, 255, 0.5) !important;
}

.campaign-hud-title {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif !important;
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  letter-spacing: 1.5px !important;
  color: #ffffff !important;
  text-shadow: 0 0 15px rgba(0, 243, 255, 0.6) !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.campaign-hud-subtitle {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  color: #00f3ff !important;
  opacity: 0.85 !important;
}

.campaign-cards-hud-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
  margin: 18px 0 24px 0 !important;
  width: 100% !important;
}

@media (max-width: 820px) {
  .campaign-cards-hud-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .campaign-header-bar {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: center !important;
  }
  .header-col-left, .header-col-right {
    width: 100% !important;
    justify-content: center !important;
    flex: auto !important;
  }
}

.campaign-launch-container {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  margin-top: 10px !important;
}

.btn-campaign-launch-gold {
  max-width: 480px !important;
  width: 100% !important;
  height: 50px !important;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  letter-spacing: 1.5px !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%) !important;
  color: #040711 !important;
  border: 2px solid #fbbf24 !important;
  border-radius: 30px !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.55), inset 0 0 10px rgba(255, 255, 255, 0.3) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  transition: all 0.25s ease !important;
}

.btn-campaign-launch-gold:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.85) !important;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%) !important;
}

/* ==========================================================================
   📱 1-COLUMN FULL-WIDTH STACKED OPTIONS (DESKTOP & MOBILE CONSISTENT)
   ========================================================================== */
.options-grid,
.puzzle-right-panel .options-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.btn-option,
.puzzle-right-panel .btn-option {
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 52px !important;
  height: auto !important;
  padding: 12px 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  text-align: left !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
  line-height: 1.45 !important;
  font-size: clamp(0.9rem, 1.35vw, 1.02rem) !important;
  background: rgba(13, 21, 39, 0.94) !important;
  border: 1.5px solid rgba(0, 243, 255, 0.45) !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
}

.btn-option {
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 54px !important;
  height: auto !important;
  padding: 10px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  text-align: left !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
  line-height: 1.4 !important;
  font-size: clamp(0.85rem, 2.2vw, 0.98rem) !important;
  background: rgba(13, 21, 39, 0.92) !important;
  border: 1.5px solid rgba(0, 243, 255, 0.45) !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
}

.btn-option:hover {
  background: rgba(14, 165, 233, 0.25) !important;
  border-color: #00f3ff !important;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.5) !important;
  transform: translateY(-2px) !important;
}

.btn-option .opt-letter {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  background: rgba(0, 243, 255, 0.18) !important;
  border: 1.5px solid #00f3ff !important;
  color: #00f3ff !important;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.92rem !important;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.35) !important;
}

.btn-option .opt-text {
  flex: 1 !important;
  min-width: 0 !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
  color: #f8fafc !important;
  line-height: 1.4 !important;
}

/* Modal Category Header Rank Shortcut Pill */
.btn-modal-rank-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(251, 191, 36, 0.25) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.7) !important;
  color: #fbbf24 !important;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25) !important;
  white-space: nowrap !important;
  margin-left: auto !important;
}

.btn-modal-rank-badge:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(251, 191, 36, 0.45) 100%) !important;
  color: #ffffff !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6) !important;
  transform: translateY(-1px) !important;
}

/* ==========================================================================
   🎯 CAMPAIGN LEVEL CARD PROMINENT SELECTION INDICATOR
   ========================================================================== */
.campaign-level-card {
  position: relative !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.campaign-level-card .selected-indicator-banner {
  display: none !important;
}

/* When Selected: Intense Glow, Border and Glowing Status Badge */
.campaign-level-card.selected {
  transform: translateY(-5px) scale(1.03) !important;
  filter: drop-shadow(0 0 16px var(--category-color, #00f3ff)) !important;
  z-index: 10 !important;
}

.campaign-level-card.selected .card-folder-inner {
  border: 2px solid var(--category-color, #00f3ff) !important;
  box-shadow: inset 0 0 25px color-mix(in srgb, var(--category-color, #00f3ff) 35%, transparent) !important;
}

.campaign-level-card.selected .selected-indicator-banner {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  position: absolute !important;
  top: 8px !important;
  right: 14px !important;
  background: var(--category-color, #00f3ff) !important;
  color: #040817 !important;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  letter-spacing: 1px !important;
  padding: 3px 10px !important;
  border-radius: 20px !important;
  box-shadow: 0 0 14px var(--category-color, #00f3ff), inset 0 0 4px rgba(255, 255, 255, 0.8) !important;
  z-index: 20 !important;
  animation: pulseSelectedBadge 1.5s infinite alternate ease-in-out !important;
}

@keyframes pulseSelectedBadge {
  0% { transform: scale(1); box-shadow: 0 0 10px var(--category-color, #00f3ff); }
  100% { transform: scale(1.06); box-shadow: 0 0 20px var(--category-color, #00f3ff); }
}


/* ==========================================================================
   🔤 CYBERPUNK HANGMAN & TEBAK KATA GAMEPLAY STYLES
   ========================================================================== */
.hangman-left-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.hangman-topic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.topic-pill {
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.5);
  color: #f472b6;
  padding: 4px 10px;
  border-radius: 8px;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.word-len-pill {
  background: rgba(0, 243, 255, 0.15);
  border: 1px solid rgba(0, 243, 255, 0.5);
  color: #00f3ff;
  padding: 4px 10px;
  border-radius: 8px;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
}

/* Cyber Hologram Gallows Visual Stage */
.hangman-visual-stage {
  background: rgba(4, 9, 23, 0.95);
  border: 1.5px solid rgba(0, 243, 255, 0.4);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 0 25px rgba(0, 243, 255, 0.08), 0 4px 20px rgba(0, 0, 0, 0.5);
}

.gallows-hologram-screen {
  height: 90px;
  width: 100%;
  position: relative;
  background: radial-gradient(circle at 50% 50%, rgba(0, 243, 255, 0.12), transparent 70%), rgba(2, 6, 18, 0.8);
  border: 1px solid rgba(0, 243, 255, 0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cyber-holo-beam {
  position: absolute;
  bottom: 12px;
  left: 20%;
  width: 60%;
  height: 4px;
  background: #00f3ff;
  box-shadow: 0 0 12px #00f3ff;
  border-radius: 2px;
}

.cyber-holo-crane {
  position: absolute;
  bottom: 12px;
  left: 30%;
  width: 4px;
  height: 65px;
  background: #00f3ff;
  box-shadow: 0 0 10px #00f3ff;
}

.cyber-holo-crane::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 45px;
  height: 4px;
  background: #00f3ff;
  box-shadow: 0 0 10px #00f3ff;
}

.cyber-holo-core {
  position: absolute;
  top: 14px;
  left: calc(30% + 40px);
  width: 16px;
  height: 26px;
  border: 2px solid #ec4899;
  background: rgba(236, 72, 153, 0.35);
  border-radius: 6px;
  box-shadow: 0 0 15px #ec4899;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cyber-holo-core.core-visible {
  opacity: 1;
}

.cyber-holo-skull {
  position: absolute;
  top: 18px;
  left: calc(30% + 32px);
  font-size: 2rem;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 15px #ef4444);
}

.cyber-holo-skull.skull-visible {
  opacity: 1;
  transform: scale(1.1);
  animation: pulse 1s infinite alternate;
}

.holo-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(0, 243, 255, 0.4);
  box-shadow: 0 0 8px #00f3ff;
  animation: scanHolo 2.5s linear infinite;
}

@keyframes scanHolo {
  0% { top: 0; }
  100% { top: 100%; }
}

.strike-status-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.strike-nodes-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.strike-node {
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.strike-node.strike-active {
  animation: popLetter 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.strike-text-msg {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: center;
}

.status-safe { color: #34d399; }
.status-danger { color: #f59e0b; text-shadow: 0 0 10px rgba(245, 158, 11, 0.6); }
.status-dead { color: #ef4444; text-shadow: 0 0 10px rgba(239, 68, 68, 0.8); }

/* Clue Unlock Section */
.hangman-clue-locked {
  width: 100%;
}

.btn-unlock-clue {
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(236, 72, 153, 0.2));
  border: 1.5px dashed #f59e0b;
  color: #fbbf24;
  border-radius: 10px;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}

.btn-unlock-clue:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(236, 72, 153, 0.35));
  border-color: #fbbf24;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.penalty-tag {
  color: #ef4444;
  font-size: 0.74rem;
  font-weight: 800;
}

.hangman-clue-unlocked {
  background: rgba(6, 182, 212, 0.12);
  border: 1.5px solid #00f3ff;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.clue-tag {
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: #00f3ff;
}

.clue-content {
  font-family: var(--font-body, 'Outfit'), sans-serif;
  font-size: 0.92rem;
  color: #f8fafc;
  line-height: 1.4;
  margin: 0;
}

/* ==========================================================================
   HANGMAN WORD SLOTS & KEYBOARD (RIGHT PANEL)
   ========================================================================== */
.hangman-interactive-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.hangman-slots-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  padding: 16px 12px;
  background: rgba(3, 7, 18, 0.85);
  border: 1.5px solid rgba(0, 243, 255, 0.3);
  border-radius: 14px;
  min-height: 72px;
  box-sizing: border-box;
}

.hangman-word-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.letter-slot {
  width: 38px;
  height: 44px;
  min-width: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  box-sizing: border-box;
  transition: all 0.25s ease;
}

.slot-hidden {
  background: rgba(13, 21, 39, 0.95);
  border-bottom: 3px solid #00f3ff;
  border-top: 1px solid rgba(0, 243, 255, 0.2);
  border-left: 1px solid rgba(0, 243, 255, 0.2);
  border-right: 1px solid rgba(0, 243, 255, 0.2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.slot-revealed {
  background: rgba(16, 185, 129, 0.25);
  border: 2px solid #34d399;
  color: #34d399;
  box-shadow: 0 0 15px rgba(52, 211, 153, 0.5);
}

.slot-failed {
  background: rgba(239, 68, 68, 0.25);
  border: 2px solid #ef4444;
  color: #ef4444;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.letter-slot-hyphen {
  width: 18px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #00f3ff;
}

.animate-letter-pop {
  animation: popLetter 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popLetter {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* 3-Row Virtual Keyboard */
.hangman-keyboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.kb-row {
  display: flex;
  gap: 5px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.kb-key {
  flex: 1;
  max-width: 44px;
  height: 44px;
  background: rgba(13, 21, 39, 0.95);
  border: 1.5px solid rgba(0, 243, 255, 0.4);
  color: #f8fafc;
  border-radius: 8px;
  font-family: var(--font-sci-fi, 'Orbitron'), sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
  touch-action: manipulation;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.kb-key:hover:not(:disabled) {
  background: rgba(0, 243, 255, 0.25);
  border-color: #00f3ff;
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.45);
}

.kb-key:active:not(:disabled) {
  transform: translateY(1px);
}

.kb-key.key-correct {
  background: rgba(16, 185, 129, 0.22) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35) !important;
  opacity: 0.85 !important;
  cursor: default !important;
}

.kb-key.key-wrong {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #ef4444 !important;
  opacity: 0.45 !important;
  cursor: default !important;
  text-decoration: line-through;
}

@media (max-width: 600px) {
  .letter-slot {
    width: 32px;
    height: 38px;
    min-width: 32px;
    font-size: 1.05rem;
  }
  .kb-key {
    height: 40px;
    font-size: 0.85rem;
    padding: 0;
  }
  .kb-row {
    gap: 3px;
  }
}


/* ==========================================================================
   DYNAMIC VECTOR SVG HANGMAN ANIMATIONS
   ========================================================================== */
.hangman-svg-canvas {
  width: 100%;
  max-width: 170px;
  height: 120px;
  display: block;
  margin: 0 auto;
  overflow: visible;
  filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.4));
  transition: all 0.3s ease;
}

.svg-scaffold {
  filter: drop-shadow(0 0 6px rgba(0, 243, 255, 0.7));
}

.svg-rope {
  filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.8));
}

.hangman-part {
  opacity: 0;
  transform-origin: 108px 50px;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hangman-part.part-revealed {
  opacity: 1 !important;
  animation: hangmanSnap 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes hangmanSnap {
  0% {
    opacity: 0;
    transform: scale(0.4) translateY(-10px);
  }
  70% {
    opacity: 1;
    transform: scale(1.15) translateY(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.stage-strikes-4 .hangman-svg-canvas {
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.8));
}

.stage-strikes-5 .hangman-svg-canvas {
  filter: drop-shadow(0 0 18px rgba(239, 68, 68, 0.95)) !important;
  animation: gallowsDeathShake 0.4s ease infinite alternate !important;
}

@keyframes gallowsDeathShake {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-2px, 1px) rotate(-1deg); }
  75% { transform: translate(2px, -1px) rotate(1deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

.gallows-hologram-screen {
  height: 125px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
