:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #232733;
  --border: #2a2f3b;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --accent: #85c742; /* Rumble green */
  --accent-ink: #0f1a05;
  --radius: 12px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #eceef2;
    --border: #e1e4e9;
    --text: #15171c;
    --muted: #5f6368;
    --accent: #5f9e1f;
    --accent-ink: #fff;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { line-height: 1.3; }
.container { max-width: 1320px; margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 12px; background: var(--accent); color: var(--accent-ink); border-radius: 6px; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.bar { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; white-space: nowrap; color: var(--text); }
.brand:hover { color: var(--text); }
.logo { display: block; width: 32px; height: 32px; flex: none; }
.search { flex: 1; max-width: 560px; margin-left: auto; display: flex; }
.search input {
  flex: 1; min-width: 0; padding: 9px 16px;
  border: 1px solid var(--border); border-right: 0; border-radius: 999px 0 0 999px;
  background: var(--surface); color: var(--text); font: inherit;
}
.search button {
  padding: 0 18px; border: 1px solid var(--border); border-radius: 0 999px 999px 0;
  background: var(--surface-2); color: var(--text); cursor: pointer;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }

.catnav ul { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
.catnav a {
  display: block; white-space: nowrap; padding: 6px 14px; border-radius: 8px;
  background: var(--surface-2); font-size: 14px; font-weight: 500;
}
.catnav a[aria-current="page"] { background: var(--text); color: var(--bg); }

/* ---------- page layout ---------- */
.page { padding-top: 16px; padding-bottom: 40px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.sidebar { position: sticky; top: 124px; display: grid; gap: 20px; }

.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; }
.breadcrumbs a:hover { color: var(--text); }

.page-title { font-size: 26px; margin: 0 0 8px; }
.page-title small { font-size: 16px; color: var(--muted); font-weight: 500; }
.page-head { margin-bottom: 18px; }
.lead { color: var(--muted); margin: 0 0 12px; max-width: 70ch; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 3px; border-radius: 9px; }
.tabs a { padding: 5px 12px; border-radius: 7px; font-size: 14px; }
.tabs a[aria-current] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.2); }

/* home h1 is for SEO; keep it subtle */
main > .page-title:first-child:has(+ .hero) { font-size: 15px; font-weight: 600; color: var(--muted); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0; margin-bottom: 32px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
}
.hero-media { position: relative; aspect-ratio: 16/9; background: #000; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center; font-size: 24px; color: #fff;
  background: rgba(0,0,0,.55); transition: transform .2s, background .2s;
}
.hero-media:hover .play { transform: scale(1.08); background: var(--accent); }
.hero-body { padding: 24px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.hero-body h2 { font-size: 22px; margin: 0; }
.hero-desc { color: var(--muted); margin: 0; }
.hero .btn { align-self: flex-start; margin-top: 6px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- sections & grid ---------- */
.section { margin-bottom: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-size: 20px; margin: 0; }
.more { color: var(--accent); font-size: 14px; font-weight: 600; }

.grid { display: grid; gap: 24px 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { min-width: 0; }
.thumb {
  position: relative; display: block; aspect-ratio: 16/9; overflow: hidden;
  border-radius: var(--radius); background: var(--surface-2);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .thumb img { transform: scale(1.04); }
.badge {
  position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 4px;
  background: rgba(0,0,0,.82); color: #fff; font-size: 12px; font-weight: 600;
}
.card-title {
  margin: 10px 0 4px; font-size: 15px; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.meta { margin: 0; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 0 6px; }
.meta > * + *::before { content: "·"; margin-right: 6px; }
.meta a:hover { color: var(--text); }
.empty { color: var(--muted); padding: 32px 0; text-align: center; }

.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 32px; }
.pagination a, .pagination span { min-width: 38px; padding: 8px 12px; text-align: center; border-radius: 8px; background: var(--surface-2); }
.pagination [aria-current] { background: var(--accent); color: var(--accent-ink); font-weight: 700; }

/* ---------- sidebar widgets ---------- */
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.widget-title { font-size: 15px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cat-list a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; }
.cat-list a:hover { background: var(--surface-2); color: var(--text); }
.count { color: var(--muted); font-size: 13px; background: var(--surface-2); padding: 0 8px; border-radius: 999px; }
.mini-list { display: grid; gap: 12px; }
.mini { display: grid; grid-template-columns: 128px 1fr; gap: 10px; }
.mini .thumb { border-radius: 8px; }
.mini .badge { font-size: 11px; }
.mini-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 14px; font-weight: 600; line-height: 1.35; margin-bottom: 2px;
}
.mini-body { min-width: 0; }

/* ---------- watch page ---------- */
.player { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-title { font-size: 22px; margin: 16px 0 8px; }
.video-meta { display: grid; gap: 12px; margin-bottom: 16px; }
.share { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-block; padding: 8px 16px; border: 0; border-radius: 999px;
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.btn:hover { filter: brightness(1.12); color: var(--text); }
.btn-primary, .btn-primary:hover { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn.fb:hover { background: #1877f2; color: #fff; }
.btn.x:hover { background: #000; color: #fff; }
.btn.tg:hover { background: #229ed9; color: #fff; }
.btn.wa:hover { background: #25d366; color: #fff; }
.btn.rd:hover { background: #ff4500; color: #fff; }
.embed-code textarea {
  width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font: 13px ui-monospace, monospace; resize: vertical;
}
.desc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 32px; }
.notfound { text-align: center; padding: 48px 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-top: 32px; padding-bottom: 24px; }
.footer-grid h2 { font-size: 14px; color: var(--text); margin: 0 0 10px; text-transform: uppercase; letter-spacing: .04em; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid p { max-width: 46ch; }
.copyright { border-top: 1px solid var(--border); padding-top: 14px; padding-bottom: 14px; font-size: 13px; }
.copyright p { margin: 0; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  padding: 10px 18px; border-radius: 8px; background: var(--text); color: var(--bg);
  opacity: 0; pointer-events: none; transition: .2s; z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-body { padding: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid section { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .bar { gap: 10px; }
  .brand span:last-child { display: none; }
  .grid { grid-template-columns: 1fr 1fr; gap: 18px 10px; }
  .card-title { font-size: 14px; }
  .page-title { font-size: 21px; }
  .video-title { font-size: 18px; }
  .player { margin: 0 -16px; border-radius: 0; }
}
@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
}

/* ---------- collections ---------- */
.stack-badge {
  position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 4px;
  background: rgba(0,0,0,.82); color: #fff; font-size: 12px; font-weight: 600;
}
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link-list a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; }
.link-list a:hover { background: var(--surface-2); color: var(--text); }

.collection .page-head { margin-bottom: 28px; }
.collection .intro { max-width: 72ch; margin: 12px 0 16px; }
.collection .intro p { margin: 0 0 10px; }
.picks { display: grid; gap: 20px; counter-reset: none; }
.pick {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start;
  padding-bottom: 20px; border-bottom: 1px solid var(--border); scroll-margin-top: 130px;
}
.pick:last-child { border-bottom: 0; }
.pick-num {
  position: absolute; left: 8px; top: 8px; min-width: 32px; height: 32px; padding: 0 8px;
  display: grid; place-items: center; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 16px;
}
.pick-title { font-size: 18px; margin: 0 0 6px; }
.pick-note { margin: 10px 0; }
.pick-note p { margin: 0 0 8px; }
@media (max-width: 640px) {
  .pick { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
