*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html{
    height: 100%;
}

body{
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.15), transparent 30%),
        radial-gradient(circle at bottom right, rgba(255,255,255,0.08), transparent 30%),
        linear-gradient(135deg,#0f172a,#1e293b,#111827);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: "Poppins", sans-serif;
    padding: 20px;
    overflow-x: hidden;
}

/* TITLE */
.topic{
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    color: #c9c142;
    text-align: center;
    margin-bottom: 25px;
    letter-spacing: 2px;
    text-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

/* GAME BOX */
.game{
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 25px;
    border-radius: 28px;
    box-shadow:
        0 20px 40px rgba(0,0,0,0.35),
        inset 0 1px 1px rgba(255,255,255,0.08);
    width: fit-content;
}

/* GRID */
.grid{
    display: grid;
    grid-template-columns: repeat(4, 90px);
    grid-template-rows: repeat(4, 90px);
    gap: 12px;
}

/* GAME BUTTONS */
.grid button{
    background: linear-gradient(145deg,#f8fafc,#cbd5e1);
    color: #0f172a;
    font-size: 2rem;
    font-weight: 700;
    border: none;
    border-radius: 18px;
    outline: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow:
        0 8px 18px rgba(0,0,0,0.2),
        inset 0 2px 2px rgba(255,255,255,0.5);
}

.grid button:hover{
    transform: translateY(-5px) scale(1.03);
    background: linear-gradient(135deg,#facc15,#facc15);
    color: white;
    box-shadow:
        0 15px 25px rgba(14,165,233,0.4);
}

.grid button:active{
    transform: scale(0.95);
}

/* FOOTER */
.footer{
    margin-top: 22px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* FOOTER BUTTON */
.footer button{
    border: none;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 14px;
    padding: 12px 18px;
    min-width: 110px;
    background: linear-gradient(135deg, #0b96f5, #facc15);
    color: #111827;
    outline: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.footer button:hover{
    transform: translateY(-4px);
    background: linear-gradient(135deg,#0ea5e9,#38bdf8);
    color: white;
}

.footer button:active{
    transform: scale(0.95);
}

/* SCORE / MOVES */
.footer span{
    flex: 1;
    text-align: center;
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 700;
    padding: 10px 16px;
    background: rgba(255,255,255,0.08);
    border-radius: 14px;
    backdrop-filter: blur(8px);
}

/* MESSAGE */
.message{
    color: #ffffff;
    min-height: 60px;
    margin-top: 18px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */

@media (max-width: 768px){

    .game{
        padding: 18px;
        border-radius: 22px;
    }

    .grid{
        grid-template-columns: repeat(4, 72px);
        grid-template-rows: repeat(4, 72px);
        gap: 10px;
    }

    .grid button{
        font-size: 1.6rem;
        border-radius: 14px;
    }

    .footer{
        justify-content: center;
    }

    .footer span{
        width: 100%;
        flex: unset;
    }
}

@media (max-width: 480px){

    body{
        padding: 15px;
    }

    .topic{
        font-size: 2rem;
    }

    .game{
        width: 100%;
        max-width: 360px;
        padding: 15px;
    }

    .grid{
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(4, 68px);
    }

    .grid button{
        font-size: 1.4rem;
    }

    .footer{
        flex-direction: column;
        gap: 12px;
    }

    .footer button{
        width: 100%;
    }

    .footer span{
        width: 100%;
    }

    .message{
        font-size: 1rem;
    }
}