/* ============================================================
   Nomade Bot — Premium Futuristic SaaS CSS  ·  2026 Edition
   Cyberpunk-Inspired · Glassmorphism · Neon Accents
   Mobile Optimized · Clean & Structured
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
    /* Colors - Premium Dark Theme */
    --bg: #030303;
    --bg-surface: #0f0f10;
    --bg-gradient: radial-gradient(circle at 50% 0%, #1a1d2e 0%, #0f0f10 50%, #030303 100%);

    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --primary-glow: rgba(59, 130, 246, 0.25);
    --primary-glow-sm: rgba(59, 130, 246, 0.15);

    --neon-blue: #60a5fa;
    --neon-glow: rgba(96, 165, 250, 0.4);
    --neon-glow-sm: rgba(96, 165, 250, 0.2);

    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.35);

    --gold: #FFD700;
    --gold-dark: #FFA500;
    --gold-glow: rgba(255, 215, 0, 0.35);
    --gold-glow-sm: rgba(255, 215, 0, 0.18);

    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --error: #ef4444;
    --error-glow: rgba(239, 68, 68, 0.3);
    --warning: #f59e0b;

    /* Glass - Enhanced */
    --glass: rgba(255, 255, 255, 0.05);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --glass-active: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-md: rgba(255, 255, 255, 0.12);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --backdrop-blur: blur(20px);
    --backdrop-blur-lg: blur(30px);

    /* Text */
    --text-main: #ffffff;
    --text-secondary: #e5e7eb;
    --text-muted: #b3b3b3;
    --text-dim: #9ca3af;
    --text-accent: #93c5fd;

    /* Spacing  (8px grid - enhanced scale) */
    --s1: 0.5rem;
    --s2: 0.75rem;
    --s3: 1rem;
    --s4: 1.5rem;
    --s5: 2rem;
    --s6: 2.5rem;
    --s7: 3rem;
    --s8: 4rem;
    --s9: 5rem;
    --s10: 6rem;

    /* Layout spacing */
    --card-gap: 1.25rem;
    --section-gap: 3rem;
    --content-gap: 1rem;

    /* Radius */
    --r-sm: 0.5rem;
    --r-md: 0.75rem;
    --r-lg: 1rem;
    --r-xl: 1.5rem;
    --r-2xl: 1.75rem;

    /* Typography */
    --ls-tight: -0.03em;
    --ls-heading: -0.015em;
    --ls-normal: 0;

    /* Accessibility */
    --focus-ring: 2px solid var(--primary);

    /* ── Animation System ─────────────────────────────────── */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);

    /* Duration tiers */
    --dur-xs: 80ms;
    --dur-sm: 150ms;
    --dur-md: 280ms;
    --dur-lg: 420ms;
    --dur-xl: 600ms;

    /* Shorthand transitions */
    --t-fast: var(--dur-sm) var(--ease-smooth);
    --t-base: var(--dur-md) var(--ease-smooth);
    --t-slow: var(--dur-lg) var(--ease-out);
    --t-spring: var(--dur-lg) var(--ease-spring);

    /* Shadows */
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.38);
    --shadow-xl: 0 16px 56px rgba(0, 0, 0, 0.48);

    --shadow-glow-sm: 0 0 16px rgba(79, 124, 255, 0.25);
    --shadow-glow: 0 0 28px rgba(79, 124, 255, 0.38);
    --shadow-glow-lg: 0 0 48px rgba(79, 124, 255, 0.5);

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.05);
    --shadow-card-hover: 0 14px 44px rgba(0, 0, 0, 0.44), 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 28px rgba(79, 124, 255, 0.14);

    /* Layout */
    --container-max: 1280px;
    --nav-height: 64px;

    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100dvh;
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-break: break-word;
    overflow-wrap: break-word;
    overflow-x: hidden;
}

/* ============================================================
   FIX: Removed the entire will-change hover block.
   Setting will-change on :hover causes the browser to promote
   and demote GPU compositing layers mid-scroll, which is the
   direct cause of the white flash / blink effect.
   will-change is now only applied to the static background
   particles layer below, where it belongs.
   ============================================================ */


/* ============================================================
   3. LAYOUT
   ============================================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(var(--s3), 4vw, var(--s5));
    padding-left: max(clamp(var(--s3), 4vw, var(--s5)), var(--safe-left));
    padding-right: max(clamp(var(--s3), 4vw, var(--s5)), var(--safe-right));
    width: 100%;
}

.container-wrapper {
    isolation: isolate;
}

/* ── Background glows ────────────────────────────────────── */
/* Enhanced animated glow effects with neon cyberpunk aesthetic */
.glow {
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
    filter: blur(120px);
    border-radius: 50%;
    top: -150px;
    left: -150px;
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
    contain: strict;
    transform: translateZ(0);
    animation: glow-pulse 8s ease-in-out infinite;
}

.glow.second {
    top: auto;
    bottom: -80px;
    left: auto;
    right: -150px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    animation: glow-pulse 10s ease-in-out infinite reverse;
}

.glow.third {
    top: 50%;
    left: 50%;
    margin: -300px 0 0 -300px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.12) 0%, transparent 70%);
    opacity: 0.4;
    animation: glow-drift 12s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; transform: translateZ(0) scale(1); }
    50% { opacity: 0.7; transform: translateZ(0) scale(1.05); }
}

@keyframes glow-drift {
    0%, 100% { transform: translateZ(0) translate(0, 0); }
    25% { transform: translateZ(0) translate(20px, -20px); }
    50% { transform: translateZ(0) translate(-10px, 10px); }
    75% { transform: translateZ(0) translate(-20px, -10px); }
}

/* FIX: particles gets will-change + translateZ here (static layer, never toggled on hover),
   so it lives permanently on its own GPU compositing layer
   without any promotion/demotion during scroll. */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    transform: translateZ(0);
    will-change: transform;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--neon-blue);
    border-radius: 50%;
    opacity: 0.4;
    box-shadow: 0 0 6px var(--neon-glow-sm);
}

/* ============================================================
   CUSTOM SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-surface);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 10px;
    border: 2px solid var(--bg-surface);
    box-shadow: 0 0 10px var(--primary-glow-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--accent-light) 100%);
    box-shadow: 0 0 15px var(--neon-glow-sm);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-surface);
}


/* ============================================================
   4. TYPOGRAPHY
   ============================================================ */
h1 {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: var(--ls-tight);
    margin-bottom: var(--s3);
    color: var(--text-main);
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.25rem, 3.5vw, 2rem);
    font-weight: 700;
    letter-spacing: var(--ls-heading);
    margin-bottom: var(--s2);
    color: var(--text-main);
    line-height: 1.25;
}

h3 {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 600;
    letter-spacing: var(--ls-heading);
    margin-bottom: var(--s2);
    color: var(--text-main);
    line-height: 1.3;
}

p {
    font-size: clamp(0.95rem, 1.5vw, 1rem);
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: var(--s3);
    letter-spacing: var(--ls-normal);
}

small {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.subtitle {
    font-size: clamp(0.875rem, 2.5vw, 1.125rem);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.7;
}

/* Lists */
ul, ol {
    margin: var(--s2) 0 var(--s3) var(--s3);
    color: var(--text-secondary);
}

ul li, ol li {
    margin-bottom: var(--s2);
    line-height: 1.7;
}

ul > li::marker {
    color: var(--primary);
    font-weight: 600;
}

ol > li::marker {
    color: var(--primary);
    font-weight: 600;
}

/* Code Blocks */
code {
    background: rgba(79, 124, 255, 0.08);
    color: var(--primary-light);
    padding: 2px 6px;
    border-radius: var(--r-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    letter-spacing: -0.02em;
}

pre {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg);
    padding: var(--s3);
    overflow-x: auto;
    margin: var(--s3) 0;
}

pre code {
    background: transparent;
    color: var(--text-main);
    padding: 0;
}

i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-base) var(--ease-out);
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

main {
    position: relative;
}

main > section {
    scroll-margin-top: calc(var(--nav-height) + 16px);
    animation: section-reveal 0.6s var(--ease-out) both;
}

/* Scroll Reveal Animation Class */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

@keyframes section-reveal {
    from { opacity: 0; }
    to   { opacity: 1; }
}

main > section + section {
    margin-top: clamp(var(--s8), 12vh, var(--s10));
    padding-top: clamp(var(--s6), 8vh, var(--s8));
    position: relative;
}

.card:focus-within {
    border-color: rgba(79, 124, 255, 0.3);
    box-shadow: var(--shadow-card), 0 0 20px rgba(79, 124, 255, 0.1);
}


/* ============================================================
   5. NAVIGATION
   ============================================================ */
.nav-bar {
    background: rgba(3, 3, 3, 0.8);
    backdrop-filter: var(--backdrop-blur-lg) saturate(180%);
    -webkit-backdrop-filter: var(--backdrop-blur-lg) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-top: var(--safe-top);
    transition: background var(--t-base), border-color var(--t-base);
    isolation: isolate;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: var(--s2) var(--s3);
    flex-wrap: wrap;
    min-height: 56px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    min-height: 44px;
    border-radius: var(--r-lg);
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    transition:
        color var(--t-fast),
        background var(--t-fast),
        transform var(--t-fast),
        box-shadow var(--t-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--neon-blue);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width var(--t-base) var(--ease-out);
    box-shadow: 0 0 8px var(--neon-glow-sm);
}

.nav-link:hover {
    background: var(--glass-hover);
    color: var(--text-main);
    transform: translateY(-1px);
}

.nav-link:hover::after {
    width: 70%;
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav-link.active::after {
    display: none;
}

.nav-link.nav-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    box-shadow: 0 0 20px var(--neon-glow), 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
}

.nav-link.nav-cta::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: calc(var(--r-lg) + 1px);
    background: linear-gradient(135deg, var(--neon-blue), var(--accent));
    opacity: 0;
    z-index: -1;
    filter: blur(8px);
    transition: opacity var(--t-base);
}

.nav-link.nav-cta:hover::before {
    opacity: 0.6;
}

.nav-link.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--neon-glow), 0 8px 20px rgba(0, 0, 0, 0.4);
}

.nav-link:active {
    transform: scale(0.96);
}

/* Accessibility: Focus States */
.nav-link:focus-visible,
.btn:focus-visible,
a:focus-visible,
.leaderboard-item:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 3px;
    z-index: 10;
}


/* ============================================================
   6. HERO SECTION
   ============================================================ */
.hero-section {
    text-align: center;
    padding: var(--s7) 0 var(--s6);
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 820px;
    margin: 0 auto;
    animation: hero-enter var(--dur-xl) var(--ease-out) both;
}

@keyframes hero-enter {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    letter-spacing: var(--ls-tight);
    margin: 0 auto var(--s3);
    max-width: 900px;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--accent-light) 60%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    animation-delay: 80ms;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.35rem);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto var(--s5);
    line-height: 1.72;
    padding: 0 var(--s2);
}

.hero-buttons {
    display: flex;
    gap: clamp(var(--s2), 2vw, var(--s3));
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--s4);
}

.hero-buttons .btn {
    min-width: 155px;
    padding: var(--s3) var(--s5);
    font-size: 1.05rem;
    font-weight: 700;
}

/* Hero Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: var(--s3);
    padding: var(--s3);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-xl);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    margin-top: var(--s4);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    contain: layout style;
}


/* Stats Overview - Enhanced */

.stats-overview {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

    gap: var(--s4);

    margin-top: var(--s5);

    max-width: 1000px;

    margin-left: auto;

    margin-right: auto;

}



.stat-card {

    position: relative;

    background: var(--glass);

    backdrop-filter: var(--backdrop-blur);

    -webkit-backdrop-filter: var(--backdrop-blur);

    border: 1px solid var(--glass-border);

    border-radius: var(--r-xl);

    padding: var(--s5);

    display: flex;

    align-items: center;

    gap: var(--s4);

    overflow: hidden;

    transition: all var(--t-base) var(--ease-out);

    box-shadow: var(--shadow-card);

}



.stat-card::before {

    content: '';

    position: absolute;

    inset: 0;

    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, transparent 50%, rgba(139, 92, 246, 0.08) 100%);

    opacity: 0;

    transition: opacity var(--t-base);

}



.stat-card:hover {

    transform: translateY(-8px);

    border-color: rgba(59, 130, 246, 0.3);

    box-shadow:

        0 20px 60px rgba(0, 0, 0, 0.4),

        0 12px 32px rgba(59, 130, 246, 0.15),

        0 0 0 1px rgba(59, 130, 246, 0.2),

        0 0 50px rgba(59, 130, 246, 0.15);

    background: rgba(255, 255, 255, 0.06);

}



.stat-card:hover::before {

    opacity: 1;

}



.stat-glow {

    position: absolute;

    inset: 0;

    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(96, 165, 250, 0.15) 0%, transparent 70%);

    opacity: 0;

    transition: opacity var(--t-fast);

    pointer-events: none;

}



.stat-card:hover .stat-glow {

    opacity: 1;

}



.stat-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 70px;

    height: 70px;

    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);

    border-radius: var(--r-lg);

    font-size: 1.75rem;

    color: #fff;

    flex-shrink: 0;

    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4), 0 0 30px rgba(59, 130, 246, 0.2);

    position: relative;

    z-index: 2;

}



.stat-icon::before {

    content: '';

    position: absolute;

    inset: -2px;

    border-radius: calc(var(--r-lg) + 2px);

    background: linear-gradient(135deg, var(--neon-blue), var(--accent));

    opacity: 0;

    z-index: -1;

    filter: blur(8px);

    transition: opacity var(--t-base);

}



.stat-card:hover .stat-icon::before {

    opacity: 0.6;

}



.stat-content {

    display: flex;

    flex-direction: column;

    gap: var(--s1);

    flex: 1;

    position: relative;

    z-index: 2;

}



.stat-number {

    font-size: clamp(2rem, 5vw, 2.75rem);

    font-weight: 800;

    color: var(--text-main);

    line-height: 1.1;

    background: linear-gradient(135deg, var(--text-main) 0%, var(--neon-blue) 100%);

    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;

    background-clip: text;

}



.stat-label {

    font-size: 0.95rem;

    font-weight: 600;

    color: var(--text-muted);

    text-transform: uppercase;

    letter-spacing: 0.05em;

}



/* Stats Page Specific Enhancements */

.stats-page .hero-section {

    padding: var(--s8) 0 var(--s7);

    position: relative;

}



.stats-page .hero-section::before {

    content: '';

    position: absolute;

    top: 50%;

    left: 50%;

    transform: translate(-50%, -50%);

    width: 600px;

    height: 600px;

    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);

    border-radius: 50%;

    z-index: -1;

    animation: hero-glow 8s ease-in-out infinite;

}



@keyframes hero-glow {

    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }

    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }

}



.hero-badge-animated {

    display: inline-flex;

    align-items: center;

    gap: var(--s2);

    padding: var(--s2) var(--s4);

    background: rgba(59, 130, 246, 0.15);

    border: 1px solid rgba(59, 130, 246, 0.4);

    border-radius: 999px;

    margin-bottom: var(--s4);

    font-size: 0.875rem;

    font-weight: 600;

    color: var(--neon-blue);

    text-transform: uppercase;

    letter-spacing: 0.1em;

    backdrop-filter: var(--backdrop-blur);

    -webkit-backdrop-filter: var(--backdrop-blur);

    animation: badge-float 3s ease-in-out infinite;

    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2), inset 0 0 20px rgba(59, 130, 246, 0.05);

}



.pulse-dot {

    width: 10px;

    height: 10px;

    background: var(--success);

    border-radius: 50%;

    box-shadow: 0 0 16px var(--success-glow), 0 0 8px var(--success);

    animation: pulse-dot 2s ease-in-out infinite;

}



@keyframes pulse-dot {

    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 16px var(--success-glow), 0 0 8px var(--success); }

    50% { opacity: 0.7; transform: scale(1.15); box-shadow: 0 0 24px var(--success-glow), 0 0 12px var(--success); }

}



@keyframes badge-float {

    0%, 100% { transform: translateY(0); }

    50% { transform: translateY(-4px); }

}



.stat-pulse-ring {

    position: absolute;

    inset: -4px;

    border-radius: var(--r-xl);

    border: 2px solid rgba(59, 130, 246, 0.4);

    opacity: 0;

    animation: stat-pulse 3s ease-in-out infinite;

    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);

}



@keyframes stat-pulse {

    0% { transform: scale(1); opacity: 0; }

    50% { transform: scale(1.08); opacity: 0.6; }

    100% { transform: scale(1.15); opacity: 0; }

}



.stat-card:nth-child(1) .stat-pulse-ring { animation-delay: 0s; }

.stat-card:nth-child(2) .stat-pulse-ring { animation-delay: 1s; }

.stat-card:nth-child(3) .stat-pulse-ring { animation-delay: 2s; }



.geometric-pattern {

    position: absolute;

    top: 50%;

    left: 50%;

    transform: translate(-50%, -50%);

    width: 400px;

    height: 400px;

    pointer-events: none;

    z-index: -1;

}



.geo-ring {

    position: absolute;

    border-radius: 50%;

    border: 1px solid rgba(59, 130, 246, 0.2);

    top: 50%;

    left: 50%;

    transform: translate(-50%, -50%);

}



.geo-ring.ring-1 {

    width: 200px;

    height: 200px;

    animation: geo-rotate 20s linear infinite;

}



.geo-ring.ring-2 {

    width: 300px;

    height: 300px;

    animation: geo-rotate 30s linear infinite reverse;

    border-color: rgba(139, 92, 246, 0.15);

}



.geo-ring.ring-3 {

    width: 400px;

    height: 400px;

    animation: geo-rotate 40s linear infinite;

    border-color: rgba(96, 165, 250, 0.1);

}



.geo-center {

    position: absolute;

    top: 50%;

    left: 50%;

    transform: translate(-50%, -50%);

    width: 100px;

    height: 100px;

    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);

    border-radius: 50%;

    animation: geo-pulse 4s ease-in-out infinite;

}



@keyframes geo-rotate {

    from { transform: translate(-50%, -50%) rotate(0deg); }

    to { transform: translate(-50%, -50%) rotate(360deg); }

}



@keyframes geo-pulse {

    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }

    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }

} 



.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--s2);
    gap: var(--s1);
    min-height: 70px;
}

.stat-number {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: clamp(0.7rem, 1.8vw, 0.85rem);
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Chart Container */
.chart-container {
    position: relative;
    width: 100%;
    min-height: 250px;
    max-height: 320px;
    margin-top: var(--s3);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--r-lg);
    padding: var(--s2);
    overflow: hidden;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: 300px;
}

/* Base Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s2);
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--r-lg);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    min-height: 48px;
    position: relative;
    overflow: hidden;
    transition: all var(--t-base) var(--ease-out);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Primary Button */
.btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4), 0 0 20px rgba(59, 130, 246, 0.2);
    position: relative;
    overflow: hidden;
}

.btn.primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--t-base);
}

.btn.primary:hover::before {
    opacity: 1;
}

.btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5), 0 0 30px rgba(59, 130, 246, 0.3);
}

.btn.primary:active {
    transform: translateY(-1px) scale(0.98);
}

/* Secondary Button */
.btn.secondary {
    background: var(--glass);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn.secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--t-base);
}

.btn.secondary:hover::before {
    opacity: 1;
}

.btn.secondary:hover {
    background: var(--glass-hover);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), 0 0 20px rgba(59, 130, 246, 0.1);
}

.btn.secondary:active {
    transform: translateY(-1px) scale(0.98);
}

/* Button Disabled State */
.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover,
.btn[disabled]:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* Button Focus State */
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--bg-base), 0 0 0 6px var(--primary);
}

/* Glow Effect Modifier */
.btn-glow {
    position: relative;
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--r-lg) + 2px);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0;
    z-index: -1;
    filter: blur(12px);
    transition: opacity var(--t-base);
}

.btn-glow:hover::before {
    opacity: 0.5;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.1) 0%, transparent 80%);
    opacity: 0;
    border-radius: var(--r-lg);
    pointer-events: none;
    transition: opacity var(--t-fast);
}

/* Join Button */
.btn-join {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s1);
    padding: 10px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--r-md);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    min-height: 40px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4), 0 0 20px rgba(16, 185, 129, 0.2);
    transition: all var(--t-base) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.btn-join::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--t-base);
}

.btn-join:hover::before {
    opacity: 1;
}

.btn-join:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5), 0 0 30px rgba(16, 185, 129, 0.3);
}

.btn-join:active {
    transform: translateY(-1px) scale(0.98);
}

/* Ranking Button */
.btn-ranking {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s1);
    padding: 10px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--r-md);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    min-height: 40px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #030303;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4), 0 0 20px rgba(255, 215, 0, 0.2);
    transition: all var(--t-base) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.btn-ranking::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--t-base);
}

.btn-ranking:hover::before {
    opacity: 1;
}

.btn-ranking:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.5), 0 0 30px rgba(255, 215, 0, 0.3);
}

.btn-ranking:active {
    transform: translateY(-1px) scale(0.98);
}

/* Hero Logo Container */
.hero-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--s4);
    position: relative;
}

.hero-logo-container .logo {
    width: clamp(96px, 20vw, 120px);
    height: clamp(96px, 20vw, 120px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(79, 124, 255, 0.25);
    position: relative;
    z-index: 2;
    animation: logo-float 4s var(--ease-in-out) infinite alternate;
    transition: transform var(--t-spring), box-shadow var(--t-slow);
    box-shadow: 0 8px 32px rgba(79, 124, 255, 0.15);
}

.hero-logo-container .logo img {
    width: clamp(84px, 17vw, 104px);
    height: clamp(84px, 17vw, 104px);
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

@keyframes logo-float {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}


/* ============================================================
   7. CARDS — Enhanced Glassmorphism with Neon Effects
   ============================================================ */

.card {
    background: var(--glass);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-xl);
    padding: clamp(var(--s3), 3vw, var(--s4));
    margin-bottom: var(--card-gap);
    box-shadow: var(--shadow-card);
    position: relative;
    z-index: 1;
    contain: layout style;
    transition:
        transform 420ms cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 420ms cubic-bezier(0.23, 1, 0.32, 1),
        border-color 280ms cubic-bezier(0.4, 0, 0.2, 1),
        background 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--r-xl);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, transparent 50%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 420ms cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.4),
        0 12px 32px rgba(59, 130, 246, 0.15),
        0 0 0 1px rgba(59, 130, 246, 0.2),
        0 0 40px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(255, 255, 255, 0.06);
}

.card:hover::before {
    opacity: 1;
}


/* ============================================================
   9. LEADERBOARD
   ============================================================ */

.leaderboard-container {
    margin-top: var(--s4);
}

.leaderboard-table {
    display: flex;
    flex-direction: column;
    gap: var(--s3);
}

/* FIX: Added contain:layout style to leaderboard items.
   Removed will-change and backface-visibility from base state.
   These were creating a compositing layer per-item (potentially
   dozens), overwhelming the GPU and causing scroll jank + flash. */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: clamp(var(--s3), 2.5vw, var(--s4));
    padding: clamp(var(--s3), 3vw, var(--s4));
    margin-bottom: 12px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    animation: slide-in 400ms var(--ease-out) both;
    contain: layout style;
    transition:
        transform 360ms var(--ease-out),
        box-shadow 360ms var(--ease-out),
        border-color 200ms var(--ease-smooth),
        background 200ms var(--ease-smooth);
    max-width: 100%;
}

.group-info {
    flex: 1;
    min-width: 0;
}

.group-info h3 {
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: var(--s1);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color var(--t-fast);
}

.leaderboard-item:hover .group-info h3 {
    color: var(--primary-light);
}

/* Premium Top 3 Ranks */
.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.08) 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(255, 215, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
    z-index: 3;
}

.leaderboard-item.rank-1::before {
    content: '👑';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}

.leaderboard-item.rank-1 .btn-join {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #0a0b0e;
    box-shadow: 0 4px 16px rgba(255, 165, 0, 0.4);
    font-weight: 700;
}

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.12) 0%, rgba(169, 169, 169, 0.06) 100%);
    border: 2px solid rgba(192, 192, 192, 0.35);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(192, 192, 192, 0.1);
    transform: scale(1.01);
    z-index: 2;
}

.leaderboard-item.rank-2::before {
    content: '🥈';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 1.3rem;
}

.leaderboard-item.rank-2 .btn-join {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.12) 0%, rgba(180, 110, 40, 0.06) 100%);
    border: 2px solid rgba(205, 127, 50, 0.35);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(205, 127, 50, 0.1);
    transform: scale(1.01);
    z-index: 2;
}

.leaderboard-item.rank-3::before {
    content: '🥉';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 1.3rem;
}

.leaderboard-item.rank-3 .btn-join {
    background: linear-gradient(135deg, #92400e 0%, #78350f 100%);
    box-shadow: 0 4px 12px rgba(146, 64, 14, 0.3);
}

/* Premium button sizing for all leaderboard items */
.leaderboard-item .btn-join {
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 120px;
    justify-content: center;
    letter-spacing: 0.02em;
}

/* ── Vote count & trend ─────────────────────────────────── */
.vote-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 100px;
    padding: var(--s2) var(--s3);
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
    transition: background var(--t-fast);
}

.leaderboard-item:hover .vote-count {
    background: rgba(255, 255, 255, 0.08);
}

.votes {
    font-size: clamp(1.1rem, 2.8vw, 1.4rem);
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.trend {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.2;
    transition: transform var(--t-fast);
}

.trend.up {
    color: var(--success);
    background: rgba(16, 185, 129, 0.12);
}

.trend.down {
    color: var(--error);
    background: rgba(239, 68, 68, 0.12);
}

/* ── Category tag ──────────────────────────────────────── */
.category-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(79, 124, 255, 0.12);
    color: var(--primary-light);
    letter-spacing: 0.02em;
    transition: background var(--t-fast), color var(--t-fast);
}

.leaderboard-item:hover .category-tag {
    background: rgba(79, 124, 255, 0.2);
}

/* ── No data placeholder ───────────────────────────────── */
.no-data {
    text-align: center;
    padding: var(--s6) var(--s3);
    color: var(--text-dim);
    font-size: 1rem;
}

/* ── Stat update animations ────────────────────────────── */
.stat-just-updated {
    animation: stat-flash 600ms var(--ease-out);
}

@keyframes stat-flash {
    0%   { color: var(--success); transform: scale(1.08); }
    50%  { color: var(--success); }
    100% { color: var(--primary); transform: scale(1); }
}

.stat-error {
    color: var(--error) !important;
    animation: stat-shake 400ms var(--ease-smooth);
}

@keyframes stat-shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-3px); }
    40%       { transform: translateX(3px); }
    60%       { transform: translateX(-2px); }
    80%       { transform: translateX(2px); }
}

/* ── Stagger entrance for leaderboard items ─────────────── */
@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.leaderboard-item:nth-child(1)  { animation-delay: 0ms; }
.leaderboard-item:nth-child(2)  { animation-delay: 60ms; }
.leaderboard-item:nth-child(3)  { animation-delay: 120ms; }
.leaderboard-item:nth-child(4)  { animation-delay: 180ms; }
.leaderboard-item:nth-child(5)  { animation-delay: 240ms; }
.leaderboard-item:nth-child(6)  { animation-delay: 300ms; }
.leaderboard-item:nth-child(7)  { animation-delay: 360ms; }
.leaderboard-item:nth-child(8)  { animation-delay: 420ms; }
.leaderboard-item:nth-child(9)  { animation-delay: 480ms; }
.leaderboard-item:nth-child(10) { animation-delay: 540ms; }

/* ── Loading / error fade transitions ──────────────────── */
.leaderboard-table .loading-state,
.leaderboard-table .error-state {
    transition: opacity var(--dur-lg) var(--ease-out);
}

.bot-actions {
    display: flex;
    flex-direction: column;
    gap: var(--card-gap);
    margin-top: var(--s3);
}

.action-card {
    padding: clamp(var(--s3), 3vw, var(--s4));
    border-radius: var(--r-lg);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--s2);
    position: relative;
    overflow: hidden;
    contain: layout style;
    transition: all var(--t-base) var(--ease-out);
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(79, 124, 255, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity var(--t-base);
    pointer-events: none;
}

.action-card:hover {
    border-color: rgba(79, 124, 255, 0.2);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.action-card:hover::before {
    opacity: 1;
}

.action-card h3 {
    font-size: clamp(1rem, 3.2vw, 1.22rem);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: var(--s2);
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

.action-card p {
    font-size: clamp(0.86rem, 2.4vw, 0.98rem);
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: var(--s3);
}

.action-card .btn {
    width: 100%;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
}


/* ============================================================
   9b. FEATURE CARDS (Index Page)
   ============================================================ */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--s3);
    margin-top: var(--s4);
}

/* FIX: Added contain:layout style to feature cards */
.feature-card {
    position: relative;
    padding: clamp(var(--s3), 3vw, var(--s4));
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    contain: layout style;
    transition: all var(--t-base) var(--ease-out);
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--t-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(79, 124, 255, 0.3);
    box-shadow: var(--shadow-card-hover);
    background: var(--glass-hover);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: var(--s2);
    display: flex;
    align-items: center;
    gap: var(--s2);
    line-height: 1.3;
}

.feature-card h3 i {
    font-size: 1.2rem;
    color: var(--primary);
    transition: transform var(--t-base) var(--ease-spring);
}

.feature-card:hover h3 i {
    transform: scale(1.1);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.section-lead {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--text-muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--s4);
    line-height: 1.7;
}


/* ============================================================
   10. RPC CARD (Ranking Promo Card - Gold)
   ============================================================ */
.rpc-card {
    width: 100%;
    max-width: 720px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 165, 0, 0.04) 100%);
    border: 1px solid rgba(255, 215, 0, 0.18);
    border-radius: var(--r-xl);
    padding: clamp(2rem, 5vw, 3rem) clamp(1.25rem, 4vw, 2rem);
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: var(--s6) auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    contain: layout style;
    transition:
        border-color var(--t-base) var(--ease-out),
        box-shadow var(--t-base) var(--ease-out),
        background var(--t-base) var(--ease-out);
}

.rpc-card:hover {
    border-color: rgba(255, 215, 0, 0.35);
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.15);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, rgba(255, 165, 0, 0.08) 100%);
}

.rpc-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.rpc-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.875rem, 2.5vw, 1.375rem);
    position: relative;
    z-index: 1;
}

.rpc-trophy {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    color: var(--gold);
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.5));
    margin-bottom: var(--s1);
    line-height: 1;
}

.rpc-card h2 {
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.22;
    letter-spacing: -0.025em;
    max-width: 500px;
    margin: 0;
}

.rpc-highlight {
    background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rpc-card p {
    font-size: clamp(0.9rem, 2.5vw, 1.05rem);
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.72;
    max-width: 460px;
    margin: 0;
}

/* ── RPC Button ───────────────────────────────────────────── */
.rpc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 16px 36px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.01em;
    border: none;
    border-radius: 14px;
    text-decoration: none;
    cursor: pointer;
    color: #0a0b0e;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    box-shadow:
        0 6px 20px rgba(255, 165, 0, 0.42),
        0 2px 6px rgba(255, 165, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-height: 54px;
    min-width: 220px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition:
        transform var(--dur-md) var(--ease-spring),
        box-shadow var(--dur-md) var(--ease-out);
    margin-top: var(--s3);
}

.rpc-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 32px rgba(255, 165, 0, 0.52),
        0 4px 12px rgba(255, 165, 0, 0.25),
        0 0 0 1px rgba(255, 215, 0, 0.35);
}

.rpc-btn:active {
    transform: scale(0.97) translateY(0);
    transition-duration: var(--dur-xs);
}

.rpc-btn i:first-child { font-size: 1.1rem; }
.rpc-btn i:last-child  { font-size: 0.9rem; transition: transform 320ms var(--ease-spring); }
.rpc-btn:hover i:last-child { transform: translateX(5px); }

.rpc-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transform: skewX(-15deg);
    transition: left 0.55s var(--ease-out);
    pointer-events: none;
}

.rpc-btn:hover::after { left: 130%; }


/* ============================================================
   DOCS PROMO CARD
   ============================================================ */
.docs-promo-card {
    background: linear-gradient(135deg, rgba(28, 31, 46, 0.7) 0%, rgba(13, 15, 22, 0.88) 100%);
    border: 1px solid rgba(139, 92, 246, 0.28);
    box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    margin: var(--s6) auto;
    border-radius: var(--r-2xl);
    overflow: hidden;
    text-align: center;
    position: relative;
    max-width: 900px;
    padding: 0;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    contain: layout style;
    z-index: 5;
    transition:
        transform 400ms var(--ease-out),
        box-shadow 400ms var(--ease-out),
        border-color 220ms var(--ease-smooth);
}

.docs-promo-card::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -10%;
    width: 120%;
    height: 200%;
    background: radial-gradient(ellipse at 50% 40%, rgba(139, 92, 246, 0.13), transparent 65%);
    opacity: 0;
    transition: opacity 400ms var(--ease-out);
    pointer-events: none;
    z-index: 0;
}

.docs-promo-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow:
        0 28px 64px rgba(0, 0, 0, 0.56),
        0 0 0 1px rgba(139, 92, 246, 0.16),
        0 0 44px rgba(139, 92, 246, 0.16);
}

.docs-promo-card:hover::before { opacity: 1; }

.docs-promo-content {
    padding: clamp(var(--s5), 6vw, var(--s8)) clamp(var(--s4), 5vw, var(--s7));
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s2);
}

.docs-promo-text h2 {
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 800;
    margin-bottom: var(--s3);
    background: linear-gradient(135deg, #fff 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    letter-spacing: -0.022em;
    line-height: 1.18;
}

.docs-promo-text p {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto var(--s5);
    line-height: 1.72;
}

.docs-promo-buttons {
    display: flex;
    gap: var(--s3);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--s2);
}

.docs-promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 16px 36px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.01em;
    border: none;
    border-radius: 14px;
    text-decoration: none;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    box-shadow:
        0 6px 20px rgba(139, 92, 246, 0.4),
        0 2px 6px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-height: 54px;
    min-width: 200px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition:
        transform var(--dur-md) var(--ease-spring),
        box-shadow var(--dur-md) var(--ease-out);
}

.docs-promo-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 32px rgba(139, 92, 246, 0.5),
        0 4px 12px rgba(79, 124, 255, 0.25),
        0 0 0 1px rgba(139, 92, 246, 0.3);
}

.docs-promo-btn:active {
    transform: scale(0.97) translateY(0);
    transition-duration: var(--dur-xs);
}

.docs-promo-btn i:last-child {
    font-size: 0.9rem;
    transition: transform 320ms var(--ease-spring);
}

.docs-promo-btn:hover i:last-child { transform: translateX(5px); }

.docs-promo-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transform: skewX(-15deg);
    transition: left 0.55s var(--ease-out);
    pointer-events: none;
}

.docs-promo-btn:hover::after { left: 130%; }


/* ============================================================
   RANKING PROMO CARD
   ============================================================ */
.ranking-promo-card {
    background: linear-gradient(135deg, rgba(20, 18, 10, 0.82) 0%, rgba(28, 22, 8, 0.9) 50%, rgba(15, 12, 5, 0.88) 100%);
    border: 1px solid rgba(255, 215, 0, 0.22);
    box-shadow:
        var(--shadow-xl),
        0 0 36px rgba(255, 215, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    margin: var(--s6) auto;
    border-radius: var(--r-2xl);
    overflow: hidden;
    text-align: center;
    position: relative;
    max-width: 900px;
    padding: 0;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    contain: layout style;
    z-index: 5;
    transition:
        transform 400ms var(--ease-out),
        box-shadow 400ms var(--ease-out),
        border-color 220ms var(--ease-smooth);
}

.ranking-promo-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.7), transparent);
    pointer-events: none;
}

.ranking-promo-card::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -10%;
    width: 120%;
    height: 200%;
    background: radial-gradient(ellipse at 50% 40%, rgba(61, 58, 9, 0.482), transparent 65%);
    opacity: 0;
    transition: opacity 400ms var(--ease-out);
    pointer-events: none;
    z-index: 0;
}

.ranking-promo-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow:
        0 32px 72px rgba(0, 0, 0, 0.6),
        0 0 0 2px rgba(255, 215, 0, 0.15),
        0 0 52px rgba(255, 165, 0, 0.18),
        0 0 120px rgba(255, 215, 0, 0.08);
}

.ranking-promo-card:hover::before { opacity: 1; }

.ranking-promo-content {
    padding: clamp(var(--s5), 6vw, var(--s8)) clamp(var(--s4), 5vw, var(--s7));
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s2);
}

.ranking-trophy-icon {
    font-size: clamp(3rem, 7vw, 4rem);
    margin-bottom: var(--s2);
    display: block;
    line-height: 1;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.45));
}

.ranking-promo-card h2 {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    font-weight: 800;
    margin-bottom: var(--s2);
    color: var(--text-main);
    letter-spacing: -0.022em;
    line-height: 1.18;
    max-width: 600px;
}

.ranking-highlight {
    background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ranking-promo-card p {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto var(--s4);
    line-height: 1.72;
}

/* ── Ranking promo button ────────────────────────────────── */
.ranking-promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 17px 40px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.015em;
    border: none;
    border-radius: 14px;
    text-decoration: none;
    cursor: pointer;
    color: #0a0b0e;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    box-shadow:
        0 6px 24px rgba(255, 165, 0, 0.45),
        0 2px 8px rgba(255, 165, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-height: 56px;
    min-width: 230px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition:
        transform var(--dur-md) var(--ease-spring),
        box-shadow var(--dur-md) var(--ease-out);
    margin-top: var(--s3);
}

.ranking-promo-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 14px 36px rgba(255, 165, 0, 0.55),
        0 4px 14px rgba(255, 165, 0, 0.28),
        0 0 0 1px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.ranking-promo-btn:active {
    transform: scale(0.97) translateY(0);
    transition-duration: var(--dur-xs);
}

.ranking-promo-btn i:first-child { font-size: 1.15rem; }
.ranking-promo-btn i:last-child  { font-size: 0.9rem; transition: transform 320ms var(--ease-spring); }
.ranking-promo-btn:hover i:last-child { transform: translateX(5px); }

.ranking-promo-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-15deg);
    transition: left 0.55s var(--ease-out);
    pointer-events: none;
}

.ranking-promo-btn:hover::after { left: 130%; }

.ranking-promo-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.4), transparent);
    margin: var(--s1) auto;
}


/* ============================================================
   RESPONSIVE — TABLET & MOBILE (promo cards)
   ============================================================ */
@media (max-width: 768px) {
    .rpc-card {
        padding: var(--s4) var(--s3);
        margin: var(--s5) auto;
        border-radius: var(--r-lg);
    }

    .rpc-btn {
        min-width: 100%;
        padding: 15px 24px;
        font-size: 0.95rem;
        min-height: 52px;
        border-radius: 12px;
    }

    .docs-promo-content {
        padding: var(--s5) var(--s3);
    }

    .docs-promo-text p { font-size: 0.95rem; }

    .docs-promo-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: var(--s2);
        width: 100%;
    }

    .docs-promo-btn {
        min-width: 100%;
        min-height: 52px;
        padding: 15px 24px;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    .ranking-promo-content { padding: var(--s5) var(--s3); }
    .ranking-promo-card h2 { font-size: 1.4rem; }
    .ranking-promo-card p  { font-size: 0.95rem; }

    .ranking-promo-btn {
        min-width: 100%;
        padding: 15px 24px;
        font-size: 0.95rem;
        min-height: 52px;
        border-radius: 12px;
    }

    .ranking-trophy-icon { font-size: 2.5rem; }
}

@media (max-width: 480px) {
    .rpc-card { padding: var(--s3) var(--s2); border-radius: var(--r-md); }
    .rpc-btn  { padding: 14px 20px; font-size: 0.9rem; min-height: 48px; border-radius: 10px; }

    .docs-promo-content,
    .ranking-promo-content { padding: var(--s4) var(--s2); }

    .docs-promo-btn,
    .ranking-promo-btn {
        padding: 14px 20px;
        font-size: 0.9rem;
        min-height: 48px;
        border-radius: 10px;
        letter-spacing: 0;
    }

    .ranking-trophy-icon { font-size: 2.25rem; }
}

/* Touch: disable translateY hover to prevent stuck-hover on iOS */
@media (hover: none) {
    .rpc-btn:hover,
    .docs-promo-btn:hover,
    .ranking-promo-btn:hover {
        transform: none;
    }

    .rpc-btn::after,
    .docs-promo-btn::after,
    .ranking-promo-btn::after {
        display: none;
    }
}


/* ============================================================
   14. COMMUNITY SECTION
   ============================================================ */
.community-card { text-align: center; }
.community-card .section-title { justify-content: center; margin-bottom: var(--s3); }
.community-card .section-lead  { text-align: center; max-width: 600px; margin-left: auto; margin-right: auto; }

.community-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(var(--s2), 2vw, var(--s3));
    justify-content: center;
    align-items: center;
    margin-top: var(--s5);
}

.community-buttons .btn { min-width: 160px; }


/* ============================================================
   15. MISC COMPONENTS
   ============================================================ */

.section-title {
    display: flex;
    align-items: center;
    gap: var(--s2);
    font-size: clamp(1rem, 3vw, 1.35rem);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: var(--s3);
    letter-spacing: var(--ls-heading);
    line-height: 1.3;
}

.section-title i {
    font-size: 1.25em;
    color: var(--primary);
    transition: transform var(--t-base) var(--ease-spring), color var(--t-base);
}

.card:hover .section-title i {
    transform: scale(1.08);
    color: var(--primary-light);
}

.hero-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s2);
    margin-top: var(--s6);
    padding: var(--s2) var(--s3);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg);
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
    transition: all var(--t-base);
}

.hero-badge:hover {
    background: var(--glass-hover);
    border-color: var(--primary);
    color: var(--primary-light);
}

.hero-badge i { font-size: 1.1em; }

.live-indicator {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--s2);
    padding: var(--s2) var(--s3);
    margin-bottom: var(--s4);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--r-lg);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--success);
    transition: all var(--t-base);
}

.live-indicator:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success), inset 0 0 4px rgba(255, 255, 255, 0.3);
    animation: pulse-dot 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0%, 100% {
        box-shadow: 0 0 10px var(--success), inset 0 0 4px rgba(255, 255, 255, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px var(--success), inset 0 0 6px rgba(255, 255, 255, 0.4);
        transform: scale(1.2);
    }
}

.rank-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
    border-radius: var(--r-lg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(79, 124, 255, 0.3);
    flex-shrink: 0;
    transition: all var(--t-base);
}

.leaderboard-item:hover .rank-badge {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(79, 124, 255, 0.4);
}

.leaderboard-item.rank-1 .rank-badge {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    box-shadow: 0 4px 16px rgba(255, 165, 0, 0.4);
}

.leaderboard-item.rank-2 .rank-badge {
    background: linear-gradient(135deg, #c0c0c0 0%, #808080 100%);
    box-shadow: 0 4px 12px rgba(192, 192, 192, 0.3);
}

.leaderboard-item.rank-3 .rank-badge {
    background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.3);
}

.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    margin: var(--s6) 0;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: clamp(var(--s6), 8vh, var(--s8));
    padding: var(--s5) 0;
    padding-bottom: max(var(--s5), var(--safe-bottom));
    border-top: 1px solid var(--glass-border);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.footer p {
    margin-bottom: var(--s2);
    color: var(--text-dim);
    font-size: 0.875rem;
}

.footer a {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color var(--t-fast);
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: width var(--t-base) var(--ease-out);
}

.footer a:hover { color: var(--primary-light); }
.footer a:hover::after { width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.04); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* Ripple */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    transform: scale(0);
    animation: ripple-burst 0.55s var(--ease-out) forwards;
    pointer-events: none;
}

@keyframes ripple-burst {
    to { transform: scale(4); opacity: 0; }
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, var(--glass) 25%, var(--glass-hover) 50%, var(--glass) 75%);
    background-size: 200% 100%;
    animation: skeleton-sweep 1.6s linear infinite;
    border-radius: var(--r-md);
}

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



/* Statistics Section */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--card-gap);
    margin-top: var(--s4);
}

/* FIX: Added contain:layout style */
.stat-card {
    display: flex;
    align-items: center;
    gap: clamp(var(--s3), 2.5vw, var(--s4));
    padding: clamp(var(--s3), 3vw, var(--s4));
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    contain: layout style;
    transition: all var(--t-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 124, 255, 0.05), transparent);
    transition: left 0.6s var(--ease-out);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-card-hover);
    background: var(--glass-hover);
}

.stat-card:hover::before { left: 100%; }

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: var(--r-lg);
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(79, 124, 255, 0.3);
}

.stat-info { flex: 1; min-width: 0; }
.stat-info h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-main); margin: 0 0 var(--s2) 0; }

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: var(--s3);
    line-height: 1.2;
    transition: all var(--t-base);
}

.stat-value.loading { color: var(--text-muted); animation: pulse 1.5s ease-in-out infinite; }
.stat-value.error   { color: var(--error); }
.stat-value.success { color: var(--success); }

.btn-sm { padding: var(--s2) var(--s3); font-size: 0.875rem; min-height: auto; }

@media (max-width: 768px) {
    .stats-container { grid-template-columns: 1fr; gap: var(--s3); }
    .stat-card { padding: var(--s3); }
    .stat-icon { width: 50px; height: 50px; font-size: 1.25rem; }
    .stat-value { font-size: 1.5rem; }
    
    /* Enhanced mobile responsiveness */
    .nav-links {
        gap: 4px;
        padding: var(--s2);
    }
    
    .nav-link {
        padding: 8px 14px;
        font-size: 0.85rem;
        min-height: 40px;
    }
    
    .nav-link span {
        display: none;
    }
    
    .nav-link.active span,
    .nav-link.nav-cta span {
        display: inline;
    }
    
    .card {
        padding: var(--s3);
        border-radius: var(--r-lg);
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: var(--s3);
    }
    
    .hero-section {
        padding: var(--s6) 0 var(--s5);
    }
    
    .hero-content h1 {
        font-size: clamp(1.75rem, 8vw, 2.25rem);
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .leaderboard-item {
        padding: var(--s3);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--s3);
    }
    
    .leaderboard-item .btn-join {
        width: 100%;
        min-width: auto;
    }
    
    .vote-count {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }

    /* Stats page mobile adjustments */
    .stats-overview {
        grid-template-columns: 1fr;
        gap: var(--s3);
    }

    .stat-card {
        padding: var(--s4);
    }

    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .hero-badge-animated {
        padding: var(--s2) var(--s3);
        font-size: 0.75rem;
    }

    .geometric-pattern {
        width: 300px;
        height: 300px;
    }

    .geo-ring.ring-1 { width: 150px; height: 150px; }
    .geo-ring.ring-2 { width: 225px; height: 225px; }
    .geo-ring.ring-3 { width: 300px; height: 300px; }
    .geo-center { width: 75px; height: 75px; }
}

@media (max-width: 480px) {
    .container {
        padding-left: var(--s3);
        padding-right: var(--s3);
    }
    
    .nav-links {
        gap: 2px;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .hero-logo-container .logo {
        width: 80px;
        height: 80px;
    }
    
    .hero-logo-container .logo img {
        width: 70px;
        height: 70px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .card {
        min-height: 48px;
        min-width: 48px;
    }
    
    .btn:active,
    .nav-link:active {
        transform: scale(0.95);
    }
}

/* Utility */
.secure-content {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.mt-3 { margin-top: var(--s3); }



/* ============================================================
   16. DOCS / PRIVACY PAGES
   ============================================================ */
.docs-page .container-wrapper,
.privacy-page .container-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.docs-page .hero-section,
.privacy-page .hero-section {
    padding: var(--s10) 0 var(--s8);
    text-align: center;
}

.docs-page h1,
.privacy-page h1 {
    font-size: clamp(2rem, 6vw, 3.75rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.docs-page h2,
.privacy-page h2 {
    font-size: clamp(1.5rem, 4vw, 2.125rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 48px 0 24px;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: var(--s2);
}

.docs-page h2 i,
.privacy-page h2 i { color: var(--primary-light); font-size: 1.2em; }

.docs-page h3,
.privacy-page h3 {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    font-weight: 600;
    line-height: 1.3;
    margin: 32px 0 16px;
    letter-spacing: -0.01em;
}

.docs-page h4,
.privacy-page h4 {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 600;
    line-height: 1.4;
    margin: 24px 0 12px;
    color: var(--text-secondary);
}

.docs-page p,
.privacy-page p {
    font-size: clamp(0.95rem, 1.5vw, 1.0625rem);
    line-height: 1.72;
    margin-bottom: 18px;
    color: var(--text-secondary);
    max-width: 750px;
    letter-spacing: var(--ls-normal);
}

.docs-page .hero-subtitle,
.privacy-page .hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.35rem);
    line-height: 1.62;
    margin: 0 auto 40px;
    color: var(--text-muted);
    max-width: 640px;
}

.docs-page ul,
.privacy-page ul { margin: 20px 0; padding-left: 24px; }

.docs-page li,
.privacy-page li { font-size: 1rem; line-height: 1.8; margin-bottom: 12px; color: var(--text-secondary); }

.docs-page .highlight-box,
.privacy-page .highlight-box {
    margin: 32px 0;
    padding: 28px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    contain: layout style;
    transition: all var(--t-base);
    position: relative;
    overflow: hidden;
}

.docs-page .highlight-box::before,
.privacy-page .highlight-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0.6;
}

.docs-page .highlight-box:hover,
.privacy-page .highlight-box:hover {
    border-color: var(--glass-border-md);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.docs-page .highlight-box h4,
.privacy-page .highlight-box h4 {
    margin-bottom: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: var(--s2);
}

.docs-page .highlight-box p,
.privacy-page .highlight-box p { margin-bottom: 0; }

.docs-page .feature-card,
.privacy-page .feature-card {
    padding: 32px 24px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    contain: layout style;
    transition: all var(--t-base);
    position: relative;
    overflow: hidden;
}

.docs-page .feature-card::before,
.privacy-page .feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 124, 255, 0.05), transparent);
    transition: left 0.6s var(--ease-out);
}

.docs-page .feature-card:hover,
.privacy-page .feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(79, 124, 255, 0.3);
    box-shadow: var(--shadow-card-hover);
    background: var(--glass-hover);
}

.docs-page .feature-card:hover::before,
.privacy-page .feature-card:hover::before { left: 100%; }

.command-category {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg);
    padding: var(--s5);
    margin-bottom: var(--s5);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    contain: layout style;
    transition: all var(--t-base);
    position: relative;
    overflow: hidden;
}

.command-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0.7;
}

.command-category:hover {
    transform: translateY(-3px);
    border-color: rgba(79, 124, 255, 0.3);
    box-shadow: var(--shadow-card-hover);
    background: var(--glass-hover);
}

.command-category h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--s3);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: var(--s2);
}

.command-category h3 i {
    color: var(--primary-light);
    font-size: 1.1em;
    transition: transform var(--t-spring);
}

.command-category:hover h3 i { transform: scale(1.1) rotate(-5deg); }
.command-category p { margin-bottom: var(--s4); color: var(--text-secondary); font-size: 1.05rem; line-height: 1.7; }

.commands-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s2);
    margin-bottom: var(--s3);
}

.command-item {
    display: flex;
    align-items: center;
    gap: var(--s2);
    padding: var(--s1) var(--s2);
    transition: all var(--t-fast);
}

.command-item code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(79, 124, 255, 0.1);
    padding: 4px 8px;
    border-radius: var(--r-sm);
    min-width: 140px;
    text-align: center;
}

.command-item span { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; }

.command-item:hover {
    background: rgba(79, 124, 255, 0.05);
    transform: translateX(4px);
}

.command-item:hover code {
    background: rgba(79, 124, 255, 0.15);
    color: var(--primary-light);
}

.docs-page code,
.privacy-page code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    background: rgba(79, 124, 255, 0.1);
    padding: 3px 8px;
    border-radius: var(--r-sm);
    color: var(--primary);
    border: 1px solid rgba(79, 124, 255, 0.2);
    font-weight: 600;
}

.docs-page .action-section,
.privacy-page .action-section {
    text-align: center;
    padding: 64px 0;
    margin-top: 80px;
    background: var(--glass);
    border-radius: var(--r-xl);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
}

.action-buttons {
    display: flex;
    gap: var(--s3);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--s4);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    padding: 14px 28px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--r-lg);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--t-base);
    border: 1px solid transparent;
    min-width: 160px;
    justify-content: center;
}

.action-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.doc-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    padding: 12px 24px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--r-lg);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--t-base);
    border: 1px solid transparent;
    margin-top: var(--s3);
}

.doc-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-sm);
}


/* ============================================================
   17. RANKING PAGE SPECIFIC
   ============================================================ */
.ranking-page .hero-section {
    padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 6vw, 64px);
    text-align: center;
}

.ranking-page h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: var(--ls-tight);
    background: linear-gradient(135deg, var(--text-main) 0%, var(--gold) 60%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--s3);
}

.ranking-page .section-title {
    display: flex;
    align-items: center;
    gap: var(--s2);
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: var(--s3);
    letter-spacing: var(--ls-heading);
    line-height: 1.3;
}

.ranking-page .section-title i {
    font-size: 1.25em;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    box-shadow: 0 0 8px var(--gold-glow-sm);
    border-radius: 6px;
    padding: 2px 6px;
    transition: box-shadow 320ms var(--ease-smooth), transform 320ms var(--ease-smooth);
}

.ranking-page .section-title i:hover,
.ranking-page .card:hover .section-title i {
    box-shadow: 0 0 18px var(--gold-glow);
    transform: scale(1.08);
}

.ranking-page .card {
    box-shadow: var(--shadow-card);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    contain: layout style;
    transition:
        box-shadow 340ms var(--ease-smooth),
        border-color 320ms var(--ease-smooth),
        background 320ms var(--ease-smooth),
        transform 320ms var(--ease-smooth);
    margin-bottom: var(--s5);
}

.ranking-page .card:hover {
    border-color: rgba(255, 215, 0, 0.18);
    box-shadow:
        0 8px 32px rgba(255, 215, 0, 0.10),
        0 2px 8px rgba(0, 0, 0, 0.10),
        var(--shadow-card-hover);
    background: var(--glass-hover);
    transform: translateY(-2px);
}

.ranking-page .card:active { transform: scale(0.99); }

.ranking-page .card::before {
    content: '';
    display: block;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 215, 0, 0.25) 50%, transparent 100%);
    border-radius: 2px 2px 0 0;
    margin-bottom: var(--s2);
}

.leaderboard-table {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
    width: 100%;
    margin: 0 auto;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 56px 1fr 120px;
    align-items: center;
    gap: var(--s3);
    padding: clamp(16px, 3vw, 28px) clamp(16px, 3vw, 32px);
    background: var(--glass);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    contain: layout style;
    transition:
        box-shadow 320ms var(--ease-smooth),
        border-color 320ms var(--ease-smooth),
        background 320ms var(--ease-smooth),
        transform 320ms var(--ease-smooth);
    cursor: pointer;
    position: relative;
}

.leaderboard-item:hover {
    background: var(--glass-hover);
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(79, 124, 255, 0.10), 0 2px 8px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
}

.leaderboard-item .rank-badge {
    min-width: 48px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 124, 255, 0.10);
    transition: box-shadow 320ms var(--ease-smooth), background 320ms var(--ease-smooth);
}

.leaderboard-item.rank-1 .rank-badge {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.18);
}
.leaderboard-item.rank-2 .rank-badge {
    background: linear-gradient(135deg, #c0c0c0 0%, #808080 100%);
    box-shadow: 0 4px 12px rgba(192, 192, 192, 0.12);
}
.leaderboard-item.rank-3 .rank-badge {
    background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.12);
}

.leaderboard-item .group-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.leaderboard-item .group-info h3 {
    font-size: clamp(1rem, 2vw, 1.18rem);
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.leaderboard-item .group-info .group-meta {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.4;
    display: flex;
    gap: var(--s2);
    flex-wrap: wrap;
}
.leaderboard-item .group-actions {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
    align-items: flex-end;
}
.leaderboard-item .btn { min-width: 100px; font-size: 0.98rem; }

.leaderboard-table .loading-state,
.leaderboard-table .error-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    width: 100%;
    color: var(--text-muted);
    font-size: 1.1rem;
    gap: var(--s2);
}
.leaderboard-table .loading-spinner i { font-size: 1.5em; color: var(--primary); }
.leaderboard-table .error-message i  { font-size: 1.3em; color: var(--accent); }
.leaderboard-table .error-message .btn { margin-top: var(--s2); }


/* ============================================================
   18. FORM ELEMENTS & INPUTS
   ============================================================ */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
textarea,
select {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-md);
    padding: var(--s2) var(--s3);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.4;
    transition: all var(--t-base);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--glass-hover);
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.1), inset 0 0 0 1px var(--primary);
}

textarea { resize: vertical; min-height: 120px; }

::selection       { background: var(--primary); color: #fff; }
::-moz-selection  { background: var(--primary); color: #fff; }

::-webkit-scrollbar        { width: 8px; height: 8px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: var(--glass-border); border-radius: 4px; transition: background var(--t-base); }
::-webkit-scrollbar-thumb:hover { background: var(--glass-border-md); }

a {
    color: var(--primary);
    text-decoration: none;
    transition: all var(--t-fast);
    position: relative;
}

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

a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}

body > * a,
.card a,
.footer a { position: relative; }

body > * a::after,
.card a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width var(--t-base) var(--ease-out);
}

body > * a:hover::after,
.card a:hover::after { width: 100%; }


/* ============================================================
   RESPONSIVE — TABLET LANDSCAPE (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-container { grid-template-columns: repeat(2, 1fr); }
}


/* ============================================================
   RESPONSIVE — TABLET (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
    :root {
        --s4: 1.25rem;
        --s5: 1.5rem;
        --s6: 2rem;
    }

    .container {
        padding: 0 var(--s2);
        padding-left: max(var(--s2), var(--safe-left));
        padding-right: max(var(--s2), var(--safe-right));
    }

    .hero-section { padding: 48px 0 32px; }

    .logo { width: 80px; height: 80px; }
    .logo img { width: 70px; height: 70px; }

    .hero-logo-container .logo {
        width: 88px;
        height: 88px;
        animation: none;
    }
    .hero-logo-container .logo img { width: 76px; height: 76px; }

    .hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--s3);
        padding: var(--s3);
    }

    .stat-item { padding: var(--s1) 4px; }
    .stat-number { font-size: 1.48rem; }
    .stat-label { font-size: 0.7rem; }

    .feature-grid { grid-template-columns: 1fr; gap: var(--s3); }

    .rpc-card {
        padding: var(--s3) var(--s2);
        margin: var(--s5) auto;
        border-radius: var(--r-lg);
    }

    .rpc-btn { min-width: 180px; padding: 12px 20px; font-size: 0.9rem; }

    /* FIX: Nav scroll on mobile */
    .nav-links {
        gap: 2px;
        padding: var(--s1) var(--s2);
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scroll-snap-type: none;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .nav-links::-webkit-scrollbar { display: none; }

    .nav-link {
        padding: 8px 12px;
        font-size: 0.78rem;
        gap: 4px;
        min-height: 44px;
        min-width: fit-content;
        flex-shrink: 0;
    }

    /* Disable heavy hover transforms on tablet/phone */
    .card:hover,
    .feature-card:hover,
    .leaderboard-item:hover,
    .docs-promo-card:hover,
    .ranking-promo-card:hover {
        transform: none;
    }

    .card:active,
    .feature-card:active { background: var(--glass-active); }

    .leaderboard-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--s2);
        padding: var(--s3);
    }

    .leaderboard-item .actions {
        width: 100%;
        justify-content: center;
    }

    .rank-badge { align-self: center; min-width: 52px; width: 52px; height: 52px; }

    .group-info { width: 100%; text-align: center; }

    .group-info.commands-list { flex-direction: column; gap: var(--s1); }

    .command-item {
        min-width: 100%;
        padding: var(--s1);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--s1);
    }

    .command-item code {
        min-width: auto;
        width: 100%;
        font-size: 0.8rem;
        text-align: left;
        padding: 6px 10px;
    }

    .command-item span { font-size: 0.85rem; line-height: 1.4; }
    .group-info h3 { font-size: 1rem; white-space: normal; }

    .vote-count {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: var(--s3);
        padding: var(--s2);
    }

    .votes { font-size: 1.35rem; margin-bottom: 0; }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        min-height: 48px;
        width: 100%;
    }

    .btn-join,
    .btn-ranking {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 44px;
        padding: 10px 14px;
        font-size: 0.82rem;
        font-weight: 600;
    }

    .hero-buttons .btn { max-width: 100%; }

    .card { padding: var(--s3) var(--s2); border-radius: var(--r-md); }

    .section-title { font-size: clamp(0.8rem, 3.6vw, 1rem); line-height: 1.35; }

    .live-indicator {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        box-sizing: border-box;
        font-size: 0.76rem;
        margin-bottom: var(--s3);
        padding: var(--s2) var(--s3);
    }

    .action-card { padding: var(--s3) var(--s2); }
    .action-card .btn { max-width: 100%; }

    .docs-promo-content,
    .ranking-promo-content { padding: var(--s4) var(--s3); }

    .docs-promo-text h2,
    .ranking-promo-card h2 { font-size: 1.4rem; }

    .docs-promo-text p,
    .ranking-promo-card p { font-size: 0.95rem; }

    .community-buttons { flex-direction: column; align-items: stretch; }
    .community-buttons .btn { width: 100%; min-width: unset; }

    .docs-page .feature-card,
    .privacy-page .feature-card { padding: 20px 16px; }

    .docs-page .highlight-box,
    .privacy-page .highlight-box { padding: 16px; }

    /* Disable shimmer sweeps on phone */
    .btn::before,
    .btn-join::before,
    .btn-ranking::before,
    .leaderboard-item::before,
    .card::before { display: none; }
}


/* ============================================================
   Touch devices: avoid "sticky" hover
   ============================================================ */
@media (hover: none) {
    .stat-item:hover  { transform: none; }
    .btn-join:hover   { transform: none; }
    .btn-ranking:hover { transform: none; }
    .trend:hover      { transform: none; }

    /* FIX: Disable ALL translateY hover transforms on touch devices
       to prevent the iOS "stuck hover" bug */
    .card:hover,
    .feature-card:hover,
    .stat-card:hover,
    .leaderboard-item:hover,
    .docs-promo-card:hover,
    .ranking-promo-card:hover,
    .action-card:hover,
    .rpc-card:hover,
    .command-category:hover,
    .highlight-box:hover,
    .btn.primary:hover,
    .btn.secondary:hover,
    .btn-join:hover,
    .btn-ranking:hover,
    .rpc-btn:hover,
    .nav-link.nav-cta:hover {
        transform: none;
    }
}


/* ============================================================
   RESPONSIVE — VERY SMALL (≤ 360px)
   ============================================================ */
@media (max-width: 360px) {
    .hero-section h1 { font-size: 1.55rem; }
    .hero-subtitle   { font-size: 0.86rem; margin-bottom: var(--s4); }
    .stat-number     { font-size: 1.22rem; }
    .stat-label      { font-size: 0.62rem; }
    .nav-link span   { display: none; }
    .votes           { font-size: 1.12rem; }
    .btn-join,
    .btn-ranking     { font-size: 0.78rem; padding: 9px 12px; }
}


/* ============================================================
   RANKING PAGE MOBILE IMPROVEMENTS
   ============================================================ */
@media (max-width: 768px) {
    .bot-actions { gap: var(--s3); }

    .action-card { padding: var(--s3); margin-bottom: var(--s2); }
    .action-card h3 { font-size: 1rem; margin-bottom: var(--s1); line-height: 1.3; }
    .action-card h3 i { font-size: 1rem; margin-right: 6px; }
    .action-card p { font-size: 0.85rem; line-height: 1.5; margin-bottom: var(--s2); }
    .action-card .btn { padding: 10px 16px; font-size: 0.85rem; min-height: 40px; max-width: 100%; }

    .leaderboard-item { padding: var(--s2) var(--s3); gap: var(--s2); }
    .rank-badge { min-width: 48px; width: 48px; height: 48px; font-size: 1.1rem; }

    .group-info h3 {
        font-size: 0.95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }

    .vote-count { min-width: 90px; padding: var(--s2); }
    .votes  { font-size: 1.25rem; }
    .trend  { font-size: 0.7rem; padding: 2px 6px; }
    .btn-join { padding: 8px 14px; font-size: 0.8rem; min-width: auto; min-height: 36px; }
}

@media (max-width: 480px) {
    .bot-actions { gap: var(--s2); margin-top: var(--s3); }

    .action-card {
        padding: var(--s2) var(--s3);
        border-radius: var(--r-md);
        margin-bottom: var(--s1);
    }
    .action-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
    .action-card h3 i { font-size: 0.95rem; min-width: 24px; min-height: 24px; padding: 4px; }
    .action-card p { font-size: 0.8rem; line-height: 1.45; margin-bottom: var(--s2); color: var(--text-dim); }
    .action-card .btn { width: 100%; padding: 10px 16px; font-size: 0.85rem; font-weight: 600; min-height: 42px; border-radius: var(--r-md); }

    .leaderboard-item { padding: var(--s2); gap: var(--s2); border-radius: var(--r-md); }
    .leaderboard-item .actions { margin-top: var(--s1); }

    .rank-badge { min-width: 44px; width: 44px; height: 44px; font-size: 1rem; border-radius: var(--r-md); }
    .rank-badge span { font-size: 0.9rem; }

    .group-info { min-width: 0; flex: 1; }
    .group-info h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; line-height: 1.3; white-space: normal; word-break: break-word; overflow-wrap: break-word; }
    .group-info .category-tag { font-size: 0.68rem; padding: 2px 8px; }

    .vote-count { min-width: 80px; padding: var(--s1) var(--s2); border-radius: var(--r-md); }
    .votes { font-size: 1.15rem; }
    .trend { font-size: 0.7rem; padding: 2px 6px; margin-top: 2px; }

    .btn-join { width: 100%; padding: 10px 16px; font-size: 0.85rem; font-weight: 600; min-height: 40px; border-radius: var(--r-md); }

    .section-title { font-size: 0.75rem; margin-bottom: var(--s3); gap: 8px; }
    .section-title i { min-width: 28px; min-height: 28px; padding: 6px; font-size: 0.9rem; }

    .live-indicator { font-size: 0.75rem; padding: 6px var(--s2); margin-bottom: var(--s2); }

    .chart-container { min-height: 180px; max-height: 240px; margin-top: var(--s2); padding: var(--s1); }
    .chart-container canvas { max-height: 220px; }

    .hero-stats { gap: var(--s2); padding: var(--s3); }
    .stat-number { font-size: 1.4rem; }
    .stat-label  { font-size: 0.65rem; }
}

@media (max-width: 360px) {
    .action-card { padding: var(--s2); }
    .action-card h3 { font-size: 0.88rem; }
    .action-card p  { font-size: 0.75rem; }
    .action-card .btn { padding: 8px 12px; font-size: 0.8rem; min-height: 38px; }

    .leaderboard-item { padding: 10px var(--s2); gap: 10px; }
    .rank-badge { min-width: 40px; width: 40px; height: 40px; font-size: 0.9rem; }
    .group-info h3 { font-size: 0.85rem; }
    .group-info .category-tag { font-size: 0.65rem; }
    .vote-count { min-width: 70px; padding: 6px 8px; }
    .votes { font-size: 1.05rem; }
    .btn-join { padding: 8px 12px; font-size: 0.78rem; min-height: 36px; }
}


/* ============================================================
   19. ACCESSIBILITY — REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    html { scroll-behavior: auto; }

    .logo,
    .logo::before,
    .hero-badge,
    .hero-content,
    .live-dot,
    .ranking-trophy-icon,
    .btn-ranking {
        animation: none !important;
    }
}


/* ============================================================
   20. HIGH CONTRAST MODE
   ============================================================ */

/* ============================================================
   IMPROVEMENTS — Buttons & Cards
   Add these at the very end of styles.css, replacing the
   matching rules in section 20.
   ============================================================ */

/* ----------------------------------------------------------
   TOP GROUP ITEMS — card-style rows instead of flat list
   ---------------------------------------------------------- */
.top-group-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  margin-bottom: 0.5rem;
  transition:
    background 200ms ease,
    border-color 200ms ease,
    transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.top-group-item:last-child {
  margin-bottom: 0;
}
.top-group-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(79, 124, 255, 0.2);
  transform: translateX(3px);
}

/* ----------------------------------------------------------
   RANK BADGE — pill with subtle gradient
   ---------------------------------------------------------- */
.group-rank {
  font-size: 1rem;
  font-weight: 800;
  min-width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(79,124,255,0.15), rgba(139,92,246,0.15));
  border: 1px solid rgba(79,124,255,0.18);
  flex-shrink: 0;
  color: var(--primary-light);
}

/* ----------------------------------------------------------
   GROUP INFO
   ---------------------------------------------------------- */
.group-title {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
  letter-spacing: 0.01em;
}
.group-handle {
  font-size: 0.75rem;
  opacity: 0.45;
  margin-top: 0.15rem;
}

/* ----------------------------------------------------------
   MEMBER COUNT
   ---------------------------------------------------------- */
.group-members {
  text-align: right;
  flex-shrink: 0;
  padding: 0 0.25rem;
}
.group-count {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}
.group-label {
  font-size: 0.68rem;
  opacity: 0.4;
  margin-top: 0.1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ----------------------------------------------------------
   JOIN BUTTON — improved depth & feedback
   ---------------------------------------------------------- */
.join-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.42rem 1rem;
  border-radius: 999px;
  background: rgba(99, 179, 237, 0.1);
  color: #63b3ed;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(99, 179, 237, 0.22);
  white-space: nowrap;
  letter-spacing: 0.025em;
  position: relative;
  overflow: hidden;
  transition:
    background     200ms ease,
    border-color   200ms ease,
    box-shadow     200ms ease,
    transform      180ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.join-btn:hover {
  background:   rgba(99, 179, 237, 0.2);
  border-color: rgba(99, 179, 237, 0.5);
  box-shadow:   0 0 14px rgba(99, 179, 237, 0.18),
                0 2px 8px rgba(0,0,0,0.2);
  transform:    translateY(-2px);
}
.join-btn:active {
  transform:  translateY(0) scale(0.97);
  box-shadow: none;
  transition-duration: 80ms;
}

/* ----------------------------------------------------------
   EMPTY STATE
   ---------------------------------------------------------- */
.no-groups-msg {
  text-align: center;
  opacity: 0.55;
  padding: 2.5rem 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ----------------------------------------------------------
   ACTION CARD — stronger visual hierarchy
   ---------------------------------------------------------- */
.action-card {
  position: relative;
  padding: clamp(var(--s3), 3vw, var(--s4));
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  overflow: hidden;
  contain: layout style;
  transition:
    border-color 280ms var(--ease-smooth),
    box-shadow   280ms var(--ease-smooth),
    transform    320ms cubic-bezier(0.23, 1, 0.32, 1),
    background   280ms var(--ease-smooth);
}

/* Top accent line */
.action-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(79,124,255,0.5), transparent);
  opacity: 0;
  transition: opacity 280ms ease;
}

.action-card:hover {
  border-color: rgba(79, 124, 255, 0.25);
  box-shadow:
    0 12px 40px rgba(0,0,0,0.28),
    0 0 0 1px rgba(79,124,255,0.1),
    0 0 24px rgba(79,124,255,0.08);
  transform: translateY(-3px);
  background: rgba(255,255,255,0.07);
}
.action-card:hover::after { opacity: 1; }

/* ----------------------------------------------------------
   PRIMARY BUTTON — crisper shadow layering
   ---------------------------------------------------------- */
.btn.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow:
    0 4px 16px rgba(79, 124, 255, 0.32),
    0 1px 4px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 28px rgba(79, 124, 255, 0.42),
    0 2px 8px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn.primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow:
    0 2px 8px rgba(79, 124, 255, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transition-duration: 80ms;
}

/* ----------------------------------------------------------
   SECONDARY BUTTON — tighter border, cleaner hover
   ---------------------------------------------------------- */
.btn.secondary {
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.btn.secondary:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px rgba(0,0,0,0.22),
    0 0 0 1px rgba(255,255,255,0.08);
}
.btn.secondary:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 80ms;
}

/* ----------------------------------------------------------
   CARD — tighter glow, smoother lift
   ---------------------------------------------------------- */
.card {
  background: var(--glass);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: clamp(var(--s3), 3vw, var(--s4));
  margin-bottom: var(--card-gap);
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 1;
  contain: layout style;
  transition:
    transform      380ms cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow     380ms cubic-bezier(0.23, 1, 0.32, 1),
    border-color   240ms var(--ease-smooth),
    background     240ms var(--ease-smooth);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 22px 56px rgba(0,0,0,0.34),
    0 8px 20px rgba(79,124,255,0.1),
    0 0 0 1px rgba(79,124,255,0.09);
  border-color: rgba(79,124,255,0.22);
  background: rgba(255,255,255,0.075);
}

/* ----------------------------------------------------------
   STAT CARD — consistent with card improvements
   ---------------------------------------------------------- */
.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79,124,255,0.3);
  box-shadow:
    0 16px 44px rgba(0,0,0,0.32),
    0 0 0 1px rgba(79,124,255,0.12),
    0 0 20px rgba(79,124,255,0.08);
  background: var(--glass-hover);
}

/* ----------------------------------------------------------
   LEADERBOARD ITEM — cleaner hover glow
   ---------------------------------------------------------- */
.leaderboard-item:hover {
  background: var(--glass-hover);
  border-color: rgba(79,124,255,0.28);
  box-shadow:
    0 10px 32px rgba(79,124,255,0.1),
    0 3px 10px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

/* ----------------------------------------------------------
   Touch: keep all hover transforms off
   ---------------------------------------------------------- */
@media (hover: none) {
  .join-btn:hover,
  .action-card:hover,
  .top-group-item:hover {
    transform: none;
    box-shadow: none;
  }
}