:root {
  color-scheme: dark;
  --bg: #050914;
  --bg-2: #07111f;
  --panel: rgba(17, 29, 52, .82);
  --panel-strong: rgba(18, 34, 60, .96);
  --line: rgba(164, 184, 220, .17);
  --text: #f7fbff;
  --muted: #aeb9ca;
  --soft: #77849b;
  --green: #00f09a;
  --green-2: #0bd3c9;
  --red: #ff425f;
  --orange: #ff7a35;
  --blue: #5592ff;
  --yellow: #ffd84a;
  --shadow: 0 22px 70px rgba(0, 0, 0, .34);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root.light {
  color-scheme: light;
  --bg: #eef4f8;
  --bg-2: #f8fbfd;
  --panel: rgba(255, 255, 255, .9);
  --panel-strong: #ffffff;
  --line: rgba(16, 42, 67, .14);
  --text: #071321;
  --muted: #526174;
  --soft: #718096;
  --shadow: 0 18px 55px rgba(6, 24, 44, .13);
}

:root.light body {
  background:
    radial-gradient(circle at 52% -8%, rgba(0, 180, 120, .18), transparent 31rem),
    linear-gradient(145deg, #eef4f8, #f8fbfd 58%, #edf6f1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 52% -8%, rgba(0, 240, 154, .28), transparent 31rem),
    linear-gradient(145deg, var(--bg), #020611 58%, var(--bg));
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 296px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  padding: 24px 20px;
  border-right: 1px solid var(--line);
  background: rgba(3, 8, 20, .74);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  scrollbar-width: thin;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 850; }
.brand img { width: 38px; height: 38px; }
.brand b, .pro-pill {
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #03141d;
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 12px;
}
.side-nav { display: grid; gap: 12px; }
.nav-link {
  min-height: 56px;
  border-radius: var(--radius);
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: .22s ease;
}
.nav-link svg { width: 25px; height: 25px; }
.nav-link.active, .nav-link:hover {
  color: var(--green);
  background: linear-gradient(120deg, rgba(0, 240, 154, .14), rgba(11, 211, 201, .05));
  border-color: rgba(0, 240, 154, .26);
}
.premium-panel {
  margin-top: auto;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 240, 154, .2);
  background: linear-gradient(145deg, rgba(0, 240, 154, .13), rgba(14, 25, 45, .86));
}
.premium-panel h3 { margin: 6px 0 10px; }
.premium-panel p { margin: 0 0 16px; color: var(--muted); line-height: 1.5; }
.crown { color: var(--yellow); font-size: 28px; }
.main { min-width: 0; padding: 34px 54px 42px; }
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-bottom: 28px; position: relative; }
.favorites-popover {
  position: absolute;
  top: 58px;
  right: 52px;
  z-index: 20;
  width: min(320px, calc(100vw - 28px));
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}
.favorites-popover .section-head { width: 100%; }
.search-shell {
  width: min(420px, 50vw);
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: rgba(4, 17, 27, .45);
}
.search-shell svg { width: 22px; height: 22px; color: var(--muted); }
.search-shell input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; }
.icon-btn, .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(19, 33, 58, .72);
  position: relative;
}
.icon-btn svg { width: 22px; height: 22px; }
.has-dot::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}
.avatar { font-weight: 800; color: var(--green); }
.view { display: grid; gap: 28px; }
.hero {
  min-height: 180px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}
.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 20px; }
h1 { margin: 0; font-size: clamp(42px, 6vw, 74px); line-height: .95; letter-spacing: 0; }
h2 { margin: 0; font-size: 26px; }
h3 { margin: 0; }
.muted { color: var(--muted); line-height: 1.5; }
.hero p { max-width: 560px; color: var(--muted); font-size: 18px; line-height: 1.55; }
.live-now {
  min-width: 196px;
  border: 0;
  color: white;
  border-radius: 999px;
  padding: 18px 26px;
  font-weight: 850;
  font-size: 18px;
  background: linear-gradient(135deg, #ff315a, var(--orange));
  box-shadow: 0 18px 50px rgba(255, 66, 95, .23);
}
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.see-all { color: var(--green); font-weight: 800; }
.grid { display: grid; gap: 16px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.match-card, .prediction-card, .team-card, .league-card, .stat-panel, .ad-slot, .empty-state, .timeline, .lineup, .notification-card, .prefs-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(24, 39, 69, .9), rgba(10, 18, 34, .86));
  box-shadow: var(--shadow);
}
:root.light .match-card,
:root.light .prediction-card,
:root.light .team-card,
:root.light .league-card,
:root.light .stat-panel,
:root.light .ad-slot,
:root.light .empty-state,
:root.light .timeline,
:root.light .lineup,
:root.light .notification-card,
:root.light .prefs-card,
:root.light .premium-panel,
:root.light .api-banner,
:root.light .live-stats div {
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(240, 247, 244, .94));
}
:root.light .sidebar,
:root.light .bottom-nav {
  background: rgba(255, 255, 255, .88);
}
:root.light .search-shell,
:root.light .icon-btn,
:root.light .avatar,
:root.light .score-box,
:root.light .club-logo,
:root.light .chip,
:root.light .select,
:root.light .input {
  background: rgba(255, 255, 255, .82);
}
.match-card {
  min-height: 190px;
  padding: 18px;
  display: grid;
  gap: 18px;
  position: relative;
  overflow: hidden;
}
.match-card.live { border-color: rgba(255, 66, 95, .7); }
.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(310px, 390px);
  gap: 22px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 6px 10px 2px;
}
.horizontal-row .match-card { min-width: 0; }
.match-meta { display: flex; justify-content: space-between; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  border-radius: 5px;
  padding: 7px 10px;
  background: rgba(119, 132, 155, .18);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.badge.live { background: linear-gradient(135deg, #ff315a, var(--orange)); color: white; }
.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px rgba(255,255,255,.12);
}
.teams-line { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.club { display: grid; justify-items: center; gap: 10px; text-align: center; min-width: 0; }
.club-logo {
  width: 68px;
  height: 68px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 240, 154, .55);
  background: #0a1729;
  font-weight: 900;
  color: var(--green);
}
.club-logo img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}
.club span { width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score-box {
  min-width: 104px;
  border-radius: var(--radius);
  padding: 12px 14px;
  text-align: center;
  font-size: 34px;
  font-weight: 850;
  background: rgba(3, 10, 22, .55);
  border: 1px solid var(--line);
}
.score-box small { display: block; color: var(--green); font-size: 14px; }
.events { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.event-chip { padding: 6px 8px; border-radius: 5px; background: rgba(255,255,255,.06); }
.prediction-card, .team-card, .league-card, .prefs-card { padding: 20px; display: grid; gap: 16px; }
.load-more-wrap {
  display: grid;
  place-items: center;
  min-height: 48px;
}
.switch-row {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}
.switch-row input {
  width: 44px;
  height: 24px;
  accent-color: var(--green);
}
.prediction-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.league-pill { color: var(--green); background: rgba(0, 240, 154, .12); padding: 8px 10px; border-radius: 999px; font-size: 12px; font-weight: 850; }
.pick { font-size: 27px; color: var(--green); font-weight: 900; }
.bar { height: 7px; border-radius: 999px; background: rgba(119, 132, 155, .2); overflow: hidden; }
.bar span { display: block; height: 100%; width: var(--value); background: linear-gradient(90deg, var(--green), var(--green-2)); }
.feature-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 22px; }
.live-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.live-stats div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(24, 39, 69, .9), rgba(10, 18, 34, .86));
}
.live-stats strong {
  display: block;
  font-size: 26px;
  color: var(--green);
}
.live-stats span {
  color: var(--muted);
  font-size: 13px;
}
.feature { display: grid; grid-template-columns: 38px 1fr; gap: 14px; align-items: start; }
.feature svg { width: 32px; height: 32px; color: var(--green); }
.feature:nth-child(2) svg { color: var(--red); }
.feature:nth-child(3) svg { color: var(--yellow); }
.feature:nth-child(4) svg { color: var(--blue); }
.feature p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chip, .select, .input {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 23, 40, .72);
  color: var(--text);
  padding: 11px 14px;
}
.chip.active { color: #04131d; background: var(--green); border-color: var(--green); font-weight: 850; }
.input { min-width: min(320px, 100%); outline: 0; }
.ad-slot {
  min-height: 92px;
  display: grid;
  place-items: center;
  color: var(--soft);
  border-style: dashed;
  box-shadow: none;
  background: linear-gradient(135deg, rgba(0, 240, 154, .06), rgba(255, 255, 255, .03));
  overflow: hidden;
  padding: 10px;
}
.ad-slot.native { min-height: 120px; }
.ad-slot .adsbygoogle {
  width: 100%;
  min-height: 90px;
}
.ad-slot.native .adsbygoogle {
  min-height: 120px;
}
.api-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 22, 38, .7);
  color: var(--muted);
}
.api-banner small {
  color: var(--soft);
  overflow-wrap: anywhere;
}
.details-grid { display: grid; grid-template-columns: 1.45fr .9fr; gap: 18px; }
.score-header { padding: 24px; }
.score-header .teams-line { margin-top: 20px; }
.stat-row { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 12px; margin: 14px 0; color: var(--muted); }
.stat-row strong { color: var(--text); text-align: center; }
.timeline, .lineup, .stat-panel { padding: 20px; }
.timeline-item { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 0; }
.team-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.team-card .team-head, .league-card .team-head { display: flex; align-items: center; gap: 14px; }
.team-card button, .league-card button { justify-self: start; }
.primary-btn {
  border: 0;
  border-radius: 6px;
  padding: 13px 18px;
  color: #03141d;
  font-weight: 900;
  background: linear-gradient(135deg, var(--green), #00d68b);
}
.ghost-btn { border: 1px solid var(--line); color: var(--text); background: transparent; border-radius: 6px; padding: 10px 14px; }
.notifications { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.notification-card { padding: 16px; border-left: 3px solid var(--green); }
.notification-card p { margin: 6px 0 0; color: var(--muted); }
.skeleton { position: relative; overflow: hidden; min-height: 190px; }
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
  animation: shimmer 1.35s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.empty-state { padding: 36px; text-align: center; color: var(--muted); }
.bottom-nav { display: none; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 22px 22px 92px; }
  .topbar { justify-content: stretch; }
  .search-shell { flex: 1; width: auto; }
  .grid.three, .grid.two, .details-grid, .feature-strip, .notifications { grid-template-columns: 1fr 1fr; }
  .bottom-nav {
    position: fixed;
    z-index: 10;
    left: 14px;
    right: 14px;
    bottom: 14px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(4, 10, 23, .9);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
  }
  .bottom-nav .nav-link { min-height: 54px; padding: 0; justify-content: center; gap: 0; }
  .bottom-nav .nav-link span:last-child { display: none; }
}

@media (max-width: 720px) {
  .main { padding: 18px 14px 90px; }
  .topbar { gap: 8px; margin-bottom: 18px; }
  .avatar, .topbar .icon-btn { width: 40px; height: 40px; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  h1 { font-size: 46px; }
  .hero p { font-size: 16px; }
  .live-now { justify-self: start; min-width: 168px; padding: 15px 20px; }
  .grid.three, .grid.two, .details-grid, .feature-strip, .notifications { grid-template-columns: 1fr; }
  .live-stats { grid-template-columns: 1fr 1fr 1fr; }
  .match-card { min-height: 166px; }
  .horizontal-row { grid-auto-columns: minmax(280px, 86vw); }
  .favorites-popover { right: 0; }
  .club-logo { width: 54px; height: 54px; }
  .score-box { min-width: 84px; font-size: 26px; }
  .search-shell { height: 42px; padding: 0 10px; }
  .search-shell input::placeholder { color: transparent; }
}
