/* style.css - Cyber-Luxe 2026 Theme */

:root {
    --bg-dark: #050510;
    --bg-panel: rgba(255, 255, 255, 0.03);
    --primary: #7e22cf;
    --accent: #facc15; /* Gold */
    --neon-purple: #a855f7;
    --neon-blue: #3b82f6;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    /* Fondo base */
    background-image: radial-gradient(circle at 50% 50%, #1a1a2e 0%, #050510 100%);
    color: #e2e8f0;
    overflow-x: hidden;
    position: relative;
}

/* --- Floating Background Animation --- */
.floating-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.float-item {
    position: absolute;
    bottom: -100px;
    font-size: 2rem;
    opacity: 0.3;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { transform: translateY(-120vh) rotate(360deg); opacity: 0; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0f0f1a; }
::-webkit-scrollbar-thumb { background: #33334d; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* --- Utility Classes --- */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-header {
    background: rgba(5, 5, 16, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}

.text-glow { text-shadow: 0 0 10px rgba(250, 204, 21, 0.5); }

/* --- Buttons --- */
.btn-glow-gold {
    background: linear-gradient(135deg, #facc15 0%, #ca8a04 100%);
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-glow-gold-2 {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-glow-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(250, 204, 21, 0.6);
}

.btn-primary {
    background: linear-gradient(135deg, #7e22cf 0%, #581c87 100%);
    color: white;
    font-weight: 800;
    padding: 0.75rem;
    border-radius: 0.75rem;
    width: 100%;
    transition: transform 0.2s;
    cursor: pointer;
}
.btn-primary:hover { transform: scale(1.02); }

.btn-secondary {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border: 2px solid rgba(255,255,255,0.2);
    color: white;
    font-weight: 700;
    padding: 0.75rem;
    border-radius: 0.75rem;
    width: 100%;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: white; }

.btn-secondaryxx {
    /* Degradado original de WhatsApp */
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border: 2px solid rgba(255,255,255,0.2);
    color: white;
    font-weight: 700;
    
    /* AUMENTO DE LONGITUD: Padding lateral amplio y ancho mínimo */
    padding: 1rem 4rem; 
    min-width: 280px; 
    
    /* Centrado y estructura */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px; /* Bordes redondeados tipo píldora para mayor elegancia */
    
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(18, 140, 126, 0.3);
}

.btn-secondaryxx:hover {
    /* Efecto de brillo al pasar el mouse */
    background: linear-gradient(135deg, #2ae06f 0%, #16a090 100%);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(18, 140, 126, 0.4);
}

.btn-secondaryxx:active {
    transform: translateY(1px);
}

.input-dark {
    width: 100%;
    padding: 1rem;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    color: white;
    outline: none;
    transition: border-color 0.3s;
}
.input-dark:focus { border-color: var(--neon-purple); }

/* --- Hero Carousel --- */
.hero-section { position: relative; overflow: hidden; }
.hero-carousel-container { position: relative; height: 500px; width: 100%; overflow: hidden; }
.hero-carousel { display: flex; height: 100%; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }

.hero-slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-slide::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(5,5,16,0.3), rgba(5,5,16,0.9));
}

.slide-content {
    position: relative; z-index: 10; text-align: center; max-width: 800px; padding: 20px;
    animation: fadeInUp 0.8s ease-out;
}

.badge-promo {
    background: var(--accent); 
    color: black; 
    font-weight: 900; 
    padding: 4px 12px; 
    border-radius: 20px;
    font-size: 0.8rem; 
    letter-spacing: 1px; 
    display: inline-block; 
    margin-bottom: 1rem; /* CORREGIDO */
}

.slide-title {
    font-size: 3.5rem; font-weight: 900; margin: 10px 0; line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
@media(max-width: 768px) { .slide-title { font-size: 2.5rem; } }

.slide-desc { font-size: 1.2rem; color: #cbd5e1; max-width: 600px; margin: 0 auto; }

.carousel-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.5); color: white; border: none;
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer; z-index: 20;
    backdrop-filter: blur(5px); transition: all 0.3s;
}
.carousel-arrow:hover { background: var(--accent); color: black; }
.carousel-arrow.prev { left: 20px; }
.carousel-arrow.next { right: 20px; }

/* --- Winners Ticker --- */
.winners-ticker {
    background: linear-gradient(90deg, #7e22cf 0%, #3b82f6 100%);
    height: 60px; overflow: hidden; position: relative;
    box-shadow: 0 0 20px rgba(126, 34, 207, 0.5);
}
.winners-track {
    display: flex; gap: 2rem; position: absolute; top: 50%; transform: translateY(-50%);
    animation: ticker 30s linear infinite; white-space: nowrap;
}
.winner-item {
    display: flex; align-items: center; background: rgba(0,0,0,0.3);
    padding: 5px 15px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.2);
}
.winner-avatar img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--accent); margin-right: 10px; }
.winner-name { font-weight: 900; font-size: 0.8rem; color: white; margin-right: 5px; }
.winner-desc { font-size: 0.7rem; color: #cbd5e1; margin-right: 10px; }
.winner-prize { color: var(--accent); font-weight: 900; }

@keyframes ticker { 0% { transform: translate(100%, -50%); } 100% { transform: translate(-100%, -50%); } }

/* --- Sala Cards (3D Hover) --- */
.sala-card {
    background: #0f0f1a; border-radius: 1.5rem; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05); transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}
.sala-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(126, 34, 207, 0.2);
    border-color: rgba(126, 34, 207, 0.4);
}
.sala-image { height: 220px; background-size: cover; background-position: center; position: relative; }
.sala-overlay { position: absolute; inset: 0; background: linear-gradient(to top, #0f0f1a, transparent); }
.sala-badge {
    position: absolute; top: 1rem; right: 1rem; padding: 0.4rem 1rem;
    border-radius: 2rem; font-weight: 900; font-size: 0.7rem; box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.badge-gold { background: var(--accent); color: black; }
.badge-blue { background: var(--neon-blue); color: white; }
.badge-purple { background: var(--neon-purple); color: white; }
.sala-content { padding: 1.5rem; }

/* --- Publicity Carousel --- */
.publicity-carousel { overflow: hidden; width: 100%; white-space: nowrap; position: relative; }
.publicity-track { display: inline-flex; animation: scrollPub 40s linear infinite; }
.pub-item {
    width: 300px; height: 300px; margin-right: 20px; border-radius: 1rem;
    background-size: cover; background-position: center; cursor: pointer;
    transition: transform 0.3s; border: 2px solid rgba(255,255,255,0.1);
}
.pub-item:hover { transform: scale(1.05); border-color: var(--accent); }
@keyframes scrollPub { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- Modals --- */
.modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(5px);
    z-index: 100; display: flex; justify-content: center; align-items: center;
}
.modal-glass {
    background: #12121f; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1.5rem; padding: 1.5rem; position: relative;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1rem; }
@keyframes scaleIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.animate-scale-in { animation: scaleIn 0.3s ease-out; }

/* --- Bingo Balls (Grid) --- */
.card-item-container {
    display: flex; flex-direction: column; align-items: center;
    cursor: pointer; transition: transform 0.1s;
}
.card-item-container:hover { transform: scale(1.1); }

.bingo-ball {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-weight: 900; font-size: 14px; position: relative;
    background: #1e1e2e; border: 2px solid #333; color: white;
    box-shadow: inset 0 -3px 5px rgba(0,0,0,0.5);
}

/* Estados */
.status-available .bingo-ball { border-color: var(--neon-purple); color: white; }
.status-selected .bingo-ball { background: var(--accent); color: black; border-color: white; box-shadow: 0 0 10px var(--accent); }
.status-reserved .bingo-ball { background: #ef4444; border-color: #b91c1c; opacity: 0.5; }
.status-sold .bingo-ball { background: #166534; border-color: #14532d; opacity: 0.5; }

.ver-tag {
    font-size: 8px; font-weight: bold; background: #333; color: white;
    padding: 1px 4px; border-radius: 4px; margin-top: -8px; z-index: 2; border: 1px solid #444;
}

/* --- Line Tabs --- */
.tab-line {
    flex: 1; padding: 0.75rem; color: #94a3b8; font-weight: 700;
    transition: all 0.3s; white-space: nowrap;
}
.tab-line.active { color: white; background: rgba(255,255,255,0.1); border-radius: 0.5rem; }

/* --- Line Numbers --- */
.line-number {
    width: 50px; height: 50px; border-radius: 12px;
    display: flex; justify-content: center; align-items: center;
    font-weight: 900; font-size: 1.2rem; cursor: pointer;
    transition: all 0.2s; border: 2px solid transparent;
}
.line-number.libre { background: rgba(126, 34, 207, 0.2); border-color: var(--neon-purple); color: white; }
.line-number.seleccionado { background: var(--accent); color: black; transform: scale(1.1); box-shadow: 0 0 15px var(--accent); }
.line-number.reservado { background: rgba(239, 68, 68, 0.2); border-color: #ef4444; color: #fca5a5; opacity: 0.7; cursor: not-allowed; }
.line-number.vendido { background: rgba(22, 163, 74, 0.2); border-color: #16a34a; color: #86efac; opacity: 0.7; cursor: not-allowed; }

/* --- Mobile Nav --- */
.nav-link {
    color: #94a3b8; font-weight: 600; font-size: 0.9rem; transition: color 0.3s;
}
.nav-link:hover { color: var(--accent); }

/* --- Store Closed Overlay --- */
.closed-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #050510; z-index: 9999; display: flex;
    justify-content: center; align-items: center;
}

/* --- EFECTO AURA DE RAYOS (LIGHTNING) --- */
.card-lightning {
    position: relative;
    z-index: 0;
    /* Asegúrate de que la tarjeta tenga border-radius para que el rayo lo siga */
    border-radius: 1rem; 
}

/* El brillo trasero difuminado */
.card-lightning::before {
    content: "";
    position: absolute;
    inset: -4px; /* Grosor del rayo */
    border-radius: inherit;
    background: conic-gradient(
        from 0deg, 
        transparent 0deg, 
        transparent 80deg, 
        #00ff88 100deg, /* Color del rayo (Verde Neon) */
        transparent 140deg,
        transparent 200deg,
        #00ff88 240deg, /* Segundo destello */
        transparent 360deg
    );
    filter: blur(8px); /* Difuminado para efecto luz */
    z-index: -1;
    animation: rotateLightning 4s linear infinite;
}

/* La línea nítida del rayo */
.card-lightning::after {
    content: "";
    position: absolute;
    inset: -2px; /* Un poco más fino que el brillo */
    border-radius: inherit;
    background: conic-gradient(
        from 0deg, 
        transparent 0deg, 
        transparent 80deg, 
        #ffffff 100deg, /* Núcleo blanco del rayo */
        transparent 140deg,
        transparent 200deg,
        #ffffff 240deg, 
        transparent 360deg
    );
    z-index: -1;
    animation: rotateLightning 4s linear infinite;
}

@keyframes rotateLightning {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- EFECTO GLOBO FLOTANTE --- */
@keyframes floatBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulseExplosion {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); transform: scale(1); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); transform: scale(1.05); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); transform: scale(1); }
}

.balloon-container {
    animation: floatBounce 2s ease-in-out infinite;
}

.balloon-body {
    animation: pulseExplosion 1.5s infinite;
}

/* =======================================================
   OMNIS PERFORMANCE BOOSTER (Optimización Extrema)
   ======================================================= */

/* 1. ELIMINA EL LAG EN LA LISTA DE 700 CARTAS */
/* Esta es la clave: El navegador dejará de "pensar" en las cartas que no se ven */
.card-item-container, 
#cardListContainer > div {
    content-visibility: auto; 
    contain-intrinsic-size: 80px 100px; /* Tamaño estimado de cada carta */
    contain: layout paint style;
}

/* 2. ACELERACIÓN POR HARDWARE (GPU) */
/* Fuerza a usar la tarjeta gráfica para animaciones suaves */
.sala-card, .btn-glow-gold, .hero-slide, .floating-container {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform, opacity;
}

/* 3. MODO LIGERO PARA MÓVILES (Optimización Agresiva) */
@media (max-width: 768px) {
    /* Desactiva el efecto "vidrio borroso" que consume mucha batería y RAM */
    .glass-panel, .glass-header, .modal-glass {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(10, 10, 25, 0.95) !important; /* Fondo oscuro sólido */
        box-shadow: none !important;
        border: 1px solid rgba(255,255,255,0.1);
    }

    /* Reduce la cantidad de partículas flotantes o las oculta */
    .floating-container {
        opacity: 0.3; /* Menos visible para que el navegador la ignore un poco */
        display: none; /* O quítale el comentario a esta línea si sigue lento */
    }

    /* Sombras más simples */
    * { box-shadow: none !important; text-shadow: none !important; }
    
    /* Mantiene solo las sombras esenciales */
    .btn-glow-gold { box-shadow: 0 0 10px rgba(250, 204, 21, 0.5) !important; }
}

/* --- WIDGET BCV FLOTANTE --- */
.bcv-widget {
    position: fixed;
    top: 80px; /* Ajusta esto si tapa tu menú */
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 50px;
    border: 1px solid rgba(250, 204, 21, 0.3); /* Borde dorado sutil */
    background: rgba(0, 0, 0, 0.8); /* Fondo oscuro */
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    animation: floatBag 3s ease-in-out infinite; /* Animación de flotar */
    transition: all 0.3s;
}

.bcv-widget:hover {
    transform: scale(1.05);
    border-color: #facc15;
}

.bcv-icon-container {
    background: linear-gradient(135deg, #facc15 0%, #ca8a04 100%);
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    margin-right: 10px;
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.6);
}

.bcv-icon {
    color: #000;
    font-size: 1.2rem;
    animation: shakeBag 5s infinite;
}

.bcv-info { display: flex; flex-direction: column; line-height: 1.1; }
.bcv-label { font-size: 0.6rem; color: #aaa; font-weight: bold; letter-spacing: 1px; }
.bcv-price { font-size: 1.1rem; font-weight: 900; color: #fff; text-shadow: 0 0 5px rgba(255,255,255,0.5); }
.bcv-date { font-size: 0.65rem; color: #facc15; font-family: monospace; margin-top: 2px; }

/* Animaciones */
@keyframes floatBag {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
@keyframes shakeBag {
    0%, 90% { transform: rotate(0deg); }
    92% { transform: rotate(-10deg); }
    94% { transform: rotate(10deg); }
    96% { transform: rotate(-10deg); }
    98% { transform: rotate(10deg); }
    100% { transform: rotate(0deg); }
}

/* Ocultar en móviles muy pequeños si molesta, o ajustar */
@media (max-width: 480px) {
    .bcv-widget {
        top: auto; bottom: 20px; right: 20px; /* Abajo en móviles */
        padding: 8px 12px;
    }
    .bcv-price { font-size: 0.9rem; }
}