@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;700;800&display=swap');

:root {
    /* Rich Premium Light Color Palette */
    --primary: #0f172a;       /* Deep slate/navy */
    --primary-light: #334155;
    --secondary: #d90429;     /* Vibrant Crimson Red */
    --secondary-light: #ef233c;
    --accent: #f59e0b;        /* Bright Gold/Amber for Acumulado/Mega */
    --accent-light: #fbbf24;
    
    /* Backgrounds & Surfaces */
    --bg-main: #f8fafc;       /* Off-white/slate light background */
    --surface: rgba(255, 255, 255, 0.7); /* Translucent White card */
    --surface-hover: rgba(255, 255, 255, 0.95);
    --surface-border: rgba(15, 23, 42, 0.06);
    
    /* Typography Colors */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-tertiary: #64748b;
    --text-on-dark: #ffffff;
    
    /* Layout & Effects */
    --border: rgba(15, 23, 42, 0.08);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    /* Premium Shadows & Glows */
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
    --shadow-glow-red: 0 0 25px rgba(217, 4, 41, 0.12);
    --shadow-glow-gold: 0 0 25px rgba(245, 158, 11, 0.15);
    
    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* Soft light ambient background lights */
    background-image: 
        radial-gradient(at 0% 0%, rgba(217, 4, 41, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(245, 158, 11, 0.03) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(241, 245, 249, 0.5) 0px, transparent 80%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
    font-family: var(--font-heading);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

/* Layout Container */
.main-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(0.98); }
}

/* Navigation - Glassmorphism Header */
.main-nav {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--surface-border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

.nav-logo span {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.nav-menu {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.04);
}

.mobile-toggle {
    display: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

/* Hero Header Section */
.hero-header {
    background: radial-gradient(circle at 80% 20%, rgba(217, 4, 41, 0.06), transparent 50%), 
                radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.04), transparent 50%),
                linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    padding: 5rem 1.5rem;
    text-align: center;
    color: var(--text-primary);
    border-bottom: 1px solid var(--surface-border);
    overflow: hidden;
    margin-bottom: 0;
}

.hero-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1.2" fill="rgba(15,23,42,0.03)"/></svg>');
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.hero-header h1 {
    font-size: clamp(2.25rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    background: linear-gradient(to right, #0f172a, #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-header p {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

/* Grid Layout */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.25rem;
    margin-bottom: 4rem;
}

/* Result Cards - Glassmorphism style */
.result-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--surface-border);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    display: flex;
    flex-direction: column;
}

.result-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(15, 23, 42, 0.15);
    background: var(--surface-hover);
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
}

.result-card h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.result-card h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--surface-border);
    margin-left: 0.5rem;
}

.result-date {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 1.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.result-date svg {
    color: var(--secondary);
}

/* Result Items */
.result-item {
    background: rgba(241, 245, 249, 0.6);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--surface-border);
    transition: var(--transition);
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-item:hover {
    background: rgba(241, 245, 249, 0.95);
    border-color: rgba(15, 23, 42, 0.12);
    transform: scale(1.01);
}

.result-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.result-numbers {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}

.result-numbers strong {
    font-weight: 800;
}

.prize-amount {
    font-size: 1.25rem;
    color: var(--secondary);
    font-weight: 700;
    margin-top: 0.35rem;
    font-family: var(--font-heading);
}

/* 3D Glossy Lottery Balls (Vibrant colors with soft light mode shadows) */
.lottery-balls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
}

.lottery-ball {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff4d6d 0%, #d90429 55%, #80001c 100%);
    color: var(--text-on-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.3rem;
    box-shadow: 0 4px 8px rgba(217, 4, 41, 0.25), 
                inset -3px -3px 8px rgba(0,0,0,0.35), 
                inset 3px 3px 8px rgba(255,255,255,0.4);
    font-family: var(--font-heading);
    position: relative;
    transition: var(--transition);
}

.lottery-ball:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 8px 16px rgba(217, 4, 41, 0.35), var(--shadow-glow-red);
}

.lottery-ball.revancha {
    background: radial-gradient(circle at 30% 30%, #4895ef 0%, #1e4d9e 55%, #071f49 100%);
    box-shadow: 0 4px 8px rgba(30, 77, 158, 0.25), 
                inset -3px -3px 8px rgba(0,0,0,0.35), 
                inset 3px 3px 8px rgba(255,255,255,0.4);
}

.lottery-ball.revancha:hover {
    box-shadow: 0 8px 16px rgba(30, 77, 158, 0.35), 0 0 20px rgba(30,77,158,0.3);
}

.lottery-ball.mega {
    background: radial-gradient(circle at 30% 30%, #ffea79 0%, #f77f00 55%, #8f4000 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(247, 127, 0, 0.25), 
                inset -3px -3px 8px rgba(0,0,0,0.35), 
                inset 3px 3px 8px rgba(255,255,255,0.4);
}

.lottery-ball.mega:hover {
    box-shadow: 0 8px 16px rgba(247, 127, 0, 0.35), var(--shadow-glow-gold);
}

/* Card Badge/Tag details */
.result-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.result-details span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(15, 23, 42, 0.04);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--surface-border);
}

.time-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-secondary);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid var(--surface-border);
}

.time-badge.reventado {
    background: linear-gradient(135deg, var(--secondary), #ef233c);
    color: white;
    border-color: var(--secondary-light);
    box-shadow: 0 4px 12px rgba(217, 4, 41, 0.25);
    animation: pulse-soft 2.5s infinite;
}

/* Interactive Lucky Generator Widget */
.generator-widget {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.8) 0%, rgba(241, 245, 249, 0.85) 100%);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    margin-bottom: 4rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.generator-widget::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.02), transparent 60%);
    pointer-events: none;
}

.generator-widget h3 {
    font-size: 1.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.generator-widget p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.generator-selector {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.25rem;
    flex-wrap: wrap;
}

.generator-btn {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--surface-border);
    color: var(--text-secondary);
    padding: 0.6rem 1.3rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.generator-btn:hover, .generator-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary-light);
    box-shadow: 0 4px 12px rgba(217, 4, 41, 0.25);
}

.generator-btn.active {
    transform: translateY(-2px);
}

.generator-display {
    min-height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2.25rem;
}

.generator-action-btn {
    background: linear-gradient(95deg, var(--secondary), var(--secondary-light));
    color: white;
    border: none;
    padding: 0.85rem 2.25rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.generator-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(217, 4, 41, 0.35);
    background: linear-gradient(95deg, var(--secondary-light), #ff4d6d);
}

.generator-action-btn:active {
    transform: translateY(-1px);
}

/* SEO Content Sections - E-E-A-T and reading structure */
.seo-content-section {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    padding: 3.5rem;
    margin-bottom: 3.5rem;
    box-shadow: var(--shadow-lg);
}

.seo-content-section h2 {
    font-size: 2.25rem;
    color: var(--text-primary);
    margin-bottom: 1.75rem;
    position: relative;
    padding-bottom: 1rem;
    font-weight: 800;
}

.seo-content-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    border-radius: 2px;
}

.seo-content-section h3 {
    font-size: 1.6rem;
    margin: 2.5rem 0 1.25rem;
    color: var(--text-primary);
    font-weight: 700;
}

.seo-content-section p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.75;
}

.seo-content-section ul, .seo-content-section ol {
    margin-bottom: 2rem;
}

.seo-content-section ul li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.85rem;
    color: var(--text-secondary);
    font-size: 1.025rem;
    list-style: none;
}

.seo-content-section ul li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.seo-content-section ol li {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1.025rem;
    margin-left: 1.5rem;
    padding-left: 0.5rem;
}

.seo-content-section ol li::marker {
    color: var(--secondary);
    font-weight: 700;
}

/* Premium Tables */
.table-container {
    overflow-x: auto;
    margin: 2.5rem 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-md);
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.4);
    text-align: left;
    font-size: 0.95rem;
}

.premium-table th {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-primary);
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.03em;
    border-bottom: 2px solid var(--surface-border);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.premium-table td {
    padding: 1.25rem 1.5rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--surface-border);
}

.premium-table tr:last-child td {
    border-bottom: none;
}

.premium-table tr:hover td {
    background: rgba(15, 23, 42, 0.01);
    color: var(--text-primary);
}

/* Game Info Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
    margin-top: 2.5rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.5);
    padding: 2.25rem;
    border-radius: var(--radius-md);
    border-top: 4px solid var(--primary-light);
    transition: var(--transition);
    border-left: 1px solid var(--surface-border);
    border-right: 1px solid var(--surface-border);
    border-bottom: 1px solid var(--surface-border);
}

.game-card:nth-child(even) {
    border-top-color: var(--secondary);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(15, 23, 42, 0.08);
}

.game-card h4 {
    font-size: 1.35rem;
    margin-bottom: 0.85rem;
    color: var(--text-primary);
}

/* FAQs */
.faq-item {
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--surface-border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.faq-answer {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* Highlight boxes (Alert style) */
.alert-box {
    background: rgba(245, 158, 11, 0.06);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #b45309;
    margin: 2rem 0;
}

.alert-box p {
    margin-bottom: 0;
    color: #b45309;
}

.alert-box strong {
    color: #78350f;
}

/* Footer Section - Contrasted dark footer */
footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 5rem 1.5rem 2.5rem;
    text-align: center;
    border-top: 1px solid var(--surface-border);
}

footer h4 {
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

footer a {
    color: #cbd5e1;
    font-size: 0.95rem;
}

footer a:hover {
    color: var(--secondary-light);
}

.footer-disclaimer {
    max-width: 850px;
    margin: 3rem auto 0;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2.5rem;
    line-height: 1.7;
}

.footer-disclaimer p {
    color: #64748b;
}

/* Utilities */
.back-link {
    color: var(--secondary);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.back-link:hover {
    color: var(--primary);
    transform: translateX(-3px);
}

.error-state {
    padding: 2.5rem;
    text-align: center;
    color: var(--secondary-light);
    background: rgba(217, 4, 41, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(217, 4, 41, 0.15);
    margin-top: 1rem;
}

/* Skeleton Loaders */
.skeleton {
    background: linear-gradient(90deg, rgba(0,0,0,0.03) 25%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.6s infinite linear;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text { height: 16px; margin-bottom: 10px; width: 80%; }
.skeleton-title { height: 28px; width: 55%; margin-bottom: 20px; }
.skeleton-ball { width: 48px; height: 48px; border-radius: 50%; }

/* Staggered Delay classes */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Responsive break points */
@media (max-width: 768px) {
    .main-nav {
        padding: 0.75rem 0;
    }
    
    .nav-menu {
        display: none;
        background: rgba(255, 255, 255, 0.98) !important;
        border-bottom: 1px solid var(--surface-border);
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .hero-header {
        padding: 3.5rem 1.25rem;
    }
    
    .seo-content-section {
        padding: 2.25rem 1.5rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .result-card {
        padding: 1.75rem;
    }
}
