:root {
  --bg: #0d0f12;
  --panel: #13161b;
  --line: #2b3038;
  --text: #f1f1ed;
  --muted: #9299a3;
  --accent: #e8eb20;
  --pause: #e87861;
  --mono: "DM Mono", monospace;
  --sans: "Manrope", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

button, input { font: inherit; }

.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px 24px;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -.05em;
}

.workspace {
  display: grid;
  grid-template-columns: 360px 1fr;
  max-width: 1080px;
  margin: 0 auto 56px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.setup-card, .results-card { padding: 32px; }
.setup-card { border-right: 1px solid var(--line); }
.results-card { min-width: 0; }
.field + .field { margin-top: 32px; }

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.field label { color: #cbd0d7; font-size: 14px; }

.field output {
  display: grid;
  width: 44px;
  height: 36px;
  place-items: center;
  background: var(--text);
  color: var(--bg);
  font: 500 16px var(--mono);
}

input[type="range"] {
  width: 100%;
  height: 3px;
  appearance: none;
  background: linear-gradient(to right, var(--accent) var(--fill, 50%), #343a43 var(--fill, 50%));
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  appearance: none;
  border: 4px solid var(--bg);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 4px solid var(--bg);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  cursor: pointer;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  color: #6f7782;
  font: 10px var(--mono);
}

.odds-box {
  margin: 32px 0 20px;
  padding: 17px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.odds-box span, .odds-box small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.odds-box strong {
  display: block;
  margin: 7px 0;
  color: var(--accent);
  font: 500 17px var(--mono);
}

.primary-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  border: 0;
  background: var(--accent);
  color: #0a0d10;
  font-weight: 700;
  cursor: pointer;
}

.primary-button:hover { background: #f5f733; }
.primary-button.running { background: var(--pause); }
.text-button {
  width: 100%;
  margin-top: 13px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

.counter-block {
  padding: 0 0 28px;
  border-bottom: 1px solid var(--line);
}

.counter-block > span { color: var(--muted); font-size: 12px; }

.counter-block > strong {
  display: block;
  margin: 8px 0 15px;
  overflow: hidden;
  font: 500 clamp(42px, 7vw, 72px)/1 var(--mono);
  letter-spacing: -.07em;
  white-space: nowrap;
}

.rate-line {
  display: flex;
  justify-content: space-between;
  color: #7b838e;
  font: 10px var(--mono);
}

.match-head, .match-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
}

.match-head {
  padding: 23px 0 9px;
  color: #737b86;
  font: 10px var(--mono);
  text-transform: uppercase;
}

.match-head span:not(:first-child), .match-row > span:not(:first-child) { text-align: right; }

.match-row {
  position: relative;
  min-height: 45px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  font: 12px var(--mono);
}

.match-row .bar {
  position: absolute;
  inset: 5px auto 5px 0;
  background: rgba(232, 235, 32, .055);
  transition: width .2s;
}

.match-row > *:not(.bar) { position: relative; }
.match-name { display: flex; align-items: center; gap: 8px; }
.match-dot { width: 6px; height: 6px; border-radius: 50%; background: #3d444e; }
.match-row.top { color: var(--accent); }
.match-row.top .match-dot { background: var(--accent); }

.win-panel {
  margin-top: 20px;
  padding: 18px;
  border-left: 2px solid var(--accent);
  background: rgba(232, 235, 32, .05);
}

.win-kicker { display: block; color: var(--accent); font: 10px var(--mono); text-transform: uppercase; }
.win-panel strong { display: block; margin: 6px 0; font-size: 20px; }
.win-panel p { margin: 0; color: var(--muted); font-size: 12px; }

@media (max-width: 760px) {
  .hero { padding: 36px 18px 20px; }
  .workspace { grid-template-columns: 1fr; margin: 0 16px 40px; }
  .setup-card { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 480px) {
  .hero { padding-top: 28px; }
  h1 { font-size: 34px; }
  .setup-card, .results-card { padding: 23px 19px; }
  .counter-block > strong { font-size: 42px; }
  .rate-line { gap: 14px; }
  .rate-line span:last-child { text-align: right; }
  .match-row { font-size: 11px; }
}
