/* Hide page until fonts load to prevent FOUT */
html { visibility: hidden; }
html.fonts-loaded { visibility: visible; }
html.fonts-failed { visibility: visible; }

:root {
    --maroon: #4a0e0e;
    --blood: #8b1a1a;
    --blood-light: #a52222;
    --gold: #c9a84c;
    --gold-light: #e0c56a;
    --gold-dim: #8a7234;
    --bg: #0c0808;
    --bg-card: #140d0d;
    --border: #2a1515;
    --text: #e8e0e0;
    --text-muted: #8a7777;
    --heading: #ffffff;
    --silver: #a8b4c0;
    --bronze: #b87333;
    --red-x: #c44040;
    --overlay-soft: rgba(255,255,255,0.03);
    --overlay-border: rgba(255,255,255,0.25);
    --glow-1: rgba(100,15,15,0.35);
    --glow-2: rgba(100,15,15,0.3);
    --glow-3: rgba(80,12,12,0.3);
    --glow-4: rgba(80,12,12,0.25);
    --topbar-tint: rgba(74,14,14,0.15);
    --side-blue: #7eaaed;
    --side-red: #c0392b;
    --phase-lobby: #8a7777;
    --phase-matchmaking: #7eaaed;
    --phase-readycheck: #e0c56a;
    --phase-champselect: #c9a84c;
    --phase-gamestart: #b87333;
    --phase-inprogress: #4caf50;
    --phase-waitingforstats: #7a6fa0;
    --on-accent: #ffffff;
    --on-gold: #0c0808;
}

:root[data-theme="light"] {
    --maroon: #5a9bd4;
    --blood: #a8332b;
    --blood-light: #c0392b;
    --gold: #7a5c1f;
    --gold-light: #a8802e;
    --gold-dim: #b89968;
    --bg: #eef2f6;
    --bg-card: #ffffff;
    --border: #d7dee5;
    --text: #1a232c;
    --text-muted: #5b6b7a;
    --heading: #10161c;
    --silver: #6f8092;
    --bronze: #9c5a24;
    --red-x: #c0392b;
    --overlay-soft: rgba(20,35,50,0.035);
    --overlay-border: rgba(20,35,50,0.15);
    --glow-1: rgba(120,160,200,0.25);
    --glow-2: rgba(120,160,200,0.22);
    --glow-3: rgba(140,180,210,0.18);
    --glow-4: rgba(140,180,210,0.15);
    --topbar-tint: rgba(74,127,168,0.10);
    --side-blue: #3d6fb0;
    --side-red: #b8362b;
    --phase-lobby: #6b7684;
    --phase-matchmaking: #3d6fb0;
    --phase-readycheck: #ad8a2e;
    --phase-champselect: #9c7a2e;
    --phase-gamestart: #9c5a24;
    --phase-inprogress: #2e8b40;
    --phase-waitingforstats: #6a5f9c;
    --on-accent: #ffffff;
    --on-gold: #0c0808;
}

* { margin: 0; padding: 0; box-sizing: border-box; cursor: default; }
html { scroll-behavior: smooth; }
button, input, select, textarea { font-family: inherit; }

body {
    font-family: 'Nothing You Could Do', cursive;
    background: var(--bg);
    -webkit-text-stroke: 0.3px currentColor;
    background-image:
        linear-gradient(to right, var(--glow-1) 0%, transparent 18%),
        linear-gradient(to left, var(--glow-2) 0%, transparent 18%),
        linear-gradient(to bottom, var(--glow-3) 0%, transparent 12%),
        linear-gradient(to top, var(--glow-4) 0%, transparent 12%),
        radial-gradient(ellipse 55% 40% at 50% 50%, var(--bg) 0%, transparent 100%),
        radial-gradient(ellipse 80% 60% at 45% 55%, rgba(160,130,50,0.04) 0%, transparent 70%);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
}

/* NAV */
nav { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 4rem; border-bottom: 1px solid var(--border); position: relative; }
.nav-page-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 1.7rem;
    color: var(--gold);
    pointer-events: none;
    white-space: nowrap;
}
.logo-link { text-decoration: none; }
.logo-link:hover .logo { opacity: 0.85; }
.logo {    
    font-size: 2.8rem;
    font-family: 'Indie Flower', cursive;
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #f0e6dc 15%,
        #ffffff 30%,
        #ffe8d6 45%,
        #fff 55%,
        #f5d0c0 68%,
        #ffffff 80%,
        #ffe0cc 90%,
        #fff 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}
.logo span {
    background: linear-gradient(
        140deg,
        var(--gold) 0%,
        var(--gold-light) 30%,
        #f0b840 50%,
        var(--gold) 70%,
        #d4a030 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    animation: laugh-pulse 3.5s ease-in-out infinite;
    animation-delay: 1s;
}

@keyframes laugh-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    /* First burst - biggest */
    10% { transform: scale(1.15) translateY(-2px); opacity: 1; }
    12.6% { transform: scale(1); opacity: 0.85; }
    /* Second burst - still strong */
    17.9% { transform: scale(1.1) translateY(-1.5px); opacity: 1; }
    20.5% { transform: scale(1); opacity: 0.8; }
    /* Third burst - fading */
    25.4% { transform: scale(1.06) translateY(-1px); opacity: 0.95; }
    27.8% { transform: scale(1); opacity: 0.75; }
    /* Fourth burst - trailing off */
    32.1% { transform: scale(1.03) translateY(-0.5px); opacity: 0.9; }
    34% { transform: scale(1); opacity: 0.7; }
    /* Settle back */
    40% { transform: scale(1); opacity: 1; }
}
nav ul { display: flex; list-style: none; gap: 2.5rem; }
nav a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
nav a:hover { color: var(--gold); }
nav ul { align-items: center; }

/* Sign In button (logged out) */
.nav-signin {
    background: var(--maroon);
    border: 1px solid var(--gold-dim);
    padding: 0.4rem 1.2rem;
    border-radius: 3px;
    color: var(--gold) !important;
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 1rem;
    transition: border-color 0.2s, background 0.2s;
}
.nav-signin:hover { border-color: var(--gold); background: rgba(201,168,76,0.08); }

/* Muster nav link — letters strain/jitter like they're being mustered/gathered by effort */
.nav-muster {
    color: var(--text) !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-flex;
}
.nav-muster span {
    display: inline-block;
    animation: muster-strain var(--dur, 2.4s) ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.09s);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition-delay: calc(var(--i) * 0.03s);
}
.nav-muster:hover span {
    animation: none;
    transform: translate(0, 0) rotate(0deg);
}
@keyframes muster-strain {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(calc(var(--dx) * 1px), calc(var(--dy) * 1px)) rotate(calc(var(--rot) * 1deg)); }
    40% { transform: translate(calc(var(--dx) * -0.8px), calc(var(--dy) * 0.9px)) rotate(calc(var(--rot) * -0.7deg)); }
    60% { transform: translate(calc(var(--dx) * 0.6px), calc(var(--dy) * -0.7px)) rotate(calc(var(--rot) * 0.8deg)); }
    80% { transform: translate(calc(var(--dx) * -0.9px), calc(var(--dy) * -0.5px)) rotate(calc(var(--rot) * -0.5deg)); }
}

/* User dropdown (logged in) */
.nav-user { position: relative; }
.user-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.4rem 1rem;
    border-radius: 3px;
    font-family: 'Nothing You Could Do', cursive;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s;
    position: relative;
    z-index: 1001;
}
.user-btn:hover { border-color: var(--gold-dim); }
.user-btn.open { border-color: var(--gold-dim); }
.user-btn.open:hover { border-color: var(--gold-dim); }
.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--gold-dim);
    border-radius: 0 0 3px 3px;
    min-width: 180px;
    z-index: 1000;
    padding: 0;
}
.user-dropdown.open { display: block; }
.dropdown-riot { display: block; padding: 0.6rem 1rem; color: var(--gold-dim); font-size: 0.8rem; font-family: 'JetBrains Mono', monospace; border-bottom: 1px solid var(--border); }
.dropdown-item { display: block; padding: 0.6rem 1rem; color: var(--text-muted); text-decoration: none; font-size: 0.85rem; transition: background 0.15s; }
.dropdown-item:hover { background: rgba(201,168,76,0.06); color: var(--text); }
.dropdown-item.signout { color: var(--blood-light); }
.dropdown-item.signout:hover { background: rgba(139,26,26,0.1); }

/* HERO */
.hero { text-align: center; padding: 8rem 2rem 4rem; max-width: 800px; margin: 0 auto; }
.hero h1 { font-size: 3.8rem; line-height: 1.2; margin-bottom: 1.5rem; color: var(--heading); font-family: 'Caveat', cursive; font-weight: 700; }
.hero h1 .accent { color: var(--gold); }
.hero p { font-size: 1rem; color: var(--text-muted); line-height: 2; margin-bottom: 2.5rem; max-width: 560px; margin-inline: auto; }
.cta-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn { padding: 0.8rem 2.2rem; border-radius: 2px; font-size: 0.9rem; text-decoration: none; transition: all 0.2s; border: none; }
.btn-primary { background: var(--gold); color: var(--on-gold); }
.btn-primary:hover { background: var(--gold-light); }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--blood-light); color: var(--blood-light); }

/* FEATURES */
.features { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; max-width: 1000px; margin: 6rem auto; padding: 0 2rem; }
.feature { background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; padding: 2rem; transition: all 0.25s; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.feature:hover { border-color: var(--gold-dim); transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(201,168,76,0.12); }
.feature-icon { width: 36px; height: 36px; border-radius: 4px; background: var(--maroon); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; margin-bottom: 1.2rem; font-size: 1rem; }
.feature h3 { font-size: 1.1rem; margin-bottom: 0.6rem; color: var(--heading); font-family: 'Caveat', cursive; font-weight: 700; }
.feature p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; }

/* HOW IT WORKS */
.how-it-works { max-width: 800px; margin: 4rem auto; padding: 0 2rem; text-align: center; }
.how-it-works h2 { font-size: 1.8rem; margin-bottom: 3rem; color: var(--heading); font-family: 'Caveat', cursive; font-weight: 700; }
.steps { display: flex; align-items: center; text-align: center; position: relative; }

.step {
    flex: 1;
    padding: 1.5rem;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--bg-card);
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.1s;
    position: relative;
    z-index: 2;
}

/* Hovered step gets wild electric border + shake */
.how-it-works .step:hover {
    animation: electric-border-wild 0.6s linear infinite, step-shake 0.08s linear infinite;
}

/* Line between steps — behind boxes, extends under their edges */
.step-line {
    flex: 0 0 2.5rem;
    min-width: 2.5rem;
    height: 2px;
    background: var(--border);
    margin: 0 -0.5rem;
    position: relative;
    z-index: 1;
    transition: background 0.3s, box-shadow 0.3s;
}

/* Line AFTER hovered step matches border — becomes part of it */
.how-it-works .step:hover + .step-line { background: var(--gold); box-shadow: 0 0 6px rgba(201,168,76,0.4); animation: pulse-line 0.6s linear infinite; }

.step-number {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--maroon); border: 1px solid var(--gold-dim);
    color: var(--gold); display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    font-family: 'JetBrains Mono', monospace; font-size: 0.9rem;
}
.step h4 { margin-bottom: 0.5rem; color: var(--heading); font-size: 1rem; font-family: 'Caveat', cursive; font-weight: 700; }
.step p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; }

/* DATA */
.data-section { max-width: 800px; margin: 6rem auto; padding: 2.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; text-align: center; }
.data-section h3 { font-size: 1.2rem; margin-bottom: 1rem; color: var(--heading); font-family: 'Caveat', cursive; font-weight: 700; }
.data-section p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; margin-bottom: 1rem; }
.api-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 1.5rem; }
.badge { font-family: 'Caveat', cursive; font-weight: 700; background: var(--maroon); border: 1px solid var(--border); padding: 0.4rem 0.8rem; border-radius: 2px; font-size: 0.85rem; color: var(--gold-dim); }
.badge:hover { border-color: var(--gold-dim); color: var(--gold); cursor: pointer; }
.badge.active { border-color: var(--gold); color: var(--gold); background: rgba(201,168,76,0.08); }

.badge-info {
    margin-top: 1.2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    min-height: 1.5rem;
    transition: opacity 0.2s;
}

/* FOOTER */
footer { text-align: center; padding: 3rem 2rem; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.75rem; line-height: 1.8; }
footer a { color: var(--gold-dim); text-decoration: none; }
footer a:hover { color: var(--gold); }

/* ANIMATIONS */
@keyframes pulse-line {
    0%, 100% { opacity: 1; background: var(--gold); }
    12% { opacity: 0.5; background: var(--gold-light); }
    37% { opacity: 1; background: var(--gold); }
    50% { opacity: 0.6; background: var(--gold-dim); }
    62% { opacity: 1; background: var(--gold-light); }
    75% { opacity: 0.4; background: var(--gold); }
    87% { opacity: 1; background: var(--gold-dim); }
}

@keyframes electric-border-wild {
    0%, 100% { border-color: var(--gold); box-shadow: 0 0 6px rgba(201,168,76,0.4); }
    12% { border-color: var(--gold-light); box-shadow: 0 0 10px rgba(201,168,76,0.5); }
    25% { border-color: var(--gold-dim); box-shadow: 0 0 4px rgba(201,168,76,0.2); }
    37% { border-color: var(--gold); box-shadow: 0 0 12px rgba(201,168,76,0.6); }
    50% { border-color: var(--gold-light); box-shadow: 0 0 6px rgba(201,168,76,0.3); }
    62% { border-color: var(--gold-dim); box-shadow: 0 0 8px rgba(201,168,76,0.5); }
    75% { border-color: var(--gold); box-shadow: 0 0 12px rgba(201,168,76,0.4); }
    87% { border-color: var(--gold-light); box-shadow: 0 0 8px rgba(201,168,76,0.6); }
}

@keyframes step-shake {
    0% { transform: translate(0.5px, -0.5px); }
    25% { transform: translate(-0.5px, 0.5px); }
    50% { transform: translate(0.5px, 0.3px); }
    75% { transform: translate(-0.3px, -0.5px); }
    100% { transform: translate(0.5px, -0.3px); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .features { grid-template-columns: 1fr; }
    .steps { flex-direction: column; }
    .step-line { width: 2px; height: 2rem; min-width: unset; }
    nav { padding: 1rem 2rem; }
    nav ul { display: none; }
}


/* NAV ACTIVE */
.nav-active { color: var(--gold) !important; }

/* DOWNLOAD PAGE */
.download-section { max-width: 700px; margin: 6rem auto; padding: 2rem; text-align: center; }
.download-section h1 { font-family: 'Caveat', cursive; font-weight: 700; font-size: 2.2rem; color: var(--heading); margin-bottom: 0.5rem; }

/* Download CTA */
.download-cta { margin-bottom: 2.5rem; }
.btn-download {
    display: inline-block;
    font-family: 'Nothing You Could Do', cursive;
    font-size: 1rem;
    padding: 0.8rem 2rem;
    border: 1px solid var(--gold-dim);
    border-radius: 4px;
    color: var(--gold);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    margin-bottom: 0.6rem;
}
.btn-download:hover { border-color: var(--gold); color: var(--heading); background: rgba(201,168,76,0.08); }
.btn-download-disabled { border-color: var(--border); color: var(--text-muted); cursor: default; }
.download-size { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--text-muted); opacity: 0.6; margin-top: 0.5rem; }

.download-status { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 2.5rem; margin-bottom: 2.5rem; }
.download-status .status-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.download-status h2 { font-family: 'Caveat', cursive; font-weight: 700; color: var(--gold); font-size: 1.4rem; margin-bottom: 0.8rem; }
.download-status p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.7; margin-bottom: 0.5rem; }
.download-status .status-detail { color: var(--text-muted); opacity: 0.7; font-size: 0.8rem; margin-top: 1rem; }

.download-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2.5rem; }
.dl-feature { background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; padding: 1.2rem 1.5rem; }
.dl-feature span { font-size: 1.5rem; display: block; margin-bottom: 0.5rem; }
.dl-feature p { color: var(--text-muted); font-size: 0.8rem; line-height: 1.5; }

/* GATE MESSAGE (for features pending prod API) */
.gate-message { max-width: 600px; margin: 8rem auto; padding: 2rem; text-align: center; }
.gate-message h2 { font-family: 'Caveat', cursive; font-weight: 700; color: var(--gold-dim); font-size: 1.6rem; margin-bottom: 1rem; }
.gate-message p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }

/* STATUS LINE */
.status-section { text-align: center; margin: 4rem auto; padding: 1.5rem; }
.status-line { color: var(--text-muted); font-size: 0.85rem; opacity: 0.7; }

/* LOOKUP PAGE */
.lookup-section { max-width: 600px; margin: 6rem auto; padding: 2rem; text-align: center; }
.lookup-section h1 { font-family: 'Caveat', cursive; font-weight: 700; font-size: 2rem; color: var(--heading); margin-bottom: 1.5rem; }
.lookup-bar { display: flex; gap: 0.5rem; max-width: 450px; margin: 0 auto; }
.lookup-bar input { flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 0.8rem 1.2rem; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; outline: none; }
.lookup-bar input:focus { border-color: var(--gold-dim); }
.lookup-bar button { background: var(--maroon); border: 1px solid var(--gold-dim); color: var(--gold); padding: 0.8rem 1.5rem; border-radius: 4px; font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.1rem; cursor: pointer; }
.lookup-bar button:hover { border-color: var(--gold); }

/* LOOKUP RESULTS */
.lookup-loading { color: var(--text-muted); font-size: 0.85rem; margin-top: 2rem; }
.lookup-error { color: #e74c3c; font-size: 0.85rem; margin-top: 1.5rem; }
.lookup-unavailable { color: var(--text-muted); font-size: 0.8rem; margin-top: 2rem; line-height: 1.6; }

.player-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}
.player-icon { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--gold-dim); }
.player-info { flex: 1; }
.player-name { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.4rem; color: var(--heading); }
.player-tag { color: var(--text-muted); font-size: 0.9rem; }
.player-level { color: var(--text-muted); font-size: 0.8rem; }
.player-unranked { color: var(--text-muted); font-size: 0.8rem; font-style: italic; }
.player-ranks { display: flex; flex-direction: column; gap: 0.4rem; }
.rank-entry { font-size: 0.75rem; font-family: 'JetBrains Mono', monospace; }
.rank-queue { color: var(--text-muted); }
.rank-tier { color: var(--gold); font-weight: 500; }
.rank-lp { color: var(--text); }
.rank-record { color: var(--text-muted); }

/* DOWNLOAD PAGE — How / Steps / Tech */
.download-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2.5rem; }
.download-how { margin-bottom: 2.5rem; }
.download-how h2 { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.4rem; color: var(--gold); margin-bottom: 1.2rem; }
.download-steps { display: flex; flex-direction: column; gap: 1rem; text-align: left; }
.dl-step { display: flex; align-items: flex-start; gap: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; padding: 1rem 1.2rem; }
.dl-step .step-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--gold);
    background: var(--maroon);
    border-radius: 50%;
    width: 1.8rem; height: 1.8rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.dl-step p { color: var(--text-muted); font-size: 0.82rem; line-height: 1.6; }
.download-tech { margin-top: 2.5rem; text-align: left; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; padding: 1.5rem; }
.download-tech h3 { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.1rem; color: var(--text); margin-bottom: 0.8rem; }
.download-tech ul { list-style: none; padding: 0; }
.download-tech li { color: var(--text-muted); font-size: 0.78rem; line-height: 1.8; padding-left: 1rem; position: relative; }
.download-tech li::before { content: '›'; position: absolute; left: 0; color: var(--gold-dim); }
.download-tech a { color: var(--gold); text-decoration: none; }
.download-tech a:hover { text-decoration: underline; }
.download-tech code { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--gold-dim); background: rgba(201,168,76,0.08); padding: 0.1rem 0.3rem; border-radius: 2px; }
.download-status code { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--gold-dim); background: rgba(201,168,76,0.08); padding: 0.1rem 0.3rem; border-radius: 2px; }

/* ACCOUNT PAGE */
.account-section { max-width: 500px; margin: 4rem auto; padding: 2rem; }
.account-section h1 {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 2rem;
    color: var(--heading);
    margin-bottom: 1.5rem;
}
.account-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1rem;
}
.account-row { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.account-row:last-of-type { border-bottom: none; }
.account-label { font-size: 0.8rem; color: var(--text-muted); }
.account-value { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--text); }
.account-value.riot-value { color: var(--gold); }
.account-value.unlinked { color: var(--text-muted); font-style: italic; }
.account-hint { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 1.5rem; opacity: 0.7; }
.account-hint a { color: var(--gold-dim); text-decoration: none; }
.account-hint a:hover { text-decoration: underline; }

/* Linked accounts list */
.linked-accounts-list { margin: 0.5rem 0 0.3rem; }
.linked-account-row { display: flex; justify-content: space-between; align-items: center; padding: 0.25rem 0; }
.linked-riot-id { font-family: 'Nothing You Could Do', cursive; font-size: 0.9rem; color: var(--text); }
.linked-account-row.active .linked-riot-id { color: var(--gold-dim); }
.linked-level { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--text-muted); opacity: 0.7; }

.linked-account-row { display: flex; align-items: center; gap: 0.5rem; }
.linked-remove-btn { background: none; border: none; font-size: 1.1rem; cursor: pointer; padding: 0; transition: color 0.2s; color: var(--border); line-height: 1; order: -1; font-weight: 700; }
.linked-remove-btn:hover { color: var(--blood-light); }
.linked-level { margin-left: auto; }

/* Confirm popup */
.confirm-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.confirm-popup { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 1.5rem 2rem; text-align: center; max-width: 280px; }
.confirm-text { font-family: 'Nothing You Could Do', cursive; font-size: 0.95rem; color: var(--text); margin-bottom: 1.2rem; }
.confirm-buttons { display: flex; gap: 0.8rem; justify-content: center; }
.confirm-btn { font-family: 'Nothing You Could Do', cursive; font-size: 0.8rem; padding: 0.4rem 1rem; border-radius: 3px; border: 1px solid var(--border); cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.confirm-btn.cancel { background: none; color: var(--text-muted); }
.confirm-btn.cancel:hover { border-color: var(--gold-dim); color: var(--text); }
.confirm-btn.remove { background: none; color: var(--blood-light); border-color: var(--blood); }
.confirm-btn.remove:hover { background: rgba(165,34,34,0.15); border-color: var(--blood-light); }

.account-signout { display: inline-block; font-size: 0.85rem; color: var(--blood-light); text-decoration: none; border: 1px solid var(--border); border-radius: 4px; padding: 0.5rem 1.2rem; transition: border-color 0.2s, color 0.2s; }
.account-signout:hover { border-color: var(--blood-light); color: var(--heading); }

/* Account page — new structure */
.account-info {
    margin-bottom: 1.5rem;
}
.account-username {
    font-family: 'Nothing You Could Do', cursive;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 0.2rem;
}
.account-email {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.linked-section { margin-top: 1rem; }
.linked-section h2 {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}
.linked-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
}
.linked-list { display: flex; flex-direction: column; gap: 0.3rem; }
.linked-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}
.linked-account-row.active .linked-status-dot { background: var(--gold); box-shadow: 0 0 4px rgba(201, 168, 76, 0.5); }

/* Confirm overlay */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.confirm-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem 2rem;
    max-width: 300px;
    text-align: center;
}
.confirm-box p { font-size: 0.85rem; margin-bottom: 1rem; color: var(--text); }
.confirm-actions { display: flex; gap: 0.8rem; justify-content: center; }
.confirm-cancel, .confirm-remove { font-family: 'Nothing You Could Do', cursive; font-size: 0.8rem; padding: 0.4rem 1rem; border-radius: 3px; border: 1px solid var(--border); cursor: pointer; transition: all 0.2s; }
.confirm-cancel { background: var(--bg-card); color: var(--text-muted); }
.confirm-cancel:hover { border-color: var(--text-muted); color: var(--text); }
.confirm-remove { background: var(--bg-card); color: var(--blood-light); border-color: var(--blood); }
.confirm-remove:hover { background: var(--blood); color: var(--on-accent); }

/* LIGHT MODE — component-specific overrides that hardcoded values can't cover via variables alone */
:root[data-theme="light"] .logo {
    background: linear-gradient(
        135deg,
        #10161c 0%,
        #2a3542 15%,
        #10161c 30%,
        #33404e 45%,
        #10161c 55%,
        #3a2e28 68%,
        #10161c 80%,
        #40312a 90%,
        #10161c 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
}
:root[data-theme="light"] .lookup-error { color: #b8362b; }

/* Flat var(--maroon) reads dull as a mid-tone blue — give these decorative
   accent backgrounds a subtle diagonal shine in light mode specifically. */
:root[data-theme="light"] .nav-signin,
:root[data-theme="light"] .feature-icon,
:root[data-theme="light"] .step-number,
:root[data-theme="light"] .badge,
:root[data-theme="light"] .lookup-bar button,
:root[data-theme="light"] .dl-step .step-num {
    background: linear-gradient(135deg, #7fb3e0 0%, #4a86bd 100%);
}

/* ===== SITE-WIDE SCROLLBAR ===== */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 6px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }
html { scrollbar-color: var(--gold-dim) var(--bg); scrollbar-width: thin; }
