/* 
   PREMIUM LIGHT LUXE THEME
   Professional, SaaS style, Clean & Vibrant
*/

:root {
    /* ELECTRIFYING CASINO VIBE - LUXE EDITION */
    --primary: #8b5cf6; /* Electric Violet */
    --primary-glow: rgba(139, 92, 246, 0.4);
    --secondary: #f43f5e; /* Rose Flash */
    --accent: #fbbf24; /* Jackpot Gold */
    --accent-glow: rgba(251, 191, 36, 0.4);
    --casino-ruby: #e11d48;
    --casino-gold: linear-gradient(135deg, #fde68a 0%, #fbbf24 50%, #b45309 100%);
    --casino-purple: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 50%, #4c1d95 100%);
    --crypto-green: #10b981; 
    
    --bg-main: #f8fafc; /* Slate 50 Light */
    --bg-card: #ffffff;
    --bg-alt: #f1f5f9; 
    
    --text-primary: #0f172a; /* Slate 900 */
    --text-secondary: #334155; /* Slate 700 */
    --text-dim: #64748b; /* Slate 500 */
    --text-muted: #94a3b8;
    
    --border-light: rgba(0, 0, 0, 0.08);
    --border-vibrant: rgba(37, 99, 235, 0.2);
    
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.05);
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.15);
    
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 3rem;

    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6; /* Slightly tighter for app feel */
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent; /* Mobile optimization */
    /* Add color orbs to background in light mode */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(245, 158, 11, 0.03) 0%, transparent 40%);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

h1 { 
    font-size: clamp(2.5rem, 8vw, 6rem); 
    background: linear-gradient(135deg, #0f172a 20%, var(--primary) 70%, #1e40af 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 5s linear infinite;
    letter-spacing: -3px;
    line-height: 1.05;
}

@keyframes shine {
    to { background-position: 200% center; }
}
h2 { font-size: 2.25rem; font-weight: 700; }
p { color: var(--text-secondary); }

/* Layout */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }
}

.section { padding: 8rem 0; }

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.8rem 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    padding: 0.4rem 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 950;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -1px;
    min-width: 200px;
}

.logo i { 
    color: var(--primary); 
    font-size: 2rem;
    filter: drop-shadow(0 0 15px var(--primary));
}

.nav-links { 
    display: flex; 
    gap: 3rem; 
    background: rgba(0, 0, 0, 0.03);
    padding: 0.6rem 2.5rem;
    border-radius: 100px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-links a {
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a i { font-size: 0.8rem; opacity: 0.6; }

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.nav-links a.active i { opacity: 1; }

/* Buttons - Casino Style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #6d28d9 100%);
    color: white !important;
    padding: 1.25rem 3rem;
    border-radius: 1.2rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 15px 35px -10px var(--primary-glow);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: 0.5s;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px var(--primary-glow);
    background: linear-gradient(135deg, #9333ea 0%, var(--primary) 100%);
}

.btn:hover::after {
    opacity: 1;
    transform: scale(1.1);
}

.btn-accent {
    background: var(--casino-gold);
    color: #000 !important;
    box-shadow: 0 15px 35px -10px var(--accent-glow);
}

.btn-accent:hover {
    box-shadow: 0 25px 50px -12px var(--accent-glow);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 12rem 0;
    background: #fff;
    overflow: hidden;
}

/* Subtle background pattern */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(var(--border-light) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

/* Timer */
.timer-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 4rem;
}

.time-box {
    background: #fff;
    border: 1px solid var(--border-light);
    padding: 2rem;
    border-radius: var(--radius-lg);
    min-width: 140px;
    box-shadow: var(--shadow-md);
}

.time-value {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.time-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    letter-spacing: 0.1em;
}

/* Premium Casino Cards */
.card-casino {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 3rem;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.card-casino::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.1), transparent 70%);
    opacity: 0;
    transition: 0.6s;
}

.card-casino:hover {
    transform: translateY(-20px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 40px 100px -20px rgba(0,0,0,0.6);
}

.card-casino:hover::before {
    opacity: 1;
}

.glow-border {
    position: relative;
}

.glow-border::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent), var(--primary));
    background-size: 400% 400%;
    z-index: -1;
    border-radius: inherit;
    animation: border-glow 10s linear infinite;
    opacity: 0.3;
}

@keyframes border-glow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-alt);
    color: var(--text-primary);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

/* Form Elements */
.form-group {
    margin-bottom: 2.5rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
    transition: all 0.3s;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.75rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    outline: none;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.5rem center;
    background-size: 1.25rem;
    padding-right: 3.5rem;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Input with Icon Wrapper */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 1.5rem;
    color: var(--text-dim);
    font-size: 1.1rem;
    transition: 0.3s;
}

.input-with-icon .form-control {
    padding-left: 4rem;
}

.input-with-icon:focus-within i {
    color: var(--primary);
}

/* Grid System */
.grid { display: grid; gap: 2.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr !important;
    }
}

/* Footer */
footer {
    background: var(--text-primary);
    color: #fff;
    padding: 8rem 0 4rem;
}

footer h4 { color: #fff; margin-bottom: 2rem; }
footer p { color: #94a3b8; }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 1rem; }
.footer-links a { color: #94a3b8; text-decoration: none; transition: 0.3s; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
    margin-top: 6rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .navbar .nav-links { display: none; } /* We will add a mobile menu later if needed or simplify */
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .section { padding: 5rem 0; }
}

@media (max-width: 768px) {
    .container { padding: 0 1.25rem; }
    
    .navbar { 
        padding: 0.75rem 0; 
        border-bottom: 1px solid rgba(0,0,0,0.05); 
    }
    .logo { 
        font-size: 1.15rem; 
        min-width: auto;
        justify-content: center;
    }
    .logo i { font-size: 1.3rem; }
    .logo img { height: 50px !important; }
    
    /* Adjust spacing for the bottom dock */
    body { padding-bottom: 200px; } 
    
    .hero { padding: 6rem 0 4rem; }
    
    /* App-style Centered Headers */
    .section-header-flex h2, 
    .hero-content h1,
    h1, h2 { 
        text-align: center; 
    }
    
    h1 { 
        font-size: clamp(2.2rem, 10vw, 3.5rem); 
        letter-spacing: -2px; 
        line-height: 1.1; 
        margin-bottom: 1.5rem;
    }
    h2 { 
        font-size: 1.85rem; 
        letter-spacing: -1px; 
        line-height: 1.2;
    }
    
    .timer-container { gap: 0.5rem; margin-top: 2.5rem; }
    .time-box { min-width: 60px; padding: 0.85rem; border-radius: 1.2rem; }
    .time-value { font-size: 1.5rem; }
    .time-label { font-size: 0.55rem; letter-spacing: 0.05em; }
    
    .btn { 
        width: 100%; 
        padding: 1.15rem 2rem; 
        border-radius: 1.25rem; 
        font-size: 0.9rem; 
        letter-spacing: 1px;
        user-select: none;
    }
    
    .section { padding: 4rem 0; }
    
    /* Sorteo Detalle Specific */
    .sorteo-grid-main { grid-template-columns: 1fr !important; gap: 2rem; }
    .sticky-form { position: relative !important; top: 0 !important; margin-top: 2rem; }
    
    /* Ticket Grid Refine */
    .ticket-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr)) !important;
        gap: 6px !important;
    }
    
    .vault-ticket {
        height: 45px !important;
        font-size: 0.85rem !important;
        border-radius: 0.8rem !important;
    }
    
    /* Verificador Cards */
    .ticket-glow-card {
        grid-template-columns: 1fr !important;
        border-radius: 1.5rem !important;
    }
    .ticket-glow-card > div {
        padding: 2rem 1.5rem !important;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2.3rem; }
    .section { padding: 3.5rem 0; }
    .card { padding: 1.25rem; border-radius: 2rem; }
    .container { padding: 0 1rem; }
}

/* Mobile App Dock */
.mobile-dock {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    min-height: 80px;
    background: #0f172a;
    background: linear-gradient(to top, #0f172a, #1e293b);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 2.2rem 2.2rem 0 0;
    z-index: 99999;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -20px 50px rgba(0,0,0,0.5);
    padding: 10px 15px calc(15px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 768px) {
    .mobile-dock { display: flex; }
    .sorteo-catalog-section { padding-bottom: 5rem !important; }
    
    /* Global Section Reductions */
    section { padding-top: 5rem !important; padding-bottom: 5rem !important; }
    .section { padding-top: 5rem !important; padding-bottom: 5rem !important; }
    footer { padding-top: 3rem !important; }
    .section-header-flex { margin-bottom: 3rem !important; }
    
    /* Specific page adjustments */
    .hero-container { padding-top: 2rem !important; padding-bottom: 2rem !important; }
    .support-card { margin-top: 3rem !important; padding: 3rem 1.5rem !important; }
    
    /* Hide desktop navbar elements on mobile if needed or keep compact */
    #mobileToggle { font-size: 1.35rem; }
    
    /* Adjust Floating WhatsApp for Dock */
    #ws-floating-btn { 
        bottom: 110px !important; 
        right: 20px !important;
        width: 55px !important; 
        height: 55px !important; 
        font-size: 24px !important;
        border-radius: 1.2rem !important;
    }
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 800;
    gap: 4px;
    width: 64px;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
    opacity: 0.7;
}

.dock-item i {
    font-size: 1.35rem;
    transition: 0.3s;
    color: #fff;
}

.dock-item span {
    letter-spacing: 0.5px;
    transform: scale(0.9);
}

.dock-item.active {
    color: var(--primary);
    opacity: 1;
}

.dock-item.active i {
    color: var(--primary);
    transform: translateY(-4px);
    filter: drop-shadow(0 0 12px var(--primary-glow));
}

.dock-item.active span {
    color: var(--primary);
    transform: scale(1);
    font-weight: 900;
}

.dock-item.active::after {
    content: '';
    position: absolute;
    bottom: 8px;
    width: 5px;
    height: 5px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: dock-active-glow 2s infinite;
}

@keyframes dock-active-glow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* Global Raffle Card Buttons Fix */
.btn-sorteo-link {
    background: #2563eb !important;
    background-image: none !important;
    color: #ffffff !important;
    opacity: 1 !important;
    filter: none !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.btn-sorteo-link:hover {
    background: #1d4ed8 !important;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4) !important;
    transform: translateY(-3px) scale(1.02) !important;
}