* {
    box-sizing: border-box;
}

body {

    margin: 0;

    min-height: 100vh;

    background:
        radial-gradient(
            circle at top,
            #172554,
            #050505 55%
        );

    color: white;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 30px;

}


.game-wrapper {

    width: 100%;

    max-width: 700px;

}


/* 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: 10px;

}


.score-box div {

    min-width: 75px;

    padding: 10px;

    text-align: center;

    background: #111113;

    border: 1px solid #27272a;

    border-radius: 10px;

}


.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 AREA */

.game-area {

    position: relative;

    width: 100%;

    aspect-ratio: 1;

}


canvas {

    width: 100%;

    height: 100%;

    display: block;

    background: #09090b;

    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,.7);

    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: 30px;

    margin: 10px 0;

}


.overlay-card p {

    color: #a1a1aa;

    margin-bottom: 25px;

}


.overlay-card button {

    padding: 14px 28px;

    border: none;

    border-radius: 9px;

    background: #7c3aed;

    color: white;

    font-weight: bold;

    cursor: pointer;

    transition: .2s;

}


.overlay-card button:hover {

    background: #8b5cf6;

    transform:
        translateY(-2px);

}


.final-score {

    display: block;

    font-size: 50px;

    margin-bottom: 20px;

    color: #a78bfa;

}


/* CONTROLS */

.controls {

    display: flex;

    gap: 10px;

    justify-content: center;

    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 CONTROLS */

.mobile-controls {

    display: none;

    text-align: center;

    margin-top: 25px;

}


.mobile-controls button {

    width: 55px;

    height: 55px;

    margin: 4px;

    border-radius: 10px;

    border: 1px solid #27272a;

    background: #18181b;

    color: white;

    font-size: 20px;

    cursor: pointer;

}


.mobile-controls button:active {

    background: #7c3aed;

}


.instructions {

    text-align: center;

    color: #52525b;

    font-size: 12px;

    margin-top: 20px;

}


@media(max-width:600px) {

    body {

        padding: 15px;

    }


    .game-header {

        align-items: flex-start;

    }


    h1 {

        font-size: 28px;

    }


    .score-box div {

        min-width: 60px;

    }


    .mobile-controls {

        display: block;

    }

}