:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #f5f7f8;
  --muted: #a7b0b4;
  --panel: rgba(10, 14, 16, 0.88);
  --line: rgba(255, 255, 255, 0.14);
  --red: #ff4d3d;
  --cyan: #4dd8e8;
  --yellow: #f2c94c;
  --green: #5ddd8a;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; color: var(--ink); background: #090b0d; letter-spacing: 0; }
button, a { font: inherit; }
button { color: inherit; }

.stadium-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("assets/stadium-night.png") center 38% / cover no-repeat;
}
.stadium-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 11, .58) 0%, rgba(7, 9, 11, .82) 45%, #090b0d 78%);
}

.app-header {
  height: 68px;
  padding: 0 clamp(18px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 11, .76);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; background: var(--red); color: #fff; border-radius: 4px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.connection-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.connection-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(242, 201, 76, .12); }
.connection-badge.is-live i { background: var(--green); box-shadow: 0 0 0 4px rgba(93, 221, 138, .12); }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.06); cursor: pointer; font-size: 21px; }
.icon-button:hover { background: rgba(255,255,255,.12); }
.icon-button:disabled { opacity: .5; cursor: wait; }

.app-shell { width: min(1440px, 100%); margin: 0 auto; padding: 0 clamp(18px, 4vw, 64px) 64px; }
.match-stage { min-height: clamp(500px, 67vh, 690px); display: flex; flex-direction: column; justify-content: flex-end; padding: 72px 0 34px; }
.broadcast-line { display: flex; justify-content: space-between; text-transform: uppercase; font-size: 12px; font-weight: 800; color: #dfe5e7; border-top: 1px solid rgba(255,255,255,.38); padding-top: 12px; }
.scoreline { display: grid; grid-template-columns: 1fr 90px 1fr; align-items: center; gap: 24px; margin: 26px 0 28px; }
.team { min-width: 0; }
.team-away { text-align: right; }
.team-side, .eyebrow { display: block; color: var(--muted); font-size: 11px; line-height: 1.3; font-weight: 800; text-transform: uppercase; }
.team h1 { margin: 5px 0 2px; font-size: clamp(32px, 6vw, 82px); line-height: .96; font-weight: 850; overflow-wrap: anywhere; }
.team-probability { color: #fff; font-size: 16px; font-weight: 800; }
.versus { display: grid; place-items: center; }
.versus span { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; font-size: 12px; font-weight: 900; background: rgba(7,9,11,.36); }
.story-strip { width: min(760px, 100%); padding-left: 18px; border-left: 4px solid var(--red); }
.story-strip span { color: var(--red); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.story-strip strong { display: block; margin-top: 5px; font-size: clamp(22px, 3vw, 38px); line-height: 1.08; }
.story-strip p { margin: 8px 0 0; color: #d2d8da; font-size: 15px; line-height: 1.5; }
.probability-track { margin-top: 26px; height: 8px; display: flex; overflow: hidden; background: rgba(255,255,255,.12); }
.probability-track span { display: block; height: 100%; transition: width .6s ease; }
.probability-home { background: var(--red); }
.probability-draw { background: var(--yellow); }
.probability-away { background: var(--cyan); }
.probability-legend { display: flex; justify-content: space-between; gap: 16px; margin-top: 9px; font-size: 12px; }
.probability-legend span { display: inline-flex; gap: 7px; align-items: center; }
.swatch { width: 7px; height: 7px; border-radius: 50%; }
.swatch.home { background: var(--red); }.swatch.draw { background: var(--yellow); }.swatch.away { background: var(--cyan); }

.control-band { display: grid; grid-template-columns: minmax(190px,.7fr) minmax(430px,1.7fr) minmax(170px,.6fr); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(20px); }
.control-band > div { padding: 24px; min-width: 0; }
.control-band > div + div { border-left: 1px solid var(--line); }
.tension-panel > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.tension-panel strong { font-size: 36px; }
.tension-meter { height: 5px; background: rgba(255,255,255,.1); margin: 15px 0; overflow: hidden; }
.tension-meter span { display: block; height: 100%; width: 82%; background: var(--yellow); transition: width .6s ease; }
.tension-panel p, .streak-panel p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.game-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.game-heading h2, .section-heading h2 { margin: 4px 0 0; font-size: 18px; }
.game-timer { min-width: 60px; font-variant-numeric: tabular-nums; text-align: right; font-size: 18px; font-weight: 800; }
.pick-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.pick-buttons button { min-height: 42px; padding: 8px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.05); cursor: pointer; font-weight: 750; overflow-wrap: anywhere; }
.pick-buttons button:hover, .pick-buttons button.is-selected { border-color: var(--cyan); background: rgba(77,216,232,.12); }
.pick-buttons button:disabled { cursor: default; opacity: .72; }
.game-status { min-height: 20px; margin: 11px 0 0; color: var(--muted); font-size: 12px; }
.game-status.is-win { color: var(--green); }.game-status.is-loss { color: #ff8176; }
.streak-panel strong { display: block; margin: 10px 0 5px; font-size: 42px; line-height: 1; }
.streak-panel small { font-size: 13px; color: var(--muted); }

.lower-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); gap: 24px; padding-top: 52px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.section-heading > span { color: var(--muted); font-size: 12px; }
.moment-list { list-style: none; margin: 0; padding: 0; }
.moment-list li { display: grid; grid-template-columns: 70px 12px 1fr; gap: 15px; padding: 19px 0; border-bottom: 1px solid var(--line); }
.moment-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.moment-dot { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--cyan); }
.moment-copy strong { display: block; font-size: 15px; }.moment-copy p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.fixture-list { display: grid; gap: 8px; padding-top: 12px; }
.fixture-button { width: 100%; min-height: 68px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; border: 1px solid transparent; border-radius: 4px; color: var(--ink); background: rgba(255,255,255,.05); cursor: pointer; }
.fixture-button:hover, .fixture-button.is-active { border-color: var(--line); background: rgba(255,255,255,.1); }
.fixture-button strong { display: block; font-size: 13px; }.fixture-button span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }.fixture-button b { font-size: 20px; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px clamp(18px, 4vw, 64px); border-top: 1px solid var(--line); color: var(--muted); background: #090b0d; font-size: 12px; }

@media (max-width: 900px) {
  .control-band { grid-template-columns: 1fr 1fr; }
  .shift-game { grid-column: 1 / -1; grid-row: 1; }
  .control-band > div + div { border-left: 0; }
  .tension-panel, .streak-panel { border-top: 1px solid var(--line); }
  .streak-panel { border-left: 1px solid var(--line) !important; }
  .lower-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .app-header { height: 58px; }
  .connection-badge { max-width: 128px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .app-shell { padding-bottom: 40px; }
  .match-stage { min-height: 560px; padding-top: 48px; }
  .scoreline { grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr); gap: 8px; }
  .team h1 { font-size: min(10vw, 42px); overflow-wrap: anywhere; }
  .versus span { width: 36px; height: 36px; }
  .story-strip { min-width: 0; padding-left: 14px; }
  .story-strip strong, .story-strip p { overflow-wrap: anywhere; }
  .probability-legend { gap: 6px; font-size: 10px; }
  .probability-legend span { min-width: 0; }
  .probability-legend b { overflow-wrap: anywhere; }
  .control-band { grid-template-columns: 1fr; }
  .control-band > div { padding: 20px; }
  .shift-game { grid-column: auto; }
  .tension-panel, .streak-panel { border-left: 0 !important; }
  .pick-buttons { grid-template-columns: 1fr; }
  .pick-buttons button { min-height: 40px; }
  .lower-grid { padding-top: 38px; }
  .moment-list li { grid-template-columns: 52px 10px 1fr; gap: 10px; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
