/* ---- Base ---- */
html {
    scroll-behavior: smooth;
}

body {
    background-color: #051424;
    color: #d4e4fa;
}

::selection {
    background: #c3f400;
    color: #051424;
}

:focus-visible {
    outline: 2px solid #c0c1ff;
    outline-offset: 2px;
    border-radius: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: #c3f400;
    color: #051424;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    border-radius: 0.5rem;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

/* ---- Surfaces & effects ---- */
.glass-card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glow-effect {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
}

.glow-effect-gold {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.25);
}

.text-gradient {
    background: linear-gradient(90deg, #c0c1ff, #c3f400);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.text-gradient-animated {
    background: linear-gradient(90deg, #c0c1ff, #c3f400, #c0c1ff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { text-shadow: 0 0 20px rgba(195, 244, 0, 0.4), 0 0 40px rgba(195, 244, 0, 0.15); }
    50% { text-shadow: 0 0 45px rgba(195, 244, 0, 0.9), 0 0 90px rgba(195, 244, 0, 0.5); }
}
.glow-pulse-text {
    animation: glow-pulse 2.4s ease-in-out infinite;
}

@keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
.float-text {
    animation: float-y 5s ease-in-out infinite;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.reveal {
    animation: fade-up 0.5s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
    .text-gradient-animated,
    .glow-pulse-text,
    .float-text,
    .reveal {
        animation: none !important;
    }
    html {
        scroll-behavior: auto;
    }
}
html.reduce-motion .text-gradient-animated,
html.reduce-motion .glow-pulse-text,
html.reduce-motion .float-text,
html.reduce-motion .reveal {
    animation: none !important;
}

/* ---- Header ---- */
#site-header {
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background-color 200ms ease, border-color 200ms ease, backdrop-filter 200ms ease;
}
#site-header.header-scrolled {
    background: rgba(13, 28, 45, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-link {
    position: relative;
    color: #d4e4fa;
    padding-bottom: 2px;
    transition: color 150ms ease;
}
.nav-link:hover {
    color: #c0c1ff;
}
.nav-link.active {
    color: #c3f400;
}
.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: #c3f400;
    border-radius: 2px;
}

#mobile-menu {
    background: #051424;
}

/* ---- Buttons ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #8083ff;
    color: #1000a9;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.18);
    transition: box-shadow 200ms ease, transform 150ms ease, background-color 200ms ease;
}
.btn-primary:hover {
    box-shadow: 0 0 34px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}
.btn-primary svg {
    transition: transform 150ms ease;
}
.btn-primary:hover svg {
    transform: translateX(3px);
}
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: #d4e4fa;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #908fa0;
    transition: background-color 200ms ease, border-color 200ms ease;
}
.btn-secondary:hover {
    background: #1c2b3c;
    border-color: #c0c1ff;
}
.link-underline {
    text-underline-offset: 4px;
    text-decoration-color: transparent;
    transition: text-decoration-color 150ms ease, color 150ms ease;
}
.link-underline:hover {
    text-decoration-line: underline;
    text-decoration-color: currentColor;
    color: #c0c1ff;
}

/* ---- Chips / badges ---- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #1c2b3c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 0.4rem 0.9rem;
}
.badge-live {
    background: #c3f400;
    color: #283500;
}
.badge-neutral {
    background: #1c2b3c;
    color: #c7c4d7;
}
.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #283500;
    flex-shrink: 0;
}

/* ---- Hero ---- */
.hero-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 60% 45% at 50% 32%, black 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 60% 45% at 50% 32%, black 20%, transparent 75%);
}
.hero-blob {
    filter: blur(90px);
}
.title-glow {
    filter: drop-shadow(0 0 36px rgba(195, 244, 0, 0.25)) drop-shadow(0 0 70px rgba(192, 193, 255, 0.16));
}
@keyframes bounce-y {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 6px); }
}
.scroll-cue {
    animation: bounce-y 2s ease-in-out infinite;
}
html.reduce-motion .scroll-cue {
    animation: none;
}

/* ---- Social icon buttons ---- */
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    border: 1px solid #464554;
    color: #c7c4d7;
    transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}
.social-btn:hover {
    color: #c3f400;
    border-color: #c3f400;
    background: rgba(195, 244, 0, 0.08);
}

/* ---- Timeline ---- */
.timeline-line {
    border-image-slice: 1;
    border-image-source: linear-gradient(180deg, #c0c1ff, #c3f400);
}
.timeline-dot {
    background: #1c2b3c;
    border: 2px solid #908fa0;
}
.timeline-dot.is-current {
    background: #c3f400;
    border-color: #c3f400;
    box-shadow: 0 0 0 6px rgba(195, 244, 0, 0.15);
}

/* ---- Leaderboard table ---- */
.leaderboard-table th {
    background: #010f1f;
    color: #c7c4d7;
}
.leaderboard-table tbody tr:nth-child(odd) {
    background: #122131;
}
.leaderboard-table tbody tr:nth-child(even) {
    background: #0d1c2d;
}
.rank-gold { color: #FFD700; }
.rank-silver { color: #C0C0C0; }
.rank-bronze { color: #CD7F32; }

/* ---- Legal pages ---- */
.legal-content h2 {
    scroll-margin-top: 6rem;
}
.legal-content a {
    color: #c0c1ff;
    text-underline-offset: 3px;
}
.legal-content a:hover {
    text-decoration: underline;
}
