:root {
    --gold: #FFD700;
    --gold-dark: #B8860B;
    --dark-bg: #0a0a0a;
    --dark-card: #1a1a1a;
    --text-light: #f5f5f5;
    --text-grey: #a0a0a0;
    --glow: 0 0 15px rgba(255, 215, 0, 0.5);
    --gradient-gold: linear-gradient(45deg, #FFD700, #FDB931, #FFD700);
    --transition: all 0.3s ease;
}

:root[data-theme='light'] {
    --dark-bg: #f4f5f7;
    --dark-card: #ffffff;
    --text-light: #111827;
    --text-grey: #4b5563;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--gold);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Utilities */
.text-gold { color: var(--gold); }
.text-center { text-align: center; }
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient-gold);
    color: var(--dark-bg);
    border: none;
    box-shadow: var(--glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.7);
}

.btn-outline {
    border: 2px solid var(--gold);
    color: var(--gold);
    background: transparent;
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--dark-bg);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--gold);
    margin: 10px auto 0;
}

/* 1. Hero Section */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1518623489648-a173ef7824f3?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding-top: 80px;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(to right, rgba(0,0,0,0.7), rgba(0,0,0,0.3));
}

:root[data-theme='light'] .navbar {
    background: linear-gradient(to right, rgba(255,255,255,0.95), rgba(255,255,255,0.8));
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 400;
}

.nav-links a:hover {
    color: var(--gold);
}

.nav-links a.active {
    border-bottom: 2px solid var(--gold);
    padding-bottom: 3px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

.icon-btn {
    background: transparent;
    border-radius: 999px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.icon-btn i {
    font-size: 0.9rem;
}

.icon-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.translate-wrapper {
    position: relative;
}

.translate-widget {
    position: absolute;
    top: 40px;
    right: 0;
    background: var(--dark-card);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    z-index: 2000;
}

.translate-widget.visible {
    display: block;
}

#google_translate_element {
    font-size: 0.8rem;
}

#google_translate_element .goog-te-gadget-simple {
    background-color: transparent !important;
    border: none !important;
}

.sidebar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px 0 20px;
}

.btn-login {
    border-radius: 30px;
    padding: 10px 26px;
    font-size: 0.9rem;
}

.btn-login-desktop {
    display: inline-block;
}

.nav-login-mobile {
    display: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--gold);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

.hero-small {
    min-height: 55vh;
}

.page-content {
    padding-top: 40px;
}

.contact-section {
    padding: 80px 0;
    background: var(--dark-card);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.contact-card {
    background: var(--dark-bg);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.contact-form .form-row {
    margin-bottom: 15px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #111;
    color: #fff;
    font-family: inherit;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-grey);
}

.auth-section {
    padding: 80px 0;
}

.auth-wrapper {
    display: flex;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--dark-card);
    border-radius: 16px;
    padding: 30px 28px 35px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

:root[data-theme='light'] .dash-card,
:root[data-theme='light'] .table-wrapper,
:root[data-theme='light'] .auth-card,
:root[data-theme='light'] .winner-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.06);
}

:root[data-theme='light'] .dashboard-body {
    background: #e5e7eb;
}

.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    background: #111;
    border-radius: 999px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-grey);
    padding: 8px 0;
    border-radius: 999px;
    font-weight: 500;
    cursor: pointer;
}

.auth-tab.active {
    background: var(--gradient-gold);
    color: var(--dark-bg);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form .form-row {
    margin-bottom: 15px;
}

.auth-form input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #111;
    color: #fff;
}

.auth-extra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-grey);
}

.auth-extra a {
    color: var(--gold);
}

.auth-errors {
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.6);
    color: #ffb3b3;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.dashboard-body {
    background: var(--dark-bg);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.dashboard-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    z-index: 1001;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.6));
}

.dashboard-topbar-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
}

.sidebar {
    background: var(--dark-card);
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    padding: 25px 20px;
}

.sidebar-toggle-btn {
    width: 32px;
    height: 24px;
    border: none;
    background: transparent;
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.sidebar-toggle-btn span {
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: var(--text-light);
    transition: var(--transition);
}

.sidebar-toggle-btn.open span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.sidebar-toggle-btn.open span:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle-btn.open span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 998;
}

.sidebar-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

.sidebar-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin-bottom: 30px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-grey);
    margin-bottom: 6px;
}

.sidebar-nav a i {
    width: 18px;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    background: rgba(255, 215, 0, 0.1);
    color: var(--gold);
}

.dashboard-main {
    padding: 25px 30px 40px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.user-info {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dash-card {
    background: #111;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dash-label {
    font-size: 0.85rem;
    color: var(--text-grey);
}

.dash-value {
    font-size: 1.6rem;
    margin-top: 6px;
}

.dashboard-table h2 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.table-wrapper {
    background: #111;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
}

.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table-wrapper th,
.table-wrapper td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-wrapper th {
    text-align: left;
    color: var(--text-grey);
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
}

.status-pending {
    background: rgba(255, 215, 0, 0.1);
    color: var(--gold);
}

.status-won {
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
}

.status-lost {
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
}

@media (max-width: 992px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-toggle-btn {
        display: inline-flex;
    }

    .dashboard-topbar {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 260px;
        max-width: 75%;
        transform: translateX(-100%);
        transition: var(--transition);
        z-index: 999;
        padding: 24px 18px 18px;
        border-right: none;
        box-shadow: 6px 0 20px rgba(0, 0, 0, 0.6);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-logo {
        margin-bottom: 16px;
    }

    .sidebar-actions {
        justify-content: flex-start;
        margin-bottom: 18px;
    }

    .sidebar-nav a {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .sidebar-logo {
        display: none;
    }

    .dashboard-main {
        padding: 70px 16px 30px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .table-wrapper th,
    .table-wrapper td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.prize-pool .label {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.prize-pool .amount {
    font-size: 5rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 10px 0;
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    min-width: 100px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.countdown-item span {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    display: block;
}

.countdown-item p {
    font-size: 0.9rem;
    text-transform: uppercase;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.2rem;
}

.pulse-effect {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(255, 215, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

/* 2. Stats Section */
.stats-section {
    padding: 80px 0;
    background: var(--dark-card);
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-card i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    color: #fff;
}

.stat-card p {
    color: var(--text-grey);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* 3. Active Lottery Card */
.active-lottery-section {
    padding: 100px 0;
    background: url('https://www.transparenttextures.com/patterns/black-linen.png'); /* Subtle texture */
}

.lottery-card {
    background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
    border: 1px solid var(--gold);
    border-radius: 20px;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.card-header {
    background: var(--gradient-gold);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    color: var(--dark-bg);
    margin: 0;
    font-size: 1.8rem;
}

.price-tag {
    background: var(--dark-bg);
    color: var(--gold);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 700;
}

.card-body {
    padding: 40px;
    text-align: center;
}

.win-label {
    font-size: 1.2rem;
    color: var(--text-grey);
}

.win-amount {
    font-size: 4rem;
    margin: 10px 0 30px;
}

.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.1);
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    background: var(--gradient-gold);
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 0 10px var(--gold);
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-grey);
}

.btn-block {
    width: 100%;
    padding: 18px;
    font-size: 1.3rem;
    background: var(--gradient-gold);
    color: var(--dark-bg);
    border: none;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.btn-block:hover {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

/* 4. Winners Section */
.winners-section {
    padding: 100px 0;
    background: var(--dark-bg);
}

.winners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.winner-card {
    background: var(--dark-card);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 215, 0, 0.1);
    transition: var(--transition);
}

.winner-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
}

.winner-icon {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 20px;
}

.ticket-num {
    background: rgba(255, 215, 0, 0.1);
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    margin: 10px 0;
    font-family: monospace;
}

.win-prize {
    font-size: 1.5rem;
    font-weight: 700;
}

.win-date {
    font-size: 0.8rem;
    color: var(--text-grey);
    margin-top: 10px;
}

/* 5. How It Works */
.how-it-works-section {
    padding: 100px 0;
    background: var(--dark-card);
}

.steps-grid {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.step-card {
    text-align: center;
    max-width: 300px;
    position: relative;
}

.step-icon {
    width: 40px;
    height: 40px;
    background: var(--gold);
    color: var(--dark-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-card i {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 20px;
}

/* 6. Payment & Legal */
.payment-section, .legal-section {
    padding: 60px 0;
    text-align: center;
    background: var(--dark-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.payment-logos {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.payment-logo {
    background: #fff;
    color: #000;
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: 700;
    /* In real project, use img tags */
}

.legal-content i {
    margin-bottom: 20px;
}

.legal-links {
    margin-top: 20px;
}

.legal-links a {
    color: var(--text-grey);
    margin: 0 10px;
    font-size: 0.9rem;
}

.legal-links a:hover {
    color: var(--gold);
}

/* 8. Footer */
.main-footer {
    background: #000;
    padding: 80px 0 30px;
    border-top: 3px solid var(--gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col ul li a {
    color: var(--text-grey);
}

.footer-col ul li a:hover {
    color: var(--gold);
    padding-left: 5px;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.social-links a:hover {
    background: var(--gold);
    color: var(--dark-bg);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-grey);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }

    .menu-toggle {
        display: flex;
    }

    .btn-login-desktop {
        display: none;
    }

    .nav-login-mobile {
        display: block;
        margin-top: 30px;
    }

    .nav-links {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.92);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 20px;
        transform: translateY(-100%);
        opacity: 0;
        transition: var(--transition);
        z-index: 99;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .prize-pool .amount {
        font-size: 3rem;
    }
    
    .countdown-item {
        min-width: 70px;
        padding: 10px;
    }
    
    .countdown-item span {
        font-size: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
