/* --- UNIVERSAL RESET --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-color: #111;
    --text-color: #eee;
    --neon-blue: #2121de; /* Classic Maze Blue */
    --neon-yellow: #ffff00;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'VT323', monospace;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

/* --- NAV --- */
.lab-nav {
    width: 100%;
    background-color: #000;
    border-bottom: 2px solid var(--neon-blue);
    padding: 15px 40px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.nav-brand {
    font-family: 'Press Start 2P', cursive;
    color: var(--neon-blue);
    text-decoration: none;
    font-size: 0.9rem;
}

.nav-links { display: flex; }
.nav-links a {
    color: #888;
    text-decoration: none;
    margin-left: 20px;
    font-size: 1.1rem;
}

/* --- GAME CONTAINER --- */
#game-container {
    margin-top: 10px;
    position: relative;
    border: 4px solid #333;
    box-shadow: 0 0 20px rgba(33, 33, 222, 0.4);
    background: #000;
}

canvas { display: block; }

/* --- INFO --- */
.cabinet-info {
    text-align: center;
    margin-top: 10px;
    color: #aaa;
    font-size: 1.2rem;
}
.legal-text { font-size: 0.8rem; color: #555; margin-top: 5px; }

/* --- MOBILE CONTROLS (Hidden Desktop) --- */
.mobile-controls { display: none; }
.mobile-msg { display: none; }
#btn-pause { display: none; }

/* --- MOBILE STYLES --- */
@media (max-width: 768px) {
    .nav-links, .desktop-msg { display: none; }
    .mobile-msg { display: block; }
    .lab-nav { padding: 10px 15px; }

    /* Canvas Scaling for Mobile */
    #game-container {
        width: 100%;
        height: auto;
        aspect-ratio: 28/31;
        max-height: 60vh; /* Leave room for buttons */
    }
    canvas { width: 100%; height: 100%; }

    /* D-PAD LAYOUT */
    .mobile-controls {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-top: 10px;
        width: 100%;
    }

    .d-pad-row { display: flex; gap: 20px; }
    .d-pad-row.middle { margin: 10px 0; }

    .mobile-btn {
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid #555;
        color: #fff;
        font-size: 1.5rem;
        width: 60px;
        height: 60px;
        border-radius: 10px;
        touch-action: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .mobile-btn:active { background: rgba(255, 255, 255, 0.3); }

    /* Pause Button */
    #btn-pause {
        display: flex;
        position: absolute;
        top: 10px; right: 10px;
        background: rgba(0,0,0,0.5);
        border: 2px solid #fff;
        width: 44px; height: 44px;
        border-radius: 50%;
        z-index: 10;
        padding: 0;
        justify-content: center; align-items: center;
    }
    #btn-pause svg { width: 16px; height: 16px; }
}