@import url('https://fonts.googleapis.com/css2?family=Playpen+Sans:wght@100..800&display=swap');

/* ========================= */
/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Playpen Sans", sans-serif;
    text-align: center;
    background: linear-gradient(135deg, #056b8d, #02aab0);
    transition: background 1s ease-in-out;
}

/* ========================= */
/* CONTAINER */
.container {
    background: linear-gradient(to bottom right, rgba(32, 1, 84, 0.9), rgba(64, 0, 128, 0.95));
    height: 70vh;
    width: 70vw;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 30px;
    margin-top: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    animation: fadeIn 1.2s ease-in-out;
}

/* ========================= */
/* GAME GRID */
.game {
    height: 60vmin;
    width: 60vmin;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5vmin;
}

/* ========================= */
/* BOXES */
.box {
    width: 18vmin;
    height: 18vmin;
    border-radius: 15px;
    border: none;
    color: #f5f5f5;
    font-size: 50px;
    background: linear-gradient(145deg, #5aa0e2, #357ab8);
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect */
.box:hover {
    transform: scale(1.05) rotate(-3deg);
    background: linear-gradient(145deg, #357ab8, #5aa0e2);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

/* Click effect */
.box:active {
    transform: scale(0.95) rotate(3deg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* Disabled box */
.box:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    background: linear-gradient(145deg, #357ab8, #5aa0e2);
}

/* ========================= */
/* BUTTONS */
.resetbtn,
.newgame {
    background: linear-gradient(145deg, #035968, #02778b);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 15px;
    color: #fff;
    margin-top: 10px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect */
.resetbtn:hover,
.newgame:hover {
    transform: scale(1.05) rotate(-1deg);
    background: linear-gradient(145deg, #02778b, #035968);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* Click effect */
.resetbtn:active,
.newgame:active {
    transform: scale(0.95) rotate(1deg);
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

/* ========================= */
/* MESSAGE */
.msg-container {
    font-size: 30px;
    /* unchanged as requested */
}
.hide{
    display: none;
    font-size: larger;
}
/* ========================= */
/* ANIMATION KEYFRAMES */
@keyframes fadeIn {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* ========================= */
/* MOBILE RESPONSIVE VIEW */
@media (max-width: 480px) {

    body {
        padding: 10px;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 15px;
        line-height: 1.2;
    }

    .container {
        width: 91%;
        height: 95%;
        padding: 15px;
        margin-top: 30px;
    }

    .game {
        width: 85vw;
        height: 85vw;
        gap: 2vw;
    }

    .box {
        width: 24vw;
        height: 24vw;
        font-size: 8vw;
        border-radius: 12px;
        transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }

    .resetbtn,
    .newgame {
        width: 80%;
        font-size: 1rem;
        padding: 10px;
        margin-top: 10px;
        gap: 10px;
    }

    .msg-container{
        font-size: 25px;
    }
}
