* {
    box-sizing: border-box;
}


body {

    margin: 0;

    min-height: 100vh;

    background:
        radial-gradient(
            circle at top,
            #172554,
            #050505 60%
        );

    color: white;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 30px;

}


.game-wrapper {

    width: 100%;

    max-width: 900px;

}


/* HEADER */

.game-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 20px;

}


.game-label {

    color: #8b5cf6;

    font-size: 11px;

    letter-spacing: 3px;

    font-weight: bold;

}


h1 {

    margin: 7px 0 0;

    font-size: 36px;

}


.score-box {

    display: flex;

    gap: 8px;

}


.score-box div {

    min-width: 70px;

    padding: 9px;

    text-align: center;

    background: #111113;

    border: 1px solid #27272a;

    border-radius: 9px;

}


.score-box small {

    display: block;

    color: #71717a;

    font-size: 9px;

    letter-spacing: 1px;

}


.score-box strong {

    display: block;

    margin-top: 3px;

    font-size: 20px;

}


/* GAME */

.game-area {

    position: relative;

    width: 100%;

}


canvas {

    width: 100%;

    height: auto;

    display: block;

    background: #050505;

    border: 2px solid #27272a;

    border-radius: 16px;

    box-shadow:
        0 25px 70px
        rgba(0,0,0,.5);

}


/* OVERLAY */

.overlay {

    position: absolute;

    inset: 0;

    display: flex;

    justify-content: center;

    align-items: center;

    background:
        rgba(0,0,0,.72);

    backdrop-filter:
        blur(6px);

    border-radius: 16px;

}


.hidden {

    display: none;

}


.overlay-card {

    text-align: center;

    padding: 30px;

}


.big-icon {

    font-size: 65px;

    margin-bottom: 10px;

}


.overlay-card h2 {

    font-size: 32px;

    margin: 10px 0;

}


.overlay-card p {

    color: #a1a1aa;

}


.overlay-card label {

    display: block;

    margin-top: 20px;

    margin-bottom: 8px;

    color: #aaa;

    font-size: 13px;

}


.overlay-card select {

    display: block;

    width: 180px;

    margin:
        0 auto 20px;

    padding: 11px;

    border-radius: 8px;

    border: 1px solid #333;

    background: #18181b;

    color: white;

}


.overlay-card button {

    padding: 14px 28px;

    border: none;

    border-radius: 9px;

    background: #7c3aed;

    color: white;

    font-weight: bold;

    cursor: pointer;

}


.overlay-card button:hover {

    background: #8b5cf6;

}


.final-score {

    display: block;

    font-size: 45px;

    margin: 15px 0 20px;

    color: #a78bfa;

}


/* CONTROLS */

.controls {

    display: flex;

    justify-content: center;

    gap: 10px;

    margin-top: 20px;

}


.controls button {

    padding: 11px 20px;

    border-radius: 8px;

    border: 1px solid #27272a;

    background: #111113;

    color: white;

    cursor: pointer;

}


.controls button:hover {

    background: #1f1f23;

}


/* MOBILE */

.mobile-controls {

    display: none;

    justify-content: center;

    gap: 15px;

    margin-top: 20px;

}


.mobile-controls button {

    width: 65px;

    height: 55px;

    border-radius: 10px;

    border: 1px solid #333;

    background: #18181b;

    color: white;

    font-size: 22px;

}


.mobile-controls button:active {

    background: #7c3aed;

}


.instructions {

    text-align: center;

    color: #52525b;

    font-size: 12px;

    margin-top: 20px;

}


@media(max-width:650px) {

    body {

        padding: 15px;

    }


    .game-header {

        align-items: flex-start;

    }


    h1 {

        font-size: 28px;

    }


    .score-box div {

        min-width: 55px;

    }


    .mobile-controls {

        display: flex;

    }

}