@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=Barlow:wght@400;500;600&display=swap');

:root {
  --night: #07130e;
  --turf-dark: #0c4029;
  --turf: #0f4d32;
  --panel: #10261c;
  --panel-up: #17342a;
  --line: #27473a;
  --chalk: #f1f5ea;
  --chalk-dim: #a9bbae;
  --yellow: #ffd21f;
  --red: #e5383b;
  --head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--chalk); font: 400 16px/1.45 var(--body); overflow-x: hidden; }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
img { display: block; }

/* Masthead */
.masthead { display: flex; align-items: center; gap: 24px; padding: 14px var(--gutter); background: var(--night); }
.logo { display: flex; align-items: center; gap: 10px; color: var(--chalk); text-decoration: none; font: 600 30px/1 var(--head); text-transform: uppercase; letter-spacing: .01em; flex: none; }
.logo svg { width: 38px; height: 38px; fill: var(--yellow); }
.logo .logo-pea { fill: var(--night); }
.logo b { font-weight: 800; color: var(--yellow); margin-left: 5px; }
.search { display: flex; align-items: center; gap: 9px; flex: 1; max-width: 420px; margin-left: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 0 12px; }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--chalk-dim); stroke-width: 2; flex: none; }
.search input { width: 100%; height: 42px; border: 0; outline: 0; background: transparent; color: var(--chalk); font: 500 16px var(--body); }
.search input::placeholder { color: var(--chalk-dim); }
.status { display: flex; align-items: center; gap: 8px; font: 600 15px var(--head); letter-spacing: .04em; text-transform: uppercase; color: var(--chalk-dim); white-space: nowrap; }
.status i { width: 9px; height: 9px; border-radius: 50%; background: #4fd07f; }

/* Ticker */
.ticker { overflow: hidden; background: var(--yellow); color: #101a14; }
.ticker-track { display: flex; width: max-content; animation: ticker 90s linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker button { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: inherit; padding: 8px 18px; cursor: pointer; font: 700 17px var(--head); text-transform: uppercase; white-space: nowrap; border-right: 2px solid #10261c33; }
.ticker button:hover { background: #fff0a8; }
.ticker strong { background: #101a14; color: var(--yellow); border-radius: 3px; padding: 0 7px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ticker .crest { width: 26px; height: 26px; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Crest */
.crest { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--chalk); overflow: hidden; }
.crest img { width: 80%; height: 80%; object-fit: contain; }
.crest.noimg::before { content: attr(data-i); color: var(--turf-dark); font: 800 13px var(--head); }

/* Hero: the pitch */
.hero { position: relative; overflow: hidden; background: radial-gradient(ellipse 70% 90% at 20% -10%, #ffffff30, transparent 65%), radial-gradient(ellipse 70% 90% at 82% -10%, #ffffff26, transparent 65%), repeating-linear-gradient(90deg, var(--turf) 0 8.333%, var(--turf-dark) 8.333% 16.666%); }
.pitch { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #f1f5ea3d; stroke-width: 3; }
.pitch .spot { fill: #f1f5ea3d; stroke: none; }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(32px, 5vw, 64px) var(--gutter); min-height: 440px; }
.kickoff { grid-column: 1 / -1; text-align: center; font: 600 30px var(--head); }
.hero-tag { display: inline-flex; align-items: center; gap: 9px; font: 700 18px var(--head); letter-spacing: .05em; text-transform: uppercase; }
.hero-tag .crest { width: 30px; height: 30px; }
.scoreboard { margin: 16px 0 22px; background: #07130ee8; border: 2px solid #f1f5ea40; border-radius: 8px; overflow: hidden; }
.scoreboard-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; }
.scoreboard-row + .scoreboard-row { border-top: 1px solid var(--line); }
.scoreboard-row .crest { width: 50px; height: 50px; }
.scoreboard-team { flex: 1; min-width: 0; font: 700 clamp(26px, 3vw, 38px)/1.05 var(--head); text-transform: uppercase; }
.scoreboard-goals { font: 800 clamp(42px, 5vw, 60px)/1 var(--head); color: var(--yellow); font-variant-numeric: tabular-nums; }
.scoreboard-foot { display: flex; justify-content: space-between; gap: 12px; padding: 7px 16px; background: var(--red); font: 700 15px var(--head); letter-spacing: .05em; text-transform: uppercase; }
.watch { display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 6px; background: var(--yellow); color: #101a14; padding: 13px 24px; font: 800 21px var(--head); letter-spacing: .03em; text-transform: uppercase; cursor: pointer; }
.watch:hover { background: #ffe25e; }
.hero-numbers { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 20px; font: 600 17px var(--head); letter-spacing: .03em; text-transform: uppercase; }
.hero-numbers b { font-size: 25px; font-weight: 800; color: var(--yellow); margin-right: 5px; }
.screen { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 4px solid var(--chalk); border-radius: 6px; padding: 0; background: #000; overflow: hidden; cursor: pointer; box-shadow: 0 22px 60px #0009; }
.screen img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.screen:hover img { transform: scale(1.04); }
.play-ball { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--yellow); box-shadow: 0 8px 26px #0008; }
.play-ball::after { content: ''; margin-left: 7px; border-left: 27px solid #101a14; border-top: 17px solid transparent; border-bottom: 17px solid transparent; }

/* Leagues */
.board { padding: 26px var(--gutter) 56px; background: linear-gradient(#0a1c14, var(--night) 320px); }
.leagues { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.league { display: flex; align-items: center; gap: 8px; flex: none; border: 1px solid var(--line); border-radius: 30px; background: var(--panel); padding: 5px 15px 5px 6px; cursor: pointer; font: 600 18px var(--head); white-space: nowrap; }
.league:hover { border-color: var(--chalk-dim); }
.league .crest { width: 28px; height: 28px; }
.league small { font: 600 14px var(--head); color: var(--chalk-dim); }
.league.on { background: var(--chalk); color: #101a14; border-color: var(--chalk); }
.league.on small { color: #47584c; }
.league-all { padding-left: 15px; }

/* Days and cards */
.day-head { display: flex; align-items: center; gap: 14px; margin: 26px 0 14px; font: 700 26px var(--head); text-transform: uppercase; letter-spacing: .02em; }
.day-head::after { content: ''; flex: 1; border-top: 2px solid var(--line); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.card { display: block; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 0; overflow: hidden; cursor: pointer; transition: transform .16s, border-color .16s; }
.card:hover { transform: translateY(-3px); border-color: var(--yellow); }
.card-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--turf-dark); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-league { position: absolute; left: 8px; top: 8px; display: flex; align-items: center; gap: 6px; background: #07130ee0; border-radius: 20px; padding: 3px 11px 3px 4px; font: 600 15px var(--head); }
.card-league .crest { width: 22px; height: 22px; }
.yellow-card { position: absolute; right: 9px; top: 8px; display: grid; place-items: center; width: 27px; height: 36px; border-radius: 3px; background: var(--yellow); color: #101a14; font: 800 19px var(--head); rotate: 7deg; box-shadow: 0 3px 8px #0007; }
.card-long { position: absolute; left: 8px; bottom: 8px; background: var(--red); border-radius: 3px; padding: 1px 8px; font: 700 14px var(--head); letter-spacing: .04em; text-transform: uppercase; }
.card-play { position: absolute; right: 9px; bottom: 9px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--yellow); opacity: .94; }
.card-play::after { content: ''; margin-left: 3px; border-left: 13px solid #101a14; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.card-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.card-row + .card-row { border-top: 1px solid var(--line); }
.card-row .crest { width: 28px; height: 28px; }
.card-team { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 20px var(--head); }
.card-goals { font: 800 25px/1 var(--head); color: var(--yellow); font-variant-numeric: tabular-nums; }
.card-source { padding: 7px 12px; background: var(--panel-up); color: var(--chalk-dim); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; padding: 56px 12px; }
.empty b { display: block; font: 700 32px var(--head); text-transform: uppercase; }
.empty span { color: var(--chalk-dim); }
.more { text-align: center; margin-top: 28px; }
.more button { border: 2px solid var(--chalk); border-radius: 6px; background: transparent; padding: 10px 30px; font: 700 20px var(--head); text-transform: uppercase; cursor: pointer; }
.more button:hover { background: var(--chalk); color: #101a14; }
.more button[hidden] { display: none; }

/* Footer */
.foot { display: flex; align-items: center; gap: 18px; padding: 22px var(--gutter); background: var(--turf-dark); }
.foot p { margin: 0; color: var(--chalk-dim); font-size: 14.5px; }
.foot-mark { flex: none; background: #101a14; color: var(--red); border-radius: 4px; padding: 2px 11px; font: 800 30px var(--head); }

/* Cinema */
.cinema { width: min(1240px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 2px solid var(--line); border-radius: 10px; background: var(--night); color: var(--chalk); overflow: auto; }
.cinema[open] { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.cinema::backdrop { background: #030806e6; }
.cinema-close { position: absolute; right: 8px; top: 8px; z-index: 3; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--chalk); color: #101a14; font-size: 28px; line-height: 1; cursor: pointer; }
.cinema form { display: contents; }
.cinema-frame { aspect-ratio: 16 / 9; background: #000; }
.cinema-frame iframe, .cinema-frame > div { width: 100%; height: 100%; border: 0; display: block; }
.cinema-info { padding: 14px 18px 16px; }
.cinema-score { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; font: 700 clamp(24px, 3vw, 32px)/1.1 var(--head); text-transform: uppercase; }
.cinema-score strong { background: var(--yellow); color: #101a14; border-radius: 4px; padding: 1px 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cinema-title { margin: 7px 0 3px; font-size: 15px; }
.cinema-note { margin: 0; color: var(--chalk-dim); font-size: 14px; }
.cinema-note a { color: var(--yellow); }
.cinema-side { padding: 18px 14px; background: var(--panel); border-left: 1px solid var(--line); min-width: 0; }
.cinema-side h2 { margin: 0 44px 12px 4px; font: 700 23px var(--head); text-transform: uppercase; }
.versions { display: grid; gap: 8px; }
.version { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-up); padding: 5px; text-align: left; cursor: pointer; }
.version:hover { border-color: var(--chalk-dim); }
.version.on { border-color: var(--yellow); box-shadow: inset 0 0 0 1px var(--yellow); }
.version img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; }
.version b { display: block; font: 700 18px/1.1 var(--head); text-transform: uppercase; }
.version span { display: block; color: var(--chalk-dim); font-size: 13px; line-height: 1.3; margin-top: 3px; }
.frame-note { display: grid; place-content: center; gap: 12px; height: 100%; padding: 24px; text-align: center; background: repeating-linear-gradient(90deg, var(--turf) 0 12.5%, var(--turf-dark) 12.5% 25%); font: 600 22px var(--head); }
.frame-note a { color: var(--yellow); }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .cinema[open] { display: block; }
  .cinema-side { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .masthead { flex-wrap: wrap; gap: 10px 14px; }
  .status { margin-left: auto; font-size: 13px; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .logo { font-size: 26px; }
  .scoreboard-row .crest { width: 42px; height: 42px; }
  .play-ball { width: 64px; height: 64px; }
  .play-ball::after { border-left-width: 21px; border-top-width: 13px; border-bottom-width: 13px; }
  .cinema { width: 100vw; max-height: 100dvh; border: 0; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; overflow-x: auto; }
  .card, .screen img { transition: none; }
}
