/**
 * ════════════════════════════════════════════════════════════════
 * ESTILOS PARA VARIOS JUEGOS
 * "Tormenta de Premios" - Con Cortantes Jugamos
 * ════════════════════════════════════════════════════════════════
 */

/* ════════════════════════════════════════════════════════════════
   MEMOTEST
   ════════════════════════════════════════════════════════════════ */

.memotest-header {
    text-align: center;
    margin-bottom: 20px;
}

.memotest-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--deep);
    margin-bottom: 10px;
}

.memotest-stats {
    font-size: 0.9rem;
    color: var(--deep);
    opacity: 0.8;
}

.memotest-tablero {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.memotest-carta {
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--hot-pink), var(--magenta));
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    transition: var(--transition);
    position: relative;
    transform-style: preserve-3d;
}

.memotest-carta:hover {
    transform: scale(1.05);
}

.memotest-carta.volteada {
    background: var(--white);
    border: 3px solid var(--hot-pink);
    transform: rotateY(180deg);
}

.memotest-carta.encontrada {
    background: var(--mint);
    cursor: default;
    animation: memotestPulse 0.5s ease;
}

@keyframes memotestPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.memotest-dorso {
    font-size: 1.5rem;
    opacity: 0.8;
}

.memotest-revelada {
    transform: rotateY(180deg);
}

/* ════════════════════════════════════════════════════════════════
   SLOT MACHINE
   ════════════════════════════════════════════════════════════════ */

.slot-machine {
    text-align: center;
    width: 100%;
}

.slot-header {
    margin-bottom: 25px;
}

.slot-header h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--deep);
    margin-bottom: 5px;
}

.slot-header p {
    font-size: 0.9rem;
    color: var(--deep);
    opacity: 0.7;
}

.slot-rodillos {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #1a0533, #4a1a6e);
    border-radius: var(--radius-lg);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.slot-rodillo {
    width: 80px;
    height: 100px;
    background: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: var(--transition);
}

.slot-rodillo.slot-ganador {
    animation: slotGanador 0.5s ease;
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

@keyframes slotGanador {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.slot-btn {
    padding: 18px 60px;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--hot-pink), var(--magenta));
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.slot-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.slot-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.slot-info {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--deep);
    opacity: 0.7;
}

/* ════════════════════════════════════════════════════════════════
   RASPA Y GANÁ
   ════════════════════════════════════════════════════════════════ */

.raspa-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.raspa-canvas {
    border-radius: var(--radius-lg);
    cursor: crosshair;
    touch-action: none;
}

/* ════════════════════════════════════════════════════════════════
   CAJA SORPRESA
   ════════════════════════════════════════════════════════════════ */

.sorpresa-container {
    text-align: center;
}

.sorpresa-titulo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.sorpresa-cajas {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.sorpresa-caja {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--hot-pink), var(--magenta));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.sorpresa-caja:hover {
    transform: translateY(-10px) rotate(5deg);
    box-shadow: var(--shadow-lg);
}

.sorpresa-caja.abierta {
    background: var(--white);
    transform: scale(1.1);
    animation: sorpresaAbrir 0.5s ease;
}

@keyframes sorpresaAbrir {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1.1); }
}

/* ════════════════════════════════════════════════════════════════
   CLICKER / REACCIÓN
   ════════════════════════════════════════════════════════════════ */

.clicker-game {
    text-align: center;
}

.clicker-header {
    margin-bottom: 15px;
}

.clicker-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--deep);
    margin-bottom: 5px;
}

.clicker-header p {
    font-size: 0.9rem;
    color: var(--deep);
    opacity: 0.8;
}

.clicker-stats {
    margin-bottom: 15px;
}

.clicker-stat {
    font-size: 0.9rem;
    color: var(--deep);
}

.clicker-display {
    font-size: 5rem;
    font-weight: 800;
    color: var(--hot-pink);
    margin: 20px 0;
}

.clicker-timer {
    font-size: 2rem;
    font-weight: 700;
    color: var(--deep);
    margin-bottom: 15px;
}

.clicker-btn-game {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--hot-pink), var(--magenta));
    border: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.clicker-btn-game:active {
    transform: scale(0.9);
}

.clicker-btn-game:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ════════════════════════════════════════════════════════════════
   TRIVIA RÁPIDA
   ════════════════════════════════════════════════════════════════ */

.trivia-game {
    text-align: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.trivia-header {
    margin-bottom: 20px;
}

.trivia-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--deep);
    margin-bottom: 5px;
}

.trivia-progress {
    font-size: 0.9rem;
    color: var(--deep);
    opacity: 0.8;
}

.trivia-timer-bar {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin-bottom: 20px;
}

.trivia-timer-fill {
    height: 100%;
    background: var(--mint);
    transition: width 1s linear;
    width: 100%;
}

.trivia-pregunta {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--deep);
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255,255,255,0.5);
    border-radius: var(--radius);
}

.trivia-opciones {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.trivia-opcion {
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 500;
    background: var(--white);
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.trivia-opcion:hover {
    border-color: var(--hot-pink);
    background: rgba(255,45,120,0.05);
}

.trivia-opcion:disabled {
    cursor: default;
    opacity: 0.7;
}

.trivia-opcion.trivia-correcta {
    background: var(--mint);
    border-color: var(--mint);
    color: var(--white);
}

.trivia-opcion.trivia-incorrecta {
    background: var(--hot-pink);
    border-color: var(--hot-pink);
    color: var(--white);
}

.trivia-score {
    font-size: 1rem;
    color: var(--deep);
}

/* ════════════════════════════════════════════════════════════════
   REACCIÓN RÁPIDA
   ════════════════════════════════════════════════════════════════ */

.reaccion-game {
    text-align: center;
}

.reaccion-display {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--deep);
    margin-bottom: 30px;
}

.reaccion-area {
    width: 100%;
    max-width: 400px;
    height: 300px;
    background: linear-gradient(135deg, rgba(255,45,120,0.1), rgba(212,0,106,0.1));
    border: 3px solid var(--hot-pink);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    cursor: pointer;
    transition: var(--transition);
}

.reaccion-area:hover {
    background: linear-gradient(135deg, rgba(255,45,120,0.2), rgba(212,0,106,0.2));
}

.reaccion-area.active {
    background: var(--hot-pink);
}

.reaccion-area.clicked {
    background: var(--mint);
}

.reaccion-result {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--hot-pink);
}

.reaccion-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--hot-pink), var(--magenta));
    border: none;
    border-radius: var(--radius-pill);
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.reaccion-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.reaccion-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE PARA JUEGOS
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .memotest-tablero {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .memotest-carta {
        font-size: 2rem;
    }

    .slot-rodillo {
        width: 60px;
        height: 80px;
        font-size: 2rem;
    }

    .slot-btn {
        padding: 15px 40px;
        font-size: 1.1rem;
    }

    .sorpresa-caja {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }

    .clicker-btn-game {
        width: 150px;
        height: 150px;
        font-size: 1.2rem;
    }

    .clicker-display {
        font-size: 4rem;
    }
}
