html, body {
    height: 100%;
}

/* 2. Configuramos el body como Flexbox */
body {
    display: flex;
    flex-direction: column;
}

/* 3. El contenedor principal crecerá para ocupar el espacio disponible */
/* Agrega esta clase a tu div que contiene todo el contenido (donde está el .container) */
.flex-wrapper {
    flex: 1 0 auto;
}

/* Virtual Scroll Container */
.virtual-scroll-container {
    position: relative;
    overflow-y: auto;
    height: 70vh;
    /* 70% de la altura de la pantalla */
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
}

/* Space for all items (fuerza el scrollbar) */
.virtual-scroll-space {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

/* Visible window */
.virtual-scroll-window {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    will-change: transform;
    /* Optimización para navegador */
}

/* Grid de botones dentro de la ventana */
.virtual-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 10px;
}

/* Botones optimizados */
.btn-boleto-mini {
    padding: 2px 5px !important;
    margin: 1px !important;
    font-size: 0.8rem !important;
    min-width: 40px !important;
    min-height: 30px !important;
    line-height: 1 !important;
    border-radius: 20% !important;
    transition: none !important;
    /* Eliminar transiciones para mejor rendimiento */
    flex-shrink: 0;
}

/* Estados */
.btn-libre {
    background-color: #0062c4ff !important;
    border-color: #0062c4ff !important;
    color: white !important;
}

.btn-pendiente {
    background-color: black !important;
    border-color: black !important;
    color: transparent !important;
}

.btn-pagado {
    background-color: black !important;
    border-color: black !important;
    color: transparent !important;
}

/* Deshabilitado */
.btn-boleto-mini:disabled {
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

/* Loader */
.virtual-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: none;
}

/* Estadísticas */
.stats-card {
    background: white;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (min-width: 768px) {
    .btn-boleto-mini {
        min-width: 45px;
        min-height: 35px;
        font-size: 0.85rem;
    }
}

@media (min-width: 1200px) {
    .btn-boleto-mini {
        min-width: 50px;
        min-height: 40px;
    }
}

/* Scrollbar styling */
.virtual-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.virtual-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.virtual-scroll-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.virtual-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}


/* Carrito */
.carrito-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0062c4ff;
    transition: all 0.2s;
}

.carrito-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.carrito-item-info {
    flex-grow: 1;
}

.carrito-item-numero {
    font-weight: bold;
    font-size: 1.1rem;
    color: #0062c4ff;
}

.carrito-item-oportunidades {
    font-size: 0.85rem;
    color: #6c757d;
}

.carrito-item-precio {
    font-weight: bold;
    color: #28a745;
    min-width: 80px;
    text-align: right;
}

.carrito-item-eliminar {
    margin-left: 10px;
    color: #dc3545;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.carrito-item-eliminar:hover {
    background: #dc3545;
    color: white;
}

/* Carrito flotante */
#btnCarrito {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cartCount {
    font-size: 0.7rem;
    padding: 4px 6px;
}

/* Modal pago */
/* Estilos para el formulario de pago */
.form-label.required::after {
    content: " *";
    color: #dc3545;
}

#resumenCompraDetalle .boleto-resumen {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

#resumenCompraDetalle .boleto-resumen:last-child {
    border-bottom: none;
}

.boleto-resumen-numero {
    font-weight: bold;
    color: #0062c4ff;
}

.boleto-resumen-oportunidades {
    font-size: 0.85rem;
    color: #6c757d;
}

.boleto-resumen-precio {
    font-weight: 500;
    color: #28a745;
}

/* Spinner para botón de pago */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Validación de formulario */
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid,
.was-validated .form-select:valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Formato para Iconsax */
.isax {
    font-size: 1.3rem;
    vertical-align: middle;
}


.btn-description {
    background-color: red;
    border-radius: 7px!important;
    color: white;
    font-weight: bold;
}

.btn-description-pendiente {
    background-color: black!important;
    border-radius: 7px!important;
    color: white;
    font-weight: bold;
}


.btn-description:hover {
    background-color: red;
    border-radius: 7px!important;
    color: white;
    font-weight: bold;
}

.btn-description-pendiente:hover {
    background-color: black!important;
    border-radius: 7px!important;
    color: white;
    font-weight: bold;
}


/* Container center */
.con-center {
    display: flex;
    justify-content: center;
}


/* Estilos universales */
#btnProcederPago,
#btnParticipar {
    background-color: var(--color-btn-str);
    color: #000; /* Texto oscuro sobre oro para mejor lectura */
    font-weight: bold;
    border: none;
    box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.39);
}

.bg-primary-modal {
    background-color: var(--color-text-dark) !important;
}


.img-set {
    height: 31rem;
    object-fit: cover;
}

/* Estilo carrusel */
/* Cambiar barras por círculos */
#carruselSorteo .carousel-indicators [button],
#carruselSorteo .carousel-indicators button {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    border: 2px solid #ff000000;
    margin: 0 5px;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Estilo para el círculo activo */
#carruselSorteo .carousel-indicators .active {
    opacity: 1 !important;
    transform: scale(1.2); /* Se hace un poco más grande el activo */
    background-color: #fff; /* Puedes cambiar el color del activo */
}

.texto-premios {
    white-space: pre-line;
}


/* Estilo para los títulos de secciones */
/* --- ESTILOS GENERALES (PC) --- */
        .navbar-custom {
            background-color: #000000;
            padding: 39px 0;
            position: fixed;
            width: 100%;
            top: 0px;
            z-index: 9;
        }

        /* Franjas Rojas */
        .stripe {
            background-color: #55b776;
            height: 17px;
            width: 100%;
            position: absolute;
            left: 0;
        }
        .stripe-top { top: 0; }
        .stripe-bottom { bottom: 0; }

        /* Estilo de los Links (Fuentes Gruesas) */
        .navbar-custom a {
            color: #ffffff;
            text-decoration: none;
            font-weight: 900;
            font-size: 1.1rem;
            font-family: 'Arial Black', sans-serif;
            text-transform: none;
        }

        /* --- CONFIGURACIÓN DESKTOP --- */
        .nav-content-desktop {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo-wrap {
            position: relative;
            z-index: 10;
        }

        .logo-img {
            width: 8rem;
            height: 8rem;
            background-color: #000000;
            position: absolute;
            top: -69px;
            left: 0;
            border: 4px solid #dddeff;
            border-radius: 100%;
        }

        .menu-links {
            display: flex;
            gap: 30px;
        }

        /* --- CONFIGURACIÓN MÓVIL (Tu segunda imagen) --- */
        .nav-content-mobile {
            display: flex;
            justify-content: space-around;
            align-items: center;
            height: 60px; /* Altura fija para centrar elementos */
        }

        .logo-wrap-mobile {
            position: relative;
            z-index: 10;
        }

        .logo-img-mobile {
            width: 10rem;
            height: 10rem;
            background-color: #000000;
            border: 4px solid #dddeff;
            border-radius: 100%;
        }

        .mobile-item {
            flex: 1;
            text-align: center;
        }


        .active {
            color: #55b776!important;
        }

/* Footer */
.custom-footer {
    background-color: #18181c;
    padding: 40px 0;
    color: #ffffff;
    width: 100%;
    flex-shrink: 0; /* Esto evita que el footer se aplaste */
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Estilo del logo circular */
.footer-mini-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    padding: 5px;
}

.footer-text-block {
    text-align: center;
}

/* Texto superior pequeño */
.footer-top-text {
    font-size: 1rem;
    margin-bottom: 5px;
    font-weight: 400;
}

.footer-top-text .highlight {
    font-weight: 700;
    color: #5d75f0; /* Color azul para el programador */
}

/* El nombre del sorteo en grande y verde */
.footer-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #69b378; /* El verde cactus de tu imagen */
    margin: 5px 0;
    font-family: 'Arial Black', sans-serif;
    letter-spacing: -1px;
}

/* Texto inferior de copyright */
.footer-bottom-text {
    font-size: 1rem;
    margin-top: 5px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.copyright-icon {
    font-size: 1.2rem;
    opacity: 0.8;
}

.contenido {    
    margin-top: 7.5rem;

}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column; /* El logo se pone arriba del texto en celular */
        text-align: center;
    }
    
    .footer-title {
        font-size: 1.6rem;
    }

    .contenido {    
        margin-top: 9.5rem;

    }
}