* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 500px;
}


h1 {
    font-size: 3rem;
    letter-spacing: 5px;
    margin-bottom: 10px;
}

.subtitle {
    color: #cbd5e1;
    margin-bottom: 20px;
}

.score-area {
    margin-bottom: 20px;
}

.score-area h2 {
    font-size: 1.3rem;
}

#game-board {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.row {
    display: flex;
    gap: 10px;
}

.tile {
    width: 65px;
    height: 65px;
    border: 2px solid #475569;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 12px;
    background-color: #1e293b;
    transition: transform 0.3s ease,
        background-color 0.4s ease,
        border-color 0.4s ease;
}

.correct {
    background-color: #22c55e;
    border-color: #22c55e;
    color: white;
    animation: flip 0.6s ease;
}

.present {
    background-color: #facc15;
    border-color: #facc15;
    color: black;
    animation: bounce 0.6s ease;
}

.absent {
    background-color: #64748b;
    border-color: #64748b;
    color: white;
    animation: fadeIn 0.5s ease;
}

/* ==========================
 BUTTONS
========================== */
.button-group {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s ease,
        background 0.3s ease;
}

button:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

button:active {
    transform: scale(0.95);
}

.message-box {
    margin-top: 20px;
}

#message {
    font-size: 1rem;
    color: #e2e8f0;
}

/* ==========================
 ANIMATIONS
========================== */
@keyframes flip {
    0% {
        transform: rotateX(0);
    }

    50% {
        transform: rotateX(90deg);
    }

    100% {
        transform: rotateX(0);
    }
}

@keyframes bounce {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0.3;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    50% {
        transform: translateX(6px);
    }

    75% {
        transform: translateX(-6px);
    }

    100% {
        transform: translateX(0);
    }
}

.shake {
    animation: shake 0.4s ease;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.4rem;
    }

    .tile {
        width: 58px;
        height: 58px;
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .tile {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    button {
        width: 100%;
    }

    .button-group {
        flex-direction: column;
    }
}