/* Snake — Tema neon su sfondo scuro */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #0a0a1a;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    overflow: hidden;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

#gameContainer {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

canvas {
    display: block;
    background: #0d0d2b;
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.1);
}

/* Schermate overlay */
.screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 26, 0.95);
    z-index: 10;
    padding: 20px;
    text-align: center;
}

.screen h1 {
    color: #00ffff;
    font-size: 2.5rem;
    text-shadow: 0 0 20px #00ffff;
    margin-bottom: 10px;
}

.screen h2 {
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.screen p {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    margin-bottom: 24px;
}

.final-score {
    color: #00ffff !important;
    font-size: 1.4rem !important;
    font-weight: 700;
}

.game-btn {
    padding: 14px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border: 2px solid #00ffff;
    background: transparent;
    color: #00ffff;
    border-radius: 30px;
    cursor: pointer;
    margin: 6px;
    transition: all 0.3s;
    min-width: 180px;
}

.game-btn:hover, .game-btn:active {
    background: #00ffff;
    color: #0a0a1a;
    box-shadow: 0 0 20px rgba(0,255,255,0.5);
}

.game-btn.secondary {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.6);
}

.game-btn.secondary:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: white;
    box-shadow: none;
}

.controls-hint {
    margin-top: 20px;
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
}

/* HUD */
#hud {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    z-index: 5;
    pointer-events: none;
}

.hud-score {
    color: #00ffff;
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0,255,255,0.5);
}

.hud-btn {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hidden { display: none !important; }
