/* ============================================================
   style.css - Master Stylesheet for MegaCrypto Jackpot
   Includes: Global variables, typography, components, 
   navigation, forms, cards, animations, and responsive styles
   ============================================================ */

/* ============================================================
   RESET & BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme Colors */
    --bg: #faf8f5;
    --bg-elevated: #ffffff;
    --bg-subtle: #f5f2ed;
    --fg: #1c1917;
    --fg-muted: #78716c;
    --fg-faint: #a8a29e;
    --border: #e7e5e4;
    --border-strong: #d6d3d1;
    --accent: #d97706;
    --accent-light: #fef3c7;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
    --card-shadow-hover: 0 4px 6px rgba(0, 0, 0, 0.04), 0 12px 24px rgba(0, 0, 0, 0.06);
    --nav-bg: rgba(250, 248, 245, 0.85);
    --bottom-nav-height: 68px;
    --good-green: #059669;
    --good-green-light: rgba(5, 150, 105, 0.08);
    --support-green: #059669;
    --support-green-light: rgba(5, 150, 105, 0.08);
    --step-blue: #3b82f6;
    --step-blue-light: rgba(59, 130, 246, 0.08);
}

/* Dark Theme Colors */
html.dark {
    --bg: #0c0a09;
    --bg-elevated: #1c1917;
    --bg-subtle: #292524;
    --fg: #fafaf9;
    --fg-muted: #a8a29e;
    --fg-faint: #78716c;
    --border: #292524;
    --border-strong: #44403c;
    --accent: #fbbf24;
    --accent-light: rgba(251, 191, 36, 0.15);
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
    --card-shadow-hover: 0 4px 6px rgba(0, 0, 0, 0.3), 0 12px 24px rgba(0, 0, 0, 0.3);
    --nav-bg: rgba(12, 10, 9, 0.85);
    --good-green: #34d399;
    --good-green-light: rgba(52, 211, 153, 0.12);
    --support-green: #34d399;
    --support-green-light: rgba(52, 211, 153, 0.12);
    --step-blue: #60a5fa;
    --step-blue-light: rgba(96, 165, 250, 0.12);
}

html.dark .text-gradient {
    background: linear-gradient(135deg, #fbbf24, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   BODY & TYPOGRAPHY
   ============================================================ */
body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--fg);
    transition: background 0.5s ease, color 0.5s ease;
    padding-bottom: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 5px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 10px;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-gradient {
    background: linear-gradient(135deg, var(--accent), #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.skeleton {
    background: var(--bg-subtle);
    border-radius: 8px;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
}

.skeleton-text {
    height: 1em;
    width: 100%;
}
.skeleton-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}
.skeleton-rect {
    height: 20px;
    border-radius: 4px;
}

.blink-live {
    animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
html.dark .btn-primary {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #0c0a09;
}
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}
.btn-primary:hover::after {
    left: 100%;
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-loading {
    opacity: 0.7;
    cursor: wait;
    position: relative;
}
.btn-loading .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* ============================================================
   NAVIGATION - DESKTOP
   ============================================================ */
.desktop-nav {
    display: flex !important;
}
.nav-blur {
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
}

/* ============================================================
   NAVIGATION - BOTTOM (Mobile)
   ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
    display: none;
    align-items: center;
    justify-content: space-around;
    height: var(--bottom-nav-height);
    padding: 0 8px 6px;
    transition: background 0.3s, border-color 0.3s;
}
html.dark .bottom-nav {
    background: rgba(12, 10, 9, 0.92);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--fg-muted);
    padding: 4px 8px;
    border-radius: 16px;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    min-width: 56px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.nav-item .nav-icon {
    font-size: 1.4rem;
    line-height: 1;
    transition: transform 0.2s;
}
.nav-item.active {
    color: var(--accent);
}
.nav-item.active .nav-icon {
    transform: scale(1.1);
}
.nav-item .nav-badge {
    position: absolute;
    top: 0;
    right: 4px;
    background: #ef4444;
    color: white;
    font-size: 0.45rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 20px;
    line-height: 1.4;
    min-width: 16px;
    text-align: center;
}

/* ============================================================
   NAVIGATION - MOBILE HEADER
   ============================================================ */
.mobile-nav-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 10px 16px;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}
html.dark .mobile-nav-header {
    background: rgba(12, 10, 9, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
.mobile-nav-header .logo-container {
    display: flex;
    align-items: center;
}
.mobile-nav-header .logo-container img {
    max-height: 34px;
    width: auto;
}
.mobile-nav-header .theme-toggle-mobile {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 6px 10px;
    border-radius: 10px;
    color: var(--fg-muted);
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mobile-nav-header .theme-toggle-mobile:hover {
    background: rgba(255, 255, 255, 0.15);
}
html.dark .mobile-nav-header .theme-toggle-mobile:hover {
    background: rgba(255, 255, 255, 0.08);
}
.mobile-nav-header .theme-toggle-mobile svg {
    width: 22px;
    height: 22px;
    stroke: var(--fg-muted);
}

/* ============================================================
   NAVIGATION - RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }
    .bottom-nav {
        display: flex !important;
    }
    .mobile-nav-header {
        display: flex !important;
    }
    footer {
        margin-bottom: var(--bottom-nav-height);
    }
    body {
        padding-top: 60px;
    }
    .hero-section {
        padding-top: 40px !important;
    }
}
@media (min-width: 769px) {
    .bottom-nav {
        display: none !important;
    }
    .desktop-nav {
        display: flex !important;
    }
    .mobile-nav-header {
        display: none !important;
    }
    footer {
        margin-bottom: 0;
    }
    body {
        padding-top: 0;
    }
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1rem;
}
.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}
.modal-content {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px 20px;
    max-width: 440px;
    width: 100%;
    max-height: 92vh;
    box-shadow: var(--card-shadow-hover);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}
.modal-overlay.open .modal-content {
    transform: scale(1) translateY(0);
}
.modal-scroll {
    overflow-y: auto;
    flex: 1 1 auto;
    padding-right: 4px;
    margin-right: -4px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}
.modal-scroll::-webkit-scrollbar {
    width: 4px;
}
.modal-scroll::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 10px;
}
.modal-scroll::-webkit-scrollbar-track {
    background: transparent;
}

/* ============================================================
   FORMS & INPUTS
   ============================================================ */
.auth-input {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--fg);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.875rem;
    outline: none;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}
.auth-input::placeholder {
    color: var(--fg-faint);
}
.auth-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fg-faint);
    margin-bottom: 6px;
    display: block;
}

/* ============================================================
   TURNSTILE
   ============================================================ */
.turnstile-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 78px;
    width: 100%;
    margin-top: 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}
.turnstile-container .cf-turnstile {
    transform: scale(0.85);
    transform-origin: center center;
}
@media (min-width: 480px) {
    .turnstile-container .cf-turnstile {
        transform: scale(1);
    }
}

.auth-error {
    color: #ef4444;
    font-size: 0.75rem;
    text-align: center;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    margin-top: 8px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}
.auth-error.hidden {
    display: none;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 2000;
    padding: 14px 20px;
    border-radius: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow-hover);
    transform: translateY(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ============================================================
   TABS
   ============================================================ */
.tab-switch {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}
.tab-switch button {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--fg-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}
.tab-switch button.active {
    background: var(--bg-elevated);
    color: var(--accent);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   BADGES
   ============================================================ */
.user-badge {
    background: linear-gradient(135deg, var(--accent-light), transparent);
    border: 1px solid var(--accent);
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}
.coin-badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid rgba(217, 119, 6, 0.1);
}
.wallet-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.15);
}
.support-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--support-green-light);
    color: var(--support-green);
    padding: 0.25rem 1rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.75rem;
    border: 1px solid var(--support-green);
    opacity: 0.9;
}
.good-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--good-green-light);
    color: var(--good-green);
    padding: 0.25rem 1.2rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.75rem;
    border: 1px solid var(--good-green);
}
.impact-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--good-green-light);
    color: var(--good-green);
    border: 1px solid rgba(5, 150, 105, 0.15);
}
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--accent);
}
.live-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: blink 1.2s ease-in-out infinite;
}
.live-badge.ended {
    background: var(--bg-subtle);
    color: #ef4444;
    border-color: #ef4444;
}
.live-badge.ended .dot {
    background: #ef4444;
    animation: none;
}

/* ============================================================
   NUMBER BALLS
   ============================================================ */
.number-ball {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.875rem;
    color: white;
    background: linear-gradient(135deg, var(--accent), #f59e0b);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}
.number-ball-sm {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.65rem;
    color: white;
    background: radial-gradient(circle at 35% 30%, #fbbf24, #d97706);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: inset -2px -2px 8px rgba(0, 0, 0, 0.15),
                inset 2px 2px 8px rgba(255, 255, 255, 0.2),
                0 2px 6px rgba(217, 119, 6, 0.25);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin: 0;
    flex-shrink: 0;
}
.number-ball-sm::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 8px;
    height: 5px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 50%;
    opacity: 0.5;
}
.draw-number-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    color: white;
    background: linear-gradient(135deg, var(--accent), #f59e0b);
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}
.number-ball-demo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.85rem;
    background: radial-gradient(circle at 35% 30%, #fbbf24, #d97706);
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    box-shadow: inset -3px -3px 8px rgba(0, 0, 0, 0.15),
                inset 3px 3px 8px rgba(255, 255, 255, 0.2),
                0 2px 8px rgba(217, 119, 6, 0.3);
    margin: 0 1px;
}
html.dark .number-ball-demo {
    background: radial-gradient(circle at 35% 30%, #fcd34d, #f59e0b);
}

/* ============================================================
   TICKET NUMBER GRID
   ============================================================ */
.ticket-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: radial-gradient(circle at 30% 30%, var(--bg-elevated), var(--bg-subtle));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    color: var(--fg);
    box-shadow: inset -3px -3px 8px rgba(0, 0, 0, 0.1),
                inset 3px 3px 8px rgba(255, 255, 255, 0.2),
                0 2px 4px rgba(0, 0, 0, 0.08);
    position: relative;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    margin: 0;
}
.ticket-num::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 8px;
    width: 10px;
    height: 6px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 50%;
    opacity: 0.6;
}
.ticket-num:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: inset -3px -3px 8px rgba(0, 0, 0, 0.1),
                inset 3px 3px 8px rgba(255, 255, 255, 0.3),
                0 6px 16px rgba(217, 119, 6, 0.2);
    border-color: var(--accent);
}
.ticket-num.selected {
    background: radial-gradient(circle at 35% 30%, #fbbf24, #d97706);
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    box-shadow: inset -4px -4px 12px rgba(0, 0, 0, 0.25),
                inset 4px 4px 12px rgba(255, 255, 255, 0.2),
                0 4px 16px rgba(217, 119, 6, 0.4),
                0 0 0 3px rgba(217, 119, 6, 0.15);
    transform: scale(1.05);
    border: 2px solid rgba(255, 255, 255, 0.3);
}
.ticket-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    max-width: 280px;
    margin: 0 auto;
}

/* ============================================================
   MINI TICKET
   ============================================================ */
.mini-ticket {
    background: linear-gradient(145deg, var(--bg-elevated), var(--bg-subtle));
    border: 1px solid var(--border);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 10px 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 6px;
}
.mini-ticket::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #f59e0b, var(--accent));
}
.mini-ticket:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   COUNTDOWN
   ============================================================ */
.countdown-digit {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    font-size: 2rem;
    line-height: 1;
    min-width: 64px;
    text-align: center;
}
.countdown-digit.ended {
    background: var(--bg-subtle);
    border-color: #ef4444;
    color: #ef4444;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #f59e0b);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   PURCHASE FEED
   ============================================================ */
.table-headers {
    display: flex;
    padding: 0.7rem 1.5rem;
    border-bottom: 2px solid var(--border-strong);
    background: var(--bg-subtle);
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fg-muted);
}
.table-headers .header-wallet {
    flex: 1;
    text-align: left;
}
.table-headers .header-tickets {
    min-width: 80px;
    text-align: right;
}
.scroll-wrapper {
    height: 420px;
    overflow: hidden;
    position: relative;
    background: var(--bg);
}
.scroll-wrapper::-webkit-scrollbar {
    display: none;
}
.scroll-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scroll-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    animation: scrollUp 25s linear infinite;
    will-change: transform;
}
.scroll-inner.paused {
    animation-play-state: paused;
}
@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}
.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1.5rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
    gap: 1rem;
    font-size: 0.9rem;
    background: var(--bg);
    height: 52px;
}
.row:hover {
    background: var(--bg-subtle);
}
.row .address {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--fg);
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}
.row .tickets {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.95rem;
    font-family: 'IBM Plex Mono', monospace;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--fg-muted);
    text-align: center;
    gap: 0.5rem;
    padding: 2rem;
}
.empty-state .icon {
    font-size: 2.5rem;
    opacity: 0.3;
}
.empty-state .text {
    font-size: 0.9rem;
}
.empty-state .sub {
    font-size: 0.75rem;
    color: var(--fg-faint);
}

/* ============================================================
   PRIZE TIER CARDS
   ============================================================ */
.prize-tier-card {
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 1rem 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}
.prize-tier-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--accent);
}
.prize-tier-card .tier-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    display: block;
}
.prize-tier-card .tier-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fg);
    line-height: 1.3;
    margin-bottom: 0.15rem;
}
.prize-tier-card .tier-percent {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1.2;
}
.prize-tier-card .tier-sub {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--fg-muted);
    letter-spacing: 0.03em;
}
.prize-tier-card.jackpot {
    border-color: var(--accent);
    background: var(--accent-light);
    border-width: 2px;
}
.prize-tier-card.jackpot .tier-percent {
    font-size: 1.8rem;
}
.prize-tier-card.jackpot .tier-label {
    color: var(--accent);
}
.prize-tier-card.jackpot .tier-sub {
    color: var(--accent);
}

/* ============================================================
   PRIZE TABLE
   ============================================================ */
.prize-table td,
.prize-table th {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 0.9rem;
}
.prize-table th {
    font-weight: 600;
    color: var(--fg-faint);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.prize-table tr:last-child td {
    border-bottom: none;
}

/* ============================================================
   PICKER & CART CARDS
   ============================================================ */
.picker-card,
.cart-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    height: 100%;
    min-height: 380px;
}
.picker-card .ticket-grid {
    max-width: 260px;
}
.picker-card .ticket-num {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}
.cart-card .cart-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.cart-card .cart-items-wrap {
    flex: 1;
    overflow-y: auto;
}

/* ============================================================
   SPONSORS
   ============================================================ */
.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.2rem;
}
.sponsor-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.2rem 0.8rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}
.sponsor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--accent);
}
.sponsor-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.6rem;
    border-radius: 50%;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 2px solid var(--border);
}
.sponsor-name {
    font-weight: 700;
    font-size: 1rem;
}
.sponsor-tag {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--fg-faint);
    background: var(--bg-subtle);
    padding: 0.15rem 0.7rem;
    border-radius: 40px;
    display: inline-block;
    margin-top: 0.25rem;
}
.sponsored {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-subtle);
    padding: 0.4rem 1.8rem;
    border-radius: 40px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg-muted);
    border: 1px solid var(--border);
}

/* ============================================================
   JACKPOT DISPLAY
   ============================================================ */
.amount-usd {
    font-weight: 700;
    color: var(--fg);
}
.amount-eth-small {
    font-size: 0.65rem;
    opacity: 0.6;
    font-weight: 400;
}
.jackpot-display .amount-usd {
    font-size: 2.5rem;
}

/* ============================================================
   DRAW ENDED
   ============================================================ */
.draw-ended-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ef4444;
    text-align: center;
    padding: 0.5rem 0;
}
.draw-ended-text .icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.25rem;
}
.timer-container.ended {
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================================
   DURATION OPTIONS
   ============================================================ */
.duration-option {
    padding: 4px 12px;
    border-radius: 8px;
    border: 2px solid var(--border);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.7rem;
    transition: all 0.2s ease;
    background: var(--bg-elevated);
    color: var(--fg-muted);
}
.duration-option.active {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.15);
}

/* ============================================================
   ADDRESS DISPLAY
   ============================================================ */
.address-display {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    word-break: break-all;
    background: var(--bg-subtle);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.donation-address {
    font-family: 'IBM Plex Mono', monospace;
    background: var(--bg-subtle);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    word-break: break-all;
    font-size: 0.8rem;
    user-select: all;
}
.copy-btn {
    cursor: pointer;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--good-green-light);
    color: var(--good-green);
    border: 1px solid var(--good-green);
    transition: all 0.2s ease;
}
.copy-btn:hover {
    background: var(--good-green);
    color: white;
}

/* ============================================================
   STEP CARDS (How to Play)
   ============================================================ */
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 1.1rem;
    background: var(--step-blue);
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}
html.dark .step-number {
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}
.step-card {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}
.step-content h3 {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.3rem;
}
.step-content p {
    color: var(--fg-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}
.step-content ul {
    list-style: disc;
    padding-left: 1.2rem;
    color: var(--fg-muted);
    line-height: 1.7;
    margin-top: 0.3rem;
}
.step-content li {
    margin-bottom: 0.15rem;
}
.highlight-box {
    background: var(--step-blue-light);
    border-left: 4px solid var(--step-blue);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin: 0.8rem 0;
}
.highlight-box p {
    margin-bottom: 0;
}

/* ============================================================
   INITIATIVE CARDS (Our Good Deeds)
   ============================================================ */
.initiative-icon {
    font-size: 2.5rem;
    line-height: 1;
}
.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.initiative-card {
    transition: all 0.3s ease;
}
.initiative-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}
.disclaimer-box {
    background: var(--bg-subtle);
    border-left: 4px solid var(--good-green);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin: 1rem 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    margin-top: auto;
    background: var(--bg-elevated);
}
.legal-footer {
    padding-bottom: 0.5rem;
}
.legal-footer p a {
    color: var(--accent);
    text-decoration: underline;
}
.footer-link {
    color: var(--fg-muted);
    transition: color 0.2s;
}
.footer-link:hover {
    color: var(--accent);
}

/* ============================================================
   LEGAL PAGE SECTIONS
   ============================================================ */
.legal-section h3 {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.legal-section p {
    color: var(--fg-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}
.legal-section ul {
    list-style: disc;
    padding-left: 1.5rem;
    color: var(--fg-muted);
    line-height: 1.7;
    margin-bottom: 1.2rem;
}
.legal-section li {
    margin-bottom: 0.3rem;
}
hr {
    border-color: var(--border);
    opacity: 0.4;
}

/* ============================================================
   RESPONSIVE - MEDIA QUERIES
   ============================================================ */

/* Tablets & Small Desktops */
@media (max-width: 1024px) {
    .focus-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Mobile */
@media (max-width: 768px) {
    .ticket-num {
        width: 30px;
        height: 30px;
        font-size: 0.7rem;
    }
    .ticket-grid {
        gap: 3px;
        max-width: 240px;
    }
    .number-ball {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }
    .number-ball-sm {
        width: 22px;
        height: 22px;
        font-size: 0.55rem;
    }
    .countdown-digit {
        padding: 8px 10px;
        font-size: 1.4rem;
        min-width: 44px;
    }
    .draw-number-ball {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .modal-content {
        padding: 16px 14px;
        max-height: 90vh;
    }
    .modal-scroll {
        padding-right: 2px;
        margin-right: -2px;
    }
    .table-headers {
        padding: 0.4rem 1rem;
        font-size: 0.6rem;
    }
    .row {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        height: 44px;
    }
    .row .address {
        font-size: 0.7rem;
    }
    .row .tickets {
        font-size: 0.8rem;
        min-width: 60px;
    }
    .scroll-wrapper {
        height: 350px;
    }
    .scroll-inner {
        animation-duration: 20s;
    }
    .jackpot-display .amount-usd {
        font-size: 1.8rem;
    }
    .prize-section-header .prize-amount {
        font-size: 1.8rem;
    }
    .prize-tier-card .tier-percent {
        font-size: 1.1rem;
    }
    .prize-tier-card.jackpot .tier-percent {
        font-size: 1.4rem;
    }
    .prize-tier-card .tier-label {
        font-size: 0.6rem;
    }
    .picker-card .ticket-num {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }
    .picker-card .ticket-grid {
        max-width: 220px;
    }
    .step-number {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .step-card {
        gap: 0.8rem;
    }
    .focus-grid {
        grid-template-columns: 1fr;
    }
    body {
        padding: 0.5rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .ticket-num {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }
    .ticket-grid {
        max-width: 200px;
    }
    .number-ball {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
    }
    .countdown-digit {
        padding: 6px 8px;
        font-size: 1.2rem;
        min-width: 36px;
    }
    .modal-content {
        padding: 12px;
    }
    .prize-tier-card {
        padding: 0.6rem 0.3rem;
    }
    .prize-tier-card .tier-percent {
        font-size: 0.9rem;
    }
    .prize-tier-card.jackpot .tier-percent {
        font-size: 1.1rem;
    }
}

/* ============================================================
   SECTION SCROLL MARGIN
   ============================================================ */
section {
    scroll-margin-top: 20px;
}

/* ============================================================
   SPONSOR LOGOS - LIGHT/DARK MODE
   ============================================================ */

/* Light mode - show light logos, hide dark logos */
html:not(.dark) .light-logo {
    display: block;
}
html:not(.dark) .dark-logo {
    display: none;
}

/* Dark mode - show dark logos, hide light logos */
html.dark .light-logo {
    display: none;
}
html.dark .dark-logo {
    display: block;
}

