:root {
  --bg: #050b2e;
  --bg-glow: #0a1c6b;
  --card: #0b1040;
  --orange: #FA4616;
  --orange-hover: #ff5a2b;
  --ink: #f4f2ee;
  --muted: #aeb6d8;
  --warm: #ffb59a;
  --face: #15171f;
  --digit-settled: #FA4616;
  --digit-spin: #8a8f9c;
  --digit-size: clamp(64px, 19vw, 180px);
}

html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  font-family: Archivo, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  cursor: default;
}
a { color: var(--orange); }
a:hover { color: #ff7a52; }
button, a, [role="button"] { cursor: pointer; }
button:disabled { cursor: not-allowed; }
input, textarea, [contenteditable] { cursor: text; }

main {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  background-image: radial-gradient(ellipse 90% 60% at 50% 0%, var(--bg-glow) 0%, var(--bg) 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(40px, 8vh, 96px) 20px 48px;
  box-sizing: border-box;
  text-wrap: pretty;
}
.wrap {
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(28px, 5vh, 56px);
}

/* Header */
.hero { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.rule { width: 56px; height: 5px; background: var(--orange); border-radius: 3px; }
h1 {
  margin: 0;
  font-family: Oswald, sans-serif;
  font-weight: 600;
  font-size: clamp(22px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-wrap: balance;
}

/* Counter */
.counter { display: flex; flex-direction: column; align-items: center; gap: 22px; width: 100%; }
.flip {
  display: flex;
  gap: clamp(6px, 1.2vw, 14px);
  justify-content: center;
  padding: clamp(14px, 2.5vw, 28px);
  background: var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
}
.digit {
  position: relative;
  width: .78em;
  height: 1.18em;
  font-size: var(--digit-size);
  perspective: 600px;
  border-radius: .07em;
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
  color: var(--digit-spin);
}
.digit.settled { color: var(--digit-settled); }
.pane {
  position: absolute;
  left: 0; right: 0;
  height: 50%;
  overflow: hidden;
  background: var(--face);
  backface-visibility: hidden;
}
.pane.top { top: 0; border-radius: .07em .07em 0 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.pane.bottom { bottom: 0; border-radius: 0 0 .07em .07em; box-shadow: inset 0 -1px 0 rgba(0,0,0,.6); }
.pane > span {
  position: absolute;
  left: 0; right: 0;
  height: 200%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Oswald, sans-serif;
  font-weight: 600;
  font-size: 1em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pane.top > span { top: 0; }
.pane.bottom > span { top: -100%; }
.pane.flip-top { transform-origin: bottom; animation: flipTop 17ms ease-in forwards; z-index: 2; }
.pane.flip-bottom { transform-origin: top; transform: rotateX(90deg); animation: flipBottom 17ms ease-out 17ms forwards; z-index: 2; }
.hinge {
  position: absolute;
  left: 0; right: 0;
  top: calc(50% - 1px);
  height: 2px;
  background: var(--bg);
  z-index: 3;
}
@keyframes flipTop { from { transform: rotateX(0deg); } to { transform: rotateX(-90deg); } }
@keyframes flipBottom { from { transform: rotateX(90deg); } to { transform: rotateX(0deg); } }

/* Facts */
.facts {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  overflow: hidden;
}
.fact { background: var(--card); padding: 24px 26px; display: flex; flex-direction: column; gap: 8px; }
.label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.label-warm { color: var(--warm); }
.value {
  font-family: Oswald, sans-serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
}
.value.accent { color: var(--orange); }
.sub { color: var(--ink); font-weight: 500; }
.nowrap { white-space: nowrap; }

/* Next matchup */
.next {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 20px 26px;
  border: 1px solid rgba(250,70,22,.45);
  border-radius: 14px;
  background: rgba(250,70,22,.08);
}
.next-text { display: flex; flex-direction: column; gap: 4px; }
.matchup { font-family: Oswald, sans-serif; font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; line-height: 1.1; }
.muted { color: var(--muted); font-weight: 500; }
.countdown { display: flex; align-items: baseline; gap: 8px; font-family: Oswald, sans-serif; }
.big { font-size: clamp(34px, 4.5vw, 48px); font-weight: 700; line-height: 1; color: var(--orange); }
.unit { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* Actions */
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  appearance: none;
  border: 0;
  text-decoration: none;
  font-family: Archivo, sans-serif;
  font-size: 15px;
  padding: 0 22px;
  height: 48px;
  border-radius: 999px;
  box-sizing: border-box;
  letter-spacing: .01em;
  transition: background-color .15s, border-color .15s;
}
.btn-primary { background: var(--orange); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--orange-hover); }
.btn-ghost { color: var(--ink); border: 1px solid rgba(255,255,255,.22); font-weight: 500; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .pane.flip-top, .pane.flip-bottom { animation: none; display: none; }
}
