/* Stats + player pages. Everything here is filled in by stats.js from /data/*.json. */
.st-hero .lede { margin-bottom: 22px; }
.pulse { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pulse i { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: ping 2s ease-out infinite; }
.pulse.stale i { background: #6b7280; animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(74,222,128,0); } }

/* search */
.find { display: flex; max-width: 440px; margin-top: 18px; background: rgba(10,10,14,.78); border: 1px solid rgba(255,255,255,.14); border-radius: 4px; overflow: hidden; }
.find input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--fg); font: 600 18px var(--body); padding: 11px 14px; }
.find input::placeholder { color: #6f7480; }
.find input:focus { outline: none; }
.find:focus-within { border-color: rgba(255,201,74,.6); }
.find button { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: .1em; text-transform: uppercase; background: var(--gold); color: #18130a; border: 0; padding: 0 18px; cursor: pointer; }
.find button:hover { background: #ffd877; }


/* section headings in the stats body */
.st-sec { padding-block: clamp(44px, 6vw, 72px) 0; }
.st-sec:last-of-type { padding-bottom: clamp(56px, 8vw, 96px); }
.st-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 20px; margin-bottom: 20px; }
.st-head h2 { margin: 0; font-size: clamp(36px, 5vw, 54px); }
.st-head p { margin: 0; color: var(--muted); font-size: 15px; }
.empty { color: var(--muted); background: var(--panel); border: 1px dashed rgba(255,255,255,.12); border-radius: 6px; padding: 26px; text-align: center; font-size: 15px; }

/* live servers */
.srv-group { margin-top: 18px; }
.srv-group h3 { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.srv { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 16px 16px 14px; overflow: hidden; transition: border-color .3s, transform .25s; }
.srv:hover { transform: translateY(-3px); }
.srv.idle { opacity: .62; }
.srv.offline { opacity: .38; }
.srv.live { border-color: rgba(255,201,74,.35); background: linear-gradient(160deg, rgba(92,20,16,.35), transparent 45%), linear-gradient(340deg, rgba(15,34,87,.45), transparent 45%), var(--panel); }
.srv-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.srv h4 { margin: 0; font-family: var(--display); font-style: italic; font-weight: 900; text-transform: uppercase; font-size: 28px; line-height: 1; }
.srv .map-name { color: var(--muted); font-size: 14px; margin-top: 3px; text-transform: capitalize; }
.badge { flex: none; display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; background: rgba(255,255,255,.07); color: var(--muted); }
.badge.in_progress { background: rgba(229,64,47,.16); color: #ff8a7d; }
.badge.in_progress::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: blink 1.2s ease-in-out infinite; }
.badge.starting { background: rgba(255,201,74,.14); color: var(--gold); }
@keyframes blink { 50% { opacity: .25; } }
.score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 14px; }
.hp { display: flex; gap: 3px; } .hp.b { justify-content: flex-end; }
.hp i { width: 16px; height: 16px; display: block; background: currentColor; clip-path: path("M8 15 1.4 8.4A4 4 0 0 1 8 3.3a4 4 0 0 1 6.6 5.1Z"); }
.hp.r i { color: var(--red); } .hp.b i { color: var(--blue); } .hp i.gone { color: rgba(255,255,255,.12); }
.clock { font-family: var(--display); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.tbar { display: flex; height: 6px; margin-top: 12px; border-radius: 3px; overflow: hidden; gap: 2px; background: transparent; }
.tbar span { display: block; min-width: 0; transition: flex-grow .6s ease; }
.tbar .r { background: var(--red); } .tbar .b { background: var(--blue); } .tbar .e { background: rgba(255,255,255,.07); }
.srv-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.srv-foot b { color: var(--fg); font-weight: 600; }
.cc-r { color: #ff8a7d; } .cc-b { color: #8db3ff; }

/* leaderboards */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tabs button { font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 6px 12px; cursor: pointer; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { color: #18130a; background: var(--gold); border-color: var(--gold); }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 12px; margin-bottom: 14px; }
.pod { text-align: center; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: 6px 6px 0 0; padding: 16px 10px 14px; position: relative; transition: transform .25s; }
.pod:hover { transform: translateY(-4px); }
.pod img { margin: 0 auto 8px; height: 120px; width: auto; filter: drop-shadow(0 10px 14px rgba(0,0,0,.5)); }
.pod.p1 { padding-top: 24px; border-color: rgba(255,201,74,.5); background: linear-gradient(180deg, rgba(255,201,74,.12), transparent 60%), var(--panel); }
.pod.p1 img { height: 150px; }
.pod .place { position: absolute; top: 8px; left: 10px; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 26px; color: var(--muted); }
.pod.p1 .place { color: var(--gold); }
.pod .who { font-family: var(--display); font-weight: 800; font-size: 20px; overflow-wrap: anywhere; }
.pod .val { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 30px; line-height: 1.1; color: var(--gold); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .pod img { height: 80px; } .pod.p1 img { height: 100px; } .pod .who { font-size: 16px; } .pod .val { font-size: 22px; } }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rows li a { position: relative; display: grid; grid-template-columns: 34px 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 14px; text-decoration: none; background: var(--panel); border-radius: 4px; overflow: hidden; }
.rows li a:hover { background: #1d212b; }
.rows .fill { position: absolute; inset: 0 auto 0 0; background: rgba(255,201,74,.07); border-right: 2px solid rgba(255,201,74,.35); z-index: 0; transition: width .7s cubic-bezier(.2,.8,.2,1); }
.rows li a > *:not(.fill) { position: relative; z-index: 1; }
.rows .n { font-family: var(--display); font-weight: 800; color: var(--muted); }
.rows img { width: 28px; height: 28px; border-radius: 3px; }
.rows .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .v { font-family: var(--display); font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; }

/* two-column layout for matches + feed */
.cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.cols > div > h3 { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }

/* matches */
.matches { display: grid; gap: 8px; }
.match { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid #4b5160; border-radius: 4px; padding: 12px 14px; display: grid; gap: 8px; }
.match.w-red { border-left-color: var(--red); } .match.w-blue { border-left-color: var(--blue); } .match.w-tie { border-left-color: var(--gold); }
.m-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.m-res { font-family: var(--display); font-style: italic; font-weight: 900; text-transform: uppercase; font-size: 22px; line-height: 1; }
.w-red .m-res { color: #ff8a7d; } .w-blue .m-res { color: #8db3ff; } .w-tie .m-res { color: var(--gold); } .w-none .m-res { color: var(--muted); }
.m-meta { color: var(--muted); font-size: 14px; }
.m-meta b { color: var(--fg); font-weight: 600; text-transform: capitalize; }
.m-when { margin-left: auto; color: var(--muted); font-size: 13px; }
.m-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.m-team { display: flex; flex-wrap: wrap; gap: 6px; }
.m-team.b { justify-content: flex-end; }
.m-vs { font-family: var(--display); font-weight: 900; font-style: italic; color: #5b616e; }
.pl { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 14px; font-weight: 600; background: rgba(255,255,255,.04); border-radius: 3px; padding: 2px 8px 2px 2px; }
.pl:hover { background: rgba(255,255,255,.09); }
.pl img { width: 20px; height: 20px; border-radius: 2px; }
.m-team.r .pl { box-shadow: inset 2px 0 0 var(--red); } .m-team.b .pl { box-shadow: inset -2px 0 0 var(--blue); }
.pl small { color: var(--muted); font-weight: 500; }
.mvp { color: var(--gold); }

/* kill feed */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.feed li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; background: rgba(0,0,0,.35); border-radius: 3px; padding: 7px 10px; font-size: 14px; animation: rise .5s ease-out both; }
.feed a { text-decoration: none; font-weight: 600; }
.feed a:hover { text-decoration: underline; }
.feed .x { color: var(--red); font-weight: 900; }
.feed .w { color: var(--muted); }
.feed .t { margin-left: auto; color: #6f7480; font-size: 12px; }

/* charts */
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .charts { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 18px 18px 14px; min-width: 0; position: relative; }
.card.wide { grid-column: 1 / -1; }
.card h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 22px; line-height: 1; margin: 0; }
.card .sub { color: var(--muted); font-size: 13px; margin: 4px 0 14px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: rgba(255,255,255,.06); }
.chart .axis text { fill: #7d8290; font: 500 11px var(--body); }
.tip-box { position: absolute; pointer-events: none; z-index: 5; background: #0b0c10; border: 1px solid rgba(255,255,255,.14); border-radius: 4px; padding: 6px 9px; font-size: 13px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity .12s; box-shadow: 0 8px 20px rgba(0,0,0,.5); }
.tip-box.on { opacity: 1; }
.tip-box b { font-family: var(--display); font-size: 16px; }
.tip-box span { color: var(--muted); }
.hbars { display: grid; gap: 7px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 34%) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d8dbe2; text-transform: capitalize; }
.hbar .trk { height: 12px; border-radius: 0 3px 3px 0; overflow: hidden; display: flex; gap: 2px; }
.hbar .trk span { display: block; height: 100%; border-radius: 0 3px 3px 0; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.hbar .g { background: var(--gold); } .hbar .r { background: var(--red); border-radius: 0; } .hbar .b { background: var(--blue); }
.hbar .num { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.split-bar { display: flex; height: 44px; border-radius: 4px; overflow: hidden; gap: 2px; margin-top: 6px; }
.split-bar span { display: flex; align-items: center; padding: 0 12px; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 22px; min-width: 0; white-space: nowrap; overflow: hidden; transition: flex-grow .8s ease; }
.split-bar .r { background: var(--red); } .split-bar .b { background: var(--blue); justify-content: flex-end; } .split-bar .t { background: #4b5160; justify-content: center; font-size: 15px; }
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 11px; color: #7d8290; }
.heat .c { aspect-ratio: 1; border-radius: 2px; background: rgba(255,255,255,.04); }
.heat .c:hover { outline: 1px solid var(--fg); }
.heat .hl { align-self: center; }
.heat .hx { text-align: center; }
.kit-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.kit-table th { text-align: left; font-family: var(--display); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; color: var(--muted); padding: 0 8px 8px; }
.kit-table td { padding: 7px 8px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.kit-table td:first-child { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.kit-table img { width: 22px; height: 22px; }
.kit-table th:not(:first-child), .kit-table td:not(:first-child) { text-align: right; }

/* ---------- player page ---------- */
.pp-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 4vw, 44px); align-items: end; }
@media (max-width: 640px) { .pp-hero { grid-template-columns: 1fr; } }
.pp-skin { height: clamp(200px, 30vw, 300px); width: auto; filter: drop-shadow(0 20px 30px rgba(0,0,0,.6)); animation: sway 6s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes sway { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
.pp-hero h1 { overflow-wrap: anywhere; margin-bottom: 10px; }
.rank { display: inline-block; font-family: var(--display); font-weight: 800; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 10px; border-radius: 3px; background: rgba(255,255,255,.08); margin-right: 6px; vertical-align: middle; }
.rank.executive { background: var(--gold); color: #18130a; }
.rank.moderator { background: #2f855a; } .rank.builder { background: #7c3aed; } .rank.youtuber, .rank.streamer { background: var(--red); }
.rank.q { background: rgba(255,201,74,.15); color: var(--gold); }
.facts { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 12px; color: var(--muted); font-size: 15px; }
.facts b { color: var(--fg); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; position: relative; }
.tile b { display: block; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 36px; line-height: 1; font-variant-numeric: tabular-nums; }
.tile span { display: block; margin-top: 6px; font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tile em { position: absolute; top: 10px; right: 12px; font-style: normal; font-family: var(--display); font-weight: 800; font-size: 13px; color: var(--gold); }
.form { display: flex; gap: 4px; flex-wrap: wrap; }
.form span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 3px; font-family: var(--display); font-weight: 900; font-size: 16px; background: #3a3f4b; }
.form .W { background: #22863a; } .form .L { background: #8b2a22; } .form .T { background: #8a6d1d; }
.rivals { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.rival { display: flex; align-items: center; gap: 14px; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px; }
.rival:hover { border-color: rgba(255,201,74,.35); }
.rival img { width: 48px; height: 48px; border-radius: 4px; }
.rival small { display: block; font-family: var(--display); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; color: var(--muted); }
.rival b { font-family: var(--display); font-size: 22px; font-weight: 800; }
.rival span { color: var(--muted); font-size: 14px; }
.hist { width: 100%; border-collapse: collapse; font-size: 14px; }
.hist th { text-align: left; font-family: var(--display); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; color: var(--muted); padding: 0 10px 8px; white-space: nowrap; }
.hist td { padding: 9px 10px; border-top: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hist td.res { font-family: var(--display); font-weight: 900; font-size: 18px; }
.hist .W { color: #4ade80; } .hist .L { color: #ff8a7d; } .hist .T { color: var(--gold); } .hist .x { color: var(--muted); }
.hist .tm-RED { color: #ff8a7d; } .hist .tm-BLUE { color: #8db3ff; }
.scroll-x { overflow-x: auto; }
.lost-player { text-align: center; padding-block: 40px; }
