:root {
  color-scheme: dark;
  --bg: #060a12;
  --panel: #0c131f;
  --panel-2: #101927;
  --line: #253246;
  --text: #f5f7fb;
  --muted: #8f9aae;
  --brand: #e51f4f;
  --brand-2: #9c1d71;
  --home: #24a4ff;
  --away: #ff385e;
  --font-display: "Barlow Condensed", sans-serif;
  --font-body: "Inter", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(circle at 12% 10%, rgba(15, 104, 181, .12), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(229, 31, 79, .1), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}
body::before {
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.topbar {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(5, 9, 16, .88);
  border-bottom: 1px solid rgba(128, 148, 177, .2);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  height: 74px;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { align-items: center; display: inline-flex; gap: 11px; justify-self: start; }
.brand-symbol { height: 43px; object-fit: contain; width: 43px; }
.brand-name { font-family: var(--font-display); font-size: 26px; font-style: italic; font-weight: 800; letter-spacing: .03em; }
.brand-name b { color: var(--brand); }
.brand-logo-horizontal { display: block; height: 52px; object-fit: contain; object-position: left center; width: 204px; }
.topbar-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.connection { align-items: center; color: var(--muted); display: flex; font-size: 12px; gap: 8px; justify-self: end; }
.connection i, .live-pill i, .game-card-top b i { background: var(--muted); border-radius: 50%; height: 7px; width: 7px; }
.connection.is-online i, .live-pill i, .game-card-top b i { background: var(--brand); box-shadow: 0 0 12px rgba(229,31,79,.7); }

.hub-shell { margin: 0 auto; max-width: 1440px; padding: 64px 36px 80px; position: relative; }
.hero { max-width: 780px; }
.eyebrow { color: var(--brand); font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: .18em; margin: 0 0 10px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(56px, 6vw, 88px); font-style: italic; letter-spacing: -.025em; line-height: .87; margin: 0; text-transform: uppercase; }
.hero h1 span { color: var(--brand); }
.hero > p:last-child { color: var(--muted); font-size: 16px; line-height: 1.7; margin: 25px 0 0; max-width: 600px; }

.sport-tabs { background: rgba(12,19,31,.85); border: 1px solid var(--line); border-radius: 12px; display: inline-flex; margin: 48px 0 42px; padding: 5px; }
.sport-tab { background: transparent; border: 0; border-radius: 8px; color: var(--muted); cursor: pointer; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: .05em; min-width: 150px; padding: 13px 24px; text-transform: uppercase; }
.sport-tab.is-active { background: linear-gradient(135deg, rgba(229,31,79,.22), rgba(156,29,113,.12)); box-shadow: inset 0 -2px var(--brand); color: white; }
.sport-icon { display: inline-block; margin-right: 8px; }
.section-heading { align-items: end; display: flex; justify-content: space-between; margin-bottom: 20px; }
.section-heading h2 { font-family: var(--font-display); font-size: 32px; letter-spacing: .02em; margin: 0; text-transform: uppercase; }
.live-pill { align-items: center; border: 1px solid rgba(229,31,79,.65); border-radius: 99px; color: #ff426e; display: inline-flex; font-family: var(--font-display); font-size: 12px; font-weight: 700; gap: 8px; letter-spacing: .08em; padding: 6px 12px; }
.games-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.game-card { background: linear-gradient(145deg, rgba(17,26,40,.98), rgba(8,14,23,.98)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: border-color .2s, transform .2s; }
.game-card:hover { border-color: rgba(229,31,79,.75); transform: translateY(-2px); }
.game-card-top { align-items: center; border-bottom: 1px solid rgba(128,148,177,.15); color: var(--muted); display: flex; font-size: 11px; justify-content: flex-end; letter-spacing: .08em; padding: 12px 16px; text-transform: uppercase; }
.game-card-top b { align-items: center; color: #ff426e; display: flex; font-size: 10px; gap: 7px; }
.game-match { align-items: center; display: grid; gap: 12px; grid-template-columns: 1fr auto 1fr; padding: 20px 18px; }
.game-team { align-items: center; display: flex; gap: 11px; min-width: 0; }
.game-team:last-child { flex-direction: row-reverse; text-align: right; }
.game-team strong { font-family: var(--font-display); font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-score { align-items: center; display: flex; font-family: var(--font-display); font-size: 27px; gap: 9px; }
.mini-score em { color: var(--brand); font-size: 17px; font-style: normal; }
.open-dashboard { border-top: 1px solid rgba(128,148,177,.15); color: var(--muted); font-size: 11px; padding: 11px 16px; text-align: right; text-transform: uppercase; }
.open-dashboard span { color: var(--brand); font-size: 16px; margin-left: 5px; }
.loading-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); grid-column: 1 / -1; padding: 40px; text-align: center; }
.loading-card.error { color: #ff617f; }
.site-footer { border-top: 1px solid rgba(128,148,177,.16); color: var(--muted); display: flex; font-size: 11px; justify-content: space-between; padding: 22px 36px; position: relative; }

/* Match dashboard */
.dashboard-topbar { grid-template-columns: 1fr auto; }
.dashboard-sports { align-items: center; background: rgba(14,21,32,.8); border: 1px solid var(--line); border-radius: 8px; display: flex; overflow: hidden; }
.dashboard-sports a { border-bottom: 2px solid transparent; color: var(--muted); font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: .06em; padding: 11px 22px; text-transform: uppercase; }
.dashboard-sports a.is-active { background: rgba(229,31,79,.08); border-color: var(--brand); color: white; }
[data-sport="futebol"] .dashboard-sports a.is-active { background: rgba(36,164,255,.08); border-color: var(--home); }
.back-link { border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 12px; justify-self: end; padding: 10px 14px; }
.back-link:hover { border-color: var(--brand); color: white; }
.match-shell { margin: 0 auto; max-width: 1720px; padding: 8px 22px 22px; position: relative; }
.scoreboard { align-items: center; display: grid; gap: 25px; grid-template-columns: 1fr 430px 1fr; min-height: 120px; }
.team { align-items: center; display: flex; gap: 22px; }
.team-away { justify-content: flex-end; text-align: right; }
.team h1 { font-family: var(--font-display); font-size: clamp(28px, 3vw, 45px); letter-spacing: .03em; margin: 0; text-transform: uppercase; }
.score-center { text-align: center; }
.score-line { align-items: center; display: grid; gap: 18px; grid-template-columns: 78px 1fr 78px; }
.score { align-items: center; display: flex; font-family: var(--font-display); gap: 28px; justify-content: center; line-height: .9; margin: 8px 0 4px; }
.score strong { font-size: 78px; }
.score span { color: var(--muted); font-size: 38px; font-weight: 300; }
.score-bookings { display: grid; gap: 7px; }
.score-bookings > span { align-items: center; color: var(--text); display: flex; font-family: var(--font-display); font-size: 18px; font-weight: 700; gap: 7px; }
.score-bookings-home > span { justify-content: flex-end; }
.score-bookings-away > span { justify-content: flex-start; }
.score-bookings .booking-card { height: 19px; transform: rotate(4deg); width: 13px; }
.dashboard-grid { display: grid; gap: 16px; grid-template-columns: minmax(250px, 27%) minmax(470px, 46%) minmax(250px, 27%); }
.side-panel, .stats-panel { background: linear-gradient(155deg, rgba(10,20,33,.96), rgba(6,12,21,.98)); border: 1px solid #314157; border-radius: 13px; min-height: 0; overflow: hidden; }
.side-panel { align-items: center; display: flex; flex-direction: column; padding: 13px 14px 12px; }
.home-panel { border-color: rgba(36,164,255,.72); box-shadow: inset 0 0 24px rgba(36,164,255,.035); }
.away-panel { border-color: rgba(255,56,94,.72); box-shadow: inset 0 0 24px rgba(255,56,94,.035); }
.side-panel h3 { align-self: stretch; font-family: var(--font-display); font-size: 17px; letter-spacing: .08em; margin: 0 0 9px; text-align: center; text-transform: uppercase; }
.home-panel h3 { color: var(--home); }
.away-panel h3 { color: var(--away); }
.panel-divider { background: rgba(128,148,177,.2); height: 1px; margin: 3px 0 9px; width: 100%; }
.map-toggle { align-items: center; color: var(--muted); cursor: pointer; display: flex; font-family: var(--font-display); font-size: 11px; font-weight: 700; gap: 8px; letter-spacing: .06em; margin: 0 0 8px; text-transform: uppercase; }
.map-toggle[hidden] { display: none; }
.map-toggle input { height: 0; opacity: 0; position: absolute; width: 0; }
.map-toggle i { background: #182337; border: 1px solid #34445b; border-radius: 20px; display: block; height: 22px; position: relative; transition: background .2s, border-color .2s; width: 42px; }
.map-toggle i::after { background: var(--home); border-radius: 50%; box-shadow: 0 0 9px rgba(36,164,255,.5); content: ""; height: 14px; left: 3px; position: absolute; top: 3px; transition: left .2s, background .2s, box-shadow .2s; width: 14px; }
.map-toggle input:checked + i { background: rgba(229,31,79,.16); border-color: rgba(229,31,79,.7); }
.map-toggle input:checked + i::after { background: var(--brand); box-shadow: 0 0 9px rgba(229,31,79,.55); left: 23px; }
.map-toggle input:focus-visible + i { outline: 2px solid white; outline-offset: 2px; }
.heatmap-frame { align-items: center; background: #08100e; border: 1px solid #27382f; border-radius: 4px; display: flex; flex: 1; justify-content: center; min-height: 260px; overflow: hidden; position: relative; width: 96%; }
.heatmap-frame img { display: none; height: 100%; object-fit: contain; width: 100%; z-index: 1; }
.heatmap-frame img.has-image { display: block; }
.heatmap-frame span { color: #637069; font-size: 11px; position: absolute; }
.zones { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.zones div { border-right: 1px solid rgba(128,148,177,.18); display: grid; gap: 1px; text-align: center; }
.zones div:last-child { border: 0; }
.zones span { color: var(--muted); font-family: var(--font-display); font-size: 11px; text-transform: uppercase; }
.zones strong { color: var(--muted); font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.zones strong small { font-size: 10px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.zones b { color: var(--home); font-family: var(--font-display); font-size: 27px; line-height: 1; }
.away-panel .zones b { color: var(--away); }
.stats-panel { display: flex; flex-direction: column; gap: 9px; padding: 11px 12px; }
.comparison-head { align-items: center; background: linear-gradient(100deg, rgba(36,164,255,.12), rgba(10,18,29,.92) 48%, rgba(255,56,94,.12)); border: 1px solid rgba(116,145,181,.42); border-radius: 9px; box-shadow: inset 0 0 24px rgba(68,127,190,.08), 0 5px 18px rgba(0,0,0,.22); display: grid; grid-template-columns: 74px 1fr 74px; min-height: 74px; padding: 8px 10px; }
.comparison-head > span { color: var(--home); font-family: var(--font-display); font-size: 37px; font-weight: 800; }
.comparison-head > span:last-child { color: var(--away); text-align: right; }
.comparison-head > div > b { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 800; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.compare-track { background: var(--away); border-radius: 6px; box-shadow: 0 0 12px rgba(36,164,255,.16); height: 13px; margin-top: 9px; overflow: hidden; }
.compare-track i { background: var(--home); display: block; height: 100%; position: relative; }
.compare-track i::after { background: #070b13; content: ""; height: 16px; position: absolute; right: -1px; top: -3px; width: 2px; }
.stats-list { display: flex; flex: 1; flex-direction: column; gap: 9px; min-height: 0; }
.stat-group { background: rgba(13,22,35,.52); border: 1px solid rgba(128,148,177,.17); border-radius: 8px; display: flex; flex: var(--rows, 1) 1 0; flex-direction: column; min-height: 0; overflow: hidden; padding: 1px 7px; }
.stat-row { align-items: center; border-bottom: 1px solid rgba(128,148,177,.14); display: grid; flex: 1; gap: 10px; grid-template-columns: 58px 1fr 58px; min-height: 42px; }
.stat-row:last-child { border: 0; }
.stat-row > strong { color: var(--home); font-family: var(--font-display); font-size: 23px; font-weight: 700; padding-left: 4px; }
.stat-row > strong:last-child { color: var(--away); padding: 0 4px 0 0; text-align: right; }
.stat-main span { display: block; font-family: var(--font-display); font-size: 14px; letter-spacing: .04em; text-align: center; text-transform: uppercase; }
.booking-card {
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 3px;
  box-shadow: inset 2px 2px 3px rgba(255,255,255,.42), inset -2px -2px 4px rgba(0,0,0,.25), 0 3px 8px rgba(0,0,0,.4);
  display: inline-block;
  height: 21px;
  position: relative;
  transform: rotate(5deg);
  width: 14px;
}
.booking-card::after {
  background: linear-gradient(120deg, rgba(255,255,255,.5), transparent 45%);
  border-radius: 2px;
  content: "";
  inset: 2px;
  position: absolute;
}
.booking-yellow { background: linear-gradient(145deg, #fff36b 0%, #ffc400 55%, #e99a00 100%); }
.booking-red { background: linear-gradient(145deg, #ff6571 0%, #ef183c 52%, #a90725 100%); }
.dual-bar { background: #162237; border-radius: 4px; display: flex; height: 5px; margin-top: 5px; overflow: hidden; }
.dual-bar i { background: var(--home); display: block; }
.dual-bar b { background: var(--away); display: block; }
.ball-state { background: linear-gradient(100deg, rgba(36,164,255,.08), rgba(255,56,94,.08)); border: 1px solid rgba(128,148,177,.25); border-radius: 8px; padding: 8px 12px 10px; }
.ball-state[hidden] { display: none; }
.ball-state-title { color: var(--muted); font-family: var(--font-display); font-size: 10px; font-weight: 700; letter-spacing: .13em; margin-bottom: 5px; text-align: center; text-transform: uppercase; }
.ball-state-values { align-items: end; display: grid; gap: 12px; grid-template-columns: 100px 1fr 100px; }
.ball-state-values > div:first-child { text-align: left; }
.ball-state-values > div:last-child { text-align: right; }
.ball-state-values span { color: var(--muted); display: block; font-family: var(--font-display); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.ball-state-values strong { font-family: var(--font-display); font-size: 25px; line-height: 1; }
.ball-state-values > div:first-child strong { color: var(--home); }
.ball-state-values > div:last-child strong { color: var(--away); }
.ball-state-track { background: var(--away); border-radius: 5px; height: 8px; margin-bottom: 4px; overflow: hidden; }
.ball-state-track i { background: var(--home); display: block; height: 100%; }

@media (min-width: 1100px) and (min-height: 700px) {
  .dashboard-page { height: 100vh; overflow: hidden; }
  .match-shell { height: calc(100vh - 74px); }
  .dashboard-grid { height: calc(100% - 120px); }
}
@media (max-width: 1000px) {
  .topbar { padding: 0 18px; }
  .brand-name { font-size: 22px; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .stats-panel { grid-column: 1 / -1; grid-row: 1; }
  .side-panel { min-height: 620px; }
  .scoreboard { grid-template-columns: 1fr 360px 1fr; }
}
@media (max-width: 700px) {
  .topbar { grid-template-columns: 1fr auto; height: 64px; }
  .topbar-title, .connection, .back-link { display: none; }
  .brand-logo-horizontal { height: 44px; width: 172px; }
  .hub-shell { padding: 42px 18px 60px; }
  .hero h1 { font-size: 52px; }
  .sport-tabs { display: flex; margin: 36px 0 32px; width: 100%; }
  .sport-tab { min-width: 0; width: 50%; }
  .games-grid { grid-template-columns: 1fr; }
  .section-heading .live-pill { display: none; }
  .site-footer { display: grid; gap: 8px; padding: 20px 18px; }
  .dashboard-topbar { grid-template-columns: 1fr auto; }
  .dashboard-sports a { padding: 10px 12px; }
  .dashboard-sports span { display: none; }
  .match-shell { padding: 5px 10px 20px; }
  .scoreboard { gap: 6px; grid-template-columns: 1fr 190px 1fr; min-height: 110px; }
  .team { justify-content: center; text-align: center; }
  .team h1 { font-size: 20px; }
  .score strong { font-size: 54px; }
  .score { gap: 12px; }
  .score-line { gap: 6px; grid-template-columns: 34px 1fr 34px; }
  .score-bookings > span { font-size: 13px; gap: 3px; }
  .score-bookings .booking-card { height: 15px; width: 10px; }
  .dashboard-grid { display: flex; flex-direction: column; }
  .stats-panel { order: 1; }
  .home-panel { order: 2; }
  .away-panel { order: 3; }
  .side-panel { min-height: 600px; }
  .stat-row { min-height: 43px; }
}
