.game-page {
    padding: 60px 0 80px;
}

.game-intro {
    text-align: center;
    margin-bottom: 35px;
}

.game-intro h1 {
    margin-bottom: 12px;
}

.game-intro p:last-child {
    max-width: 650px;
    margin: 0 auto;
}


/* INFORMACIÓ */

.game-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.info-box {
    background: #ffffff;
    border: 2px solid #09101d;
    border-radius: 14px;
    padding: 15px;
    text-align: center;
}

.info-box span {
    display: block;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 5px;
}

.info-box strong {
    font-size: 1.3rem;
}


/* ZONA DEL JOC
   (el fons de posta de sol el dibuixa fons-posta.js
   dins d'aquest contenidor, darrere dels animals) */

.game-area {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: #1a1033; /* color de reserva mentre carrega el fons */
}


/* SÒL */

.game-area::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;

    width: 100%;
    height: 25px;

    background: #09101d;
}


/* PANTALLA INICIAL / FINAL */

.start-screen {
    position: absolute;
    z-index: 100;

    inset: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 30px;

    text-align: center;

    background: rgba(20, 10, 40, 0.55);
    color: #ffffff;
}

.start-screen h2 {
    font-size: 2rem;
    margin: 10px 0;
}

.start-screen p {
    max-width: 450px;
}

.start-icon {
    font-size: 4rem;
}

.hidden {
    display: none;
}


/* BOTÓ */

.game-button {
    margin-top: 15px;
    cursor: pointer;
}


/* ANIMALS */

.falling-animal {
    position: absolute;
    width: 110px;
    height: 125px;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    user-select: none;
    z-index: 5;
}

.animal-sprite {
    width: 100px;
    height: 92px;
    background-repeat: no-repeat;
    image-rendering: pixelated;
}

.animal-word {
    margin-top: 2px;
    padding: 4px 9px;
    border-radius: 8px;
    background: #09101d;
    color: white;
    border: 2px solid #84cbc9;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    transition: background 0.1s;
}

.pixel-animal {
    margin-top: 7px;
    image-rendering: pixelated;
}

.falling-animal.typing-match .animal-word {
    background: #84cbc9;
    color: #09101d;
}

.falling-animal.animal-correct {
    transform: scale(1.2);
    opacity: 0;
    transition: 0.12s ease;
}

.life-lost {
    animation: lifeLost 0.18s ease;
}

.level-up {
    animation: levelUp 0.5s ease;
}

@keyframes lifeLost {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

@keyframes levelUp {
    0% {
        box-shadow: inset 0 0 0 0 #84cbc9;
    }

    50% {
        box-shadow: inset 0 0 40px 10px rgba(132, 203, 201, 0.35);
    }

    100% {
        box-shadow: inset 0 0 0 0 #84cbc9;
    }
}


/* INPUT */

.typing-area {
    margin-top: 25px;
}

.typing-area label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

#word-input {
    width: 100%;

    padding: 17px 18px;

    border: 3px solid #09101d;
    border-radius: 12px;

    font-family: "Space Grotesk", sans-serif;
    font-size: 1.15rem;

    outline: none;
    box-sizing: border-box;
}

#word-input:focus {
    box-shadow: 5px 5px 0 #09101d;
}

.game-message {
    min-height: 24px;
    margin-top: 10px;
}


/* RESPONSIVE */

@media (max-width: 700px) {

    .game-page {
        padding-top: 35px;
    }

    .game-info {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-area {
        height: 540px;
    }

    .start-screen h2 {
        font-size: 1.6rem;
    }

}
