/* ===================================================================== */
/* === ANTI-HIGHLIGHT (limpio pero efectivo) ======================== */
/* ===================================================================== */
*,
*:active,
*:focus,
*:focus-visible {
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}

html, body {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    user-select: none !important;
    touch-action: manipulation;
}

/* Permitir escritura en el input del tiempo */
#input-tiempo {
    user-select: text !important;
    -webkit-user-select: text !important;
    touch-action: auto !important;
}

/* Quitar flechas del input número en Chrome/Safari */
#input-tiempo::-webkit-outer-spin-button,
#input-tiempo::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ===================================================================== */
/* ================== ESTILOS BASE ==================================== */
/* ===================================================================== */

body {
    margin: 0;
    padding: 0;
    background-color: #000000;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #ffffff;
    height: 100vh;
    min-height: -webkit-fill-available;
}

#particles-canvas {
    display: block;
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Temporizador */
.BTN-CUENTA-REGRESIVA {
    position: fixed;
    top: 15px;
    z-index: 25;
    color: #FF0000;
    animation: GLOW-CONTORNO 2s infinite alternate;
    border: 2px solid #FF0000;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    box-shadow: 0 0 15px #FF0000;
}

@media (min-width: 1025px) {
    .BTN-CUENTA-REGRESIVA { right: 95px; }
}

@media (max-width: 1024px) {
    .BTN-CUENTA-REGRESIVA {
        left: 50%;
        transform: translateX(-50%);
    }
}

.cuenta-regresiva-numero {
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    text-shadow: 0 0 10px #FF0000;
}

@keyframes GLOW-CONTORNO { 
    from { box-shadow: 0 0 15px currentColor; } 
    to   { box-shadow: 0 0 25px currentColor, 0 0 35px currentColor; } 
}

.timer-hidden { display: none; }
.timer-visible { display: block; animation: pulseTimer 1s infinite alternate; }

@keyframes pulseTimer { 
    from { transform: scale(1); } 
    to   { transform: scale(1.15); } 
}

/* ================== MODALES ======================== */
.modal-mensaje {
    position: fixed;
    inset: 0;
    background: #000000;
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-contenido {
    background: #000000;
    border-radius: 20px;
    padding: 30px 35px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.boton-canjear {
    padding: 12px 30px;
    background: linear-gradient(#000, #000) padding-box,
                linear-gradient(45deg, #0000FF, #00FFFF) border-box;
    color: #FFF;
    border: 4px solid transparent;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: bold;
    text-transform: uppercase;
    animation: BORDE-BOTON-FLUIDO 0.6s infinite linear;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.7), 0 0 40px rgba(0, 0, 255, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.boton-canjear:hover {
    transform: scale(1.08);
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.9), 0 0 60px rgba(0, 0, 255, 0.6);
}

.boton-canjear.no-gracias {
    background: linear-gradient(#000, #000) padding-box,
                linear-gradient(45deg, #ff4444, #ff8888) border-box;
}

@keyframes BORDE-BOTON-FLUIDO {
    0%   { background: linear-gradient(#000,#000) padding-box, linear-gradient(45deg, #0000FF, #00FFFF) border-box; }
    50%  { background: linear-gradient(#000,#000) padding-box, linear-gradient(45deg, #00FFFF, #0000FF) border-box; }
    100% { background: linear-gradient(#000,#000) padding-box, linear-gradient(45deg, #0000FF, #00FFFF) border-box; }
}

.botones-contenedor {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ICONO-NOTIFICACION {
    font-size: 4.5rem;
    margin-bottom: 20px;
}

.WARNING-TITULO {
    font-size: 2.2rem;
    margin: 0 0 15px;
    text-shadow: 0 0 12px #00ffff, 0 0 18px rgba(0, 0, 255, 0.75), 0 0 28px rgba(0, 255, 255, 0.65);
}

.WARNING-TEXTO {
    font-size: 1.3rem;
    line-height: 1.6;
    margin: 0 0 30px;
}

@media (max-width: 767px) {
    .modal-contenido {
        padding: 25px 20px;
        max-width: 90vw;
    }
    .ICONO-NOTIFICACION { font-size: 3.8rem; margin-bottom: 15px; }
    .WARNING-TITULO { font-size: 1.9rem; }
    .WARNING-TEXTO { font-size: 1.2rem; }
    .botones-contenedor { gap: 15px; }
    .boton-canjear { padding: 11px 28px; font-size: 1.3rem; }
}

/* Puzzle */
#puzzle-container {
    position: absolute;
    z-index: 2;
    background: transparent;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90vmin;
    height: 90vmin;
    max-width: 500px;
    max-height: 500px;
    display: none;
}

.tile {
    position: absolute;
    background-size: 400% 300%;
    border-radius: 6px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: left 0.3s ease, top 0.3s ease;
}