:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

/* ============================================
   PREVENIR OVERSCROLL/BOUNCE EN MÓVILES
   Aplicado a todas las páginas
   ============================================ */

/* Prevenir overscroll behavior globalmente - Aplica a todas las páginas */
html,
body {
    overscroll-behavior: none !important;
    overscroll-behavior-y: none !important;
    overscroll-behavior-x: none !important;
    -webkit-overflow-scrolling: touch !important;
    position: relative !important;
}

/* En móviles, asegurar límites de scroll y prevenir bounce */
@media (max-width: 768px) {
    html {
        overscroll-behavior: none !important;
        overscroll-behavior-y: none !important;
        overscroll-behavior-x: none !important;
        position: relative !important;
        height: 100% !important;
        max-height: 100vh !important;
        overflow-x: hidden !important;
    }
    
    body {
        overscroll-behavior: none !important;
        overscroll-behavior-y: none !important;
        overscroll-behavior-x: none !important;
        -webkit-overflow-scrolling: touch !important;
        position: relative !important;
        height: 100% !important;
        max-height: 100vh !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
    
    /* Prevenir bounce en header */
    header,
    .navbar-custom,
    .navbar,
    nav.navbar {
        overscroll-behavior: none !important;
        position: relative !important;
        touch-action: pan-y !important;
    }
    
    /* Prevenir bounce en footer */
    footer,
    .footer-custom {
        overscroll-behavior: none !important;
        position: relative !important;
        touch-action: pan-y !important;
        margin-top: auto !important;
    }
    
    /* Contenedor principal - sin overscroll */
    .container,
    .container-fluid {
        overscroll-behavior: none !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Prevenir que el contenido se mueva más allá de los límites */
    main,
    .main-content {
        overscroll-behavior: none !important;
        position: relative !important;
        touch-action: pan-y !important;
    }
    
    /* Contenedores principales - sin overscroll */
    .container > *,
    .container-fluid > * {
        overscroll-behavior: none !important;
    }
}

.hero-section {
    /* El gradiente se aplica dinámicamente desde la configuración */
    margin-top: -76px;
    padding-top: 150px !important;
}

.hero-section h1,
.hero-section .display-4 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.hero-section p,
.hero-section .lead {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.step-card {
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

.step-number {
    font-size: 1.5rem;
    font-weight: bold;
}

.rifa-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    overflow: hidden;
}

.rifa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

.rifa-image-container {
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.rifa-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: relative;
    z-index: 2;
}

.rifa-image.loaded {
    opacity: 1;
}

/* Skeleton loader mientras carga la imagen */
.rifa-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

/* Ocultar skeleton cuando la imagen está cargada usando JavaScript */
.rifa-image-container.image-loaded::before {
    display: none;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.progress-bar-custom {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Contenedores de números en modo claro */
.sorteo-numeros-grid,
.numeros-paginado-container {
    border: 1px solid #e6e6e6;
    background: #fafafa;
    border-radius: 8px;
}

.sorteo-numero {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #dee2e6;
}

/* Números disponibles en modo claro */
.sorteo-numero.disponible {
    background-color: #fff;
    color: #495057;
    border-color: #dee2e6;
    cursor: pointer;
}

.sorteo-numero:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.sorteo-numero.seleccionado {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: white !important;
    border-color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

/* Números vendidos en modo claro */
.sorteo-numero.vendido {
    background-color: #f8f9fa !important;
    color: #adb5bd !important;
    border-color: #dee2e6 !important;
    border: 1px solid #dee2e6 !important;
    cursor: not-allowed !important;
}

/* Números reservados - Mismo estilo que vendidos (gris, no amarillo) en modo claro */
.sorteo-numero.reservado {
    background-color: #f8f9fa !important;
    color: #adb5bd !important;
    border-color: #dee2e6 !important;
    border: 1px solid #dee2e6 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* Selectores más específicos para asegurar que se aplique en modo claro */
div.sorteo-numero.reservado,
.sorteo-numero.text-center.p-2.rounded.reservado,
.sorteo-numero.reservado.text-center,
.sorteo-numero.reservado.p-2,
.sorteo-numero.reservado.rounded,
#numeros-container .sorteo-numero.reservado,
#numeros-container-paginado .sorteo-numero.reservado,
.sorteo-numeros-grid .sorteo-numero.reservado {
    background-color: #f8f9fa !important;
    color: #adb5bd !important;
    border-color: #dee2e6 !important;
    border: 1px solid #dee2e6 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

.form-section {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    background: white;
}

.form-section h3 {
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.estatus-ticket {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
}

.estatus-pendiente { 
    background: #fff3cd; 
    color: #856404; 
}

.estatus-verificado { 
    background: #d4edda; 
    color: #155724; 
}

.estatus-denegado { 
    background: #f8d7da; 
    color: #721c24; 
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding-top: 120px !important;
    }
    
    .step-card {
        margin-bottom: 1rem;
    }
}