/* Root variables - Retro Arcade Theme */
:root {
    /* Neon Colors */
    --neon-cyan: #00ffff;
    --neon-magenta: #ff00ff;
    --neon-yellow: #ffff00;
    --neon-green: #00ff00;
    --neon-red: #ff0066;
    --neon-blue: #0099ff;

    /* Background Colors */
    --bg-dark: #0a0e27;
    --bg-darker: #050813;
    --arcade-frame: #1a1a2e;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-glow: #00ffff;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', cursive;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    image-rendering: pixelated;
}

/* Animated background particles - Grid effect */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-scroll 20s linear infinite;
}

@keyframes grid-scroll {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 50px 50px;
    }
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Screen transitions */
.screen {
    display: none;
    width: 100%;
    animation: scanline-in 0.5s ease-in;
}

.screen.active {
    display: block;
}

@keyframes scanline-in {
    from {
        opacity: 0;
        transform: scaleY(0.1);
    }

    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* Arcade Frame - Main container for all screens */
.arcade-frame {
    background: var(--arcade-frame);
    border: 8px solid var(--neon-cyan);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.5),
        0 0 40px rgba(0, 255, 255, 0.3),
        inset 0 0 60px rgba(0, 255, 255, 0.1);
    animation: border-glow 2s ease-in-out infinite;
}

@keyframes border-glow {

    0%,
    100% {
        box-shadow:
            0 0 20px rgba(0, 255, 255, 0.5),
            0 0 40px rgba(0, 255, 255, 0.3),
            inset 0 0 60px rgba(0, 255, 255, 0.1);
    }

    50% {
        box-shadow:
            0 0 30px rgba(0, 255, 255, 0.7),
            0 0 60px rgba(0, 255, 255, 0.5),
            inset 0 0 80px rgba(0, 255, 255, 0.2);
    }
}

/* CRT Effect */
.crt-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px);
    animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(10px);
    }
}

/* ============================================
   LANDING SCREEN STYLES
   ============================================ */

.logo-container {
    text-align: center;
    margin-bottom: 3rem;
}

.pixel-title {
    font-size: 3rem;
    color: var(--neon-cyan);
    text-shadow:
        0 0 10px var(--neon-cyan),
        0 0 20px var(--neon-cyan),
        0 0 30px var(--neon-cyan);
    letter-spacing: 0.3rem;
    animation: title-glow 2s ease-in-out infinite;
    margin-bottom: 1rem;
}

.pixel-title-alt {
    font-size: 3rem;
    color: var(--neon-magenta);
    text-shadow:
        0 0 10px var(--neon-magenta),
        0 0 20px var(--neon-magenta),
        0 0 30px var(--neon-magenta);
    letter-spacing: 0.3rem;
    animation: title-glow 2s ease-in-out infinite 0.5s;
}

@keyframes title-glow {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.5);
    }
}

.insert-coin {
    font-size: 1rem;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px var(--neon-yellow);
    margin-top: 2rem;
    animation: blink 1s step-start infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.game-info {
    margin-bottom: 3rem;
}

.info-line {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.pixel-icon {
    color: var(--neon-cyan);
    font-size: 1.5rem;
}

.high-score-box {
    background: var(--bg-darker);
    border: 4px solid var(--neon-yellow);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow:
        0 0 10px var(--neon-yellow),
        inset 0 0 20px rgba(255, 255, 0, 0.2);
}

.hs-label {
    font-size: 0.8rem;
    color: var(--neon-yellow);
    margin-bottom: 0.5rem;
    letter-spacing: 0.2rem;
}

.hs-value {
    font-size: 2rem;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px var(--neon-yellow);
    letter-spacing: 0.3rem;
}

/* Difficulty Selection */
.difficulty-selection {
    margin-bottom: 2rem;
}

.difficulty-label {
    font-size: 0.9rem;
    color: var(--neon-cyan);
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: 0.2rem;
    text-shadow: 0 0 5px var(--neon-cyan);
}

.difficulty-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.difficulty-btn {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
}

.difficulty-btn .btn-text {
    font-size: 1rem;
}

.btn-subtitle {
    font-size: 0.5rem;
    color: var(--neon-cyan);
    opacity: 0.8;
    letter-spacing: 0.05rem;
}

.difficulty-btn:hover .btn-subtitle {
    opacity: 1;
}

/* Leaderboard Link Section */
.leaderboard-link {
    margin-top: 2rem;
    text-align: center;
}

.leaderboard-btn {
    border-color: var(--neon-yellow);
    color: var(--neon-yellow);
    font-size: 0.9rem;
    padding: 1.2rem 2rem;
    box-shadow:
        0 0 20px var(--neon-yellow),
        inset 0 0 20px rgba(255, 255, 0, 0.2);
}

.leaderboard-btn:hover {
    background: var(--neon-yellow);
    color: var(--bg-dark);
    box-shadow:
        0 0 30px var(--neon-yellow),
        0 0 50px var(--neon-yellow);
}

/* Footer Text Section */
.footer-text {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.05rem;
}

.footer-text a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: all 0.2s;
}

.footer-text a:hover {
    color: var(--neon-magenta);
    text-shadow: 0 0 5px var(--neon-magenta);
}

/* Pixel Button */
.pixel-btn {
    background: var(--bg-darker);
    border: 4px solid var(--neon-magenta);
    color: var(--neon-magenta);
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    padding: 1.5rem 3rem;
    cursor: pointer;
    position: relative;
    display: block;
    margin: 0 auto;
    text-transform: uppercase;
    transition: all 0.1s;
    box-shadow:
        0 0 20px var(--neon-magenta),
        inset 0 0 20px rgba(255, 0, 255, 0.2);
}

.pixel-btn:hover {
    background: var(--neon-magenta);
    color: var(--bg-dark);
    transform: scale(1.05);
    box-shadow:
        0 0 30px var(--neon-magenta),
        0 0 50px var(--neon-magenta);
}

.pixel-btn:active {
    transform: scale(0.98);
}

.btn-text {
    position: relative;
    z-index: 1;
    animation: text-flicker 3s infinite;
}

@keyframes text-flicker {

    0%,
    100% {
        opacity: 1;
    }

    98% {
        opacity: 1;
    }

    99% {
        opacity: 0.8;
    }
}

/* ============================================
   GAME SCREEN STYLES
   ============================================ */

/* Logo in top right corner of background */
.game-logo {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 100px;
    height: auto;
    z-index: 100;
    filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.7));
    animation: logo-float 3s ease-in-out infinite;
}

@keyframes logo-float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

.game-hud {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-darker);
    border: 4px solid var(--neon-green);
    box-shadow:
        0 0 10px var(--neon-green),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
}

.hud-left,
.hud-right {
    display: flex;
    gap: 2rem;
}

.level-indicator,
.lives-container,
.score-container,
.combo-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hud-label {
    font-size: 0.6rem;
    color: var(--neon-green);
    letter-spacing: 0.1rem;
}

.hud-value {
    font-size: 1rem;
    color: var(--text-primary);
    text-shadow: 0 0 5px var(--neon-cyan);
}

.hearts {
    display: flex;
    gap: 0.5rem;
}

.heart {
    font-size: 1.5rem;
    color: var(--neon-red);
    text-shadow: 0 0 10px var(--neon-red);
    animation: heart-beat 1s ease-in-out infinite;
}

.heart.lost {
    opacity: 0.3;
    filter: grayscale(1);
    animation: none;
}

@keyframes heart-beat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Audio Player Box */
.audio-player-box {
    background: var(--bg-darker);
    border: 4px solid var(--neon-cyan);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow:
        0 0 15px var(--neon-cyan),
        inset 0 0 30px rgba(0, 255, 255, 0.1);
}

.pixel-visualizer {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0.5rem;
    height: 80px;
    margin-bottom: 1.5rem;
}

.pixel-bar {
    width: 12px;
    background: linear-gradient(to top, var(--neon-cyan), var(--neon-magenta));
    box-shadow: 0 0 10px var(--neon-cyan);
    animation: pixel-bounce 0.8s ease-in-out infinite;
}

.pixel-bar:nth-child(1) {
    animation-delay: 0s;
    height: 30%;
}

.pixel-bar:nth-child(2) {
    animation-delay: 0.1s;
    height: 60%;
}

.pixel-bar:nth-child(3) {
    animation-delay: 0.2s;
    height: 80%;
}

.pixel-bar:nth-child(4) {
    animation-delay: 0.3s;
    height: 100%;
}

.pixel-bar:nth-child(5) {
    animation-delay: 0.4s;
    height: 70%;
}

.pixel-bar:nth-child(6) {
    animation-delay: 0.5s;
    height: 50%;
}

.pixel-bar:nth-child(7) {
    animation-delay: 0.6s;
    height: 65%;
}

.pixel-bar:nth-child(8) {
    animation-delay: 0.7s;
    height: 40%;
}

@keyframes pixel-bounce {

    0%,
    100% {
        transform: scaleY(0.5);
    }

    50% {
        transform: scaleY(1);
    }
}

audio {
    width: 100%;
    max-width: 500px;
    height: 50px;
    margin-bottom: 1rem;
    border-radius: 0;
    filter: hue-rotate(180deg) saturate(2);
}

.audio-label {
    font-size: 0.7rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
    animation: blink-slow 2s ease-in-out infinite;
}

@keyframes blink-slow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Dual Audio Box for Easy Mode */
.dual-audio-box {
    background: var(--bg-darker);
    border: 4px solid var(--neon-cyan);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow:
        0 0 15px var(--neon-cyan),
        inset 0 0 30px rgba(0, 255, 255, 0.1);
}

.audio-pair {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.audio-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.audio-item .audio-label {
    font-size: 0.9rem;
    color: var(--neon-magenta);
    text-shadow: 0 0 5px var(--neon-magenta);
    letter-spacing: 0.2rem;
}

.audio-item audio {
    width: 100%;
    max-width: 300px;
}

.audio-instruction {
    text-align: center;
    font-size: 0.8rem;
    color: var(--neon-yellow);
    text-shadow: 0 0 5px var(--neon-yellow);
    animation: blink-slow 2s ease-in-out infinite;
}

/* Pixel Choices */
.pixel-choices {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
    justify-items: center;
}

.pixel-choice {
    background: var(--bg-darker);
    border: 6px solid var(--neon-cyan);
    padding: 2rem;
    cursor: pointer;
    position: relative;
    transition: all 0.1s;
    font-family: 'Press Start 2P', cursive;
    box-shadow:
        0 0 15px rgba(0, 255, 255, 0.5),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    width: 100%;
    max-width: 400px;
}

.pixel-choice:hover {
    transform: scale(1.05);
    border-color: var(--neon-yellow);
    box-shadow:
        0 0 30px var(--neon-yellow),
        inset 0 0 30px rgba(255, 255, 0, 0.2);
}

.pixel-choice:active {
    transform: scale(0.98);
}

.pixel-choice.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

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

.pixel-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
}

.pixel-label {
    font-size: 1.5rem;
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.authentic-choice:hover {
    border-color: var(--neon-green);
    box-shadow:
        0 0 30px var(--neon-green),
        inset 0 0 30px rgba(0, 255, 0, 0.2);
}

.deepfake-choice:hover {
    border-color: var(--neon-red);
    box-shadow:
        0 0 30px var(--neon-red),
        inset 0 0 30px rgba(255, 0, 102, 0.2);
}

/* Correct/Wrong animations */
.pixel-choice.correct {
    animation: correct-flash 0.6s ease;
    border-color: var(--neon-green);
    background: rgba(0, 255, 0, 0.2);
}

.pixel-choice.wrong {
    animation: wrong-shake 0.5s ease;
    border-color: var(--neon-red);
    background: rgba(255, 0, 102, 0.2);
}

@keyframes correct-flash {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px var(--neon-green);
    }

    25%,
    75% {
        transform: scale(1.1);
        box-shadow: 0 0 40px var(--neon-green);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 60px var(--neon-green);
    }
}

@keyframes wrong-shake {

    0%,
    100% {
        transform: translateX(0) rotate(0deg);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-10px) rotate(-2deg);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(10px) rotate(2deg);
    }
}

/* Pixel Feedback */
.pixel-feedback {
    text-align: center;
    padding: 1.5rem;
    border: 4px solid transparent;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
    background: var(--bg-darker);
}

.pixel-feedback.show {
    opacity: 1;
}

.pixel-feedback.correct {
    border-color: var(--neon-green);
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
    box-shadow:
        0 0 20px var(--neon-green),
        inset 0 0 20px rgba(0, 255, 0, 0.2);
    animation: feedback-pulse 0.3s ease;
}

.pixel-feedback.wrong {
    border-color: var(--neon-red);
    color: var(--neon-red);
    text-shadow: 0 0 10px var(--neon-red);
    box-shadow:
        0 0 20px var(--neon-red),
        inset 0 0 20px rgba(255, 0, 102, 0.2);
    animation: feedback-pulse 0.3s ease;
}

@keyframes feedback-pulse {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* ============================================
   RESULTS SCREEN STYLES
   ============================================ */

.results-header {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--neon-magenta);
    text-shadow:
        0 0 10px var(--neon-magenta),
        0 0 20px var(--neon-magenta),
        0 0 30px var(--neon-magenta);
    animation: title-glow 1s ease-in-out infinite;
}

.results-header.perfect {
    color: var(--neon-yellow);
    text-shadow:
        0 0 10px var(--neon-yellow),
        0 0 20px var(--neon-yellow),
        0 0 30px var(--neon-yellow);
}

.grade-display {
    text-align: center;
    margin-bottom: 2rem;
}

.grade-label {
    font-size: 0.8rem;
    color: var(--neon-cyan);
    margin-bottom: 1rem;
    letter-spacing: 0.2rem;
}

.grade-value {
    font-size: 6rem;
    color: var(--neon-yellow);
    text-shadow:
        0 0 20px var(--neon-yellow),
        0 0 40px var(--neon-yellow);
    animation: grade-float 2s ease-in-out infinite;
}

@keyframes grade-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.final-stats {
    background: var(--bg-darker);
    border: 4px solid var(--neon-cyan);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow:
        0 0 15px var(--neon-cyan),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-name {
    color: var(--neon-cyan);
    min-width: 120px;
}

.stat-dots {
    flex: 1;
    color: rgba(0, 255, 255, 0.3);
    overflow: hidden;
    white-space: nowrap;
}

.stat-value {
    color: var(--neon-yellow);
    text-shadow: 0 0 5px var(--neon-yellow);
    min-width: 100px;
    text-align: right;
}

.results-message-box {
    background: var(--bg-darker);
    border: 4px solid var(--neon-magenta);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow:
        0 0 15px var(--neon-magenta),
        inset 0 0 20px rgba(255, 0, 255, 0.1);
}

.message-text {
    font-size: 1rem;
    color: var(--neon-magenta);
    text-shadow: 0 0 10px var(--neon-magenta);
    animation: message-glow 2s ease-in-out infinite;
}

@keyframes message-glow {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.5);
    }
}

.achievements {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.achievement {
    background: var(--bg-darker);
    border: 3px solid var(--neon-yellow);
    padding: 0.8rem 1.2rem;
    font-size: 0.6rem;
    color: var(--neon-yellow);
    text-shadow: 0 0 5px var(--neon-yellow);
    animation: achievement-pop 0.5s ease;
}

@keyframes achievement-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Confetti canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Screen Shake effect */
@keyframes screen-shake {

    0%,
    100% {
        transform: translate(0, 0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translate(-5px, 5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translate(5px, -5px);
    }
}

.shake {
    animation: screen-shake 0.5s ease;
}

/* Combo notification */
.combo-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--neon-yellow);
    text-shadow:
        0 0 20px var(--neon-yellow),
        0 0 40px var(--neon-yellow);
    z-index: 1000;
    pointer-events: none;
    animation: combo-pop 1s ease forwards;
}

@keyframes combo-pop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1) translateY(-100px);
        opacity: 0;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .arcade-frame {
        padding: 1.5rem;
        border-width: 4px;
    }

    .pixel-title,
    .pixel-title-alt {
        font-size: 1.8rem;
        letter-spacing: 0.2rem;
    }

    .insert-coin {
        font-size: 0.7rem;
    }

    .info-line {
        font-size: 0.6rem;
    }

    .pixel-btn {
        font-size: 0.8rem;
        padding: 1rem 2rem;
    }

    .game-hud {
        flex-direction: column;
        gap: 1rem;
    }

    .hud-left,
    .hud-right {
        justify-content: space-between;
    }

    .pixel-choices {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .pixel-emoji {
        font-size: 3rem;
    }

    .pixel-label {
        font-size: 1.2rem;
    }

    .results-header {
        font-size: 1.5rem;
    }

    .grade-value {
        font-size: 4rem;
    }

    .stat-row {
        font-size: 0.6rem;
    }
}

/* ============================================
   RESULTS BUTTONS
   ============================================ */

.results-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.pixel-btn.secondary {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow:
        0 0 20px var(--neon-cyan),
        inset 0 0 20px rgba(0, 255, 255, 0.2);
}

.pixel-btn.secondary:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow:
        0 0 30px var(--neon-cyan),
        0 0 50px var(--neon-cyan);
}

/* ============================================
   SUBMIT SCREEN STYLES
   ============================================ */

.submit-header {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--neon-cyan);
    text-shadow:
        0 0 10px var(--neon-cyan),
        0 0 20px var(--neon-cyan);
    animation: title-glow 2s ease-in-out infinite;
}

.submit-form {
    background: var(--bg-darker);
    border: 4px solid var(--neon-magenta);
    padding: 2rem;
    box-shadow:
        0 0 15px var(--neon-magenta),
        inset 0 0 20px rgba(255, 0, 255, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.7rem;
    color: var(--neon-cyan);
    margin-bottom: 0.8rem;
    letter-spacing: 0.1rem;
    text-shadow: 0 0 5px var(--neon-cyan);
}

.required {
    color: var(--neon-red);
}

.pixel-input {
    width: 100%;
    background: var(--bg-dark);
    border: 3px solid var(--neon-cyan);
    color: var(--text-primary);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    padding: 1rem;
    box-shadow:
        0 0 10px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    transition: all 0.2s;
}

.pixel-input:focus {
    outline: none;
    border-color: var(--neon-yellow);
    box-shadow:
        0 0 15px var(--neon-yellow),
        inset 0 0 30px rgba(255, 255, 0, 0.2);
}

.pixel-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
}

.form-hint {
    font-size: 0.5rem;
    color: rgba(0, 255, 255, 0.6);
    margin-top: 0.5rem;
    letter-spacing: 0.05rem;
}

.form-section-label {
    font-size: 0.7rem;
    color: var(--neon-magenta);
    text-align: center;
    margin: 2rem 0 1.5rem;
    padding: 0.8rem;
    border-top: 2px solid var(--neon-magenta);
    border-bottom: 2px solid var(--neon-magenta);
    text-shadow: 0 0 5px var(--neon-magenta);
}

.form-error {
    display: none;
    background: rgba(255, 0, 102, 0.2);
    border: 2px solid var(--neon-red);
    color: var(--neon-red);
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.6rem;
    text-align: center;
    text-shadow: 0 0 5px var(--neon-red);
    animation: error-shake 0.5s ease;
}

@keyframes error-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25%,
    75% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }
}

.form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-buttons .pixel-btn {
    flex: 1;
    font-size: 0.9rem;
    padding: 1.2rem 1.5rem;
}

/* ============================================
   LEADERBOARD SCREEN STYLES
   ============================================ */

.leaderboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.lb-title {
    font-size: 2.5rem;
    color: var(--neon-yellow);
    text-shadow:
        0 0 10px var(--neon-yellow),
        0 0 20px var(--neon-yellow),
        0 0 30px var(--neon-yellow);
    margin-bottom: 0.5rem;
    animation: title-glow 2s ease-in-out infinite;
}

.lb-subtitle {
    font-size: 0.8rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
    letter-spacing: 0.3rem;
}

.your-rank {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    background: var(--bg-darker);
    border: 4px solid var(--neon-magenta);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow:
        0 0 20px var(--neon-magenta),
        inset 0 0 20px rgba(255, 0, 255, 0.2);
    animation: rank-pulse 2s ease-in-out infinite;
}

@keyframes rank-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.rank-label {
    font-size: 0.9rem;
    color: var(--neon-magenta);
    text-shadow: 0 0 5px var(--neon-magenta);
}

.rank-value {
    font-size: 2rem;
    color: var(--neon-yellow);
    text-shadow:
        0 0 10px var(--neon-yellow),
        0 0 20px var(--neon-yellow);
}

.leaderboard-table {
    background: var(--bg-darker);
    border: 4px solid var(--neon-cyan);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow:
        0 0 15px var(--neon-cyan),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
}

.lb-table-header {
    display: grid;
    grid-template-columns: 60px 1fr 150px 100px;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 3px solid var(--neon-cyan);
    margin-bottom: 1rem;
    font-size: 0.7rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
}

.lb-table-body {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.lb-row {
    display: grid;
    grid-template-columns: 60px 1fr 150px 100px;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.2);
    transition: all 0.2s;
    animation: row-slide-in 0.5s ease;
}

@keyframes row-slide-in {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.lb-row:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    transform: translateX(5px);
}

.lb-row.first-place {
    border-color: var(--neon-yellow);
    background: rgba(255, 255, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.3);
}

.lb-row.second-place {
    border-color: rgba(192, 192, 192, 0.8);
    background: rgba(192, 192, 192, 0.05);
}

.lb-row.third-place {
    border-color: rgba(205, 127, 50, 0.8);
    background: rgba(205, 127, 50, 0.05);
}

.lb-col-rank {
    font-size: 1.2rem;
    color: var(--neon-yellow);
    text-shadow: 0 0 5px var(--neon-yellow);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-col-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    text-shadow: 0 0 3px var(--neon-cyan);
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-col-score {
    font-size: 0.9rem;
    color: var(--neon-magenta);
    text-shadow: 0 0 5px var(--neon-magenta);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-col-accuracy {
    font-size: 0.9rem;
    color: var(--neon-green);
    text-shadow: 0 0 5px var(--neon-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-message,
.error-message,
.empty-message {
    text-align: center;
    padding: 3rem;
    font-size: 0.9rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
    animation: blink-slow 2s ease-in-out infinite;
}

.error-message {
    color: var(--neon-red);
    text-shadow: 0 0 5px var(--neon-red);
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .pixel-title,
    .pixel-title-alt {
        font-size: 1.3rem;
    }

    .hs-value {
        font-size: 1.5rem;
    }

    .hud-label {
        font-size: 0.5rem;
    }

    .hud-value {
        font-size: 0.8rem;
    }

    .pixel-visualizer {
        height: 60px;
    }

    .submit-header {
        font-size: 1.5rem;
    }

    .pixel-input {
        font-size: 0.7rem;
        padding: 0.8rem;
    }

    .form-buttons {
        flex-direction: column;
    }

    .lb-title {
        font-size: 1.8rem;
    }

    .lb-table-header,
    .lb-row {
        grid-template-columns: 50px 1fr 100px 80px;
        gap: 0.5rem;
        padding: 0.8rem;
        font-size: 0.6rem;
    }

    .lb-col-rank {
        font-size: 1rem;
    }

    .lb-col-name,
    .lb-col-score,
    .lb-col-accuracy {
        font-size: 0.7rem;
    }
}