/* The game's site, after Dotabuff's: dark panels, tables, wins green and losses red;
   the game's own warm text and amber, each axis its colour. */
:root {
  --bg: #111317;
  --panel: #191c22;
  --panel2: #1f232b;
  --row: #1c2027;
  --line: #2a2f38;
  --text: #e8e2ce;
  --dim: #8f948f;
  --amber: #d9b65a;
  --win: #6cbf6a;
  --loss: #e05a4f;
  --dem: #4f86d9;
  --auth: #c9483c;
  --radius: 4px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }
.dim { color: var(--dim); }
.num { font-variant-numeric: tabular-nums; }

/* The bar on top */
.top { background: #0b0d10; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.bar { max-width: 1180px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; flex-direction: column; line-height: 1; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-name { font-weight: 800; letter-spacing: 0.18em; font-size: 20px; }
.brand-sub { font-size: 11px; color: var(--dim); letter-spacing: 0.08em; margin-top: 3px; }
nav { display: flex; gap: 4px; }
nav a { color: var(--dim); padding: 8px 12px; border-radius: var(--radius); font-weight: 600; }
nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
nav a.on { color: var(--text); background: var(--panel2); box-shadow: inset 0 -2px 0 var(--amber); }
.search { margin-left: auto; }
.search input { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: var(--radius); padding: 7px 10px; width: 200px; font: inherit; }
.search input:focus { outline: 1px solid var(--amber); }

main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 40px; }
.foot { max-width: 1180px; margin: 0 auto; padding: 20px 16px 30px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 12px; color: var(--dim); }
.foot span:first-child { color: var(--text); letter-spacing: 0.1em; }

/* Pieces */
h1 { font-size: 26px; margin: 0; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--dim); margin: 0 0 10px; font-weight: 700; }
.grid { display: grid; gap: 20px; }
.two { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.half { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.panel.flush { padding: 0; }
.panel.flush h2 { padding: 14px 16px 0; }
.stats-row { display: flex; flex-wrap: wrap; gap: 28px; }
.big { font-size: 24px; font-weight: 700; }
.label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:nth-child(even) { background: var(--row); }
tbody tr:hover { background: var(--panel2); }
td.r, th.r { text-align: right; }
.nowrap { white-space: nowrap; }
.scroll { overflow-x: auto; }

.who { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.who img { width: 9px; height: 20px; image-rendering: pixelated; }
.who .tag { color: var(--dim); font-size: 12px; }
.board { image-rendering: pixelated; vertical-align: middle; }

.won { color: var(--win); font-weight: 600; }
.lost { color: var(--loss); font-weight: 600; }
.drawn, .cancelled, .unrated { color: var(--dim); }
.up { color: var(--win); }
.down { color: var(--loss); }

.axis { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; padding: 1px 6px; border-radius: 3px; color: #fff; white-space: nowrap; }
.axis.a0 { background: var(--dem); }
.axis.a1 { background: var(--auth); }

/* A share won, as a bar (each axis its colour) */
.share { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line); min-width: 80px; }
.share span { display: block; height: 100%; }
.share .w { background: var(--win); }
.share .d { background: var(--dem); }
.share .u { background: var(--auth); }
.split { display: flex; justify-content: space-between; font-size: 12px; margin-top: 4px; }

.tabs { display: flex; gap: 4px; margin-bottom: 14px; }
.tabs a { padding: 6px 14px; border-radius: var(--radius); background: var(--panel); color: var(--dim); font-weight: 600; border: 1px solid var(--line); }
.tabs a.on { color: var(--text); border-color: var(--amber); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.pager { display: flex; justify-content: space-between; padding: 10px 16px; }
.button { display: inline-block; background: var(--panel2); border: 1px solid var(--line); color: var(--text); padding: 7px 14px; border-radius: var(--radius); font-weight: 600; }
.button:hover { border-color: var(--amber); text-decoration: none; }

/* A player's head */
.head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.head .board { width: 36px; height: 80px; }
.head .tag { color: var(--dim); font-weight: 400; font-size: 18px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.card { display: flex; gap: 16px; align-items: center; }
.card .board { width: 27px; height: 60px; }

/* The rating game by game */
.chart svg { width: 100%; height: 180px; display: block; }
.chart .line { fill: none; stroke: var(--amber); stroke-width: 2; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--dim); font-size: 10px; }
.chart .dot { fill: var(--amber); }

/* A game's sides */
.sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.side h2 .won, .side h2 .lost { margin-left: 8px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 8px 0 20px; color: var(--dim); }
.facts b { color: var(--text); font-weight: 600; }
.note { color: var(--dim); font-size: 12px; margin-top: 8px; }
.empty { color: var(--dim); padding: 24px 16px; text-align: center; }
.ranks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ranks td img { width: 18px; height: 40px; image-rendering: pixelated; }

@media (max-width: 860px) {
  .two, .half, .cards, .sides, .ranks { grid-template-columns: minmax(0, 1fr); }
  .bar { gap: 12px; height: auto; flex-wrap: wrap; padding: 10px 16px; }
  .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  nav a { padding: 6px 8px; }
}
