/* --- Base Variables --- */
:root {
    --bg-deep: #050507;
    --bg-panel: rgba(10, 30, 40, 0.7); /* Dark green tint */
    --bg-card: rgba(255, 255, 255, 0.03);
    
    --primary: #00d4ff; /* Lime green */
    --accent: #22c55e;  /* Green */
    
    --gold: #00d4ff; /* Changed to lime green */
    --silver: #e2e8f0;
    --bronze: #0099cc; /* Dark lime */
    
    --glass-border: 1px solid rgba(0, 212, 255, 0.15); /* Lime green tint */
    --glass-blur: blur(20px);
    
    --font-main: 'Outfit', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* HIDE SCROLLBARS GLOBALLY */
html, body { overflow-x: hidden; }
::-webkit-scrollbar { width: 0px; background: transparent; display: none; }
html { scrollbar-width: none; -ms-overflow-style: none; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-deep);
    color: #f8fafc;
    min-height: 100vh;
}

/* --- SCROLL LOCK CLASS --- */
body.no-scroll {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* --- DESKTOP NEWS TICKER (SEAMLESS FIX) --- */
.desktop-ticker {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: 36px;
    background: linear-gradient(90deg, #0a2a3a, #1a3a4a, #0a2a3a); /* Dark green gradient */
    z-index: 10000;
    overflow: hidden;
    display: flex; align-items: center;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3); /* Lime border */
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.ticker-track {
    display: flex;
    width: max-content; /* Critical for looping */
    animation: tickerScroll 40s linear infinite; /* Adjust speed here */
}

.ticker-set {
    display: flex; /* Holds one set of items */
}

.ticker-item {
    padding: 0 2rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    display: flex; align-items: center; gap: 0.5rem;
    white-space: nowrap;
}

.ticker-item strong {
    color: var(--gold);
    font-weight: 700;
}

/* Loops from 0 to -50% (exactly half, since we duplicated the content) */
@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Background --- */
.background-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: radial-gradient(circle at 50% 0%, #0a1a2a 0%, #000000 80%); /* Dark green gradient */
}
#matrixCanvas { width: 100%; height: 100%; opacity: 0.15; }
.vignette-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, transparent 40%, #000 100%);
    pointer-events: none;
}

/* --- Main Layout --- */
.leaderboard-container {
    max-width: 1200px; margin: 0 auto; padding: 1rem;
    display: flex; flex-direction: column; gap: 2rem;
    min-height: 100vh;
    /* PADDING-TOP INCREASED TO 220px SO THE BIG LOGO DOESN'T COVER THE TITLE */
    padding-top: 220px;
}

/* --- UI Elements (LOCKED) --- */
.home-btn {
    position: fixed !important; 
    top: 55px; 
    left: 20px; 
    z-index: 999; 
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(0,0,0,0.6); border: var(--glass-border); color: #fff;
    cursor: pointer; transition: 0.3s; backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.home-btn:hover { background: var(--primary); transform: scale(1.1); }

/* --- SITE LOGO (LOWERED POSITION) --- */
.site-logo {
    position: absolute !important;
    top: 80px; /* LOWERED from 45px */
    left: 50%;
    transform: translateX(-50%);
    height: 150px;
    width: auto;
    z-index: 999;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
    transition: 0.3s;
    pointer-events: none;
}

.live-indicator {
    position: absolute !important; 
    top: 55px; 
    right: 80px; 
    z-index: 999;
    background: rgba(0,0,0,0.6); border: var(--glass-border); padding: 8px 16px;
    border-radius: 30px; display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 700; text-decoration: none; color: white;
    backdrop-filter: blur(10px);
}
.live-indicator.online { border-color: #10b981; color: #10b981; }
.status-ping { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; }
.live-indicator.online .status-ping { background: #10b981; box-shadow: 0 0 10px #10b981; animation: ping 1.5s infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }

.hamburger-menu {
    position: absolute !important; 
    top: 55px; 
    right: 20px; 
    z-index: 2001; 
    width: 44px; height: 44px; background: var(--primary); border-radius: 12px;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4); transition: 0.3s;
}
.hamburger-menu:hover { transform: scale(1.05); }
.hamburger-inner { width: 20px; height: 2px; background: #fff; position: relative; }
.hamburger-inner::before, .hamburger-inner::after {
    content: ''; position: absolute; left: 0; width: 20px; height: 2px; background: #fff;
}
.hamburger-inner::before { top: -6px; }
.hamburger-inner::after { top: 6px; }

/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 768px) {
    .desktop-ticker { display: none; }
    .home-btn { top: 15px; left: 15px; }
    .hamburger-menu { top: 15px; right: 15px; }
    .live-indicator { top: 15px; right: 70px; padding: 6px 12px; font-size: 0.7rem; }
    
    /* PUSH CONTENT DOWN ON MOBILE */
    .leaderboard-container { 
        padding-top: 140px; 
    }
    
    /* LOGO MOBILE ADJUSTMENT (BIGGER) */
    .site-logo {
        top: 50px; /* Moves up slightly */
        height: 100px; /* BIGGER SIZE FOR MOBILE */
    }

    /* --- FIX FOR TABLE RANKS 4+ --- */
    /* Reduce padding and font size for the whole table */
    .leaderboard-table th, 
    .leaderboard-table td {
        padding: 0.8rem 0.4rem !important; /* drastically reduces side padding */
        font-size: 0.75rem; /* makes the rank # and wager smaller */
    }

    /* Tighten the Player Name column */
    .player-cell {
        gap: 0.4rem; /* brings avatar closer to name */
    }
    
    .table-avatar {
        width: 24px; /* smaller avatar for list view */
        height: 24px;
    }

    /* Fix the Prize Wording (The Green Pill) */
    .prize-pill {
        font-size: 0.65rem; /* Smaller text */
        padding: 3px 6px;   /* Smaller background box */
        white-space: normal; /* Allows text to wrap */
        text-align: right;   /* Aligns it cleanly to the right */
        line-height: 1.1;    /* Tighter spacing if it wraps */
    }
}

/* --- RACE DISABLED CUSTOM SCREEN (UPDATED FOR DESKTOP CENTERING) --- */
.race-disabled-container {
    display: flex; 
    justify-content: center; 
    align-items: center;
    width: 100%; 
    margin-top: 2rem;
    min-height: 55vh; /* Force height so it centers vertically in view */
}

.disabled-card {
    background: rgba(20, 20, 25, 0.9);
    border: 1px solid rgba(239, 68, 68, 0.5); /* Red border */
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    max-width: 600px;
    width: 100%;
    margin: 0 auto; /* Force horizontal centering */
    backdrop-filter: blur(15px);
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.2);
    animation: pulseRed 3s infinite;
}

@keyframes pulseRed {
    0% { box-shadow: 0 0 40px rgba(239, 68, 68, 0.2); }
    50% { box-shadow: 0 0 60px rgba(239, 68, 68, 0.4); }
    100% { box-shadow: 0 0 40px rgba(239, 68, 68, 0.2); }
}

.disabled-icon {
    font-size: 3rem; color: #ef4444; margin-bottom: 1rem;
}

.disabled-card h2 {
    font-size: 2rem; font-weight: 900; color: #ef4444; letter-spacing: 2px; margin: 0;
}

.disabled-line {
    height: 2px; width: 50px; background: #ef4444; margin: 1rem auto;
}

.race-disabled-message {
    font-size: 1.1rem; color: #cbd5e1; margin-bottom: 1.5rem; line-height: 1.6;
}

.discord-hint {
    background: rgba(88, 101, 242, 0.1); color: #5865F2;
    padding: 0.8rem 1.5rem; border-radius: 12px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700;
}

/* --- Typography --- */
.leaderboard-title-wrapper { padding: 2rem 0 1rem; text-align: center; }
.leaderboard-title { 
    max-width: 800px; margin: 0 auto; 
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
    animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.prize-pool-subtitle {
    text-align: center; font-size: 1rem; letter-spacing: 3px;
    color: #94a3b8; font-weight: 600; text-transform: uppercase;
}
/* Update Prize Pool to Lime Green */
.prize-pool-amount {
    display: block; 
    font-size: 3.5rem; 
    font-weight: 800; 
    color: #00d4ff; /* Lime Green */
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
    background: linear-gradient(to right, #fff, #00d4ff);
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
}

/* --- Timer --- */
.timer-container {
    background: var(--bg-panel); backdrop-filter: var(--glass-blur);
    border: var(--glass-border); border-radius: 20px;
    padding: 1.5rem; text-align: center; max-width: 600px; margin: 0 auto;
}
#timer-title { color: var(--primary); font-size: 0.8rem; letter-spacing: 2px; margin-bottom: 1rem; }
.timer-grid { display: flex; justify-content: center; align-items: center; gap: 0.5rem; }
.timer-box { 
    background: rgba(0,0,0,0.3); border-radius: 12px; padding: 0.8rem; min-width: 70px;
    border: 1px solid rgba(255,255,255,0.05);
}
.timer-time { font-size: 1.8rem; font-weight: 700; display: block; line-height: 1; }
.timer-label { font-size: 0.6rem; color: #94a3b8; margin-top: 5px; display: block; }
.timer-separator { font-size: 1.5rem; color: #94a3b8; padding-bottom: 1rem; }

/* --- PODIUM SECTION (FIXED & MATCHING IMAGE) --- */
.podium {
    display: flex;
    flex-direction: row; /* Side-by-side on desktop */
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center; /* Center them vertically relative to each other */
    gap: 1.5rem;
    margin-top: 2rem;
    width: 100%;
}

.podium-place {
    background: var(--bg-deep); /* Darker background like image */
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    width: 300px; /* Slightly wider */
    min-width: 280px;
    position: relative;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.podium-place:hover {
    transform: translateY(-5px);
}

/* Rank Badges/Titles styling to match image text */
.podium-rank-badge {
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: block;
    position: static; /* Reset absolute positioning */
    transform: none;
    width: auto;
    height: auto;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* --- 1ST PLACE (CENTER - GOLD) --- */
.podium-place.first {
    order: 2; /* Middle */
    height: 450px; /* Taller */
    border: 2px solid #fbbf24; /* Full Gold Border */
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.15), inset 0 0 20px rgba(251, 191, 36, 0.05);
    z-index: 2;
}
.podium-place.first .podium-rank-badge { color: #fbbf24; }
.podium-place.first .prize-tag { background: transparent; color: #a855f7; font-size: 1.5rem; font-weight: 900; }

/* --- 2ND PLACE (LEFT - SILVER) --- */
.podium-place.second {
    order: 1; /* Left */
    height: 380px;
    border: 1px solid rgba(255, 255, 255, 0.5); /* Silver/White Border */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}
.podium-place.second .podium-rank-badge { color: #e2e8f0; }
.podium-place.second .prize-tag { background: transparent; color: #a855f7; font-size: 1.3rem; font-weight: 900; }

/* --- 3RD PLACE (RIGHT - BRONZE) --- */
.podium-place.third {
    order: 3; /* Right */
    height: 380px;
    border: 1px solid rgba(217, 119, 6, 0.5); /* Bronze/Orange Border */
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.1);
}
.podium-place.third .podium-rank-badge { color: #d97706; }
.podium-place.third .prize-tag { background: transparent; color: #a855f7; font-size: 1.3rem; font-weight: 900; }


/* --- MOBILE/TABLET BREAKPOINT --- */
@media (max-width: 1024px) {
    .podium {
        flex-direction: column; /* Stack vertically */
        align-items: center;
        gap: 1.5rem;
    }

    .podium-place {
        /* FIX: WIDER ON MOBILE */
        width: 95% !important; 
        max-width: 500px !important; /* Increased from 320px */
        min-width: 0;
        height: auto !important; /* Auto height fits content */
        padding: 2rem;
    }

    /* Mobile Ordering: 1st Place on Top */
    .podium-place.first {
        order: 1;
        margin-bottom: 0.5rem;
        transform: scale(1); /* Reset scale */
    }
    .podium-place.second { order: 2; }
    .podium-place.third { order: 3; }
}

.crown-icon { font-size: 3rem; color: var(--gold); margin-bottom: 0.5rem; filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.5)); }
.player-avatar-placeholder {
    width: 80px; height: 80px; border-radius: 50%; background: #1e293b; margin: 0 auto 1rem;
    display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700;
    border: 3px solid rgba(255,255,255,0.1); box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.player-avatar-placeholder.gold { border-color: var(--gold); background: rgba(251, 191, 36, 0.1); color: var(--gold); }
.player-name { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.5rem; }
.wagered-amount { font-family: monospace; color: #94a3b8; margin-bottom: 1rem; font-size: 1.1rem; }
.prize-tag { 
    display: inline-block; padding: 0.5rem 1rem; border-radius: 20px; font-weight: 700; font-size: 0.9rem;
    background: rgba(255,255,255,0.1); 
}
.prize-tag.gold { background: var(--gold); color: #000; }
.prize-tag.silver { background: var(--silver); color: #000; }
.prize-tag.bronze { background: var(--bronze); color: #fff; }

/* --- Table --- */
.leaderboard-table {
    background: var(--bg-panel); backdrop-filter: var(--glass-blur);
    border: var(--glass-border); border-radius: 24px; overflow: hidden; margin-bottom: auto;
}
table { width: 100%; border-collapse: collapse; }
th { 
    text-align: left; padding: 1.5rem; color: #94a3b8; font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.05); background: rgba(0,0,0,0.2);
}
td { padding: 1.2rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.03); }
.rank-number { font-weight: 700; color: #94a3b8; }
.player-cell { display: flex; align-items: center; gap: 1rem; font-weight: 600; }
.table-avatar { 
    width: 32px; height: 32px; background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem;
}
.prize-pill { background: rgba(16, 185, 129, 0.1); color: #10b981; padding: 4px 12px; border-radius: 12px; font-size: 0.85rem; font-weight: 600; }

/* --- Footer --- */
.footer { margin-top: 4rem; padding-bottom: 2rem; }
.footer-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent); margin-bottom: 2rem; }
.footer-content { text-align: center; color: #64748b; font-size: 0.85rem; display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.footer-brand { font-size: 0.9rem; letter-spacing: 1px; text-transform: uppercase; opacity: 0.9; display: flex; align-items: center; gap: 10px; }
.footer-bot-logo { height: 30px; width: auto; } 
.footer-brand strong { color: #fff; font-weight: 700; }
.footer-links { display: flex; gap: 1.5rem; font-size: 0.8rem; }
.footer-links a { color: #64748b; text-decoration: none; transition: color 0.3s; }
.footer-links a:hover { color: var(--primary); }
.footer-copyright { font-size: 0.75rem; opacity: 0.6; }

/* --- Menu Overlay (SCROLL FIXES) --- */
.menu-overlay {
    position: fixed; top: 0; right: -100%; width: 400px; height: 100%;
    background: #0f172a; border-left: 1px solid rgba(255,255,255,0.1);
    z-index: 3000; transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column; /* CRITICAL for scrolling */
}
.menu-overlay.active { right: 0; }
.menu-header { padding: 2rem; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.menu-title { font-weight: 900; letter-spacing: 2px; font-size: 1.2rem; }
.menu-close { background: none; border: none; color: white; font-size: 2rem; cursor: pointer; }

/* REPLACED: Vertical Menu Tabs */
.menu-tabs { 
    display: flex; 
    flex-direction: column; /* This stacks them */
    padding: 1.5rem; 
    gap: 15px; 
    overflow-y: auto; 
    flex-shrink: 0; 
}

/* REPLACED: Menu Tab Styling */
.menu-tab { 
    background: rgba(255,255,255,0.05); 
    border: none; 
    color: #94a3b8;
    padding: 15px 20px; /* Bigger touch area */
    border-radius: 12px; 
    cursor: pointer; 
    transition: 0.3s; 
    font-weight: 700;
    text-align: left; /* Align text left */
    width: 100%; /* Full width */
    font-size: 1rem;
    border: 1px solid transparent;
}
.menu-tab:hover { background: rgba(255,255,255,0.1); }
.menu-tab.active { background: var(--primary); color: white; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3); }

/* NEW: Signup Button Style */
.signup-nwr-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #10b981, #059669);
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 1px;
    margin-top: 10px;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
    transition: 0.3s;
    border: 1px solid rgba(255,255,255,0.2);
}
.signup-nwr-btn:hover { transform: translateY(-2px); box-shadow: 0 0 25px rgba(16, 185, 129, 0.5); }


.menu-content {
    flex: 1; /* Takes remaining height */
    overflow: hidden; /* Contains the scrollable tab */
    display: flex; 
    flex-direction: column;
}

/* --- API Warning Box --- */
.api-warning-box {
    background: rgba(234, 179, 8, 0.1); /* Amber Tint */
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #fef08a; /* Light Yellow Text */
    padding: 1rem 1.5rem;
    margin: 1.5rem auto 0; /* Spacing below timer */
    border-radius: 12px;
    max-width: 700px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: fadeIn 0.5s ease-in-out;
}

.api-warning-box i {
    font-size: 1.4rem;
    color: #eab308; /* Bright Amber Icon */
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .api-warning-box {
        flex-direction: column;
        gap: 8px;
        font-size: 0.85rem;
        width: 90%;
    }
}

/* SCROLLABLE CONTENT AREA */
.tab-content { 
    padding: 0 2rem 2rem; 
    display: none; 
    flex: 1; 
    overflow-y: auto; /* Enable scroll inside tabs */
    -webkit-overflow-scrolling: touch; /* Smooth scroll for iOS */
}
.tab-content.active { display: block; animation: fadeUp 0.4s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* --- SOCIAL TAB --- */
.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.social-card {
    background: rgba(255,255,255,0.05); border-radius: 16px; padding: 1.5rem;
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    text-decoration: none; color: white; transition: 0.3s; border: 1px solid transparent;
}
.social-card i { font-size: 1.8rem; margin-bottom: 0.2rem; }
.social-card span { font-size: 0.9rem; font-weight: 600; }
.social-card:hover { transform: translateY(-5px); }
.social-card.kick:hover { background: rgba(0, 225, 0, 0.1); border-color: #00E701; color: #00E701; }
.social-card.twitter:hover { background: rgba(29, 161, 242, 0.1); border-color: #1DA1F2; color: #1DA1F2; }
.social-card.discord:hover { background: rgba(88, 101, 242, 0.1); border-color: #5865F2; color: #5865F2; }
.social-card.instagram:hover { background: rgba(225, 48, 108, 0.1); border-color: #E1306C; color: #E1306C; }

.discord-connect-box {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.1), rgba(88, 101, 242, 0.05));
    border: 1px solid rgba(88, 101, 242, 0.3); border-radius: 16px; padding: 1.5rem; text-align: center;
}
.connect-header { color: #5865F2; font-weight: 700; letter-spacing: 1px; font-size: 0.9rem; margin-bottom: 1rem; }
.discord-btn {
    background: #5865F2; color: white; border: none; padding: 12px 24px; border-radius: 30px;
    font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: 0.2s;
}
.discord-btn:hover { transform: scale(1.05); box-shadow: 0 5px 20px rgba(88,101,242,0.4); }

/* --- REWARDS STYLES --- */
.rewards-payouts { background: rgba(255,255,255,0.02); border-radius: 16px; padding: 1rem; margin-bottom: 1.5rem; border: 1px solid rgba(255,255,255,0.05); }
.rewards-payouts-title { text-align: center; font-weight: 700; margin-bottom: 1rem; color: #fff; }
.rewards-payout-item { 
    display: flex; justify-content: space-between; padding: 0.8rem; 
    border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.9rem;
}
.rewards-payout-item:last-child { border-bottom: none; }
.rewards-wager { color: #94a3b8; }
.rewards-tip { color: var(--gold); font-weight: 700; }

.rewards-requirements { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); border-radius: 16px; padding: 1rem; }
.rewards-requirements-title { color: #f87171; font-weight: 700; text-align: center; margin-bottom: 0.8rem; }
.rewards-requirement { display: flex; gap: 0.5rem; font-size: 0.85rem; margin-bottom: 0.5rem; color: #fecaca; }
.rewards-highlight { color: #fff; font-weight: 700; }

/* --- PRIZES STYLES --- */
.prizes-container { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1.5rem; }
.prize-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.2rem; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid transparent;
}
.prize-card.rank-1 { background: linear-gradient(90deg, rgba(251, 191, 36, 0.1), transparent); border-color: rgba(251, 191, 36, 0.3); }
.prize-card.rank-2 { border-color: rgba(148, 163, 184, 0.3); }
.prize-card.rank-3 { border-color: rgba(180, 83, 9, 0.3); }

.rank-icon { font-size: 1.5rem; }
.rank-title { font-weight: 700; font-size: 1rem; color: white; }
.rank-amount { font-weight: 800; font-size: 1.2rem; }
.prize-note { font-size: 0.75rem; color: #64748b; text-align: center; font-style: italic; }

/* --- CHALLENGES STYLES --- */
.challenge-card-styled {
    border-radius: 16px; overflow: hidden; position: relative; margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.1); transition: 0.3s;
}
.challenge-card-styled:hover { transform: translateY(-5px); }
.bg-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 5px; }

.hacksaw .bg-overlay { background: #00d1ff; box-shadow: 0 0 20px #00d1ff; }
.nolimit .bg-overlay { background: #fff; box-shadow: 0 0 20px #fff; }
.pragmatic .bg-overlay { background: #ff7b00; box-shadow: 0 0 20px #ff7b00; }

.challenge-info { padding: 1.5rem; background: rgba(20, 20, 35, 0.8); }
.provider-tag { font-size: 0.7rem; font-weight: 700; color: #94a3b8; margin-bottom: 0.5rem; letter-spacing: 1px; }
.challenge-info h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.5rem; }
.challenge-info p { font-size: 0.9rem; color: #94a3b8; margin-bottom: 1rem; }
.prize-badge { display: inline-block; background: var(--primary); color: white; padding: 4px 12px; border-radius: 4px; font-size: 0.8rem; font-weight: 700; }

/* --- MODAL (Hidden by default!) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(5px);
    z-index: 5000;
    display: none; 
    align-items: center; justify-content: center;
}
.modal-container {
    background: #0f172a; border: 1px solid rgba(255,255,255,0.1);
    width: 90%; max-width: 600px; max-height: 80vh; border-radius: 16px;
    display: flex; flex-direction: column; box-shadow: 0 0 30px rgba(0,0,0,0.5);
}
.modal-header {
    padding: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h2 { font-size: 1.2rem; font-weight: 700; color: #fff; }
.modal-close { background: none; border: none; color: #94a3b8; font-size: 1.5rem; cursor: pointer; }
.modal-content { padding: 1.5rem; overflow-y: auto; color: #cbd5e1; line-height: 1.6; }
.modal-content strong { color: #fff; }

/* New Loading Screen Animation */
.loading-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: #050507; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
}

.loading-icons i {
    font-size: 4rem;
    color: var(--primary);
    animation: pulseGlitch 1.5s infinite ease-in-out;
}

@keyframes pulseGlitch {
    0% { transform: scale(1); opacity: 1; text-shadow: 0 0 0px var(--primary); }
    50% { transform: scale(1.1); opacity: 0.7; text-shadow: 3px 0px 5px #ff0000, -3px 0px 5px #0000ff; }
    100% { transform: scale(1); opacity: 1; text-shadow: 0 0 0px var(--primary); }
}

.loading-text {
    font-size: 1rem;
    letter-spacing: 5px;
    color: #00d4ff;
    margin-top: 20px;
    font-weight: 900;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0.3; }
}

.live-stream-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 5000; display: none; align-items: center; justify-content: center; }
.live-stream-container.active { display: flex; }
.live-stream-wrapper { width: 90%; max-width: 1000px; aspect-ratio: 16/9; position: relative; background: #000; }
.live-stream-iframe { width: 100%; height: 100%; border: none; }
.live-stream-close { position: absolute; top: -40px; right: 0; color: white; background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.live-stream-header { position: absolute; top: -30px; left: 0; color: white; display: flex; gap: 10px; align-items: center; font-weight: 700; }