/* ==========================================================================
   1. CONFIGURACIÓN Y VARIABLES (DESIGN SYSTEM VIP)
   ========================================================================== */
:root {
    /* Paleta VIP Premium */
    --primary: #d4af37; /* Dorado Base */
    --primary-glow: rgba(212, 175, 55, 0.5);
    --gold-gradient: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    --gold-dark: #aa771c;
    
    --accent: #f1c40f;
    --success: #27ae60; /* Verde Casino */
    --danger: #c0392b;  /* Rojo Terciopelo */
    --blue-neon: #2980b9;
    
    /* Fondos */
    --bg-deep: #050505;
    --bg-card: rgba(20, 20, 20, 0.7);
    --bg-input: rgba(0, 0, 0, 0.6);
    
    /* UI / Glassmorphism de Lujo */
    --glass-border: rgba(255, 215, 0, 0.15); /* Borde dorado sutil */
    --glass-bg: rgba(18, 18, 18, 0.85);
    --shadow-main: 0 20px 50px rgba(0, 0, 0, 0.7);
    --shadow-gold: 0 0 15px rgba(212, 175, 55, 0.2);
    
    /* Tipografía */
    --font-main: 'Poppins', sans-serif;
    --text-main: #ffffff;
    --text-muted: #b0b0b0;
}

/* ==========================================================================
   2. RESET Y ESTILOS BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; 
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-deep);
    background-image: 
        radial-gradient(circle at top center, #1a1a1a 0%, #000000 80%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Fondo Dinámico (Ajustado para ser más elegante y menos invasivo) */
.background-glow {
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 15% 25%, rgba(212, 175, 55, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(100, 100, 100, 0.05) 0%, transparent 45%);
    z-index: -1;
    pointer-events: none;
}

/* ==========================================================================
   4. SECCIÓN HERO & CARRUSEL
   ========================================================================== */
.main-content {
    flex: 1;
    padding-top: 100px;
    display: flex;
    align-items: center;
}

.hero-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 5%;
    display: flex;
    gap: 5rem;
    align-items: center;
}

.hero-text-section { 
    flex: 1; 
    min-height: 450px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Títulos con efecto metálico */
h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.text-gradient { 
    background: var(--gold-gradient);
    -webkit-background-clip: text; 
    background-clip: text; 
    color: transparent; 
    -webkit-text-fill-color: transparent; 
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.text-gradient-blue { 
    background: linear-gradient(90deg, #fff, var(--blue-neon)); 
    -webkit-background-clip: text; 
    background-clip: text; 
    color: transparent; 
    -webkit-text-fill-color: transparent; 
}

.text-gradient-gold { 
    background: var(--gold-gradient); 
    -webkit-background-clip: text; 
    background-clip: text; 
    color: transparent; 
    -webkit-text-fill-color: transparent; 
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 520px;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* Badges VIP */
.badge-new, .badge-live, .badge-gold {
    padding: 6px 16px;
    border-radius: 4px; /* Bordes más rectos para elegancia */
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: inline-block;
    backdrop-filter: blur(5px);
}

.badge-new {
    background: rgba(39, 174, 96, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.badge-live {
    background: rgba(41, 128, 185, 0.1);
    color: #3498db;
    border: 1px solid rgba(41, 128, 185, 0.3);
}

.badge-gold {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(0,0,0,0));
    color: #f1c40f;
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

/* Carrusel */
.hero-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.hero-slide {
    display: none;
    width: 100%;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide.active {
    display: block !important;
    opacity: 1;
    animation: slideUpFade 0.7s ease-out;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); filter: blur(5px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.stats-row {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 2rem;
    border-left: 3px solid var(--primary); /* Línea decorativa dorada */
    padding-left: 20px;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ddd;
}
.stat-box i { color: var(--primary); font-size: 1.1rem; text-shadow: 0 0 10px var(--primary-glow); }

.carousel-indicators {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%; /* Rombo para estilo VIP */
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    cursor: pointer;
    transition: all 0.4s ease;
    padding: 0;
}

.indicator.active {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Preview de Resultados */
.live-results-preview {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 560px;
    margin-top: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.live-header { display: flex; justify-content: space-between; margin-bottom: 1.2rem; font-size: 0.9rem; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
.live-header span { color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.live-header a { color: var(--primary); text-decoration: none; font-weight: 600; font-size: 0.8rem; transition: 0.3s; }
.live-header a:hover { color: #fff; text-shadow: 0 0 5px var(--primary); }

.results-chips { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 10px; }
.results-chips::-webkit-scrollbar { height: 4px; }
.results-chips::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); border-radius: 4px; }
.results-chips::-webkit-scrollbar-thumb { background: var(--primary-dark); border-radius: 4px; }

.chip {
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 12px;
    min-width: 110px;
    text-align: center;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}
.chip:hover { 
    border-color: var(--primary); 
    transform: translateY(-5px); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
/* Brillo sutil en hover */
.chip:hover::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.05), transparent);
    pointer-events: none;
}

.lottery-tag { font-size: 0.6rem; color: var(--primary); font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
.chip-inner { position: relative; margin: 10px 0; }
.chip-inner img { width: 50px; height: 50px; border-radius: 50%; border: 2px solid #222; box-shadow: 0 4px 8px rgba(0,0,0,0.5); }
.chip-num {
    position: absolute; bottom: -5px; right: -5px;
    background: var(--gold-gradient); color: #000;
    width: 22px; height: 22px; border-radius: 50%;
    font-size: 0.75rem; font-weight: 900;
    display: grid; place-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.chip-time { font-size: 0.7rem; font-weight: 600; color: #888; }

/* ==========================================================================
   5. MEJORA FORMULARIOS (LOGIN Y REGISTRO VIP)
   ========================================================================== */
.auth-wrapper { flex: 1; display: flex; justify-content: flex-end; }

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid rgba(255, 215, 0, 0.3); /* Borde superior más brillante */
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-main), inset 0 0 20px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

/* Destello decorativo en la tarjeta */
.auth-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 60%);
    pointer-events: none;
}

.form-tabs { 
    display: flex; 
    background: rgba(0, 0, 0, 0.5); 
    padding: 6px; 
    border-radius: 12px; 
    margin-bottom: 2rem; 
    border: 1px solid rgba(255,255,255,0.05);
}

.tab-btn { 
    flex: 1; 
    padding: 12px; 
    border: none; 
    background: none; 
    color: #666; 
    font-weight: 700; 
    cursor: pointer; 
    border-radius: 8px; 
    transition: 0.4s ease; 
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.tab-btn.active { 
    background: rgba(255, 255, 255, 0.1); 
    color: #fff; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.auth-form { display: flex; flex-direction: column; gap: 1.2rem; }

/* Inputs de Alta Gama */
input:not([type="checkbox"]) { 
    width: 100%; 
    background: var(--bg-input); 
    border: 1px solid rgba(255,255,255,0.1); 
    padding: 16px 18px; 
    border-radius: 10px; 
    color: #fff; 
    font-size: 0.95rem; 
    transition: all 0.3s ease; 
    outline: none;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

input:not([type="checkbox"])::placeholder {
    color: #555;
    font-weight: 500;
}

input:focus { 
    border-color: var(--primary); 
    background: rgba(0, 0, 0, 0.8); 
    box-shadow: 0 0 0 1px var(--primary), 0 0 15px rgba(212, 175, 55, 0.1);
}

/* Iconos dentro de inputs */
#login-form .input-wrapper {
    position: relative;
    width: 100%;
}

#login-form .input-wrapper i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    opacity: 0.7;
    z-index: 5;
    transition: 0.3s;
}

#login-form input:focus + i,
#login-form .input-wrapper:focus-within i {
    opacity: 1;
    text-shadow: 0 0 8px var(--primary);
}

#login-form input {
    padding-left: 50px;
}

.row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Mejora: Fecha de Nacimiento */
#reg-fecha {
    position: relative;
    color: transparent;
}

#reg-fecha:focus, 
#reg-fecha:valid {
    color: #fff;
}

#reg-fecha:before {
    content: "Fecha de Nacimiento";
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    font-weight: 500;
    pointer-events: none;
    z-index: 1;
}

#reg-fecha:focus:before,
#reg-fecha:valid:before {
    display: none;
}

.phone-group {
    width: 100%;
    position: relative;
}

/* Personalización VIP del selector de país */
.iti__country-list {
    background-color: #0a0a0a !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.9) !important;
    z-index: 100;
}

.iti__country:hover, .iti__country.iti__highlight {
    background-color: #222 !important;
}

.iti--allow-dropdown { width: 100%; }
.iti__flag-container { z-index: 2; }

/* Botón de Acción Principal (CTA) */
.btn-submit { 
    background: var(--gold-gradient); 
    color: #000; 
    border: none; 
    padding: 16px; 
    border-radius: 10px; 
    font-weight: 800; 
    font-size: 1rem;
    cursor: pointer; 
    margin-top: 1rem; 
    transition: all 0.3s ease; 
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Efecto de brillo al pasar el mouse */
.btn-submit::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
}

.btn-submit:hover::after {
    left: 100%;
}

.btn-submit:hover { 
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
}

.forgot-pass {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    text-align: right;
    transition: 0.3s;
}
.forgot-pass:hover { color: var(--primary); text-decoration: underline; }

.terms-check { 
    display: flex; 
    gap: 12px; 
    font-size: 0.8rem; 
    color: #888; 
    align-items: center;
    line-height: 1.4;
}

.terms-check a { color: var(--primary); text-decoration: none; font-weight: 600; }

/* ==========================================================================
   6. FOOTER VIP
   ========================================================================== */
.main-footer { 
    background: #020202; 
    border-top: 1px solid #1a1a1a; 
    padding: 5rem 5% 2rem; 
    margin-top: 5rem;
    position: relative;
}

/* Línea dorada fina superior */
.main-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

.footer-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 4rem; }
.footer-col h4 { color: #fff; margin-bottom: 1.5rem; text-transform: uppercase; font-size: 0.95rem; letter-spacing: 2px; font-weight: 800; color: var(--primary); }
.footer-col p { font-size: 0.9rem; color: #777; line-height: 1.8; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: #888; text-decoration: none; font-size: 0.9rem; transition: 0.3s; display: inline-block; }
.footer-col ul li a:hover { color: var(--primary); transform: translateX(5px); }

.badge-item { display: flex; align-items: center; gap: 12px; background: #0f0f0f; padding: 12px 18px; border-radius: 8px; border: 1px solid #222; margin-bottom: 12px; font-size: 0.85rem; transition: 0.3s; }
.badge-item:hover { border-color: var(--primary); background: #151515; }
.badge-item i { color: var(--primary); }

.footer-divider { height: 1px; background: #151515; margin: 3rem 0; }
.footer-bottom { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; font-size: 0.8rem; color: #444; align-items: center; }
.footer-socials a { color: #555; margin-left: 1.5rem; font-size: 1.2rem; transition: 0.3s; }
.footer-socials a:hover { color: var(--primary); transform: scale(1.2); }

/* ==========================================================================
   7. RESPONSIVE DESIGN (MÓVIL)
   ========================================================================== */
@media (max-width: 968px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding-top: 140px;
        gap: 3rem;
    }

    .hero-text-section { 
        width: 100%;
        min-height: auto;
        display: block; 
    }

    .hero-slide.active {
        display: flex !important;
        flex-direction: column;
        align-items: center;
    }

    h1 { font-size: 2.5rem; }
    .hero-desc { font-size: 1rem; margin: 0 auto 2rem; }
    .stats-row { 
        justify-content: center; 
        gap: 1.5rem; 
        margin-bottom: 2rem; 
        border-left: none; /* Quitar borde lateral en móvil */
        padding-left: 0;
    }

    .auth-wrapper { width: 100%; justify-content: center; margin-top: 20px; }
    .auth-card { max-width: 100%; padding: 2rem; border-radius: 20px; }

    .row-2 { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
    .legal-badges { display: flex; flex-direction: column; align-items: center; }
    .badge-item { width: 100%; max-width: 320px; justify-content: center; }
    .footer-bottom { flex-direction: column; gap: 1.5rem; align-items: center; text-align: center; }
    .footer-socials { margin-top: 10px; }
    .footer-socials a { margin: 0 10px; }
}

/* Utils */
.hidden { display: none !important; }
.alert-box {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}
.alert-box.error { background: rgba(192, 57, 43, 0.2); color: #e74c3c; border: 1px solid rgba(192, 57, 43, 0.5); }
.alert-box.success { background: rgba(39, 174, 96, 0.2); color: #2ecc71; border: 1px solid rgba(39, 174, 96, 0.5); }

.input-error {
    border-color: #e74c3c !important; 
    background: rgba(231, 76, 60, 0.1) !important;
    box-shadow: 0 0 0 1px #e74c3c !important;
}

.shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* =========================================
   SISTEMA DE ALERTAS PREMIUM (TOASTS)
   ========================================= */
.toast-container {
    position: fixed;
    top: 100px; 
    right: 30px;
    z-index: 10001; 
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
}

@media (max-width: 768px) {
    .toast-container {
        top: 110px; 
        right: 15px;
        left: 15px; 
        align-items: center;
    }
    
    .toast {
        min-width: auto;
        width: 100%; 
        max-width: 100%;
    }
}

.toast {
    pointer-events: auto;
    min-width: 320px;
    max-width: 450px;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(12px);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 18px 22px;
    color: #fff;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    animation: toastIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05); /* Borde sutil */
    border-left-width: 4px; /* Mantener borde izquierdo grueso */
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

.toast.removing {
    opacity: 0;
    transform: translateX(50%) scale(0.9);
}

.toast-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.toast-message {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.4;
}

/* Estilos Específicos */
.toast.success { border-left-color: var(--success); }
.toast.success .toast-icon { color: var(--success); text-shadow: 0 0 15px rgba(39, 174, 96, 0.4); }

.toast.error { border-left-color: var(--danger); }
.toast.error .toast-icon { color: var(--danger); text-shadow: 0 0 15px rgba(192, 57, 43, 0.4); }

.toast.warning { border-left-color: var(--primary); }
.toast.warning .toast-icon { color: var(--primary); text-shadow: 0 0 15px rgba(212, 175, 55, 0.4); }

.toast.info { border-left-color: var(--blue-neon); }
.toast.info .toast-icon { color: var(--blue-neon); text-shadow: 0 0 15px rgba(41, 128, 185, 0.4); }