:root {
  --bg: #121212;
  --panel: #1a1a1a;
  --border: #2e2e2e;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --blue: #3d8bff;
  --red: #e0392e;
  --green: #1f9d3a;
  --near: #d98b1a;
  --far: #b52b2b;
  --win: #2ecc71;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  background-image: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255,255,255,.07), transparent 70%),
                    linear-gradient(180deg, #1c1c1c 0%, #141414 45%, #101010 100%);
  color: var(--text);
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 16px 40px; }

/* Header */
.site-header { text-align: center; padding: 28px 16px 8px; position: relative; }
.title {
  font-size: clamp(2.6rem, 8vw, 4rem);
  font-weight: 500;
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.title-face {
  width: 0.95em; height: 0.95em;
  border-radius: 12px;
  object-fit: cover;
  object-position: top;
  filter: drop-shadow(0 0 8px rgba(255,255,255,.35));
}
.subtitle { margin: 0; font-size: 1.15rem; }

/* Guess area */
.guess-area {
  display: flex; justify-content: center; align-items: flex-start; gap: 24px;
  margin-top: 28px; flex-wrap: wrap;
}
.guess-panel { display: flex; flex-direction: column; align-items: center; min-width: 240px; }

.previous h2, .hints h2 { font-size: 1rem; font-weight: 500; margin: 0 0 12px; text-align: center; }
.guess-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.guess-row { display: flex; align-items: center; gap: 6px; justify-content: center; }
.guess-row .slash, .inputs .slash { color: var(--muted); font-size: 1.1rem; }
.cell {
  width: 32px; height: 32px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 500; font-size: 1rem; color: #fff;
}
.cell.exact { background: var(--green); }
.cell.near { background: var(--near); }
.cell.far { background: var(--far); }

.guess-form { display: flex; flex-direction: column; align-items: center; margin-top: 12px; }
.inputs { display: flex; align-items: flex-end; gap: 6px; }
.inputs label { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); }
.inputs input {
  width: 32px; height: 32px; border-radius: 6px; border: 1px solid #777;
  background: var(--panel); color: var(--text); text-align: center; font-family: inherit; font-size: 1rem;
  -moz-appearance: textfield; appearance: textfield;
  transition: background .2s;
}
.inputs input::-webkit-outer-spin-button, .inputs input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.inputs input:focus { outline: 1px solid #ddd; }
.inputs input.exact { background: var(--green); border-color: var(--green); }
.inputs input.near { background: var(--near); border-color: var(--near); }
.inputs input.far { background: var(--far); border-color: var(--far); }
.inputs input:disabled { opacity: 1; color: #fff; }

.btn {
  margin-top: 16px; background: var(--panel); color: var(--text); border: 1px solid var(--border);
  padding: 8px 14px; border-radius: 8px; font-family: inherit; font-size: .95rem; cursor: pointer;
}
.btn:hover { border-color: #666; }
.btn:active { transform: translateY(1px); }

.hints {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: .9rem;
  background: rgba(255,255,255,.02); max-width: 300px;
}
.hints h2 { text-align: left; margin-bottom: 8px; }
.hints p { margin: 4px 0; display: flex; align-items: center; gap: 8px; }
.dot { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.dot.near { background: var(--near); }
.dot.far { background: var(--far); }

/* Result */
.result { text-align: center; margin-top: 12px; }
.gg { font-size: 3.2rem; font-weight: 700; letter-spacing: 1px; margin: 8px 0; }
.countdown { font-size: 1rem; margin-bottom: 14px; }
#countdown { font-weight: 600; font-size: 1.1rem; }
.share p { margin: 0 0 8px; }
.share .btn { margin-top: 12px; }
.share pre {
  font-family: inherit; text-align: left; display: inline-block; margin: 0 auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; line-height: 1.35;
}

/* Match */
.match { margin-top: 36px; text-align: center; }
.teams { display: flex; justify-content: center; align-items: center; gap: 36px; }
.team { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 150px; }
.team-logo { width: 72px; height: 72px; object-fit: contain; }
.team-name { font-size: 1.15rem; font-weight: 500; }
.vs { font-size: 1rem; }
.match-meta { margin-top: 20px; font-size: .95rem; line-height: 1.5; }
#m-winner .won { color: var(--win); }

.scoreboard-wrap { overflow-x: auto; margin-top: 24px; }
.scoreboard {
  display: inline-grid;
  grid-template-columns: repeat(2, auto);
  gap: 0 48px;
  border: 1px solid var(--border); border-radius: 14px; padding: 26px 40px;
  min-width: 760px;
  text-align: left;
  background: rgba(255,255,255,.025);
}
.side table { border-collapse: collapse; }
.side th { font-weight: 400; font-size: 1rem; padding: 8px 14px; text-align: center; vertical-align: bottom; }
.side th.side-name { text-align: left; }
.side.blue th.side-name { color: var(--blue); }
.side.red th.side-name { color: var(--red); }
.col-icon { width: 24px; height: 24px; object-fit: contain; vertical-align: middle; }
.col-icon.cs { height: 27px; }
.side td { padding: 9px 14px; font-size: 1.05rem; text-align: center; white-space: nowrap; }
.side td.name { text-align: left; }
.side tr.target td.name { font-weight: 600; }
.champ { width: 32px; height: 32px; border-radius: 6px; vertical-align: middle; display: block; margin: 0 auto; background: #222; }
.kda { font-variant-numeric: tabular-nums; }
.kda.hidden { filter: blur(4px); user-select: none; color: #bbb; }
.kda.unknown { color: var(--muted); }
.side td.dmg { color: #ddd; }
.side td.na { color: var(--muted); }

/* Footer */
.site-footer { text-align: center; padding: 20px 16px; border-top: 1px solid var(--border); font-size: .85rem; color: var(--muted); }
.site-footer nav { margin-bottom: 8px; }
.site-footer nav a { color: var(--text); text-decoration: none; margin: 0 8px; }
.site-footer nav a:hover { text-decoration: underline; }
.disclaimer { margin: 0; max-width: 820px; margin: 0 auto; }

/* About page */
.about { max-width: 720px; margin: 24px auto; line-height: 1.6; padding: 0 16px; }
.about h2 { margin-top: 28px; font-weight: 600; }
.about a { color: var(--blue); }

@media (max-width: 720px) {
  .scoreboard { display: grid; width: 100%; grid-template-columns: 1fr; min-width: 0; gap: 12px 0; padding: 12px; }
  .side table { width: 100%; }
  .side td, .side th { padding: 6px 4px; font-size: .85rem; }
  .teams { gap: 16px; }
  .team { width: 120px; }
  .team-name { font-size: 1rem; }
  .gg { font-size: 2.6rem; }
}
