/* Grizzlies Hub. Mobile-first, brand colors from the spec. */
:root {
  --navy: #121441;
  --navy-2: #1a1d55;
  --navy-3: #23276a;
  --line: rgba(151, 203, 243, 0.16);
  --blue: #97CBF3;
  --gold: #D3AA56;
  --white: #ffffff;
  --text: #eef3fb;
  --muted: #a9b4d0;
  --win: #7fd9a3;
  --loss: #f19a9a;
  --radius: 14px;
  --gutter: 16px;
  --tabbar-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Barlow Condensed", "Inter", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font: 15px/1.45 var(--font);
  min-height: 100vh;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* Header */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) var(--gutter) 10px;
  background: rgba(18, 20, 65, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand h1 {
  margin: 0; font: 800 22px/1 var(--display); letter-spacing: .02em; text-transform: uppercase;
}
.updated { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.refresh {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: 12px; font-weight: 600;
}
.refresh:disabled { opacity: .6; }

.banner {
  margin: 12px var(--gutter) 0; padding: 10px 12px; border-radius: 10px;
  background: rgba(211, 170, 86, 0.14); border: 1px solid rgba(211, 170, 86, 0.4);
  color: #f3dfb5; font-size: 13px;
}

main { max-width: 760px; margin: 0 auto; }
.view { padding: 14px var(--gutter) 0; }

/* Section heads */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin: 22px 0 10px;
}
.section-head:first-child { margin-top: 6px; }
.section-head h2 {
  margin: 0; font: 700 20px/1.1 var(--display); text-transform: uppercase; letter-spacing: .03em;
}
.section-head .more { color: var(--blue); font-size: 13px; font-weight: 600; background: none; border: 0; padding: 4px 0; cursor: pointer; }
.section-head .meta { color: var(--muted); font-size: 12px; }

/* Filter chips */
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; margin: 0 calc(-1 * var(--gutter));
  padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--navy-2); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--navy); }
.chip .n { opacity: .7; font-weight: 500; margin-left: 4px; }

/* Cards and lists */
.card {
  background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: block; padding: 13px 14px; position: relative; }
.item-top {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted); margin-bottom: 5px;
}
.item-top .src { color: var(--blue); font-weight: 600; }
.item h3 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 600; color: var(--white); }
.item p.snippet {
  margin: 6px 0 0; color: var(--muted); font-size: 13.5px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.item.beat { border-left: 3px solid var(--gold); }
.tag {
  display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; background: rgba(151, 203, 243, .14); color: var(--blue);
}
.tag.gold { background: rgba(211, 170, 86, .18); color: var(--gold); }
.new {
  display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 800;
  letter-spacing: .06em; background: var(--gold); color: var(--navy);
}
.ext { font-size: 12px; color: var(--blue); font-weight: 600; }

.empty, .error {
  padding: 18px 14px; text-align: center; color: var(--muted); font-size: 14px;
}
.error { color: #f3dfb5; }
.load-more {
  display: block; width: 100%; margin: 12px 0 0; padding: 12px; border-radius: 12px;
  border: 1px solid var(--line); background: transparent; color: var(--blue); font-weight: 600; cursor: pointer;
}

/* Videos */
.video-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .video-grid { grid-template-columns: 1fr 1fr; } }
.video { overflow: hidden; }
.video .frame { position: relative; aspect-ratio: 16 / 9; background: #0b0d2c; }
.video .frame img, .video .frame iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.video .play {
  position: absolute; inset: 0; display: grid; place-items: center; border: 0; padding: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 12, 40, .7)); cursor: pointer;
}
.video .play span {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(18, 20, 65, .85); border: 2px solid var(--blue);
}
.video .play svg { width: 22px; height: 22px; margin-left: 3px; color: var(--white); }
.video .frame .new { position: absolute; top: 8px; left: 8px; }
.video .body { padding: 10px 12px 12px; }
.video h3 { margin: 0 0 4px; font-size: 15px; line-height: 1.3; font-weight: 600; }
.video .item-top { margin: 0; }

/* Podcasts */
.pod { padding: 13px 14px; }
.pod h3 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 600; color: var(--white); }
.pod audio { width: 100%; height: 36px; margin-top: 10px; }
.pod .actions { display: flex; gap: 14px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.pod.tmb { border-color: rgba(211, 170, 86, .5); background: linear-gradient(160deg, #2a2a5a, var(--navy-2) 60%); }
.soon-note { font-size: 12px; color: var(--muted); }

/* Next game hero */
.hero { padding: 16px; overflow: hidden; position: relative; }
.hero::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(151, 203, 243, .18), transparent 70%);
}
.hero .label { font: 700 13px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.hero .matchup { display: flex; align-items: center; gap: 14px; margin: 12px 0 8px; }
.hero .team { font: 800 34px/1 var(--display); letter-spacing: .02em; }
.hero .vs { color: var(--muted); font: 700 16px/1 var(--display); text-transform: uppercase; }
.hero .when { color: var(--text); font-weight: 600; }
.hero .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.hero-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .hero-row { grid-template-columns: 1.4fr 1fr; } }
.last { padding: 14px 16px; cursor: pointer; }
.last .label { font: 700 13px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.last .score { font: 800 26px/1.1 var(--display); margin-top: 8px; }
.wl { font-weight: 800; }
.wl.w { color: var(--win); }
.wl.l { color: var(--loss); }
.record { font: 700 15px/1 var(--display); letter-spacing: .04em; color: var(--blue); }

/* Lookahead strip */
.strip {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip .g {
  flex: none; width: 84px; padding: 10px 8px; text-align: center; scroll-snap-align: start;
  border-radius: 12px; background: var(--navy-2); border: 1px solid var(--line); cursor: pointer;
}
.strip .g.home { border-color: rgba(151, 203, 243, .45); }
.strip .g .d { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.strip .g .ha { font-size: 11px; color: var(--muted); margin-top: 6px; }
.strip .g .opp { font: 800 22px/1 var(--display); margin-top: 2px; }
.strip .g .t { font-size: 11px; color: var(--blue); margin-top: 6px; font-weight: 600; }
.strip .g .pre { font-size: 9.5px; color: var(--gold); font-weight: 700; letter-spacing: .06em; margin-top: 4px; }
.pager { display: flex; align-items: center; gap: 8px; }
.pager button {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--navy-2);
  color: var(--blue); cursor: pointer; display: grid; place-items: center;
}
.pager button:disabled { opacity: .35; cursor: default; }
.pager .meta { min-width: 64px; text-align: center; }

/* Month calendar */
.cal { padding: 12px 10px 10px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; }
.cal-head h3 { margin: 0; font: 700 20px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font-size: 10.5px; color: var(--muted); text-align: center; font-weight: 700; padding-bottom: 2px; }
.cal-day {
  min-height: 62px; border-radius: 8px; padding: 4px 3px; background: rgba(255, 255, 255, .025);
  display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; border: 1px solid transparent;
}
.cal-day.out { visibility: hidden; }
.cal-day .n { color: var(--muted); font-size: 10.5px; align-self: flex-start; padding-left: 2px; }
.cal-day.today { border-color: var(--gold); }
.cal-day.game { background: var(--navy-3); cursor: pointer; }
.cal-day.game.home { box-shadow: inset 0 0 0 1px rgba(151, 203, 243, .4); }
.cal-day .opp { font: 800 15px/1 var(--display); }
.cal-day .res { font-size: 9.5px; font-weight: 700; text-align: center; line-height: 1.15; white-space: nowrap; letter-spacing: -0.02em; }
.cal-day .tm { font-size: 9.5px; color: var(--blue); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); padding: 10px 4px 2px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.results { margin-top: 4px; }
.result-row {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 10px;
  padding: 11px 14px; border-top: 1px solid var(--line); cursor: pointer;
}
.result-row:first-child { border-top: 0; }
.result-row .d { font-size: 12px; color: var(--muted); }
.result-row .m { font-weight: 600; }
.result-row .s { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Game sheet */
.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px;
  border-radius: 18px 18px 0 0; background: var(--navy-2); color: var(--text);
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet::backdrop { background: rgba(5, 6, 25, .6); }
.sheet .inner { padding: 18px var(--gutter) 22px; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 14px; }
.sheet h3 { margin: 0; font: 800 26px/1.1 var(--display); text-transform: uppercase; }
.sheet .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.qtable { width: 100%; border-collapse: collapse; margin-top: 16px; font-variant-numeric: tabular-nums; }
.qtable th, .qtable td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.qtable th { font-size: 11px; color: var(--muted); font-weight: 700; }
.qtable td:first-child, .qtable th:first-child { text-align: left; }
.qtable td.tot { font-weight: 800; color: var(--white); }
.qtable tr.mem td:first-child { color: var(--blue); font-weight: 700; }
.sheet .close {
  display: block; width: 100%; margin-top: 18px; padding: 12px; border-radius: 12px; border: 0;
  background: var(--blue); color: var(--navy); font-weight: 700; cursor: pointer;
}

/* Coming soon */
.soon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.soon { padding: 13px; border-style: dashed; }
.soon h4 { margin: 0 0 4px; font-size: 14px; }
.soon p { margin: 0; font-size: 12.5px; color: var(--muted); }
.soon .tag { margin-bottom: 8px; }

/* Bottom tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(14, 16, 52, .96); border-top: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tabbar button {
  position: relative; border: 0; background: none; color: var(--muted); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600;
}
.tabbar svg { width: 23px; height: 23px; }
.tabbar button[aria-current="page"] { color: var(--blue); }
.tabbar button[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold);
}
.tabbar .dot {
  position: absolute; top: 8px; left: calc(50% + 8px); min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--gold); color: var(--navy); font-size: 10px; font-weight: 800;
  display: grid; place-items: center;
}

@media (min-width: 760px) {
  .tabbar { max-width: 560px; margin: 0 auto 14px; border-radius: 18px; border: 1px solid var(--line); height: var(--tabbar-h); padding-bottom: 0; }
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .card, .chip, .strip .g { transition: background-color .15s, border-color .15s; }
}
