/* auto_dota — the terminal look (the lead's pick, 2026-09-06). Radiant green / Dire red are Dota's. */

:root {
  --bg: #050605;
  --bg2: #0b0d0b;
  --bg3: #121512;
  --fg: #d7e0d2;
  --muted: #6d7a6a;
  --line: #233024;
  --accent: #39ff14;
  --radiant: #39ff14;
  --dire: #ff3b3b;
  --gold: #ffd166;
  --font: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --tile-w: 112px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 14px; line-height: 1.45; }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 5; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px); }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2 { margin: 0; font-weight: 700; }
h1 { font-size: 30px; } h2 { font-size: 18px; }
.muted { color: var(--muted); }
.radiant-text { color: var(--radiant); } .dire-text { color: var(--dire); }
.gold { color: var(--gold); }
@keyframes blink { to { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

#app { min-height: 100vh; display: flex; flex-direction: column; }
.top { display: grid; grid-template-columns: 220px 1fr 220px; align-items: center; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: rgba(11, 13, 11, .85); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 4; }
.brand { font-size: 18px; text-decoration: none; color: var(--fg); }
.brand::before { content: "> "; color: var(--accent); }
.brand::after { content: "_"; animation: blink 1s steps(2) infinite; color: var(--accent); }
.clock { font-size: 32px; text-align: right; font-variant-numeric: tabular-nums; letter-spacing: .05em; }
.clock.running { color: var(--accent); }

.bar-wrap { display: flex; flex-direction: column; gap: 4px; }
.bar-labels { display: flex; justify-content: space-between; font-size: 12px; }
.lbl-radiant { color: var(--radiant); } .lbl-dire { color: var(--dire); }
.bar-pct { font-variant-numeric: tabular-nums; color: var(--muted); }
.bar { position: relative; height: 14px; background: repeating-linear-gradient(90deg, var(--dire) 0 6px, transparent 6px 8px); overflow: hidden; }
.bar-fill { position: absolute; inset: 0 auto 0 0; width: 50%; background: repeating-linear-gradient(90deg, var(--radiant) 0 6px, var(--bg) 6px 8px); transition: width 1.4s cubic-bezier(.2, .8, .2, 1); }
.bar-mid { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: rgba(255, 255, 255, .55); }
.bar-marker { position: absolute; top: -2px; bottom: -2px; left: 50%; width: 4px; margin-left: -2px; background: #fff; box-shadow: 0 0 8px #fff; transition: left 1.4s cubic-bezier(.2, .8, .2, 1); }

main { flex: 1; padding: 24px 20px; max-width: 1280px; width: 100%; margin: 0 auto; }
main.wide { max-width: none; padding: 0; }
.foot { display: flex; justify-content: space-between; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

.panel { background: var(--bg2); border: 1px solid var(--line); padding: 16px; }
.panel.radiant { border-color: var(--radiant); }
.panel.dire { border-color: var(--dire); }
.btn { display: inline-block; background: var(--accent); color: #041004; border: 0; padding: 10px 18px; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn::before { content: "[ "; } .btn::after { content: " ]"; }
.btn:disabled { opacity: .35; cursor: default; }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.radiant { background: var(--radiant); } .btn.dire { background: var(--dire); color: #fff; }
.btn.gold { background: var(--gold); color: #1a1400; }
.input { background: var(--bg3); border: 1px solid var(--line); color: var(--fg); padding: 8px 10px; font: inherit; }

/* ---- front page (the terminal direction from the design canvas) ---- */
.home { position: relative; overflow: hidden; min-height: calc(100vh - 110px); }
.home-bg { position: absolute; inset: 0; background: url(/assets/map/terrain.jpg) center 40% / 1440px 1440px no-repeat; opacity: .35; filter: grayscale(1) contrast(1.35) brightness(.9); }
.home-tint { position: absolute; inset: 0; background: rgba(57, 255, 20, .06); mix-blend-mode: screen; }
.home-fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 6, 5, .2) 0%, rgba(5, 6, 5, .75) 55%, var(--bg) 100%); }
.home-in { position: relative; max-width: 1248px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; }
.hero { display: flex; flex-direction: column; gap: 16px; padding: 96px 0 44px; max-width: 900px; }
.hero .cmd { font-size: 13px; color: var(--muted); }
.hero h1 { font-size: 64px; line-height: 1; letter-spacing: -.02em; color: #f2f7ef; }
.hero h1 span { color: var(--accent); }
.hero .tag { font-size: 19px; color: var(--accent); }
.hero p { margin: 0; max-width: 720px; font-size: 15px; line-height: 1.65; color: #a9b5a4; text-wrap: pretty; }
.hero .cta { display: flex; gap: 18px; align-items: center; margin-top: 8px; }
.hero .cta .btn { padding: 14px 22px; font-size: 15px; }
.hero .bar-demo { width: 720px; max-width: 100%; margin-top: 14px; }
.rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 12px 0 36px; }
.rule { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 20px; background: rgba(11, 13, 11, .9); border: 1px solid var(--line); }
.rule svg { color: var(--accent); }
.rule b { font-size: 15px; color: #f2f7ef; }
.rule span { font-size: 13px; line-height: 1.55; color: #a9b5a4; }
.timeline { display: flex; flex-direction: column; gap: 16px; padding: 22px 0 56px; border-top: 1px solid var(--line); }
.timeline .head { display: flex; justify-content: space-between; font-size: 13px; }
.marks { position: relative; display: flex; justify-content: space-between; }
.marks::before { content: ""; position: absolute; left: 24px; right: 24px; top: 15px; height: 2px; background: var(--line); }
.mark { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 120px; position: relative; }
.mark .t { width: 32px; height: 32px; background: var(--bg); border: 1px solid var(--accent); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 10px; }
.mark .p { font-size: 12px; }
.tricks-strip { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 40px; }
.tricks-strip span { border: 1px solid var(--line); padding: 4px 10px; font-size: 12px; color: #a9b5a4; }
.tricks-strip span b { color: var(--accent); font-weight: 400; }

/* lobby */
.lobby { display: grid; gap: 20px; max-width: 900px; margin: 0 auto; }
.share { display: flex; gap: 8px; align-items: center; }
.share .input { flex: 1; }
.seats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.seat { text-align: center; display: grid; gap: 10px; }
.seat h2 { font-size: 24px; }
.seat-name { font-size: 17px; min-height: 26px; }

/* draft */
.draft { display: grid; gap: 14px; }
.draft-top { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: start; }
.slots { display: flex; gap: 6px; flex-wrap: wrap; }
.slot { width: 96px; height: 54px; background: var(--bg3); border: 1px dashed var(--line); overflow: hidden; display: grid; place-items: center; color: var(--muted); }
.slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot.filled { border-style: solid; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { background: var(--bg3); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: 12px; color: var(--muted); }
.chip.on { color: var(--fg); border-color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile-w), 1fr)); gap: 8px; }
.tile { position: relative; border: 2px solid transparent; overflow: hidden; background: var(--bg3); cursor: pointer; transition: transform .12s; }
.tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; filter: saturate(.6) contrast(1.1); }
.tile.picked img, .tile:hover img { filter: none; }
.tile .nm { font-size: 11px; padding: 3px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile:hover { transform: translateY(-2px); border-color: var(--line); }
.tile.picked { border-color: var(--accent); }
.tile.picked::after { content: "✓"; position: absolute; top: 4px; right: 6px; color: var(--accent); font-weight: 700; }
.tile.gone { opacity: .25; pointer-events: none; }
.tile.hide { display: none; }
.lockbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.notice { color: var(--gold); }

/* match */
.match { display: grid; gap: 16px; }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.team { display: grid; gap: 8px; }
.team h2 { display: flex; justify-content: space-between; align-items: baseline; }
.team .slots .slot { width: 84px; height: 48px; }
.score { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.score b { color: var(--fg); font-weight: 400; }
.round { display: grid; gap: 14px; }
.round-head { display: flex; justify-content: space-between; align-items: baseline; }
.phase-name { font-size: 20px; }
.section-h { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.option { text-align: left; background: var(--bg3); border: 1px solid var(--line); padding: 12px 14px; cursor: pointer; font-size: 14px; line-height: 1.4; }
.option::before { content: attr(data-n) " > "; color: var(--accent); }
.option:hover { border-color: var(--accent); }
.option.chosen { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.option:disabled { cursor: default; opacity: .6; }
.tricks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.trick { text-align: left; background: var(--bg3); border: 1px solid var(--line); padding: 10px 12px; cursor: pointer; display: grid; gap: 4px; }
.trick b { font-size: 13px; color: var(--gold); font-weight: 400; }
.trick span { font-size: 11px; color: var(--muted); line-height: 1.4; }
.trick:hover { border-color: var(--gold); }
.trick.chosen { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.trick.used { opacity: .3; cursor: default; text-decoration: line-through; }
.trick:disabled { cursor: default; }
.commit { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.allin { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); padding: 8px 12px; cursor: pointer; background: transparent; color: var(--fg); }
.allin.on { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 12px rgba(255, 209, 102, .25); }
.allin:disabled { opacity: .35; cursor: default; }
.wait { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
.verdict { display: grid; gap: 12px; animation: rise .5s ease-out; }
.verdict .picks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.verdict .pick { padding: 10px 12px; background: var(--bg3); border-left: 3px solid var(--line); display: grid; gap: 4px; }
.verdict .pick.radiant { border-left-color: var(--radiant); } .verdict .pick.dire { border-left-color: var(--dire); }
.verdict .pick .hidden-play { font-size: 12px; color: var(--gold); }
.verdict .clash { font-size: 13px; color: var(--gold); border: 1px dashed var(--gold); padding: 8px 12px; }
.verdict .story { font-size: 16px; line-height: 1.55; color: #f2f7ef; }
.events { display: flex; flex-wrap: wrap; gap: 6px; }
.ev { font-size: 12px; border: 1px solid var(--line); padding: 3px 8px; }
.ev.radiant { border-color: var(--radiant); } .ev.dire { border-color: var(--dire); }
.history { display: grid; gap: 8px; }
.history .row { display: grid; grid-template-columns: 90px 1fr 1fr 70px; gap: 10px; font-size: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.history .row b { font-variant-numeric: tabular-nums; }
.history .story { font-size: 13px; color: #a9b5a4; padding: 0 0 8px; }

/* result */
.result { display: grid; gap: 18px; }
.winner { text-align: center; padding: 28px; }
.winner h1 { font-size: 44px; }
.winner.radiant h1 { color: var(--radiant); } .winner.dire h1 { color: var(--dire); }
.path { width: 100%; height: 110px; }
.toast { position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%); background: var(--bg3); border: 1px solid var(--accent); padding: 10px 16px; z-index: 9; }

@media (max-width: 860px) {
  .top { grid-template-columns: 1fr; gap: 8px; }
  .clock { text-align: left; font-size: 26px; }
  .draft-top, .teams, .seats, .options, .verdict .picks, .rules { grid-template-columns: 1fr; }
  .tricks { grid-template-columns: 1fr 1fr; }
  :root { --tile-w: 88px; }
  .history .row { grid-template-columns: 60px 1fr; }
  .hero h1 { font-size: 40px; }
  .hero { padding-top: 48px; }
  .marks { flex-wrap: wrap; gap: 12px; } .marks::before { display: none; }
}
