@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body { 
    margin: 0; 
    background: #050505; 
    color: #00ffff; 
    font-family: 'Press Start 2P', cursive; 
    /* Changed to auto so you can scroll to the leaderboard on mobile */
    overflow-x: hidden;
    overflow-y: auto; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 20px 0;
    min-height: 100vh;
}

.logo-container { 
    text-align: center; 
    margin-bottom: 20px; 
    z-index: 10; 
}

.logo-main { 
    font-size: 2.2rem; 
    color: #fff; 
    text-shadow: 3px 3px #ff00ff, 6px 6px #00ffff; 
    letter-spacing: -2px; 
    margin: 0; 
}

.logo-sub { 
    font-size: 0.7rem; 
    color: #ff00ff; 
    letter-spacing: 3px; 
    margin-top: 8px; 
}

canvas { 
    border: 4px solid #00ffff; 
    box-shadow: 0 0 20px #00ffff; 
    max-width: 95vw; 
    max-height: 70vh; 
    background: #000; 
    cursor: crosshair; 
}

.score-box { 
    color: #fff; 
    font-size: 1rem; 
    margin-top: 15px; 
    text-shadow: 0 0 5px #ff00ff; 
    margin-bottom: 20px;
}

/* MOBILE FIRST BOARD: Stacks underneath the canvas */
#highScoreBoard { 
    background: rgba(0,0,0,0.9); 
    border: 2px solid #ff00ff; 
    padding: 15px; 
    font-size: 0.6rem; 
    line-height: 2; 
    color: #00ffff; 
    width: 280px; /* Controlled width for mobile */
    margin-bottom: 40px; /* Padding at the bottom of the page */
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

/* DESKTOP OPTIMIZATION: Puts the board back on the side for wide screens */
@media (min-width: 1100px) { 
    body {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: 50px;
        height: 100vh;
        overflow: hidden;
        padding-top: 100px;
    }

    #highScoreBoard { 
        position: relative; /* Removes the absolute squeeze */
        margin-top: 0;
    }

    .logo-container {
        position: absolute;
        top: 20px;
    }
}