:root {
    --bg: #0a0b10;
    --bg-elevated: #12141c;
    --surface: rgba(22, 25, 36, 0.72);
    --border: rgba(255, 255, 255, 0.08);
    --text: #e8eaef;
    --text-muted: #8b92a8;
    --accent: #7c5cff;
    --accent-2: #00d4aa;
    --accent-glow: rgba(124, 92, 255, 0.35);
    --danger: #ff5c7a;
    --gold: #ffd166;
    --silver: #c0c8d8;
    --diamond: #5ce1ff;
    --radius: 14px;
    --radius-lg: 22px;
    --font: 'Outfit', system-ui, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

.bg-glow-1 {
    width: 500px; height: 500px;
    top: -150px; right: -100px;
    background: var(--accent-glow);
}

.bg-glow-2 {
    width: 400px; height: 400px;
    bottom: -100px; left: -80px;
    background: rgba(0, 212, 170, 0.15);
}

.container {
    width: min(1180px, 92vw);
    margin: 0 auto;
}

.site-header,
.site-main,
.site-footer { position: relative; z-index: 1; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    background: rgba(10, 11, 16, 0.85);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 10px;
    font-size: 1rem;
}

.main-nav {
    display: flex;
    gap: 0.25rem;
}

.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text);
    background: rgba(255,255,255,0.06);
}

.header-search {
    margin-left: auto;
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.header-search input {
    background: transparent;
    border: none;
    color: var(--text);
    padding: 0.55rem 1rem;
    width: 180px;
    font-family: var(--font);
    outline: none;
}

.header-search button {
    background: transparent;
    border: none;
    padding: 0 0.85rem;
    cursor: pointer;
    font-size: 1rem;
}

.nav-toggle {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
}

/* Glass */
.glass {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

/* Hero */
.hero { padding: 3rem 0 2rem; }

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: rgba(124, 92, 255, 0.2);
    color: #b8a4ff;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 30%, #a8b0c8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin: 0.75rem 0 1.5rem;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.9rem;
}

.stat-pill strong { font-size: 1.1rem; }
.stat-pill span:last-child { color: var(--text-muted); }

.stat-pill.online .stat-dot {
    width: 8px; height: 8px;
    background: var(--accent-2);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    border-radius: 12px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #9b7dff);
    color: #fff;
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.08); }

.btn-ghost {
    background: rgba(255,255,255,0.06);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost:hover { background: rgba(255,255,255,0.1); }

.hero-card {
    padding: 2rem;
    text-align: center;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
}

.hero-skin {
    max-height: 300px;
    width: auto;
    image-rendering: pixelated;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
    margin-bottom: -1rem;
}

.hero-top-player h3 { font-size: 1.5rem; margin: 0.5rem 0; }

.rank-badge {
    font-size: 0.75rem;
    color: var(--gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.elo { font-family: var(--mono); color: var(--accent-2); font-weight: 600; }

.hero-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 1rem;
}

.hero-placeholder span { font-size: 4rem; opacity: 0.3; }

/* Sections */
.section { padding: 2.5rem 0; }

.section-title {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.panel { padding: 1.5rem; }

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.panel-head h2 { font-size: 1.1rem; }

.link-more {
    color: var(--accent-2);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.link-more:hover { text-decoration: underline; }

.lb-mini { list-style: none; }

.lb-mini li {
    display: grid;
    grid-template-columns: 36px 36px 1fr auto auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
}

.lb-mini li:last-child { border-bottom: none; }

.lb-mini .rank { font-weight: 700; font-size: 0.9rem; min-width: 28px; }

.avatar-sm {
    border-radius: 8px;
    image-rendering: pixelated;
    background: rgba(0,0,0,0.3);
}

.lb-mini .name {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.lb-mini .name:hover { color: var(--accent-2); }

.lb-mini .value { font-family: var(--mono); font-weight: 600; color: var(--accent-2); }

.lb-mini .sub { font-size: 0.8rem; color: var(--text-muted); }

.kit-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.kit-chip {
    padding: 0.5rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.kit-chip:hover {
    border-color: var(--accent);
    background: rgba(124, 92, 255, 0.15);
}

/* ── Tier Badges ────────────────────────────────────────── */
.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.28rem 0.7rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    border: 1px solid transparent;
}

.tier-badge.sm  { font-size: 0.62rem; padding: 0.15rem 0.45rem; gap: 0.25em; }
.tier-badge.lg  { font-size: 0.88rem; padding: 0.42rem 0.95rem; gap: 0.35em; }

.tier-icon { font-size: 0.85em; line-height: 1; flex-shrink: 0; }

/* Shimmer for top tiers */
@keyframes tier-shimmer {
    0%   { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}
.tier-netherite::after,
.tier-grandmaster::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 45%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,0.18), transparent);
    animation: tier-shimmer 2.8s ease-in-out infinite;
    pointer-events: none;
}

/* Netherite — purple-black obsidian */
.tier-netherite {
    background: linear-gradient(135deg, rgba(80,20,100,0.75) 0%, rgba(30,10,50,0.9) 100%);
    color: #d8b4fe;
    border-color: rgba(192,132,252,0.5);
    box-shadow: 0 0 14px rgba(192,132,252,0.25), inset 0 1px 0 rgba(255,255,255,0.07);
}

/* Grandmaster — crimson-gold */
.tier-grandmaster {
    background: linear-gradient(135deg, rgba(200,30,30,0.3) 0%, rgba(160,80,0,0.25) 100%);
    color: #fbbf24;
    border-color: rgba(251,191,36,0.5);
    box-shadow: 0 0 16px rgba(251,191,36,0.22), inset 0 1px 0 rgba(255,255,255,0.06);
}

/* Master — violet */
.tier-master {
    background: linear-gradient(135deg, rgba(109,40,217,0.3) 0%, rgba(67,56,202,0.25) 100%);
    color: #c4b5fd;
    border-color: rgba(196,181,253,0.45);
    box-shadow: 0 0 12px rgba(196,181,253,0.18);
}

/* Diamond — cyan */
.tier-diamond {
    background: linear-gradient(135deg, rgba(6,182,212,0.22) 0%, rgba(14,165,233,0.18) 100%);
    color: #67e8f9;
    border-color: rgba(103,232,249,0.45);
    box-shadow: 0 0 12px rgba(103,232,249,0.18);
}

/* Platinum — emerald-teal */
.tier-platinum {
    background: linear-gradient(135deg, rgba(16,185,129,0.22) 0%, rgba(5,150,105,0.18) 100%);
    color: #6ee7b7;
    border-color: rgba(110,231,183,0.4);
    box-shadow: 0 0 10px rgba(110,231,183,0.14);
}

/* Gold */
.tier-gold {
    background: linear-gradient(135deg, rgba(245,158,11,0.22) 0%, rgba(217,119,6,0.18) 100%);
    color: #fcd34d;
    border-color: rgba(252,211,77,0.45);
    box-shadow: 0 0 10px rgba(252,211,77,0.16);
}

/* Silver */
.tier-silver {
    background: linear-gradient(135deg, rgba(148,163,184,0.2) 0%, rgba(100,116,139,0.16) 100%);
    color: #cbd5e1;
    border-color: rgba(203,213,225,0.35);
}

/* Iron */
.tier-iron {
    background: linear-gradient(135deg, rgba(100,116,139,0.18) 0%, rgba(71,85,105,0.14) 100%);
    color: #94a3b8;
    border-color: rgba(148,163,184,0.28);
}

/* Bronze */
.tier-bronze {
    background: linear-gradient(135deg, rgba(180,83,9,0.22) 0%, rgba(146,64,14,0.18) 100%);
    color: #fb923c;
    border-color: rgba(251,146,60,0.38);
}

/* Unranked / Default */
.tier-unranked,
.tier-default {
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
    border-color: rgba(255,255,255,0.08);
}

/* CTA */
.cta-card {
    padding: 2.5rem;
    text-align: center;
}

.cta-card h2 { margin-bottom: 0.5rem; }
.cta-card p { color: var(--text-muted); margin-bottom: 1.5rem; }

.cta-search {
    display: flex;
    gap: 0.75rem;
    max-width: 480px;
    margin: 0 auto;
}

.cta-search input {
    flex: 1;
    padding: 0.85rem 1.1rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: var(--font);
    outline: none;
}

.cta-search input:focus { border-color: var(--accent); }

/* Player profile */
.search-bar {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    margin-bottom: 2rem;
}

.search-bar input {
    flex: 1;
    padding: 0.85rem 1.1rem;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    outline: none;
}

.profile-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.profile-skin-wrap { position: relative; }

.profile-skin {
    height: 320px;
    width: auto;
    image-rendering: pixelated;
    filter: drop-shadow(0 16px 32px rgba(0,0,0,0.5));
}

.profile-avatar-float {
    position: absolute;
    bottom: 10px;
    right: -10px;
    border-radius: 10px;
    border: 3px solid var(--bg);
    image-rendering: pixelated;
    box-shadow: var(--shadow);
}

.profile-info h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.profile-ranked {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.elo-block { display: flex; flex-direction: column; }

.elo-main {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--mono);
    color: var(--accent-2);
    line-height: 1;
}

.elo-label { font-size: 0.8rem; color: var(--text-muted); }

.peak { color: var(--text-muted); font-size: 0.9rem; }
.peak strong { color: var(--text); }

.profile-quick {
    display: flex;
    gap: 1.25rem;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.9rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    padding: 1.25rem;
    text-align: center;
}

.stat-card.highlight {
    border-color: rgba(124, 92, 255, 0.35);
    background: rgba(124, 92, 255, 0.08);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    font-family: var(--mono);
}

.stat-value.accent { color: var(--accent-2); }

.panel-title {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.ffa-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    text-align: center;
}

.ffa-row strong {
    display: block;
    font-size: 1.5rem;
    font-family: var(--mono);
    margin-top: 0.25rem;
}

.ffa-row .accent { color: var(--accent-2); }

.kit-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.15rem;
}

/* ── Kit Stat Card (glassmorphism) ───────────────── */
.kit-stat-card {
    --glow: rgba(255,255,255,0.1);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.09);
    background: rgba(10,12,24,0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
}

/* Tier top stripe */
.kit-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: rgba(255,255,255,0.06);
    z-index: 2;
}

/* Ambient glow behind card header */
.kit-stat-card::after {
    content: '';
    position: absolute;
    top: -70px; left: 50%;
    transform: translateX(-50%);
    width: 200px; height: 200px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.1;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 0;
}

.kit-stat-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255,255,255,0.16);
    box-shadow: 0 24px 56px rgba(0,0,0,0.6), 0 0 0 1px var(--glow);
}
.kit-stat-card:hover::after { opacity: 0.26; }

/* Per-tier: top stripe + glow blob + hover shadow color */
.kit-stat-card.tier-netherite   { --glow: rgba(192,132,252,0.3); }
.kit-stat-card.tier-grandmaster { --glow: rgba(251,191,36,0.3); }
.kit-stat-card.tier-master      { --glow: rgba(167,139,250,0.3); }
.kit-stat-card.tier-diamond     { --glow: rgba(103,232,249,0.3); }
.kit-stat-card.tier-platinum    { --glow: rgba(110,231,183,0.28); }
.kit-stat-card.tier-gold        { --glow: rgba(252,211,77,0.28); }
.kit-stat-card.tier-silver      { --glow: rgba(203,213,225,0.22); }
.kit-stat-card.tier-iron        { --glow: rgba(148,163,184,0.2); }
.kit-stat-card.tier-bronze      { --glow: rgba(251,146,60,0.28); }

.kit-stat-card.tier-netherite::before   { background: linear-gradient(90deg,#c084fc,#7c3aed30); }
.kit-stat-card.tier-grandmaster::before { background: linear-gradient(90deg,#fbbf24,#d9770630); }
.kit-stat-card.tier-master::before      { background: linear-gradient(90deg,#c4b5fd,#6d28d930); }
.kit-stat-card.tier-diamond::before     { background: linear-gradient(90deg,#67e8f9,#0891b230); }
.kit-stat-card.tier-platinum::before    { background: linear-gradient(90deg,#6ee7b7,#10b98130); }
.kit-stat-card.tier-gold::before        { background: linear-gradient(90deg,#fcd34d,#f59e0b30); }
.kit-stat-card.tier-silver::before      { background: linear-gradient(90deg,#cbd5e1,#94a3b830); }
.kit-stat-card.tier-iron::before        { background: linear-gradient(90deg,#94a3b8,#64748b30); }
.kit-stat-card.tier-bronze::before      { background: linear-gradient(90deg,#fb923c,#b4530930); }

.kit-stat-card.tier-netherite::after   { background: #c084fc; }
.kit-stat-card.tier-grandmaster::after { background: #fbbf24; }
.kit-stat-card.tier-master::after      { background: #a78bfa; }
.kit-stat-card.tier-diamond::after     { background: #67e8f9; }
.kit-stat-card.tier-platinum::after    { background: #6ee7b7; }
.kit-stat-card.tier-gold::after        { background: #fcd34d; }
.kit-stat-card.tier-silver::after      { background: #cbd5e1; }
.kit-stat-card.tier-iron::after        { background: #94a3b8; }
.kit-stat-card.tier-bronze::after      { background: #fb923c; }

/* ─ Header */
.ksc-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.05rem 1.15rem 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
    z-index: 1;
}

.ksc-icon-box {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.ksc-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.2;
}

.ksc-link {
    font-size: 0.68rem;
    color: var(--accent-2);
    text-decoration: none;
    opacity: 0.5;
    display: block;
    margin-top: 0.12rem;
    transition: opacity 0.15s;
}
.ksc-link:hover { opacity: 1; }

/* ─ Rank section */
.ksc-rank {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.3rem 1rem 1.1rem;
    gap: 0.18rem;
    position: relative;
    z-index: 1;
    flex: 1;
}

.ksc-elo-big {
    font-size: 2.55rem;
    font-weight: 900;
    font-family: var(--mono);
    color: #fff;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-top: 0.3rem;
    text-shadow: 0 2px 20px rgba(255,255,255,0.15);
}

.ksc-elo-lbl {
    font-size: 0.58rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-top: 0.08rem;
}

/* ─ Stats footer */
.ksc-footer {
    display: flex;
    align-items: stretch;
    border-top: 1px solid rgba(255,255,255,0.05);
    position: relative;
    z-index: 1;
}

.ksc-stat {
    flex: 1;
    padding: 0.72rem 0.3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.18rem;
}

.ksc-sep {
    width: 1px;
    background: rgba(255,255,255,0.05);
    align-self: stretch;
}

.ksc-sv {
    font-size: 1.05rem;
    font-weight: 800;
    font-family: var(--mono);
    line-height: 1;
}
.ksc-sv.g { color: #4ade80; }
.ksc-sv.r { color: #f87171; }

.ksc-sl {
    font-size: 0.58rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* W/L bar in the center stat */
.ksc-bar {
    width: 52px;
    height: 4px;
    border-radius: 99px;
    background: rgba(255,255,255,0.07);
    overflow: hidden;
    margin-bottom: 0.08rem;
}
.ksc-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    min-width: 2px;
}

/* ─ Streak strip */
.ksc-streak {
    text-align: center;
    padding: 0.38rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fb923c;
    background: linear-gradient(90deg, rgba(251,146,60,0.12), rgba(251,146,60,0.06));
    border-top: 1px solid rgba(251,146,60,0.2);
    position: relative;
    z-index: 1;
    letter-spacing: 0.03em;
}

/* Leaderboard */
.lb-header { margin-bottom: 1.5rem; }
.lb-header h1 { font-size: 2rem; font-weight: 800; }

.lb-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.35rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.lb-tabs a {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.lb-tabs a:hover { color: var(--text); }
.lb-tabs a.active {
    background: linear-gradient(135deg, var(--accent), #9b7dff);
    color: #fff;
}

.kit-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.kit-tab {
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.kit-tab:hover, .kit-tab.active {
    color: var(--text);
    border-color: var(--accent);
}

.lb-table-wrap { overflow-x: auto; padding: 0; }

.lb-table {
    width: 100%;
    border-collapse: collapse;
}

.lb-table th,
.lb-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.lb-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
}

.lb-table tbody tr {
    transition: var(--transition);
}

.lb-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

.lb-table tr.top-1 {
    background: rgba(255,209,102,0.07);
    box-shadow: inset 3px 0 0 rgba(255,209,102,0.55);
}
.lb-table tr.top-2 {
    background: rgba(203,213,225,0.05);
    box-shadow: inset 3px 0 0 rgba(203,213,225,0.4);
}
.lb-table tr.top-3 {
    background: rgba(251,146,60,0.06);
    box-shadow: inset 3px 0 0 rgba(251,146,60,0.45);
}

.rank-cell { font-weight: 700; width: 60px; }

.player-cell {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.player-cell img {
    border-radius: 8px;
    image-rendering: pixelated;
    background: rgba(0,0,0,0.3);
}

.player-cell a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.player-cell a:hover { color: var(--accent-2); }

.mono { font-family: var(--mono); }
.accent { color: var(--accent-2); }
.muted { color: var(--text-muted); }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.page-info { color: var(--text-muted); font-size: 0.9rem; }

/* Empty / alerts */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.alert-error {
    background: rgba(255, 92, 122, 0.12);
    border: 1px solid rgba(255, 92, 122, 0.3);
    color: #ff8fa3;
}

.alert small {
    display: block;
    margin-top: 0.5rem;
    opacity: 0.7;
    font-family: var(--mono);
    font-size: 0.8rem;
}

/* Footer */
.site-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand strong { display: block; }
.footer-brand span { color: var(--text-muted); font-size: 0.9rem; }

.footer-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-note { font-size: 0.75rem; }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

/* Responsive */
@media (max-width: 900px) {
    .hero-grid,
    .two-col,
    .profile-hero { grid-template-columns: 1fr; }

    .hero-visual { order: -1; }

    .stat-grid { grid-template-columns: repeat(2, 1fr); }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        flex-direction: column;
        background: var(--bg-elevated);
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .main-nav.open { display: flex; }

    .nav-toggle { display: block; }

    .header-search { display: none; }
}

@media (max-width: 600px) {
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .ffa-row { grid-template-columns: 1fr; }
    .lb-mini li { grid-template-columns: 28px 32px 1fr; }
    .lb-mini .sub, .lb-mini .tier-badge { display: none; }
}
