:root {
    --bg: #080b10;
    --bg-2: #0c1118;
    --panel: #111823;
    --panel-2: #16202d;
    --line: #1e2b3a;
    --gold: #c8aa6e;
    --gold-bright: #f0e6d2;
    --gold-dim: #7a6a46;
    --text: #dce3ea;
    --muted: #74849a;
    --win: #3fc47f;
    --loss: #e05c5c;
    --shadow: 0 8px 24px rgba(0, 0, 0, .45);
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background:
        radial-gradient(1100px 500px at 50% -220px, #16283a 0%, transparent 70%),
        var(--bg);
    color: var(--text);
    font: 15px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-variant-numeric: tabular-nums;
    min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px 80px; }

/* ------------------------------------------------------------------ header */

header.top {
    border-bottom: 1px solid var(--line);
    background: rgba(8, 11, 16, .8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}

header.top .inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    font-weight: 800;
    letter-spacing: .14em;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--gold);
    white-space: nowrap;
}
.brand span { color: var(--muted); font-weight: 500; }

nav.top-links { display: flex; gap: 18px; font-size: 14px; margin-left: auto; }
nav.top-links a { color: var(--muted); }
nav.top-links a:hover, nav.top-links a.on { color: var(--gold-bright); }

/* -------------------------------------------------------------------- bits */

h1 { font-size: 26px; margin: 32px 0 4px; letter-spacing: -.01em; }
h2 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--gold-dim);
    margin: 34px 0 14px;
    font-weight: 700;
}
.sub { color: var(--muted); font-size: 14px; margin: 0 0 8px; }

.panel {
    background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.grid { display: grid; gap: 14px; }
.cols-2 { grid-template-columns: 1.35fr 1fr; }
.cards { grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); }
@media (max-width: 900px) { .cols-2 { grid-template-columns: 1fr; } }

.tag {
    display: inline-block;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
}
.tag.gold { border-color: var(--gold-dim); color: var(--gold); }
.tag.ok { border-color: rgba(63, 196, 127, .4); color: var(--win); }

.champ {
    width: 42px; height: 42px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    object-fit: cover;
    flex: none;
}
.champ.sm { width: 30px; height: 30px; border-radius: 6px; }
.champ.lg { width: 56px; height: 56px; }

/* ---------------------------------------------------------------- profiles */

.profile {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(200, 170, 110, .07) 0%, transparent 45%),
        var(--panel);
    margin-top: 18px;
}
.profile .name { font-size: 23px; font-weight: 700; letter-spacing: -.01em; }
.profile .meta { color: var(--muted); font-size: 13px; margin-top: 5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crest {
    width: 58px; height: 58px; flex: none;
    border-radius: 12px;
    border: 1px solid var(--gold-dim);
    display: grid; place-items: center;
    font-weight: 800; color: var(--gold);
    background: linear-gradient(160deg, #1d2735, #0f151d);
    font-size: 19px;
}

/* ------------------------------------------------------------- fact cards */

.fact {
    padding: 15px 16px;
    display: flex;
    gap: 13px;
    align-items: center;
    background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .15s, transform .15s;
}
.fact:hover { border-color: var(--gold-dim); transform: translateY(-1px); }
.fact .body { min-width: 0; flex: 1; }
.fact .label {
    font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase;
    color: var(--gold-dim); font-weight: 700;
}
.fact .value {
    font-size: 25px; font-weight: 800; color: var(--gold-bright);
    line-height: 1.15; margin-top: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fact .foot { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ------------------------------------------------------------------ tables */

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
    text-align: left;
    font-size: 10.5px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--gold-dim);
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    font-weight: 700;
    white-space: nowrap;
}
td { padding: 10px 14px; border-bottom: 1px solid rgba(30, 43, 58, .55); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(200, 170, 110, .045); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.dim { color: var(--muted); }
.win { color: var(--win); font-weight: 600; }
.loss { color: var(--loss); font-weight: 600; }
.rank-1 { color: var(--gold); font-weight: 800; }

.cellchamp { display: flex; align-items: center; gap: 9px; }

.result-bar {
    width: 3px; height: 30px; border-radius: 2px; flex: none;
}
.result-bar.w { background: var(--win); }
.result-bar.l { background: var(--loss); }

/* -------------------------------------------------------------- duel feed */

.duel {
    display: flex; align-items: center; gap: 13px;
    padding: 13px 15px;
    border-bottom: 1px solid rgba(30, 43, 58, .55);
}
.duel:last-child { border-bottom: 0; }
.duel .vs { flex: 1; min-width: 0; }
.duel .line1 { font-size: 12px; color: var(--gold-dim); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.duel .line2 { margin-top: 3px; }
.duel .pts { font-weight: 700; white-space: nowrap; }

.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.empty code { color: var(--gold); background: var(--panel-2); padding: 2px 7px; border-radius: 5px; }

footer.bot { color: var(--muted); font-size: 12px; text-align: center; padding: 30px 0; }

/* ------------------------------------------------------------------ search */

.search {
    width: 100%;
    padding: 11px 14px;
    margin: 4px 0 16px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    font: inherit;
    outline: none;
}
.search:focus { border-color: var(--gold-dim); }
.search::placeholder { color: var(--muted); }

/* ------------------------------------------------------------- stat tiles */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.stat {
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
}
.stat .k {
    font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase;
    color: var(--gold-dim); font-weight: 700;
}
.stat .v { font-size: 27px; font-weight: 800; color: var(--gold-bright); margin-top: 4px; }
.stat .n { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* -------------------------------------------------------------- hero duel */

.hero {
    margin-top: 18px;
    padding: 22px;
    border: 1px solid var(--gold-dim);
    border-radius: var(--radius);
    background:
        radial-gradient(600px 200px at 12% 0%, rgba(200, 170, 110, .12), transparent 70%),
        linear-gradient(180deg, var(--panel), var(--bg-2));
}
.hero .kicker {
    font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
    color: var(--gold); font-weight: 800;
}
.hero .headline { font-size: 22px; font-weight: 800; margin-top: 8px; line-height: 1.3; }
.hero .headline .who { color: var(--gold-bright); }
.hero .detail { color: var(--muted); font-size: 13px; margin-top: 8px; }

.rowlink { color: inherit; }
.rowlink:hover { color: var(--gold-bright); }

