@charset "utf-8";
/* ESTILOS GENERALES ORIGINALES (MÓVIL) */
#crono-premio-container {
    max-width: 320px;
    margin: 20px auto;
    padding: 20px;
    background: #6E5B52;
    border-radius: 10px;
    color: #FFFFFF;
    text-align: center;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    position: relative;
    border: 2px solid #D0A05E;
}

.crono-screen {
    display: none;
}

.crono-screen.active {
    display: block;
}

#crono-instructions h2 {
    color: #D0A05E;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

#crono-instructions p:first-of-type, 
#crono-instructions p:nth-of-type(2) {
    display: none;
}

.highlight {
    color: #009900;
    font-weight: bold;
    font-size: 1.1rem;
}

#crono-understand-btn {
    background: #D0A05E;
    color: #6E5B52;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
    display: inline-block;
}

#crono-understand-btn:hover {
    background: #F8E571;
    color: #6E5B52;
}

#crono-display {
    font-size: 5rem;
    font-family: 'Courier New', monospace;
    color: #F8E571;
    margin: 30px 0;
    text-shadow: 0 0 12px rgba(248, 229, 113, 0.7);
    letter-spacing: 2px;
    font-weight: bold;
}

.crono-back-btn {
    background: rgba(110, 91, 82, 0.7);
    border: none;
    color: #EDE1CA;
    position: absolute;
    top: 15px;
    left: 15px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    padding: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.crono-back-btn:hover {
    background: #D0A05E;
    color: #FFFFFF;
    transform: scale(1.1);
}

.crono-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 25px 0;
}

#crono-start, #crono-reset {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 100px;
    font-size: 1rem;
}

#crono-start {
    background: #009900;
    color: white;
}

#crono-start:hover {
    background: #007700;
}

#crono-start.paused {
    background: #D0A05E;
}

#crono-start.paused:hover {
    background: #B3894E;
}

#crono-reset {
    background: #6E5B52;
    color: #EDE1CA;
    border: 1px solid #D0A05E;
}

#crono-reset:hover {
    background: #5A4A42;
    color: white;
}

#jugadas-info {
    margin-top: 20px;
    font-size: 0.95rem;
    color: #EDE1CA;
}

.crono-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(110, 91, 82, 0.96);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s;
}

.crono-modal-content {
    background: #6E5B52;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 350px;
    border: 3px solid #D0A05E;
    box-shadow: 0 0 30px rgba(208, 160, 94, 0.5);
    animation: zoomIn 0.4s;
}

.crono-modal h1 {
    color: #F8E571;
    font-size: 2.2rem;
    margin-bottom: 15px;
    text-shadow: 0 0 8px rgba(248, 229, 113, 0.5);
}

.crono-modal h2 {
    color: #D0A05E;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.crono-modal p {
    font-size: 1.2rem;
    margin: 12px 0;
    color: #EDE1CA;
}

.crono-modal strong {
    color: #F8E571;
    font-size: 2.5rem;
    display: inline-block;
    margin: 10px 0;
    text-shadow: 0 0 10px rgba(248, 229, 113, 0.5);
}

.crono-modal-close {
    background: #D0A05E;
    color: #6E5B52;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 20px;
    transition: all 0.3s;
    font-weight: bold;
}

.crono-modal-close:hover {
    background: #F8E571;
    transform: scale(1.05);
}

#audio-alert {
    display: none;
    background: #D0A05E;
    color: #6E5B52;
    padding: 10px 15px;
    border-radius: 5px;
    margin-top: 15px;
    font-size: 0.9rem;
    animation: pulse 1.5s infinite;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ESTILOS PARA MÓVILES PEQUEÑOS (ORIGINAL) */
@media (max-width: 480px) {
    #crono-display {
        font-size: 3.5rem !important;
    }
    
    #crono-instructions h2 {
        font-size: 1.5rem;
    }
    
    .highlight {
        font-size: 1rem;
    }
    
    #crono-understand-btn {
        padding: 10px 25px;
        font-size: 1rem;
    }
}

/* =============================================== */
/* NUEVOS ESTILOS EXCLUSIVOS PARA TABLET RECTANGULAR */
/* =============================================== */
@media (min-width: 768px) and (orientation: landscape) {
    #crono-premio-container {
        max-width: none;
        width: 70vw;
        height: 60vh;
        margin: 12vh auto;
        padding: 50px;
        border-radius: 25px;
    }
    
    #crono-display {
        font-size: 10rem !important;
        margin: -2vh 0 6vh;
        letter-spacing: 5px;
    }
    
    .crono-controls {
        flex-direction: row;
        gap: 60px;
        margin: 6vh 0;
    }
    
    #crono-start, #crono-reset {
        min-width: 280px;
        padding: 20px 50px;
        font-size: 2.1rem;
        border-radius: 15px;
    }
    /* cambia tamaño texto volver */
    .crono-back-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
        top: 35px;
        left: 35px;
    }
    
    #jugadas-info {
        font-size: 2.2rem;
        bottom: 130px;
    }
    
    #crono-understand-btn {
        padding: 30px 70px;
        font-size: 2.2rem;
        margin: 50px auto 30px;
        border-radius: 12px;
    }
    
    .crono-modal-content {
        max-width: 750px;
        padding: 70px;
    }
    
    .crono-modal h1 {
        font-size: 4rem;
    }
    
    .crono-modal p {
        font-size: 2.2rem;
    }
    
    .crono-modal-close {
        padding: 30px 60px;
        font-size: 2rem;
    }
}

#jugadas-info {
    display: none !important;
}

/* Eliminar ventana emergente del cronómetro */
.crono-modal {
    display: none !important;  /* Oculta la ventana y su fondo oscuro */
}

/* =============================================== */
/* MEJORAS PARA LA FLUIDEZ DEL CRONÓMETRO (SOLO AÑADIDOS) */
/* =============================================== */
#crono-display {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    perspective: 1000px;
}

@media (max-width: 768px) {
    #crono-display {
        text-shadow: none !important;
        animation: none !important;
    }
    
    .crono-controls button {
        transition: none !important;
    }
}

@supports (-webkit-touch-callout: none) {
    #crono-premio-container {
        overflow: hidden;
        isolation: isolate;
    }
    
    #crono-display {
        font-weight: normal !important;
        position: relative;
        z-index: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Optimización específica para Snapdragon 425 en landscape */
@media (min-width: 768px) and (orientation: landscape) and (max-device-width: 1024px) {
    #crono-display {
        font-size: 8rem !important;
        text-shadow: none !important;
    }
    
    .crono-controls {
        gap: 30px !important;
    }
    
    #crono-start, #crono-reset {
        min-width: 200px !important;
        padding: 15px 30px !important;
        font-size: 1.8rem !important;
    }
}

/* =============================================== */
/* DETENER CONFETI AL VOLVER (SOLO AÑADIDOS) */
/* =============================================== */

/* 1. Detener animación del confeti cuando se presiona volver */
.crono-back-btn.active + canvas {
    display: none !important;
    animation: none !important;
    visibility: hidden !important;
}

/* 2. Forzar detención de cualquier animación relacionada */
.crono-screen:not(.active) ~ canvas {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.1s linear !important;
}

/* 3. Asegurar que no hay efectos residuales */
body.crono-no-effects {
    overflow: auto !important;
}
body.crono-no-effects canvas {
    display: none !important;
}


/* ========================== */
/* SECCIÓN DE SELECCIÓN DE TICKETS */
/* ========================== */
@media (min-width: 768px) and (orientation: landscape) {
    /* Contenedor del cuadro marrón */
    #ticket-selection-container {
        max-width: 80vw;
        margin: 10vh auto;
        padding: 40px;
        border-radius: 20px;
        background: #6E5B52 !important; /* Marrón fijo */
        box-shadow: 0px 6px 15px rgba(208, 160, 94, 0.5);
        text-align: center;
    }

    /* Título */
    #ticket-selection-container h2 {
        font-size: 2rem;
        font-weight: bold;
        color: #EDE1CA;
        margin-bottom: 15px;
    }

    /* Botones */
    .ticket-btn {
        display: block;
        width: 90%;
        margin: 10px auto;
        padding: 12px;
        font-size: 1.4rem; /* Texto ajustado */
        font-weight: bold;
        background-color: #D0A05E;
        color: #6E5B52;
        border: none;
        border-radius: 10px;
        cursor: pointer;
        transition: background 0.3s, transform 0.2s;
    }

    .ticket-btn:hover {
        background-color: #F8E571;
        transform: scale(1.05);
    }

    .ticket-btn:active {
        transform: scale(0.95);
    }
}
#jugadas-info {
    font-size: 18px;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 5px;
    display: block !important;
}


.premio-texto {
    color: brown;
}
/* 🔹 Contenedor de jugadas */
#jugadas-info {
    font-size: 20px;
    color: #fff; /* Texto en blanco para mejor contraste */
    background: rgba(50, 50, 50, 0.8); /* Fondo oscuro semitransparente */
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

/* 🔹 Resaltar jugadas realizadas */
#jugadas-realizadas {
    color: #FFD700; /* Dorado */
    font-size: 24px;
    font-weight: bold;
}

/* 🔹 Botones de acción */
button {
    font-size: 20px;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

/* 🔹 Botón INICIAR (Verde con efecto) */
#crono-start {
    background-color: #28a745;
    color: white;
}

#crono-start:hover {
    background-color: #218838;
}

/* 🔹 Botón REINICIAR (Marrón con efecto) */
#crono-reset {
    background-color: #8B4513;
    color: white;
}

#crono-reset:hover {
    background-color: #6A2C00;
}

/* 🔹 Distribución de los botones */
.crono-controls {
    margin-top: 15px;
    display: flex;
    gap: 10px; /* Espacio entre botones */
    justify-content: center;
}

/* 🔹 Ajuste de mensajes */
.premio-texto {
    color: brown;
}
/* Feedback visual para botones táctiles */
.button-pressed {
    transform: scale(0.95) !important;
    opacity: 0.8 !important;
    transition: none !important;
}

/* Optimización específica para Snapdragon 425 */
@media (max-device-width: 1024px) and (orientation: landscape) {
    button {
        -webkit-tap-highlight-color: transparent;
    user-select: none;
    }
    
    #audio-alert {
        font-size: 1.2rem !important;
        padding: 12px !important;
    }
}