/* Custom Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* ELIMINADO: Transiciones de opacidad que causan parpadeo */
/* img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[src] {
    opacity: 1;
} */

/* Fallback para imágenes rotas - MEJORADO */
img {
    background-color: #f8f9fa;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #6610f2);
}

.raffle-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.raffle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.stat-item h3 {
    font-size: 2.5rem;
}

/* Progress bar animation */
.progress-bar {
    transition: width 0.6s ease;
}

/* Boletos grid */
.boletos-grid {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 10px;
    background-color: white;
}

.btn-check:checked + .btn-outline-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Loading animation - SOLO para casos específicos */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Badge styles */
.badge {
    font-size: 0.75em;
}

/* Card hover effects */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Estilos para imágenes de rifas - MEJORADO */
.raffle-image {
    background-color: #f8f9fa;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.raffle-image i {
    font-size: 3rem;
}

/* Estilos para las estadísticas en el detalle */
.stats-grid .stat-item {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    text-align: center;
    background: white;
}

.stats-grid .stat-item h4 {
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.stats-grid .stat-item small {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .stat-item h3 {
        font-size: 1.8rem;
    }
    
    .card-img-top {
        height: 150px !important;
    }
    
    .stats-grid .col-4 {
        margin-bottom: 1rem;
    }
}

/* Estilos para el modal de compra */
.modal-compra .modal-dialog {
    max-width: 600px;
}

.paso-compra {
    min-height: 400px;
}

/* Estilos para los métodos de pago */
.metodo-pago {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.metodo-pago:hover {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}

.metodo-pago.active {
    border-color: #198754;
    background-color: #e8f5e8;
}

.metodo-pago .form-check-input {
    margin-top: 0.3rem;
}

/* Estilos para la confirmación */
.confirmacion-exitosa {
    background: linear-gradient(135deg, #198754, #20c997);
    color: white;
    border-radius: 10px;
    padding: 2rem;
}

/* Responsive para el modal */
@media (max-width: 768px) {
    .modal-compra .modal-dialog {
        margin: 10px;
    }
    
    .paso-compra {
        min-height: 300px;
    }
}

/* Estilos para selección rápida */
.seleccion-rapida {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.seleccion-rapida h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Botones de cantidad predefinida */
.btn-cantidad {
    flex: 1;
    min-width: 80px;
    margin: 2px;
    font-size: 0.8rem;
}

/* Input grupo para números específicos */
.input-group-sm .form-control {
    font-size: 0.875rem;
}

/* Badges para números específicos */
.badge .btn-close {
    padding: 0.25rem;
    font-size: 0.6rem;
}

.badge .btn-close:hover {
    background-color: rgba(255,255,255,0.3);
}

/* Selector de cantidad aleatoria */
#cantidad-aleatoria {
    font-size: 0.875rem;
}

/* Botones de acción */
.btn-accion {
    font-size: 0.8rem;
    padding: 0.375rem 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .seleccion-rapida {
        padding: 10px;
    }
    
    .btn-cantidad {
        min-width: 70px;
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .input-group-sm {
        flex-wrap: nowrap;
    }
}

/* Estilos para los badges de números específicos */
#numeros-especificos-lista .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* Efectos hover para botones de selección */
.btn-outline-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}