/* ============================================
   EGD SPACE RUNNER — Neon Retro Space
   Emblavez Gaming Day 2026
   ============================================ */

/* --- CSS Variables --- */
:root {
    --neon-pink: #ff006e;
    --neon-cyan: #00f5ff;
    --neon-yellow: #ffbe0b;
    --neon-green: #00ff41;
    --deep-space: #0a0e27;
    --purple-dark: #240046;
    --purple-glow: #8338ec;

    --hud-height: 60px;
    --radius: 6px;
    --transition: 0.3s ease;
}

/* --- Reset --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--deep-space);
}
::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-pink);
}
html {
    scrollbar-width: thin;
    scrollbar-color: var(--neon-cyan) var(--deep-space);
}

/* --- Base --- */
html, body {
    font-family: 'Share Tech Mono', monospace;
    background: var(--deep-space);
    color: var(--neon-cyan);
    min-height: 100vh;
}

body {
    position: relative;
    overflow: hidden;
}

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

/* --- Scanline overlay (static, no animation for perf) --- */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

/* ============================================
   ANIMATED STAR LAYERS
   ============================================ */
.stars,
.stars2,
.stars3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    pointer-events: none;
    z-index: 0;
}

.stars {
    background: radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.8), transparent),
                radial-gradient(1px 1px at 30% 50%, rgba(255,255,255,0.6), transparent),
                radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.7), transparent),
                radial-gradient(1px 1px at 70% 70%, rgba(255,255,255,0.5), transparent),
                radial-gradient(1px 1px at 90% 40%, rgba(255,255,255,0.8), transparent),
                radial-gradient(1px 1px at 15% 80%, rgba(255,255,255,0.6), transparent),
                radial-gradient(1px 1px at 45% 90%, rgba(255,255,255,0.7), transparent),
                radial-gradient(1px 1px at 80% 15%, rgba(255,255,255,0.5), transparent),
                radial-gradient(1px 1px at 5% 55%, rgba(255,255,255,0.9), transparent),
                radial-gradient(1px 1px at 65% 35%, rgba(255,255,255,0.6), transparent),
                radial-gradient(1px 1px at 25% 65%, rgba(255,255,255,0.4), transparent),
                radial-gradient(1px 1px at 85% 85%, rgba(255,255,255,0.7), transparent);
    animation: starField 60s linear infinite;
}

.stars2 {
    background: radial-gradient(1.5px 1.5px at 20% 30%, rgba(0,245,255,0.6), transparent),
                radial-gradient(1.5px 1.5px at 60% 60%, rgba(0,245,255,0.5), transparent),
                radial-gradient(1.5px 1.5px at 40% 80%, rgba(255,190,11,0.4), transparent),
                radial-gradient(1.5px 1.5px at 75% 20%, rgba(0,245,255,0.6), transparent),
                radial-gradient(1.5px 1.5px at 10% 50%, rgba(255,190,11,0.3), transparent),
                radial-gradient(1.5px 1.5px at 55% 15%, rgba(0,245,255,0.5), transparent),
                radial-gradient(1.5px 1.5px at 35% 45%, rgba(255,190,11,0.4), transparent),
                radial-gradient(1.5px 1.5px at 90% 70%, rgba(0,245,255,0.6), transparent);
    animation: starField 90s linear infinite;
    opacity: 0.7;
}

.stars3 {
    background: radial-gradient(2px 2px at 25% 45%, rgba(131,56,236,0.5), transparent),
                radial-gradient(2px 2px at 55% 25%, rgba(255,0,110,0.4), transparent),
                radial-gradient(2px 2px at 80% 55%, rgba(131,56,236,0.5), transparent),
                radial-gradient(2px 2px at 15% 75%, rgba(255,0,110,0.3), transparent),
                radial-gradient(2px 2px at 45% 5%, rgba(131,56,236,0.4), transparent),
                radial-gradient(2px 2px at 70% 90%, rgba(255,0,110,0.5), transparent);
    animation: starField 120s linear infinite;
    opacity: 0.5;
}

@keyframes starField {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* ============================================
   VIDEO BACKGROUND
   ============================================ */
.video-background {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0.25;
    filter: blur(3px);
    pointer-events: none;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(10, 14, 39, 0.3),
        rgba(10, 14, 39, 0.6)
    );
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   VERSION BADGE (links to admin)
   ============================================ */
.version {
    position: fixed;
    top: 10px;
    right: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    color: var(--neon-cyan);
    background: rgba(0, 245, 255, 0.08);
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(0, 245, 255, 0.4);
    border-radius: 3px;
    z-index: 1000;
    opacity: 0.6;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    display: block;
}

.version:hover {
    opacity: 1;
    background: rgba(0, 245, 255, 0.25);
    transform: scale(1.1);
    box-shadow: 0 0 12px var(--neon-cyan);
}

/* ============================================
   INDEX PAGE — Main container
   ============================================ */
.container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}

/* --- Logo / title area --- */
.logo-container {
    margin-bottom: 2.5rem;
    position: relative;
}

.main-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 900;
    letter-spacing: 0.3em;
    color: var(--neon-cyan);
    text-shadow:
        0 0 10px var(--neon-cyan),
        0 0 20px var(--neon-cyan),
        0 0 40px var(--neon-cyan),
        0 0 80px rgba(0, 245, 255, 0.5);
    animation: titlePulse 3s ease-in-out infinite;
    line-height: 1.2;
}

@keyframes titlePulse {
    0%, 100% {
        text-shadow:
            0 0 10px var(--neon-cyan),
            0 0 20px var(--neon-cyan),
            0 0 40px var(--neon-cyan);
    }
    50% {
        text-shadow:
            0 0 20px var(--neon-cyan),
            0 0 40px var(--neon-cyan),
            0 0 80px var(--neon-cyan),
            0 0 120px rgba(0, 245, 255, 0.8);
    }
}

.year {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--neon-pink);
    text-shadow:
        0 0 10px var(--neon-pink),
        0 0 20px var(--neon-pink);
    margin-top: 0.5rem;
    letter-spacing: 0.5em;
}

/* --- Game title row --- */
.game-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    animation: float 3s ease-in-out infinite;
}

.game-title h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: 0.2em;
    background: linear-gradient(135deg, var(--neon-yellow), var(--neon-pink), var(--purple-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* --- Rockets --- */
.rocket {
    font-size: clamp(2rem, 5vw, 3rem);
    animation: rocketBounce 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 10px var(--neon-yellow));
}

@keyframes rocketBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(-5deg); }
    75% { transform: translateY(4px) rotate(3deg); }
}

/* --- Menu buttons --- */
.menu {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 400px;
}

/* --- Info text (bottom) --- */
.info {
    font-family: 'Share Tech Mono', monospace;
    color: var(--neon-cyan);
}

.theme {
    font-size: clamp(1rem, 2vw, 1.2rem);
    letter-spacing: 0.3em;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.challenge {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    color: var(--neon-yellow);
    opacity: 0.7;
}

/* ============================================
   GLOBAL BUTTON SYSTEM
   ============================================ */
.btn {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    font-weight: 700;
    padding: 1.1rem 2.8rem;
    border: 3px solid;
    border-radius: var(--radius);
    background: transparent;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-block;
    text-align: center;
}

/* Shine sweep on hover */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s;
    pointer-events: none;
}

.btn:hover::before {
    left: 100%;
}

/* Primary — green glow */
.btn-primary {
    border-color: var(--neon-green);
    color: var(--neon-green);
    box-shadow:
        0 0 20px rgba(0, 255, 65, 0.4),
        inset 0 0 20px rgba(0, 255, 65, 0.08);
}

.btn-primary:hover {
    background: var(--neon-green);
    color: var(--deep-space);
    box-shadow:
        0 0 40px rgba(0, 255, 65, 0.8),
        inset 0 0 40px rgba(0, 255, 65, 0.25);
    transform: scale(1.05);
}

/* Secondary — purple glow */
.btn-secondary {
    border-color: var(--purple-glow);
    color: var(--purple-glow);
    box-shadow:
        0 0 20px rgba(131, 56, 236, 0.4),
        inset 0 0 20px rgba(131, 56, 236, 0.08);
}

.btn-secondary:hover {
    background: var(--purple-glow);
    color: #fff;
    box-shadow:
        0 0 40px rgba(131, 56, 236, 0.8),
        inset 0 0 40px rgba(131, 56, 236, 0.25);
    transform: scale(1.05);
}

/* Danger — pink glow */
.btn-danger {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    box-shadow:
        0 0 20px rgba(255, 0, 110, 0.4),
        inset 0 0 20px rgba(255, 0, 110, 0.08);
}

.btn-danger:hover {
    background: var(--neon-pink);
    color: #fff;
    box-shadow:
        0 0 40px rgba(255, 0, 110, 0.8),
        inset 0 0 40px rgba(255, 0, 110, 0.25);
    transform: scale(1.05);
}

/* ============================================
   FORM INPUTS
   ============================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    color: var(--neon-cyan);
    background: rgba(10, 14, 39, 0.8);
    border: 2px solid rgba(0, 245, 255, 0.3);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    outline: none;
    transition: all var(--transition);
    width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--neon-cyan);
    box-shadow:
        0 0 10px rgba(0, 245, 255, 0.4),
        0 0 20px rgba(0, 245, 255, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: rgba(0, 245, 255, 0.35);
}

/* ============================================
   GAME PAGE
   ============================================ */
.game-page {
    overflow: hidden;
}

/* HUD bar */
.hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--hud-height);
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 100;
    border-bottom: 2px solid rgba(0, 245, 255, 0.2);
}

.hud-scores {
    display: flex;
    gap: 2rem;
    align-items: center;
}
.hud-item {
    text-align: center;
}
.hud-label {
    font-size: 0.65rem;
    color: var(--neon-cyan);
    opacity: 0.7;
    letter-spacing: 0.1em;
    display: block;
}
.hud-value {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--neon-yellow);
    text-shadow: 0 0 10px rgba(255, 190, 11, 0.5);
}
.hud-value.hud-best {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

/* Menu button in game */
.btn-menu {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 200;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border: 2px solid var(--neon-cyan);
    border-radius: var(--radius);
    background: rgba(10, 14, 39, 0.7);
    color: var(--neon-cyan);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-menu:hover {
    background: var(--neon-cyan);
    color: var(--deep-space);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.6);
}

/* Canvas */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    padding: 0;
    padding-top: var(--hud-height);
}

#gameCanvas {
    display: block;
    position: fixed;
    top: var(--hud-height);
    left: 0;
    background: var(--deep-space);
    touch-action: none;
}

.game-header {
    margin-bottom: 0.3rem;
}

.game-controls {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    text-align: center;
    color: var(--neon-cyan);
    font-size: 0.9rem;
    max-width: 900px;
    line-height: 1.4;
}

/* Score display (reusable) */
.score-display {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 900;
    color: var(--neon-yellow);
    text-shadow: 0 0 20px var(--neon-yellow);
    margin: 1rem 0;
}

/* --- Countdown overlay --- */
.countdown {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(6rem, 20vw, 12rem);
    font-weight: 900;
    color: var(--neon-yellow);
    text-shadow:
        0 0 40px var(--neon-yellow),
        0 0 80px var(--neon-yellow);
    z-index: 2000;
    animation: countdownPulse 0.8s ease-out;
    pointer-events: none;
    user-select: none;
    background: rgba(10, 14, 39, 0.5);
}

@keyframes countdownPulse {
    0% { transform: scale(0.3); opacity: 0; }
    60% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Game Over modal --- */
.game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1500;
}
.game-over-overlay.show {
    display: flex;
    animation: fadeIn 0.4s ease-out;
}

.game-over-card {
    background: linear-gradient(145deg, rgba(36, 0, 70, 0.9), rgba(10, 14, 39, 0.95));
    border: 3px solid var(--neon-pink);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow:
        0 0 30px rgba(255, 0, 110, 0.4),
        inset 0 0 30px rgba(255, 0, 110, 0.05);
    animation: slideUp 0.5s ease-out;
}

.game-over-card h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 900;
    color: var(--neon-pink);
    text-shadow: 0 0 20px var(--neon-pink);
    margin-bottom: 1.5rem;
}

.go-subtitle {
    color: var(--neon-cyan);
    font-size: 1rem;
    margin-bottom: 0.3rem;
}
.go-score {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 900;
    color: var(--neon-yellow);
    text-shadow: 0 0 30px rgba(255, 190, 11, 0.6);
    margin-bottom: 1.5rem;
}
.form-group {
    margin-bottom: 1rem;
    text-align: left;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--neon-cyan);
    margin-bottom: 0.3rem;
    letter-spacing: 0.1em;
}
.form-group input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--neon-cyan);
    border-radius: var(--radius);
    color: var(--neon-cyan);
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus {
    border-color: var(--neon-yellow);
    box-shadow: 0 0 15px rgba(255, 190, 11, 0.3);
}
.go-buttons {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.go-buttons .btn {
    flex: 1;
    min-width: 80px;
    text-align: center;
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
}

/* ============================================
   LEADERBOARD PAGE
   ============================================ */
.leaderboard-container {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    animation: fadeIn 0.5s ease-out;
}

.leaderboard-container h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.6rem, 5vw, 2.8rem);
    font-weight: 900;
    text-align: center;
    color: var(--neon-cyan);
    text-shadow: 0 0 20px var(--neon-cyan);
    margin-bottom: 2rem;
    letter-spacing: 0.15em;
}

/* Search bar */
.leaderboard-search {
    margin-bottom: 1.5rem;
}

.leaderboard-search input {
    width: 100%;
    padding: 0.85rem 1.2rem;
    font-size: 1rem;
    background: rgba(10, 14, 39, 0.9);
    border: 2px solid rgba(0, 245, 255, 0.25);
    border-radius: var(--radius);
    color: var(--neon-cyan);
    transition: all var(--transition);
}

.leaderboard-search input:focus {
    border-color: var(--neon-cyan);
    box-shadow:
        0 0 15px rgba(0, 245, 255, 0.35),
        0 0 30px rgba(0, 245, 255, 0.1);
}

/* Table */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(0.85rem, 2vw, 1rem);
}

.leaderboard-table thead th {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--neon-cyan);
    padding: 1rem 0.75rem;
    border-bottom: 2px solid rgba(0, 245, 255, 0.3);
    text-align: left;
}

.leaderboard-table tbody tr {
    transition: background var(--transition);
    border-bottom: 1px solid rgba(0, 245, 255, 0.08);
}

.leaderboard-table tbody tr:hover {
    background: rgba(0, 245, 255, 0.06);
}

.leaderboard-table tbody td {
    padding: 0.85rem 0.75rem;
    vertical-align: middle;
}

/* Rank numbers */
.rank {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
}

.rank-1 {
    color: #ffd700;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.7);
}

.rank-2 {
    color: #c0c0c0;
    text-shadow: 0 0 12px rgba(192, 192, 192, 0.6);
}

.rank-3 {
    color: #cd7f32;
    text-shadow: 0 0 12px rgba(205, 127, 50, 0.6);
}

.rank-other {
    color: var(--neon-cyan);
    opacity: 0.7;
}

/* Medals */
.medal {
    font-size: 1.5rem;
    margin-right: 0.3rem;
}

.medal-gold {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
}

.medal-silver {
    filter: drop-shadow(0 0 8px rgba(192, 192, 192, 0.7));
}

.medal-bronze {
    filter: drop-shadow(0 0 8px rgba(205, 127, 50, 0.7));
}

/* Score in table */
.leaderboard-table .score-cell {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--neon-yellow);
    text-shadow: 0 0 8px rgba(255, 190, 11, 0.4);
}

/* ============================================
   ADMIN PAGE
   ============================================ */

/* Login screen */
.admin-login {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    animation: fadeIn 0.5s ease-out;
}

.admin-login-card {
    background: linear-gradient(145deg, rgba(36, 0, 70, 0.85), rgba(10, 14, 39, 0.95));
    border: 2px solid var(--purple-glow);
    border-radius: 12px;
    padding: 3rem 2.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow:
        0 0 30px rgba(131, 56, 236, 0.3),
        inset 0 0 20px rgba(131, 56, 236, 0.05);
}

.admin-login-card h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--purple-glow);
    text-shadow: 0 0 15px rgba(131, 56, 236, 0.5);
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
}

.admin-login-card form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-login-card .btn {
    margin-top: 0.5rem;
}

/* Dashboard */
.admin-container {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    animation: fadeIn 0.5s ease-out;
}

.admin-container h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 900;
    color: var(--neon-cyan);
    text-shadow: 0 0 15px rgba(0, 245, 255, 0.4);
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
}

/* Stat cards grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: linear-gradient(145deg, rgba(36, 0, 70, 0.6), rgba(10, 14, 39, 0.8));
    border: 2px solid rgba(0, 245, 255, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
    transform: translateY(-3px);
}

.stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.stat-card .stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 900;
    color: var(--neon-yellow);
    text-shadow: 0 0 12px rgba(255, 190, 11, 0.4);
    display: block;
    margin-bottom: 0.3rem;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--neon-cyan);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Charts area */
.charts-area {
    margin-bottom: 2.5rem;
}

.chart-card {
    background: rgba(10, 14, 39, 0.7);
    border: 1px solid rgba(0, 245, 255, 0.15);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.admin-table thead th {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--neon-cyan);
    padding: 0.85rem 0.6rem;
    border-bottom: 2px solid rgba(0, 245, 255, 0.25);
    text-align: left;
}

.admin-table tbody tr {
    transition: background var(--transition);
    border-bottom: 1px solid rgba(0, 245, 255, 0.06);
}

.admin-table tbody tr:hover {
    background: rgba(0, 245, 255, 0.06);
}

.admin-table tbody td {
    padding: 0.75rem 0.6rem;
    vertical-align: middle;
}

/* Admin modal */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.admin-modal {
    background: linear-gradient(145deg, rgba(36, 0, 70, 0.9), rgba(10, 14, 39, 0.95));
    border: 2px solid var(--purple-glow);
    border-radius: 12px;
    padding: 2rem;
    max-width: 560px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow:
        0 0 30px rgba(131, 56, 236, 0.35),
        inset 0 0 20px rgba(131, 56, 236, 0.05);
    animation: slideUp 0.4s ease-out;
}

.admin-modal h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--purple-glow);
    text-shadow: 0 0 12px rgba(131, 56, 236, 0.4);
    margin-bottom: 1.5rem;
}

.admin-modal form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-modal .btn-row {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.admin-modal .btn-row .btn {
    flex: 1;
    font-size: 0.9rem;
    padding: 0.75rem 1.2rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Utility classes */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

/* ============================================
   RESPONSIVE — Mobile first, 768px breakpoint
   ============================================ */

/* Default (mobile) adjustments */
@media (max-width: 768px) {
    /* Hide heavy elements on mobile */
    .video-background,
    .video-overlay,
    .stars,
    .stars2,
    .stars3 {
        display: none !important;
    }
    body::after { display: none; }

    .container {
        padding: 1rem;
    }

    .logo-container {
        margin-bottom: 1.5rem;
    }

    .game-title {
        gap: 0.8rem;
        margin-bottom: 2rem;
    }

    .menu {
        max-width: 100%;
        gap: 1rem;
    }

    .btn {
        padding: 0.9rem 2rem;
        font-size: clamp(1rem, 4vw, 1.3rem);
    }

    /* Leaderboard stacking */
    .leaderboard-table,
    .leaderboard-table thead,
    .leaderboard-table tbody,
    .leaderboard-table th,
    .leaderboard-table td,
    .leaderboard-table tr {
        display: block;
    }

    .leaderboard-table thead {
        display: none;
    }

    .leaderboard-table tbody tr {
        background: rgba(36, 0, 70, 0.3);
        border: 1px solid rgba(0, 245, 255, 0.12);
        border-radius: 8px;
        padding: 1rem;
        margin-bottom: 0.75rem;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }

    .leaderboard-table tbody td {
        padding: 0.3rem 0.5rem;
        border: none;
        text-align: left;
    }

    .leaderboard-table tbody td::before {
        content: attr(data-label);
        font-family: 'Orbitron', sans-serif;
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: rgba(0, 245, 255, 0.5);
        display: block;
        margin-bottom: 0.15rem;
    }

    /* Admin responsive */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .admin-container {
        padding: 1.5rem 1rem;
    }

    .admin-modal {
        padding: 1.5rem;
        width: 95%;
    }

    .admin-modal .btn-row {
        flex-direction: column;
    }

    /* Game page mobile */
    .hud {
        padding: 0 0.75rem;
    }

    .btn-menu {
        font-size: 0.65rem;
        padding: 0.4rem 0.75rem;
    }

    .game-over-card {
        padding: 1.8rem 1.5rem;
    }
}

/* Larger screens */
@media (min-width: 769px) {
    .leaderboard-container {
        padding: 3rem 2rem;
    }

    .admin-container {
        padding: 2.5rem 2rem;
    }
}

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

.text-center {
    text-align: center;
}

.text-pink {
    color: var(--neon-pink);
}

.text-cyan {
    color: var(--neon-cyan);
}

.text-yellow {
    color: var(--neon-yellow);
}

.text-green {
    color: var(--neon-green);
}

.text-purple {
    color: var(--purple-glow);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
