:root {
  --bg: #06100d;
  --bg-soft: #0a1713;
  --panel: rgba(14, 30, 25, .86);
  --panel-solid: #0e1e19;
  --panel-2: #142821;
  --line: rgba(255,255,255,.08);
  --muted: #8da49b;
  --text: #f4fbf7;
  --green: #31e98b;
  --green-2: #19b96a;
  --red: #ff5364;
  --gold: #f2c453;
  --shadow: 0 24px 80px rgba(0,0,0,.32);
}

* { box-sizing: border-box; }
html { color-scheme: dark; background: var(--bg); }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.context-hidden { display:none !important; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 74% 8%, rgba(49,233,139,.10), transparent 31%), radial-gradient(circle at 8% 93%, rgba(49,233,139,.06), transparent 27%);
  z-index: 0;
}

.app-shell { min-height: 100vh; position: relative; z-index: 1; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 242px; padding: 26px 18px 22px; z-index: 20;
  display: flex; flex-direction: column; background: rgba(6,16,13,.92); border-right: 1px solid var(--line); backdrop-filter: blur(22px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 32px; }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; position: relative; overflow: hidden; background: linear-gradient(145deg, var(--green), #0b8d52); box-shadow: 0 9px 28px rgba(49,233,139,.22); color: #032b18; font-weight: 950; letter-spacing: -.08em; }
.brand-mark::after { content:""; position:absolute; width:60px; height:1px; background:rgba(255,255,255,.45); transform:rotate(-34deg); }
.brand-mark span { position:relative; z-index:1; }
.brand strong { display: block; font-size: 17px; letter-spacing: .08em; line-height: 1; }
.brand small { display:block; color:var(--green); font-size:10px; letter-spacing:.34em; margin-top:6px; font-weight:800; }
.side-nav { display:flex; flex-direction:column; gap:7px; }
.nav-item { width:100%; min-height:50px; border:0; border-radius:13px; background:transparent; display:grid; grid-template-columns:30px 1fr auto; align-items:center; gap:8px; padding:0 13px; color:#91a79e; cursor:pointer; text-align:left; transition:.2s ease; }
.nav-item:hover { color:#fff; background:rgba(255,255,255,.05); }
.nav-item.active { background:linear-gradient(90deg, rgba(49,233,139,.18), rgba(49,233,139,.05)); color:#fff; box-shadow:inset 3px 0 var(--green); }
.nav-icon { font-size:17px; color:var(--green); width:22px; text-align:center; }
.nav-item span:not(.nav-icon) { font-size:13px; font-weight:700; }
.nav-item b { min-width:24px; height:20px; border-radius:20px; display:grid; place-items:center; padding:0 6px; color:#fff; background:var(--red); font-size:10px; }
.sidebar-card { margin-top:auto; border:1px solid rgba(49,233,139,.13); border-radius:16px; padding:16px; background:linear-gradient(135deg, rgba(49,233,139,.09), rgba(255,255,255,.02)); }
.sidebar-card p { margin:10px 0 5px; font-size:11px; color:var(--muted); }
.sidebar-card strong { font-size:12px; }
.pulse-dot,.mini-live-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--red); box-shadow:0 0 0 0 rgba(255,83,100,.65); animation:pulse 1.6s infinite; }
.sidebar-footer { display:flex; align-items:center; gap:8px; margin-top:18px; padding:8px 5px 0; color:var(--muted); font-size:10px; }
.connection-dot { width:7px; height:7px; border-radius:50%; background:var(--gold); box-shadow:0 0 10px currentColor; }
.connection-dot.online { background:var(--green); }
.connection-dot.offline { background:var(--red); }

.main-content { margin-left:242px; padding:34px clamp(22px,4vw,60px) 70px; max-width:1660px; }
.topbar { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom:26px; }
.eyebrow { color:var(--green); font-size:10px; font-weight:900; letter-spacing:.22em; margin:0 0 8px; }
.topbar h1 { font-size:clamp(28px,3.5vw,44px); line-height:1; letter-spacing:-.045em; margin:0; }
.page-date { color:var(--muted); font-size:12px; margin:10px 0 0; text-transform:capitalize; }
.top-actions { display:flex; align-items:center; gap:12px; }
.live-clock { min-width:104px; min-height:48px; border:1px solid var(--line); background:var(--panel); border-radius:14px; display:flex; align-items:center; justify-content:center; gap:9px; padding:0 14px; }
.live-clock span { color:var(--green); font-size:8px; font-weight:900; letter-spacing:.15em; }
.live-clock strong { font-size:16px; letter-spacing:.03em; }
.icon-button { width:48px; height:48px; border:1px solid var(--line); background:var(--panel); border-radius:14px; cursor:pointer; font-size:23px; color:var(--green); transition:.25s; }
.icon-button:hover { transform:rotate(45deg); border-color:rgba(49,233,139,.35); }
.icon-button.loading { animation:spin 1s linear infinite; }

.summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; margin-bottom:16px; }
.summary-card { min-height:104px; border:1px solid var(--line); background:linear-gradient(145deg, rgba(17,36,30,.96), rgba(11,24,20,.9)); border-radius:18px; padding:18px; display:grid; grid-template-columns:42px 1fr auto; align-items:center; gap:13px; box-shadow:0 12px 34px rgba(0,0,0,.13); }
.summary-card.live-summary { border-color:rgba(255,83,100,.19); background:linear-gradient(145deg, rgba(54,24,28,.68), rgba(14,29,24,.95)); }
.summary-icon { width:40px; height:40px; display:grid; place-items:center; border-radius:12px; background:rgba(49,233,139,.09); color:var(--green); font-size:15px; }
.live-summary .summary-icon { color:var(--red); background:rgba(255,83,100,.12); }
.summary-card small { display:block; color:var(--muted); font-size:9px; font-weight:900; letter-spacing:.12em; }
.summary-card strong { display:block; font-size:27px; line-height:1; margin-top:6px; }
.summary-card em { color:#597067; font-size:9px; font-style:normal; align-self:end; }

.spotlight { min-height:220px; margin:16px 0; border:1px solid rgba(49,233,139,.19); border-radius:22px; overflow:hidden; position:relative; background:linear-gradient(120deg,rgba(18,49,38,.98),rgba(8,22,18,.96)); box-shadow:var(--shadow); }
.spotlight::before { content:""; position:absolute; inset:0; opacity:.22; background:linear-gradient(90deg,transparent 49.6%,rgba(255,255,255,.22) 50%,transparent 50.4%),radial-gradient(circle at 50% 50%,transparent 0 44px,rgba(255,255,255,.25) 45px 46px,transparent 47px),repeating-linear-gradient(115deg,transparent 0 65px,rgba(255,255,255,.025) 66px 67px); }
.spotlight-inner { position:relative; z-index:1; min-height:220px; display:grid; grid-template-columns:1fr 210px 1fr; align-items:center; gap:20px; padding:28px clamp(25px,5vw,70px); }
.spot-team { display:flex; align-items:center; gap:15px; font-size:clamp(17px,2vw,24px); font-weight:850; }
.spot-team.away { flex-direction:row-reverse; text-align:right; }
.team-logo-xl { width:66px; height:66px; object-fit:contain; filter:drop-shadow(0 10px 15px rgba(0,0,0,.3)); }
.spot-score { text-align:center; }
.spot-score small { display:inline-flex; align-items:center; gap:7px; padding:6px 10px; border-radius:30px; background:rgba(255,83,100,.14); color:#ff8793; font-size:9px; font-weight:900; letter-spacing:.12em; }
.spot-score strong { display:block; font-size:52px; letter-spacing:.08em; margin:5px 0 0; }
.spot-score p { margin:2px 0 0; color:var(--muted); font-size:11px; }

.content-panel { border:1px solid var(--line); border-radius:22px; background:rgba(10,24,20,.74); backdrop-filter:blur(16px); min-height:420px; overflow:hidden; }
.content-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:17px 18px; border-bottom:1px solid var(--line); }
.filter-row { display:flex; gap:7px; overflow:auto; scrollbar-width:none; }
.filter-chip { white-space:nowrap; border:1px solid transparent; border-radius:10px; background:transparent; color:var(--muted); padding:9px 13px; font-size:11px; font-weight:750; cursor:pointer; }
.filter-chip:hover { color:#fff; background:rgba(255,255,255,.04); }
.filter-chip.active { color:#052c19; background:var(--green); }
.filter-chip .mini-live-dot { width:6px; height:6px; margin-right:7px; }
.filter-chip.active .mini-live-dot { background:#052c19; animation:none; box-shadow:none; }
.search-box { height:39px; min-width:260px; border:1px solid var(--line); background:rgba(255,255,255,.035); border-radius:11px; display:flex; align-items:center; gap:9px; padding:0 12px; color:var(--muted); }
.search-box:focus-within { border-color:rgba(49,233,139,.4); }
.search-box input { width:100%; border:0; outline:0; background:transparent; color:#fff; font-size:11px; }
.search-box input::placeholder { color:#61776f; }
.date-picker { margin:18px; padding:12px; border-radius:15px; border:1px solid var(--line); background:rgba(255,255,255,.025); display:flex; justify-content:center; align-items:center; gap:14px; }
.date-picker button { width:40px; height:40px; border:1px solid var(--line); background:var(--panel-2); border-radius:10px; cursor:pointer; font-size:24px; color:var(--green); }
.date-picker label { display:flex; flex-direction:column; gap:4px; color:var(--muted); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; }
.date-picker input { border:0; outline:0; color:#fff; background:transparent; font-weight:800; color-scheme:dark; }

.league-list { padding:0 18px 20px; }
.league-block { padding-top:18px; }
.league-header { min-height:42px; display:flex; align-items:center; gap:10px; padding:0 5px 10px; }
.league-logo { width:24px; height:24px; object-fit:contain; }
.league-title { flex:1; }
.league-title strong { display:block; font-size:12px; }
.league-title span { display:block; color:var(--muted); font-size:9px; margin-top:2px; }
.league-count { color:var(--muted); font-size:9px; border:1px solid var(--line); border-radius:30px; padding:5px 8px; }
.matches-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.match-card { position:relative; min-height:126px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.025); padding:14px; cursor:pointer; transition:.2s ease; overflow:hidden; }
.match-card:hover { transform:translateY(-2px); border-color:rgba(49,233,139,.28); background:rgba(49,233,139,.035); }
.match-card.is-live { border-color:rgba(255,83,100,.24); }
.match-meta { display:flex; justify-content:space-between; align-items:center; min-height:21px; margin-bottom:7px; }
.status-badge { display:inline-flex; align-items:center; gap:5px; color:var(--muted); font-size:9px; font-weight:850; text-transform:uppercase; letter-spacing:.06em; }
.status-badge.live { color:#ff7d89; }
.match-round { color:#5c736a; font-size:8px; }
.team-row { display:grid; grid-template-columns:28px 1fr auto; gap:9px; align-items:center; min-height:36px; }
.team-row img { width:25px; height:25px; object-fit:contain; }
.team-logo-fallback { width:25px; height:25px; border-radius:9px; display:grid; place-items:center; background:linear-gradient(145deg,#1d3b30,#11271f); color:var(--green); font-size:8px; font-weight:950; }
.team-logo-fallback.team-logo-xl { width:66px; height:66px; border-radius:20px; font-size:14px; }
.team-row span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; font-weight:700; }
.team-row strong { min-width:22px; text-align:center; font-size:18px; }
.favorite-button { position:absolute; right:9px; bottom:8px; border:0; background:transparent; color:#4d625a; cursor:pointer; padding:4px; font-size:15px; }
.favorite-button.active { color:var(--gold); }
.other-leagues { margin:22px 0 4px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.018); overflow:hidden; }
.other-leagues > summary { min-height:66px; padding:0 17px; display:grid; grid-template-columns:1fr auto 24px; align-items:center; gap:12px; cursor:pointer; list-style:none; }
.other-leagues > summary::-webkit-details-marker { display:none; }
.other-leagues > summary span strong { display:block; font-size:12px; }
.other-leagues > summary span small { display:block; margin-top:4px; color:var(--muted); font-size:9px; }
.other-leagues > summary b { padding:6px 9px; border-radius:30px; background:rgba(255,255,255,.05); color:var(--muted); font-size:9px; }
.other-leagues > summary i { color:var(--green); font-size:16px; font-style:normal; transition:transform .2s; }
.other-leagues[open] > summary i { transform:rotate(180deg); }
.other-leagues-content { padding:0 15px 16px; border-top:1px solid var(--line); }

.competition-grid { padding:18px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.competition-card { border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.025); min-height:126px; padding:17px; display:flex; flex-direction:column; align-items:flex-start; justify-content:space-between; transition:.2s; }
.competition-card:hover { border-color:rgba(49,233,139,.28); transform:translateY(-2px); }
.competition-card img { width:38px; height:38px; object-fit:contain; }
.competition-card strong { font-size:12px; margin-top:12px; }
.competition-card span { color:var(--muted); font-size:9px; }

.loading-state,.empty-state,.error-state { min-height:310px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:30px; }
.loading-state strong,.empty-state strong,.error-state strong { margin-top:14px; font-size:14px; }
.loading-state span,.empty-state p,.error-state p { color:var(--muted); font-size:11px; margin:7px 0; }
.loading-ball { width:32px; height:32px; border-radius:50%; border:3px solid rgba(49,233,139,.15); border-top-color:var(--green); animation:spin .8s linear infinite; }
.empty-state > span { font-size:34px; opacity:.45; filter:grayscale(1); }
.error-state > span { width:38px; height:38px; border-radius:50%; display:grid; place-items:center; color:#ff8691; background:rgba(255,83,100,.12); font-weight:900; }
.error-state button { margin-top:12px; padding:10px 16px; border:0; border-radius:10px; color:#042c19; background:var(--green); font-size:11px; font-weight:900; cursor:pointer; }

.modal-backdrop { position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:18px; background:rgba(0,8,6,.78); backdrop-filter:blur(12px); }
.match-modal-card { width:min(900px,100%); max-height:90vh; overflow:auto; position:relative; border:1px solid rgba(49,233,139,.2); border-radius:24px; background:#0b1b16; box-shadow:0 35px 100px rgba(0,0,0,.62); }
.modal-close { position:sticky; top:14px; float:right; z-index:3; margin:14px 14px 0 0; width:36px; height:36px; border:1px solid var(--line); border-radius:11px; background:#142821; color:#fff; cursor:pointer; font-size:22px; }
.modal-hero { padding:28px 26px 24px; background:linear-gradient(145deg,rgba(49,233,139,.11),transparent); border-bottom:1px solid var(--line); text-align:center; }
.modal-competition { color:var(--green); font-size:9px; font-weight:900; letter-spacing:.1em; text-transform:uppercase; }
.modal-scoreboard { display:grid; grid-template-columns:1fr 120px 1fr; align-items:center; gap:14px; margin-top:22px; }
.modal-team { display:flex; flex-direction:column; align-items:center; gap:10px; font-size:12px; font-weight:800; }
.modal-team img { width:58px; height:58px; object-fit:contain; }
.modal-team .team-logo-fallback { width:58px; height:58px; border-radius:18px; font-size:13px; }
.modal-score { font-size:38px; font-weight:900; }
.modal-score small { display:block; margin-top:6px; color:var(--muted); font-size:9px; font-weight:700; }
.match-info-strip { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:20px; }
.match-info-strip span { padding:6px 9px; border:1px solid var(--line); border-radius:30px; background:rgba(255,255,255,.025); color:var(--muted); font-size:9px; }
.modal-section { padding:20px 24px; border-bottom:1px solid var(--line); }
.modal-section h3 { margin:0 0 14px; font-size:12px; letter-spacing:.08em; text-transform:uppercase; }
.section-title-row { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-bottom:14px; }
.section-title-row h3 { margin:0; }
.section-title-row > span { color:var(--green); font-size:8px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.lineup-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.lineup-team { border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.02); overflow:hidden; }
.lineup-team > header { min-height:62px; padding:11px 13px; display:flex; align-items:center; gap:10px; border-bottom:1px solid var(--line); background:rgba(49,233,139,.035); }
.lineup-team > header img,.lineup-team > header .team-logo-fallback { width:34px; height:34px; object-fit:contain; border-radius:10px; }
.lineup-team > header strong { display:block; font-size:11px; }
.lineup-team > header span { display:block; margin-top:3px; color:var(--green); font-size:8px; }
.starter-list { padding:5px 11px; }
.player-row { min-height:42px; display:grid; grid-template-columns:30px 1fr auto; align-items:center; gap:9px; border-top:1px solid rgba(255,255,255,.045); }
.player-row:first-child { border-top:0; }
.player-row img,.player-number { width:27px; height:27px; border-radius:50%; object-fit:cover; display:grid; place-items:center; background:#1b332a; color:var(--green); font-size:8px; font-weight:900; }
.player-row > span:nth-child(2) { min-width:0; }
.player-row strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:9px; }
.player-row small { display:block; margin-top:2px; color:var(--muted); font-size:7px; }
.player-row > b { min-width:27px; padding:4px 5px; border-radius:7px; text-align:center; color:#072718; background:var(--green); font-size:8px; }
.lineup-unavailable { padding:14px 4px; color:var(--muted); font-size:9px; text-align:center; }
.bench-list { border-top:1px solid var(--line); }
.bench-list summary { min-height:42px; padding:0 12px; display:flex; align-items:center; justify-content:space-between; list-style:none; cursor:pointer; color:var(--muted); font-size:9px; font-weight:800; }
.bench-list summary::-webkit-details-marker { display:none; }
.bench-list summary b { min-width:22px; padding:4px 6px; border-radius:20px; text-align:center; color:var(--green); background:rgba(49,233,139,.09); }
.bench-list > div { padding:0 11px 7px; background:rgba(0,0,0,.08); }
.event-row,.stat-row { display:grid; grid-template-columns:55px 1fr auto; align-items:center; gap:10px; min-height:36px; color:#d9e7e1; font-size:10px; border-top:1px solid rgba(255,255,255,.045); }
.event-row:first-child,.stat-row:first-child { border-top:0; }
.event-row span,.stat-row span { color:var(--muted); }
.stat-bar { grid-column:1/-1; height:3px; margin:-4px 0 7px; background:#1c332a; border-radius:5px; overflow:hidden; }
.stat-bar i { display:block; height:100%; background:var(--green); border-radius:5px; }

.toast { position:fixed; z-index:120; right:22px; bottom:22px; max-width:340px; padding:13px 16px; border-radius:12px; border:1px solid var(--line); background:#13271f; box-shadow:var(--shadow); color:#dff5ea; font-size:11px; }
.mobile-nav { display:none; }

@keyframes spin { to { transform:rotate(360deg); } }
@keyframes pulse { 70% { box-shadow:0 0 0 7px rgba(255,83,100,0); } 100% { box-shadow:0 0 0 0 rgba(255,83,100,0); } }

@media (max-width:1100px) {
  .summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .competition-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:840px) {
  .sidebar { display:none; }
  .main-content { margin-left:0; padding:24px 16px 95px; }
  .mobile-nav { position:fixed; z-index:40; inset:auto 12px 12px; display:grid; grid-template-columns:repeat(4,1fr); border:1px solid var(--line); border-radius:18px; padding:7px; background:rgba(8,22,18,.94); backdrop-filter:blur(18px); box-shadow:var(--shadow); }
  .mobile-nav button { border:0; background:transparent; color:var(--muted); min-height:53px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; border-radius:12px; cursor:pointer; }
  .mobile-nav button.active { color:#062b19; background:var(--green); }
  .mobile-nav button.active .nav-icon { color:#062b19; }
  .mobile-nav span:not(.nav-icon) { font-size:8px; font-weight:850; }
  .spotlight-inner { grid-template-columns:1fr 110px 1fr; padding:24px 18px; }
  .spot-team { flex-direction:column; text-align:center; font-size:14px; }
  .spot-team.away { flex-direction:column; text-align:center; }
  .team-logo-xl { width:50px; height:50px; }
  .spot-score strong { font-size:37px; }
  .matches-grid { grid-template-columns:1fr; }
}
@media (max-width:620px) {
  .topbar h1 { font-size:30px; }
  .page-date { max-width:220px; }
  .live-clock { display:none; }
  .summary-grid { gap:8px; }
  .summary-card { min-height:82px; grid-template-columns:34px 1fr; padding:13px; }
  .summary-card em { display:none; }
  .summary-icon { width:32px; height:32px; }
  .summary-card strong { font-size:21px; }
  .content-toolbar { align-items:stretch; flex-direction:column-reverse; }
  .search-box { min-width:0; width:100%; }
  .spotlight { min-height:190px; }
  .spotlight-inner { min-height:190px; gap:8px; padding:20px 12px; }
  .spot-team { font-size:11px; }
  .team-logo-xl { width:42px; height:42px; }
  .spot-score strong { font-size:30px; }
  .competition-grid { grid-template-columns:repeat(2,minmax(0,1fr)); padding:12px; }
  .modal-scoreboard { grid-template-columns:1fr 82px 1fr; }
  .modal-team img { width:45px; height:45px; }
  .modal-score { font-size:29px; }
  .lineup-grid { grid-template-columns:1fr; }
  .modal-section { padding:18px 14px; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.001ms!important; animation-iteration-count:1!important; transition-duration:.001ms!important; } }
