:root {
    --bg-color: #0d0d0d;
    --neon-green: #39ff14;
    --neon-blue: #0ff;
    --text-color: #fff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--neon-green);
    font-family: 'Press Start 2P', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    text-align: center;
}

/* Mobile-first container */
#game-container {
    width: 95%;
    max-width: 800px;
    padding: 15px; /* Smaller padding for phones */
    border: 3px solid var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green), inset 0 0 10px var(--neon-green);
    background: #000;
    margin: 20px 0;
}

/* Hidden Utility Class */
.hidden {
    display: none !important;
}

/* Loading Screen Styles - scaled for mobile */
#loading-text {
    font-size: 10px; /* Smaller so it doesn't break on narrow screens */
    line-height: 2;
    margin-bottom: 20px;
    min-height: 40px;
}

.progress-bar-container {
    width: 100%;
    height: 15px;
    border: 2px solid var(--neon-green);
    margin-top: 15px;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--neon-green);
    transition: width 1.25s linear;
}

/* Button Styles - scaled for mobile */
button {
    background-color: var(--bg-color);
    color: var(--neon-green);
    border: 2px solid var(--neon-green);
    padding: 15px 10px;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 0 8px var(--neon-green);
    transition: all 0.2s;
    width: 100%; /* Full width on phone */
}

button:hover {
    background-color: var(--neon-green);
    color: #000;
}

/* Results Screen Styles - scaled for mobile */
.title {
    color: var(--neon-blue);
    font-size: 16px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.subtitle {
    font-size: 14px;
    margin-bottom: 20px;
}

.leaderboard-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    border: 2px dashed var(--neon-blue);
    padding: 15px;
}

.image-container img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 3px solid var(--text-color);
}

.stats-container p {
    font-size: 9px; /* Small enough to fit the arcade font on mobile */
    line-height: 2;
    margin-bottom: 10px;
    color: var(--text-color);
    text-align: left;
    word-wrap: break-word; /* Prevents long words from stretching the screen */
}

.highlight {
    color: var(--neon-blue);
}

/* Blinking Animation */
.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

/* Desktop Scaling (Screens wider than 600px) */
@media (min-width: 600px) {
    #game-container {
        width: 90%;
        padding: 40px;
        border-width: 4px;
    }
    
    #loading-text { font-size: 14px; }
    .progress-bar-container { height: 20px; }
    
    button { 
        padding: 20px; 
        font-size: 16px; 
        width: auto;
    }

    .title { font-size: 24px; margin-bottom: 20px; }
    .subtitle { font-size: 18px; margin-bottom: 30px; }

    .leaderboard-card {
        flex-direction: row;
        padding: 20px;
        gap: 25px;
    }

    .image-container img {
        width: 150px;
        height: 150px;
    }

    .stats-container p { font-size: 12px; }
}