/* ===========================
   ESTILOS GENERALES
=========================== */
body {
    margin: 0;
    font-family: "Comic Sans MS", sans-serif;
    background: #dff1ff;
    min-height: 100dvh;
}


/* ===========================
   PANTALLAS
=========================== */
.screen {
    width: 100vw;
    min-height: 100dvh;
    position: absolute;
    top: 0;
    left: 100%;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    transition: 0.5s;
}

    .screen.active {
        left: 0;
    }

/* ===========================
   MASCOTA (centrada siempre)
=========================== */
.mascota {
    width: 180px;
    display: block;
    margin: 20px auto;
    animation: petBounce 2s infinite;
}

.mascota-mini {
    width: 120px;
    display: block;
    margin: 10px auto 20px auto;
    animation: petBounce 2s infinite;
}

/* Animación exclusiva para mascota */
@keyframes petBounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ===========================
   BOTONES
=========================== */
.btn-start {
    background: #ffce00;
    border: none;
    padding: 12px 40px;
    font-size: 28px;
    border-radius: 25px;
    box-shadow: 0px 6px 0px #c19b00;
    cursor: pointer;
    margin-top: 20px;
}

    .btn-start:active {
        box-shadow: none;
        transform: translateY(6px);
    }

.btn-sec {
    background: #6fc4ff;
    border: none;
    padding: 12px 30px;
    font-size: 22px;
    border-radius: 20px;
    margin-top: 10px;
    cursor: pointer;
}

/* ===========================
   NIVELES
=========================== */
.nivel-box p {
    font-size: 20px;
}

.nivel-btn {
    background: #ff8a8a;
    padding: 10px 30px;
    border-radius: 20px;
    margin: 5px;
    cursor: pointer;
    font-size: 22px;
}

/* ===========================
   OPERACIÓN
=========================== */
.operation {
    font-size: 60px;
    font-weight: bold;
    margin: 20px 0;
    color: #2b6cb0;
}

/* ===========================
   RESPUESTAS
=========================== */
.answers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 15px;
    padding: 20px;
}

    .answers button {
        font-size: 26px;
        padding: 15px;
        border-radius: 20px;
        background: #fff;
        border: 3px solid #2b6cb0;
    }
/* ===========================
   PANTALLA DE VICTORIA
=========================== */
.estrella {
    width: 200px;
    display: block;
    margin: 20px auto 10px auto;
    animation: starBounce 1.5s infinite;
}

/* Animación exclusiva para la estrella */
@keyframes starBounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* ===========================
   MENSAJE FLOTANTE (con salto)
=========================== */
.msgBox {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: #ff4d4d;
    color: white;
    padding: 15px 30px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    opacity: 0;
    transition: opacity .3s, transform .3s;
    pointer-events: none;
    z-index: 9999;
}

    .msgBox.show {
        opacity: 1;
        transform: translateX(-50%) scale(1.1);
        animation: msgBounce 0.6s ease;
    }

    .msgBox.error {
        background: #ff4d4d;
    }

    .msgBox.ok {
        background: #40c057;
    }

    .msgBox.info {
        background: #4dabf7;
    }

/* Salto del mensaje */
@keyframes msgBounce {
    0% {
        transform: translateX(-50%) scale(0.7);
    }

    40% {
        transform: translateX(-50%) scale(1.15);
    }

    70% {
        transform: translateX(-50%) scale(0.95);
    }

    100% {
        transform: translateX(-50%) scale(1);
    }
}

/* ===========================
   NÚMEROS GRANDES (texto)
=========================== */
.big-number {
    font-size: 80px;
    font-weight: bold;
    color: #2a9df4;
    margin: 20px 0;
}
button {
    touch-action: manipulation;
    cursor: pointer;
}