/* Estilos Generales */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    background-color: #121212;
    color: #ffffff;
    padding-bottom: 200px;
    margin: 0;
}

h1 {
    font-family: 'cursive', 'Brush Script MT', sans-serif;
    font-size: 3rem;
    color: #fff;
    text-shadow: 
        -1px -1px 0 #000,  
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
}
p { color: #e0e0e0; font-size: 1.1rem; }

/* Estilos para la descripción de la rifa */
#info-rifa-publica {
    max-width: 800px;
    margin: 20px auto;
    padding: 15px;
    background-color: #2a2a2a;
    border-radius: 8px;
    border-left: 5px solid #4ade80;
    text-align: left;
}
#info-rifa-publica p {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.5;
}

#contenedor-buscador {
    margin: 20px auto;
    padding: 0 20px;
    max-width: 600px;
}
#buscador-numeros {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border-radius: 10px;
    border: 2px solid #444;
    background-color: #222;
    color: #fff;
    box-sizing: border-box;
}
#buscador-numeros::placeholder { color: #888; }

#contenedor-descarga { margin: 20px auto; }
#btn-descargar-talonario {
    background: linear-gradient(45deg, #6d28d9, #9f1239);
    padding: 12px 25px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(109, 40, 217, 0.4);
}
#btn-descargar-talonario:hover { transform: scale(1.05); }

/* ========= INICIO DE ESTILOS CLAVE PARA LA CAPTURA ========= */
#talonario-para-captura {
    background-color: #121212;
}
#info-rifa-captura {
    display: none;
    color: #ffffff;
    padding: 20px;
    font-size: 1.5rem;
    text-align: center;
    font-weight: bold;
    white-space: pre-wrap;
}

body.capturando #talonario-para-captura {
    padding: 30px;
    background-color: #121212;
}
body.capturando #info-rifa-captura {
    display: block;
}
body.capturando #grid-numeros {
    grid-template-columns: repeat(10, 1fr);
    width: auto;
    max-width: none;
}
body.capturando h1,
body.capturando #info-rifa-publica,
body.capturando p,
body.capturando #contenedor-buscador,
body.capturando #contenedor-descarga,
body.capturando #panel-reserva {
    display: none;
}
/* ========= FIN DE ESTILOS CLAVE PARA LA CAPTURA ========= */


/* Cuadrícula de Números (vista normal en la página) */
#grid-numeros {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 12px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}

.numero-rifa {
    position: relative;
    padding: 15px 5px;
    border: 2px solid #444;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
    font-size: 1.4rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.numero-rifa.disponible:hover { background-color: #00aaff; transform: scale(1.1); }
.numero-rifa.seleccionado {
    background-color: #00d4ff;
    color: #121212;
    border-color: #fff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.7);
    transform: scale(1.1);
}
.numero-rifa.reservado {
    background-color: #f97316;
    color: #fff;
    cursor: not-allowed;
    text-decoration: none;
}
.numero-rifa.pagado {
    background-color: #22c55e;
    color: #fff;
    cursor: not-allowed;
    text-decoration: none;
}

/* Panel de Reserva */
#panel-reserva {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    padding: 10px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.5);
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
    border-top: 1px solid #444;
}
#panel-reserva.visible { transform: translateY(0); }
#panel-reserva h3 {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 10px;
}

/* Formulario */
#formulario-reserva {
    display: none;
    margin-top: 5px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}
input[type="text"], input[type="tel"] {
    width: 95%;
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid #555;
    border-radius: 8px;
    font-size: 14px;
    background-color: #222;
    color: #fff;
}
button {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(45deg, #0077b6, #00b4d8);
    color: white;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.4);
}
button:disabled { background: #555; cursor: wait; }

/* ========= ESTILOS DEL COMPROBANTE MEJORADO ========= */
.comprobante-estilo {
    display: none; /* Se mantiene oculto hasta que se genera */
    width: 400px;
    padding: 25px;
    background: linear-gradient(135deg, #2c3e50, #4ca1af);
    color: white;
    font-family: 'Arial', sans-serif;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    text-align: left;
    border: none;
}

.comprobante-estilo h2 {
    text-align: center;
    color: #f1c40f;
    font-weight: bold;
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #f1c40f;
    padding-bottom: 10px;
}

.comprobante-estilo p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 10px 0;
    color: #ecf0f1;
}

.comprobante-estilo strong {
    color: #ffffff;
    font-weight: 600;
}

.comprobante-estilo #comprobante-numeros {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4ade80; /* Un verde vibrante */
    text-align: center;
    display: block;
    margin: 15px 0;
}

.comprobante-estilo em {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #bdc3c7;
    font-style: italic;
}