/* CSS Variables for Marions Leaderboard Design System */
:root {
    --primary: #8a2be2;
    --primary-hover: #9d4edd;
    --secondary: #00d1ff;
    --gold: #ffcc00;
    --discord: #5865F2;
    --primary-dim: #6a1bb2;
    --background: #0f111a;
    --surface: #1a1d2d;
    --surface-light: #252a3f;
    --text-primary: #ffffff;
    --text-secondary: #b0b3c1;
    --accent: #00d1ff;
    /* Accent cyan */
    --gold: #f8a010;
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(26, 29, 45, 0.7);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--background);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.font-heading {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 10px 40px -10px rgba(138, 43, 226, 0.3);
}

/* Header Styles */
nav {
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--primary), var(--gold), var(--primary), transparent) 1;
    background: rgba(15, 17, 26, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    height: 85px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    width: 100%;
    margin: 0 auto;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
}

.logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-name {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.kick-icon:hover {
    color: #53fc18;
}

.x-icon:hover {
    color: #fff;
}

.insta-icon:hover {
    color: #e1306c;
}

.yt-icon:hover {
    color: #ff0000;
}

.mobile-menu-btn {
    display: none;
}

.login-btn {
    background: var(--primary);
    color: #fff;
    padding: 10px 24px;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 700;
    border: none;
    cursor: not-allowed;
    position: relative;
    transition: all 0.3s ease;
}

.login-btn .tooltip {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #000;
    color: #fff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.login-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Footer Section */
footer {
    padding: 80px 0 40px;
    background: #070912;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: #fff;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.glow-text {
    color: #ffffff;
    text-shadow: 0.05em 0.05em 0px rgba(0, 0, 0, 0.4);
}

/* Hero Section Refinements */
.hero-wrapper {
    background: linear-gradient(180deg, rgba(15, 17, 26, 0.4) 0%, rgba(7, 9, 18, 0.9) 100%);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--primary), var(--gold), var(--primary), transparent) 1;
    position: relative;
    overflow: hidden;
}

/* Game Icons Floating Animations */
.game-icon-float {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    filter: blur(2px) drop-shadow(0 0 30px rgba(138, 43, 226, 0.3));
    opacity: 0.15;
    animation: fade-float 10s ease-in-out infinite;
    object-fit: contain;
}

@keyframes fade-float {

    0%,
    100% {
        opacity: 0;
        transform: translateY(0) rotate(0deg);
    }

    20%,
    80% {
        opacity: 0.2;
    }

    50% {
        opacity: 0.35;
        transform: translateY(-40px) rotate(5deg);
    }
}

.game-icon-left {
    left: 5%;
    top: 30%;
    width: 256px;
    animation-delay: 0s;
}

.game-icon-right {
    right: 5%;
    top: 40%;
    width: 256px;
    animation-delay: 2s;
}

.game-icon-behind {
    position: absolute;
    left: 50%;
    top: 40%;
    width: 600px;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    filter: blur(40px);
    opacity: 0;
    animation: center-pop 12s ease-in-out infinite;
}

@keyframes center-pop {

    0%,
    85%,
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    90% {
        opacity: 0.25;
        transform: translate(-50%, -50%) scale(1.1);
    }

    95% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Developer Credit Hover Styling */
.dev-credit:hover .dev-name,
.dev-credit:hover .fa-discord {
    color: var(--discord) !important;
    text-shadow: 0 0 15px rgba(88, 101, 242, 0.5);
    transform: scale(1.05);
    transition: all 0.3s ease;
}

/* Premium Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0b13;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.preloader-logo {
    width: 80px;
    height: 80px;
    animation: breathing 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(138, 43, 226, 0.2));
}

@keyframes breathing {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.loader-track {
    width: 300px;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: visible;
    position: relative;
    border: none;
}

.loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, transparent, var(--primary), var(--gold), var(--primary), transparent);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.3), 0 0 40px rgba(138, 43, 226, 0.2);
    border-radius: 10px;
    transition: width 0.4s ease;
}

.loader-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 2px;
    background: white;
    box-shadow: 0 0 20px white;
    filter: blur(4px);
    opacity: 0.3;
}

/* Ensure body doesn't scroll while loading */
body.loading {
    overflow: hidden !important;
}

/* Leaderboard Specific Styles */
.glow-text-primary {
    color: var(--primary);
    text-shadow: 0.05em 0.05em 0px rgba(0, 0, 0, 0.4);
}

.podium-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.podium-card:hover {
    transform: translateY(-10px) scale(1.02);
}

@keyframes pop {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-pop {
    animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.timer-unit {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 100px;
}

/* Compact Kick Footer Bar */
.kick-profile-section {
    position: relative;
    padding-top: 20px;
    width: 100%;
}

.kick-card {
    background: rgba(83, 252, 24, 0.04);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(83, 252, 24, 0.1);
    border-radius: 12px;
    padding: 10px 14px;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 60px;
}

.kick-card:hover {
    border-color: #53fc18;
    background: rgba(83, 252, 24, 0.08);
}

.kick-avatar {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    padding: 2px;
    background: #53fc18;
    flex-shrink: 0;
}

.kick-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #000;
}

.status-dot {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #444;
    border: 2px solid #0a0b13;
}

.status-dot.online {
    background: #53fc18;
    box-shadow: 0 0 8px #53fc18;
}

.status-text {
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.kick-username {
    font-size: 10px;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    line-height: 1;
}

.kick-viewers-tag {
    background: rgba(83, 252, 24, 0.2);
    color: #53fc18;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 8px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 3px;
}

.kick-followers-pill {
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.kick-followers-label {
    font-size: 6px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    font-weight: 900;
}

.kick-followers-count {
    font-size: 10px;
    font-weight: 900;
    color: #53fc18;
}

.kick-follow-btn-compact {
    width: 28px;
    height: 28px;
    background: #53fc18;
    color: #000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.kick-follow-btn-compact:hover {
    background: #fff;
    transform: scale(1.1);
}

/* --- Responsive Design System --- */

/* Tablet & Smaller (1024px) */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 20px;
    }

    .nav-links {
        gap: 15px;
    }

    .container {
        padding: 0 15px;
    }
}

/* Mobile Header & General Layout (768px) */
@media (max-width: 768px) {
    .nav-container {
        height: 70px;
        padding: 0 15px;
    }

    /* Hide desktop nav components */
    .nav-links, 
    .nav-actions .social-icons,
    .nav-actions .login-btn {
        display: none !important;
    }

    /* Force show mobile menu button */
    .mobile-menu-btn {
        display: flex !important;
        width: 45px;
        height: 45px;
        align-items: center;
        justify-content: center;
        background: rgba(138, 43, 226, 0.15);
        border: 1px solid rgba(138, 43, 226, 0.3);
        border-radius: 12px;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .mobile-menu-btn:hover {
        background: rgba(138, 43, 226, 0.3);
        border-color: var(--primary);
    }

    .site-name {
        font-size: 1.2rem;
    }

    .logo-circle {
        width: 35px;
        height: 35px;
    }

    /* Hero Section Scaling */
    main {
        padding-top: 70px !important;
    }

    .hero-wrapper {
        padding: 60px 0 !important;
    }

    .hero-wrapper h1 {
        font-size: 2.8rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }

    .hero-wrapper p {
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
    }

    .game-icon-float {
        width: 100px !important;
        opacity: 0.1 !important;
    }

    /* Button Stacking */
    .hero-wrapper .flex.gap-6 {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .hero-wrapper .flex.gap-6 a {
        width: 100%;
        padding: 14px !important;
        font-size: 0.85rem !important;
        justify-content: center;
    }

    /* Shuffle Card Responsive */
    #shuffle-section {
        padding: 40px 0 !important;
    }

    #shuffle-section > .relative {
        border-radius: 1rem !important;
        padding: 30px 20px !important;
    }

    /* Footer Responsive */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .footer-col:last-child {
        border-bottom: none;
    }

    .footer-col.col-span-2 {
        grid-column: span 1 / span 1 !important;
    }

    .footer-col p {
        max-width: 300px;
        margin: 0 auto;
        opacity: 0.6;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding-bottom: 30px;
    }

    /* Leaderboard Page Specifics */
    .solid-heading {
        font-size: 3rem !important;
        letter-spacing: -1px !important;
    }

    /* Podium Stacking */
    .podium-container {
        flex-direction: column !important;
        gap: 40px !important;
        padding: 0 10px;
    }

    .rank-1-border {
        order: -1 !important;
        transform: scale(1) !important;
    }

    .rank-2-border, .rank-3-border {
        transform: scale(1) !important;
    }

    /* Timer Stacking */
    .timer-container {
        gap: 10px !important;
        flex-wrap: wrap;
        justify-content: center;
    }

    .timer-unit {
        min-width: 75px;
        padding: 0.8rem !important;
    }

    .timer-unit span:first-child {
        font-size: 1.5rem !important;
    }

    /* Modern Card-style Tables for Mobile */
    table thead {
        display: none;
    }

    table, tbody, tr, td {
        display: block;
        width: 100%;
    }

    tr {
        background: rgba(255, 255, 255, 0.02);
        margin-bottom: 25px;
        padding: 20px !important;
        border-radius: 1.5rem;
        border: 1px solid rgba(255, 255, 255, 0.05);
        position: relative;
    }

    td {
        padding: 12px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-align: left !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    td:last-child {
        border-bottom: none;
    }

    /* Column Specifics in Mobile */
    td:nth-of-type(1)::before { content: "RANK"; font-size: 8px; font-weight: 900; color: rgba(255,255,255,0.3); }
    td:nth-of-type(2) {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
    td:nth-of-type(2) div {
        flex-direction: column;
        gap: 8px;
    }
    td:nth-of-type(2)::before { display: none; }
    td:nth-of-type(3)::before { content: "WAGERED"; font-size: 10px; font-weight: 900; color: rgba(255,255,255,0.3); letter-spacing: 1px; }
    td:nth-of-type(4)::before { content: "REWARD"; font-size: 10px; font-weight: 900; color: var(--gold); letter-spacing: 1px; }

    td:nth-of-type(3), td:nth-of-type(4) {
        background: rgba(255, 255, 255, 0.02);
        padding: 15px 20px !important;
        border-radius: 12px;
        margin-top: 5px;
    }

    .kick-card {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        height: auto;
        border-radius: 1.5rem;
    }

    .kick-followers-pill {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        padding: 10px 15px;
    }
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: #0f111a;
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    opacity: 0;
    visibility: hidden;
}

.mobile-nav-overlay.active {
    right: 0;
    opacity: 1;
    visibility: visible;
}

.mobile-nav-close {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 25px;
    text-align: center;
    margin-bottom: 40px;
}

.mobile-nav-link {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    color: white;
    text-decoration: none;
    font-family: var(--font-heading);
    letter-spacing: 2px;
}

.mobile-nav-socials {
    display: flex;
    gap: 20px;
    font-size: 1.5rem;
}
