/* bumshi — game-portal theme.
   Dark slate base, one brand purple for everything clickable, heat orange only
   for trending. Nunito throughout: rounded, heavy for titles, plain for reading. */
:root {
  --bg: #0c0d14;
  --side: #12131c;
  --panel: #1a1b28;
  --card: #212233;
  --hover: #2a2c40;
  --line: #2b2d42;
  --text: #f9faff;
  --muted: #aaadbe;
  --dim: #6f7287;
  --brand: #6842ff;
  --brand-2: #8668ff;
  --hot: #ff5c35;
  --cool: #3d7bff;
  --green: #3ddc84;
  --amber: #ffb627;
  --heat: linear-gradient(90deg, var(--cool), var(--brand) 55%, var(--hot));
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --top: 64px;
  --side-w: 236px;
  --rail-w: 72px;
  --gap: 20px;
  --r: 10px;
  --r-lg: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-padding-top: calc(var(--top) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 600 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.skip { position: fixed; left: -999px; top: 10px; z-index: 50; background: var(--brand); padding: 8px 14px; border-radius: 8px; font-weight: 800; }
.skip:focus { left: 10px; }

.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  height: var(--top);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px 0 12px;
  background: var(--side);
  box-shadow: 0 1px 0 var(--line);
}
.icon-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent;
}
.icon-btn:hover { background: var(--hover); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 24px; letter-spacing: -0.02em; }
.logo-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--brand); color: #fff;
  font-size: 21px; line-height: 1; padding-bottom: 2px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}
.search {
  position: relative; flex: 1; max-width: 520px; margin: 0 auto;
}
.search .ic { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 42px;
  padding: 0 16px 0 42px;
  border: 1px solid transparent; border-radius: 99px;
  background: var(--card); color: var(--text);
  font: inherit; font-weight: 600;
}
.search input::placeholder { color: var(--dim); }
.search input:hover { background: var(--hover); }
.search input:focus { outline: none; border-color: var(--brand); background: var(--panel); }
.top-cta {
  display: flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 16px 0 12px; border-radius: 99px;
  background: var(--brand); font-weight: 800;
}
.top-cta:hover { background: var(--brand-2); }
.top-cta .ic { width: 18px; height: 18px; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; top: var(--top); bottom: 0; left: 0; z-index: 25;
  width: var(--side-w);
  display: flex; flex-direction: column;
  padding: 10px 10px 16px;
  background: var(--side);
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 14px;
  min-height: 44px; padding: 0 12px; border-radius: var(--r);
  color: var(--muted); font-weight: 700;
  white-space: nowrap;
}
.nav-link:hover { background: var(--panel); color: var(--text); }
.nav-link.is-active { background: var(--card); color: var(--text); }
.nav-link.is-active .ic { color: var(--brand-2); }
.nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-n { font-size: 12px; color: var(--dim); }
.nav-hot {
  font-size: 11px; font-weight: 800; color: #fff;
  background: var(--hot); padding: 1px 7px; border-radius: 99px;
}
.nav-title { margin: 18px 12px 6px; font-size: 13px; font-weight: 800; color: var(--dim); }
.side-foot { margin-top: auto; padding: 24px 12px 0; color: var(--dim); font-size: 13px; line-height: 1.45; }
.side-foot p + p { margin-top: 8px; }
.side-small { font-size: 12px; }

.scrim { position: fixed; inset: var(--top) 0 0 0; z-index: 24; background: rgba(5, 6, 12, 0.6); }

/* Icon rail (desktop collapsed, and medium screens) */
body.side-mini .sidebar { width: var(--rail-w); }
body.side-mini .nav-link { justify-content: center; padding: 0; gap: 0; }
body.side-mini .nav-label, body.side-mini .nav-n, body.side-mini .nav-hot,
body.side-mini .nav-title, body.side-mini .side-foot { display: none; }
body.side-mini .nav-title + .nav-link { margin-top: 14px; }

/* ---------- Main ---------- */
.main {
  margin-left: var(--side-w);
  padding: calc(var(--top) + 20px) 24px 0;
  min-height: 100vh;
}
body.side-mini .main { margin-left: var(--rail-w); }

/* Tiles */
.tile { display: block; border-radius: var(--r); }
.thumb {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: var(--r);
  background: var(--card);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.tile-cap {
  position: absolute; inset: auto 0 0 0;
  display: flex; flex-direction: column; gap: 2px;
  padding: 28px 12px 10px;
  background: linear-gradient(transparent, rgba(8, 9, 16, 0.92));
  opacity: 0; transition: opacity 0.15s ease;
}
.tile-cap b { font-weight: 800; font-size: 15px; line-height: 1.2; }
.tile:hover .thumb img, .tile:focus-visible .thumb img { transform: scale(1.05); }
.tile:hover .tile-cap, .tile:focus-visible .tile-cap { opacity: 1; }
.tile:hover .thumb, .tile:focus-visible .thumb { box-shadow: 0 0 0 2px var(--brand); }
@media (hover: none) { .tile-cap { opacity: 1; } }

.st {
  position: absolute; top: 8px; left: 8px;
  padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 900; color: #0c0d14;
}
.st-play { background: var(--green); }
.st-soon { background: var(--amber); }
.st-lab { background: #d0d2e0; }
.heat-pill {
  position: absolute; top: 8px; right: 8px;
  display: flex; align-items: center; gap: 3px;
  padding: 2px 8px 2px 6px; border-radius: 6px;
  background: var(--hot); color: #fff;
  font-size: 11px; font-weight: 900;
}

/* Big featured tiles */
.tile-big .thumb { aspect-ratio: 16 / 10; }
.tile-big .st, .tile-big .heat-pill { top: 14px; font-size: 12px; }
.tile-big .st { left: 14px; }
.tile-big .heat-pill { right: 14px; }

/* Hero */
.hero {
  display: grid; gap: var(--gap);
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  margin-bottom: 32px;
}
.hero-tiles { display: grid; gap: var(--gap); grid-template-columns: 1fr 1fr; align-items: start; }

.mini-meter { background: var(--panel); border-radius: var(--r-lg); padding: 16px 14px 10px; }
.mini-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 6px 8px; }
.mini-head h2 { font-size: 18px; font-weight: 900; }
.mini-head a, .see-all { color: var(--brand-2); font-weight: 800; font-size: 14px; }
.mini-head a:hover, .see-all:hover { color: var(--text); }
.mini-list a {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 9px 6px; border-radius: var(--r);
}
.mini-list a:hover { background: var(--card); }
.mini-rank { font-weight: 900; color: var(--dim); text-align: center; }
.mini-list li:first-child .mini-rank { color: var(--hot); }
.mini-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mini-body b { font-size: 14px; font-weight: 800; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-heat { font-weight: 900; font-size: 18px; text-align: right; line-height: 1.1; }
.mini-heat small { display: block; font-size: 11px; font-weight: 800; }

/* Heat meter */
.meter { display: block; height: 6px; border-radius: 99px; background: var(--card); overflow: hidden; }
.meter i { display: block; height: 100%; width: calc(var(--v) * 1%); border-radius: inherit; background: var(--heat); background-size: calc(10000% / var(--v)) 100%; }
.meter-lg { height: 8px; }
.up { color: var(--hot); }
.down { color: var(--cool); }

/* Rows */
.row { margin-bottom: 30px; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.row-head h2, .row-head h1 { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 900; letter-spacing: -0.01em; }
.row-head h2 .ic { color: var(--brand-2); }
.rail { position: relative; }
.rail-track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: clamp(190px, 19%, 260px);
  gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 2px; margin: -2px;
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > .tile { scroll-snap-align: start; }
.rail-btn {
  position: absolute; top: 50%; z-index: 2; translate: 0 -50%;
  display: grid; place-items: center;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--text); color: var(--bg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  opacity: 0; transition: opacity 0.15s;
}
.rail-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.rail-btn.prev { left: -12px; }
.rail-btn.next { right: -12px; }
.rail:hover .rail-btn, .rail-btn:focus-visible { opacity: 1; }
@media (hover: none) { .rail-btn { display: none; } }

/* Results grid */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.count { font-size: 14px; font-weight: 800; color: var(--muted); background: var(--card); padding: 2px 10px; border-radius: 99px; }
.empty { color: var(--muted); padding: 40px 0; }
.empty a { color: var(--brand-2); font-weight: 800; }

.foot { margin-top: 48px; padding: 24px 0 32px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
.foot p + p { margin-top: 4px; }
.foot b { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 22px; border-radius: 99px;
  background: var(--brand); font-weight: 900;
}
.btn:hover { background: var(--brand-2); }

/* ---------- Trendometer ---------- */
.tm-head { margin-bottom: 20px; }
.tm-head h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; }
.tm-head p { color: var(--muted); max-width: 62ch; margin-top: 6px; }

.tm-top { display: grid; gap: var(--gap); grid-template-columns: minmax(280px, 1.1fr) 1fr 1fr; margin-bottom: 36px; }
.tm-card { background: var(--panel); border-radius: var(--r-lg); padding: 18px; }
.tm-card h2 { font-size: 16px; font-weight: 900; margin-bottom: 10px; }

.gauge-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.gauge-card h2 { align-self: flex-start; }
.gauge { width: 100%; max-width: 260px; overflow: visible; }
.g-track, .g-fill { fill: none; stroke-width: 16; stroke-linecap: round; }
.g-track { stroke: var(--card); }
.g-fill { stroke: url(#heat-grad); }
.g-ticks line { stroke: var(--dim); stroke-width: 2; stroke-linecap: round; }
.g-needle { stroke: var(--text); stroke-width: 4; stroke-linecap: round; }
.g-hub { fill: var(--text); }
.gauge-num { font-size: 44px; font-weight: 900; line-height: 1; margin-top: -6px; }
.gauge-num small { font-size: 16px; color: var(--dim); font-weight: 800; }
.gauge-topic { font-weight: 800; font-size: 17px; margin: 6px 0 14px; }
@media (prefers-reduced-motion: no-preference) {
  .g-needle { transform-origin: 100px 96px; animation: needle 0.9s cubic-bezier(.3, 1.4, .5, 1) both; }
  @keyframes needle { from { transform: rotate(-150deg); } }
}

.mover-list a {
  display: grid; grid-template-columns: minmax(0, 1fr) 72px 48px; align-items: center; gap: 10px;
  padding: 10px 8px; border-radius: var(--r);
}
.mover-list a:hover { background: var(--card); }
.mover-list b { font-weight: 800; font-size: 14px; line-height: 1.25; }
.mv { text-align: right; font-weight: 900; font-size: 14px; }

.spark { width: 100%; height: 32px; overflow: visible; }
.spark polyline { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.spark.hot polyline { stroke: var(--hot); }
.spark.cool polyline { stroke: var(--cool); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { height: 36px; padding: 0 14px; border: 0; border-radius: 99px; background: var(--card); color: var(--muted); font-weight: 800; }
.tab:hover { background: var(--hover); color: var(--text); }
.tab[aria-pressed="true"] { background: var(--text); color: var(--bg); }

.board-cols, .b-row {
  display: grid; align-items: center; gap: 20px;
  grid-template-columns: 36px minmax(0, 1fr) 160px 130px 220px;
}
.board-cols { padding: 0 16px 8px; color: var(--dim); font-size: 12px; font-weight: 800; }
.board-cols span:first-child { grid-column: 2; }
.board { display: flex; flex-direction: column; gap: 8px; }
.b-row { padding: 14px 16px; border-radius: var(--r-lg); background: var(--panel); }
.b-row.is-target { box-shadow: 0 0 0 2px var(--brand); }
.b-rank { font-size: 20px; font-weight: 900; color: var(--dim); text-align: center; }
.b-row:nth-child(-n+3) .b-rank { color: var(--hot); }
.b-cat { display: flex; align-items: center; gap: 5px; color: var(--brand-2); font-size: 12px; font-weight: 800; }
.b-story h3 { font-size: 17px; font-weight: 900; line-height: 1.25; margin: 2px 0 3px; }
.b-blurb { color: var(--muted); font-size: 14px; line-height: 1.45; max-width: 70ch; }
.b-heat p { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: 13px; font-weight: 800; }
.b-heat b { font-size: 26px; font-weight: 900; line-height: 1; }
.b-week { display: block; font-size: 12px; font-weight: 800; color: var(--dim); margin-top: 2px; }
.b-game {
  display: flex; align-items: center; gap: 10px;
  padding: 6px; border-radius: var(--r);
  background: var(--card);
}
.b-game:hover { background: var(--hover); box-shadow: 0 0 0 2px var(--brand); }
.b-game img { width: 72px; height: 45px; object-fit: cover; border-radius: 6px; flex: none; }
.b-game > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.b-game b { font-weight: 900; font-size: 14px; }
.st-text { font-size: 12px; font-weight: 800; }
.st-text.st-play { color: var(--green); background: none; }
.st-text.st-soon { color: var(--amber); background: none; }
.st-text.st-lab { color: var(--muted); background: none; }
.tm-note { color: var(--dim); font-size: 13px; margin-top: 14px; max-width: 80ch; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .hero { grid-template-columns: 1fr; }
  .mini-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 8px; }
  .board-cols, .b-row { grid-template-columns: 30px minmax(0, 1fr) 140px 200px; }
  .board-cols span:nth-child(3), .b-spark { display: none; }
  .tm-top { grid-template-columns: 1fr 1fr; }
  .gauge-card { grid-row: span 2; }
}
@media (max-width: 1100px) {
  .sidebar { width: var(--rail-w); }
  .nav-link { justify-content: center; padding: 0; gap: 0; }
  .nav-label, .nav-n, .nav-hot, .nav-title, .side-foot { display: none; }
  .nav-title + .nav-link { margin-top: 14px; }
  .main, body.side-mini .main { margin-left: var(--rail-w); }
}
@media (max-width: 900px) {
  .hero-tiles { grid-template-columns: 1fr; min-height: 0; }
  .tile-big .thumb { aspect-ratio: 16 / 10; height: auto; min-height: 0; }
  .b-row { grid-template-columns: 26px minmax(0, 1fr); row-gap: 12px; }
  .board-cols { display: none; }
  .b-heat, .b-game { grid-column: 2; }
  .tm-top { grid-template-columns: 1fr; }
  .gauge-card { grid-row: auto; }
}
@media (max-width: 760px) {
  :root { --top: 58px; }
  .topbar { gap: 8px; padding: 0 12px 0 6px; }
  .logo-word { display: none; }
  .top-cta { width: 40px; padding: 0; justify-content: center; }
  .top-cta span { display: none; }
  .sidebar, body.side-mini .sidebar { width: min(280px, 84vw); translate: -100% 0; transition: translate 0.2s ease; }
  body.side-open .sidebar { translate: 0 0; }
  body.side-open .nav-link, body.side-mini.side-open .nav-link { justify-content: flex-start; padding: 0 12px; gap: 14px; }
  body.side-open .nav-label, body.side-open .nav-n, body.side-open .nav-hot,
  body.side-open .nav-title, body.side-open .side-foot { display: revert; }
  body.side-open .nav-label { display: block; }
  body.side-open .nav-title + .nav-link { margin-top: 0; }
  .main, body.side-mini .main { margin-left: 0; padding: calc(var(--top) + 16px) 16px 0; }
  .rail-track { grid-auto-columns: 62%; gap: 10px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mini-list { display: block; }
  .tile-cap b { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .thumb img, .sidebar { transition: none; }
}

/* Video previews on tiles */
.tile-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.tile.vid-on .tile-vid { opacity: 1; }
.tile.vid-on .thumb img { transform: none; }
.vid-hint { position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(8, 9, 16, .6); backdrop-filter: blur(4px); transition: opacity .2s ease; }
.vid-hint::before { content: ""; position: absolute; left: 10px; top: 8px; border-left: 8px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.tile:hover .vid-hint, .tile.vid-on .vid-hint { opacity: 0; }
.tile-big .vid-hint { right: 14px; bottom: 14px; }
@media (hover: none) { .vid-hint { display: none; } }
.hero { align-items: start; }

/* Featured tiles: the art stays clean; title, pitch and Play sit in a strip below */
.tile-big { display: flex; flex-direction: column; background: var(--panel); border-radius: var(--r-lg); overflow: hidden; transition: box-shadow .15s ease; }
.tile-big .thumb { border-radius: 0; }
.tile-big:hover .thumb, .tile-big:focus-visible .thumb { box-shadow: none; }
.tile-big:hover, .tile-big:focus-visible { box-shadow: 0 0 0 2px var(--brand); }
.tile-info { display: flex; align-items: center; gap: 14px; padding: 12px 14px 14px; min-height: 78px; }
.tile-info > div { min-width: 0; flex: 1; display: grid; gap: 2px; }
.tile-info b { font-size: 18px; font-weight: 900; letter-spacing: -.01em; line-height: 1.2; }
.tile-info span { font-size: 13px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-big .tile-info .tile-btn { position: static; flex: none; padding: 10px 18px; border-radius: 99px; background: var(--brand); font-weight: 900; font-size: 14px; color: #fff; }
.tile-big:hover .tile-info .tile-btn { background: var(--brand-2); }
.side-small a, .foot a { color: var(--muted); text-decoration: underline; }
.b-src { color: var(--brand-2); font-weight: 800; font-size: 12px; white-space: nowrap; }
