:root {
    --arcade-background: rgb(25, 25, 30);
    --neon-purple: rgb(153, 51, 229);
    --neon-blue: rgb(51, 204, 255);
    --neon-pink: rgb(255, 51, 153);
    --neon-green: rgb(51, 255, 102);
    --neon-yellow: rgb(255, 229, 25);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--arcade-background);
    color: white;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    touch-action: manipulation;
}

/* BASE: MOBILE (iPhone 15 Pro Max) */
.screen {
    display: none;
    width: 100%;
    max-width: 430px;
    flex-direction: column;
    padding: calc(env(safe-area-inset-top, 0px) + 60px) clamp(14px, 5vw, 24px) calc(env(safe-area-inset-bottom, 0px) + 20px);
    box-sizing: border-box;
}

.screen.active {
    display: flex;
}

header h1 {
    font-size: clamp(30px, 10vw, 40px);
    font-weight: 900;
    margin-bottom: 5px;
    text-align: center;
}

.subtitle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: gray;
    font-weight: bold;
    margin-bottom: 30px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-green);
}

.game-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.arcade-btn {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 20px;
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    transition: transform 0.1s ease-out, box-shadow 0.1s;
}

.arcade-btn:active {
    transform: scale(0.95);
}

.arcade-btn:focus-visible { outline: 3px solid var(--neon-yellow); outline-offset: 3px; }


.arcade-btn .icon {
    font-size: 35px;
    margin-right: 15px;
}

.arcade-btn h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
}

.arcade-btn p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.neon-pink {
    background-color: var(--neon-pink);
    box-shadow: 0 5px 15px rgba(255, 51, 153, 0.6);
}

.neon-blue {
    background-color: var(--neon-blue);
    box-shadow: 0 5px 15px rgba(51, 204, 255, 0.6);
}

.neon-lupus {
    background-color: rgb(255, 107, 53);
    color: black;
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.5);
}

.neon-yellow {
    background-color: var(--neon-yellow);
    color: black;
    box-shadow: 0 5px 15px rgba(255, 229, 25, 0.5);
}

.neon-purple {
    background-color: var(--neon-purple);
    box-shadow: 0 5px 15px rgba(153, 51, 229, 0.6);
}

.disabled {
    background-color: rgba(128, 128, 128, 0.5);
    cursor: not-allowed;
}

.back-btn {
    background: transparent;
    color: white;
    border: none;
    font-size: 16px;
    text-align: left;
    padding: 10px 0;
    cursor: pointer;
    margin-bottom: 20px;
}

/* REGOLE DESKTOP (Schermi larghi) */
@media (min-width: 768px) {
    .screen {
        max-width: 900px;
        justify-content: center;
        padding-top: 40px;
    }
    
    header h1 {
        font-size: 60px;
    }
    
    .subtitle-row {
        font-size: 20px;
        margin-bottom: 50px;
    }
    
    .game-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .arcade-btn {
        padding: 30px;
    }

    .disabled { grid-column: span 2; }
    
    .arcade-btn .icon {
        font-size: 50px;
    }
}