/* Stats portal styles, shared by every page. */

:root {
  --bg: #0b0f14;
  --panel: #121922;
  --panel2: #18212c;
  --line: #243142;
  --text: #dbe4ee;
  --muted: #8a9bb0;
  --accent: #f5b229;
  --accent2: #4fb3e8;
  --good: #5fd38d;
  --bad: #ef6b6b;
  --radius: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--panel2); padding: 1px 6px; border-radius: 4px; }
input, button {
  font: inherit; color: var(--text); background: var(--panel2);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px;
}
button { cursor: pointer; background: var(--accent); color: #111; border: 0; font-weight: 700; }

/* Header and footer */
header { background: linear-gradient(180deg, #141d28, #0e141b); border-bottom: 2px solid var(--accent); }
.bar { max-width: 1180px; margin: 0 auto; padding: 12px 16px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.brand { font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text); font-size: 17px; }
.brand b { color: var(--accent); }
.brand:hover { text-decoration: none; }
.pages { display: flex; gap: 14px; flex-wrap: wrap; }
.pages a { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 600; }
.pages a.on, .pages a:hover { color: var(--text); text-decoration: none; }
.switch { display: flex; gap: 4px; background: var(--panel2); border: 1px solid var(--line); border-radius: 99px; padding: 3px; }
.switch a { color: var(--muted); font-size: 12.5px; font-weight: 700; padding: 3px 11px; border-radius: 99px; text-decoration: none; }
.switch a.on { background: var(--accent); color: #111; }
form.search { margin-left: auto; display: flex; gap: 6px; }
footer { max-width: 1180px; margin: 0 auto; padding: 0 16px 30px; color: var(--muted); font-size: 12.5px; }
.notice { max-width: 1148px; margin: 16px auto 0; padding: 12px 14px; border: 1px solid var(--bad); border-radius: var(--radius); background: rgba(239, 107, 107, .1); }

/* Page layout */
main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 48px; }
h1 { font-size: 26px; margin: 4px 0 2px; letter-spacing: .02em; }
h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 28px 0 10px; font-weight: 700; }
.sub { color: var(--muted); margin: 0 0 8px; }
.muted { color: var(--muted); }
.spaced { margin-top: 14px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.empty { padding: 16px; color: var(--muted); }
.scroll { overflow-x: auto; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pager { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.tile .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.tile .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--panel2); }
td.n, th.n { text-align: right; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #16202b; }
th a { color: var(--muted); }
th a.on { color: var(--accent); }
.pos { color: var(--muted); width: 44px; }
.top1 .pos { color: #ffd54a; }
.top2 .pos { color: #cfd8dc; }
.top3 .pos { color: #d4915a; }
/* The tint spans the whole row, so it does not restart in each cell. */
tr.top1 { background: linear-gradient(90deg, rgba(255, 213, 74, .14), transparent 70%); }
tr.top2 { background: linear-gradient(90deg, rgba(207, 216, 220, .12), transparent 70%); }
tr.top3 { background: linear-gradient(90deg, rgba(212, 145, 90, .12), transparent 70%); }
.rank { color: var(--muted); font-size: 13px; }
.who { display: flex; gap: 10px; align-items: center; }
.compact .full { display: none; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.pill.on { background: rgba(95, 211, 141, .15); color: var(--good); }
.pill.off { background: rgba(138, 155, 176, .15); color: var(--muted); }
.pill.ranked { background: rgba(245, 178, 41, .15); color: var(--accent); }

/* Icons */
.ico, .ico-s, .ico-l { flex: none; display: block; object-fit: contain; }
.ico { width: 44px; height: 44px; }
.ico-s { width: 30px; height: 30px; }
.ico-l { width: 72px; height: 72px; }
.ico-gear { flex: none; display: block; object-fit: contain; width: auto; max-width: 64px; height: 28px; }

/* Overview */
.banner {
  background: var(--panel) center / cover no-repeat; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; margin-bottom: 14px; min-height: 120px; display: flex; flex-direction: column; justify-content: center;
}
.banner .logo { width: auto; height: auto; max-width: min(420px, 100%); max-height: 110px; margin-bottom: 6px; }
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
a.game {
  display: block; color: var(--text); text-decoration: none; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; padding-bottom: 10px;
}
a.game:hover { border-color: var(--accent2); }
a.game.on { border-color: var(--accent); }
.game .art { height: 120px; background: linear-gradient(135deg, #1b2633, #0e141b) center / cover no-repeat; }
.game .gname { font-weight: 700; padding: 8px 12px 0; }
.game .muted { padding: 0 12px; }

/* Player page */
.hero {
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap; background: var(--panel) center / cover;
  border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 16px 18px;
}
.lvl { font-size: 40px; font-weight: 800; color: var(--accent); line-height: 1; min-width: 64px; text-align: center; }
.lvl small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .1em; font-weight: 600; }
.cat { color: var(--accent2); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.prog { height: 8px; background: var(--panel2); border-radius: 99px; overflow: hidden; margin-top: 8px; max-width: 420px; }
.prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #ffd27a); }
.also { margin-top: 6px; }
.also a { margin-right: 12px; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.award {
  display: flex; gap: 10px; align-items: flex-start; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 11px;
}
.award .body { flex: 1; min-width: 0; }
.award .t { font-weight: 700; }
.award .d { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.award .c { float: right; color: var(--accent); font-weight: 800; }
.award.locked .t { color: var(--muted); }
.award.locked .ico { filter: grayscale(1); opacity: .4; }

/* Account page */
.notice.ok { border-color: var(--good); background: rgba(95, 211, 141, .1); }
main .notice { margin: 12px 0; }
.form { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.form h2 { margin: 0; }
.form p { margin: 0; }
.form label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }
.form label input { color: var(--text); }
.form .row { display: flex; gap: 10px; flex-wrap: wrap; }
.form .row label { flex: 1; min-width: 150px; }
.actions, .inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
button.quiet { background: var(--panel2); color: var(--text); border: 1px solid var(--line); font-weight: 600; }
button:disabled { opacity: .6; cursor: default; }
.profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.careers { display: flex; gap: 14px; flex-wrap: wrap; }
.career { display: flex; gap: 6px; align-items: center; }
.clan { color: var(--accent); font-weight: 700; }
.steps { margin: 0; padding: 12px 16px 12px 34px; }
.steps li { margin: 4px 0; }
.small { font-size: 12.5px; }

@media (max-width: 760px) {
  .two { grid-template-columns: 1fr; }
  form.search { margin-left: 0; width: 100%; }
  form.search input { flex: 1; }
  .grid { grid-template-columns: 1fr 1fr; }
  .award .d { font-size: 12px; }
}
