/* =====================================================================
   THEME: Retro VHS Static — 复古录像带 / CRT噪点主题
   Palette: near-black CRT tube + magenta/cyan chromatic-aberration accents
   + warning-tape yellow. Monospace "tracking" typography, scanline overlay,
   film-grain noise, blinking REC dot. No clip-path / 3D transforms / columns.
   ===================================================================== */
:root {
  --bg-0: #0a0a12;
  --bg-1: #12121d;
  --tape: #ffd93d;
  --magenta: #ff2e88;
  --cyan: #23e5db;
  --ink: #f2f0e6;
  --ink-dim: #b9b6c9;
  --panel: rgba(28, 28, 42, .72);
  --panel-brd: rgba(35, 229, 219, .22);
  --font-mono: 'Courier New', 'Consolas', monospace;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: linear-gradient(180deg, #0d0d17 0%, #14121f 55%, #0a0a12 100%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.4;
  padding-bottom: 24px;
  overflow-x: hidden;
  position: relative;
}
/* Scanlines + grain overlay, pure CSS */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0px, rgba(255,255,255,.035) 1px, transparent 1px, transparent 3px);
  opacity: .6;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 12%, rgba(255,255,255,.5) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 76% 6%, rgba(35,229,219,.5) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 42% 28%, rgba(255,255,255,.4) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 60% 55%, rgba(255,46,136,.45) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 22% 68%, rgba(255,255,255,.4) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 90% 40%, rgba(255,217,61,.4) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 12% 88%, rgba(255,255,255,.35) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 68% 82%, rgba(35,229,219,.4) 0, transparent 100%);
  opacity: .8;
}
[v-cloak] { display: none; }
a { color: inherit; text-decoration: none; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
::-webkit-scrollbar { display: none; }

/* ===== Top Bar ===== */
.topbar {
  position: static; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(10,10,18,.9); border-bottom: 2px solid var(--magenta);
  box-shadow: 0 2px 0 var(--cyan);
}
.topbar-logo {
  font-family: var(--font-mono); font-size: 17px; font-weight: 700; letter-spacing: .03em;
  color: var(--tape);
  text-shadow: 1px 0 0 var(--magenta), -1px 0 0 var(--cyan);
}
.topbar-search-btn {
  width: 36px; height: 36px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-1); color: var(--cyan);
  border: 1px solid var(--panel-brd);
}
/* ===== Category Tabs ===== */
.cat-tabs {
  position: static; top: 60px; z-index: 30;
  background: rgba(10,10,18,.92); border-bottom: 1px solid var(--panel-brd);
  overflow-x: auto; white-space: nowrap;
}
.cat-tabs-inner { display: inline-flex; gap: 8px; padding: 10px 16px; }
.cat-tab {
  flex-shrink: 0; padding: 7px 14px; border-radius: 4px;
  background: var(--bg-1); color: var(--ink-dim); font-size: 12px; font-weight: 700; font-family: var(--font-mono);
  border: 1px solid var(--panel-brd); text-transform: uppercase;
}
.cat-tab.active {
  background: var(--magenta); color: #17070f;
  border-color: var(--magenta);
  box-shadow: 0 0 0 2px var(--cyan) inset;
}
/* ===== Search ===== */
.search-bar-wrap {
  position: static; top: 60px; z-index: 30;
  display: flex; gap: 8px; padding: 10px 16px;
  background: rgba(10,10,18,.92); border-bottom: 1px solid var(--panel-brd);
}
.search-input {
  flex: 1; padding: 9px 14px; border-radius: 6px; border: 1px solid var(--panel-brd);
  background: var(--bg-1); color: var(--ink); font-size: 14px; font-family: var(--font-mono);
}
.search-cancel { font-size: 13px; color: var(--cyan); font-weight: 700; padding: 0 4px; font-family: var(--font-mono); }
/* ===== Loading ===== */
.loading-full { display: flex; align-items: center; justify-content: center; padding: 80px 0; }
.loading-ring {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255,46,136,.25); border-top-color: var(--cyan);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes recblink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .15; } }
/* ===== Section spacing ===== */
section[class$="-sec"] { margin-bottom: 30px; }
/* ===== Section Header ===== */
.sec-hd { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 10px; }
.sec-label {
  font-size: 14px; font-weight: 700; color: var(--ink); font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: .04em;
  border-left: 3px solid var(--magenta); padding-left: 8px;
}
.sec-more { font-size: 11px; color: var(--cyan); font-weight: 700; font-family: var(--font-mono); text-transform: uppercase; }
.sec-cnt { font-size: 12px; color: var(--ink-dim); font-family: var(--font-mono); }
/* ===== Featured ===== */
.featured-sec { padding: 12px 16px 0; }

/* ===== Generic responsive icon grid ===== */
.all-grid, .games-grid, .channel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 16px 8px;
}
@media (min-width: 480px) {
  .all-grid, .games-grid, .channel-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 860px) {
  .all-grid, .games-grid, .channel-grid { grid-template-columns: repeat(8, 1fr); }
}
.agcard, .gcard, .channel-card { cursor: pointer; min-width: 0; }
.agcard-img, .gcard-img, .channel-img {
  aspect-ratio: 1/1 !important; width: 100%; height: auto; overflow: hidden;
  border-radius: 8px; border: 1px solid var(--panel-brd); position: relative;
}
.agcard-img img, .gcard-img img, .channel-img img { width: 100%; height: 100%; object-fit: cover; }
.agcard-nm, .gcard-nm, .channel-nm {
  font-size: 11px; margin-top: 5px; text-align: center; color: var(--ink-dim); font-family: var(--font-mono);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.channel-ch {
  position: absolute; top: 3px; left: 3px; font-size: 8px; font-weight: 700; color: var(--tape);
  background: rgba(10,10,18,.75); padding: 1px 4px; border-radius: 3px; font-family: var(--font-mono);
}
/* ===== Load more ===== */
.more-wrap, .loadmore-wrap { display: flex; justify-content: center; padding: 16px; }
.more-btn, .loadmore-btn {
  padding: 10px 22px; border-radius: 6px; background: var(--bg-1); color: var(--tape);
  font-size: 12px; font-weight: 700; border: 1px solid var(--tape); font-family: var(--font-mono); text-transform: uppercase;
}
/* ===== Filter header ===== */
.filter-hdr { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.filter-back { font-size: 12px; color: var(--cyan); font-weight: 700; font-family: var(--font-mono); }
.filter-title { flex: 1; font-size: 15px; font-weight: 700; color: var(--ink); font-family: var(--font-mono); }
.filter-cnt { font-size: 12px; color: var(--ink-dim); font-family: var(--font-mono); }
.empty-msg { text-align: center; padding: 60px 0; color: var(--ink-dim); font-size: 13px; font-family: var(--font-mono); }
/* ===== Footer ===== */
.site-footer { display: flex; justify-content: center; gap: 10px; padding: 24px 16px; font-size: 12px; color: var(--ink-dim); font-family: var(--font-mono); }
/* ===== Back to top ===== */
.totop-btn {
  position: fixed; right: 16px; bottom: 20px; z-index: 50;
  width: 40px; height: 40px; border-radius: 6px;
  background: var(--magenta); color: #17070f; font-size: 16px; font-weight: 700;
  border: 1px solid var(--cyan);
}

/* =====================================================================
   12 SECTION LAYOUTS (all distinct)
   ===================================================================== */

/* 1) Hot Games — "REC" tape-deck: 1 big + 4 small strip */
.hotmason { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; padding: 0 16px; }
.hotmason-item { min-width: 0; border-radius: 8px; overflow: hidden; position: relative; cursor: pointer; border: 1px solid var(--panel-brd); }
.hotmason-item:first-child { grid-row: span 2; }
.hotmason-img { aspect-ratio: 1/1; }
.hotmason-img img { width: 100%; height: 100%; object-fit: cover; }
.hotmason-nm {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 6px; font-size: 10px; color: var(--ink); font-family: var(--font-mono);
  background: linear-gradient(transparent, rgba(0,0,0,.82)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hotmason-rec {
  position: absolute; top: 5px; left: 5px; display: flex; align-items: center; gap: 3px;
  font-size: 9px; font-weight: 700; color: var(--tape); font-family: var(--font-mono); text-transform: uppercase;
}
.hotmason-rec::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #ff3b3b; animation: recblink 1.1s infinite; }

/* 2) Spotlight Picks — tracker list */
.star-list { display: flex; flex-direction: column; gap: 0; padding: 0 16px; }
.star-item { cursor: pointer; padding: 12px 0; border-bottom: 1px dashed var(--panel-brd); min-width: 0; }
.star-item:last-child { border-bottom: none; }
.star-bullet { color: var(--cyan); margin-right: 6px; font-family: var(--font-mono); }
.star-name { font-size: 14px; font-weight: 700; color: var(--ink); font-family: var(--font-mono); }
.star-cat { font-size: 10px; color: var(--tape); margin-left: 8px; font-family: var(--font-mono); text-transform: uppercase; }
.star-desc { font-size: 12px; color: var(--ink-dim); margin-top: 4px; margin-left: 18px; }

/* 3) Static Feed — horizontal scroll ticker cards */
.tape-row { display: flex; gap: 10px; padding: 4px 16px 14px; overflow-x: auto; }
.tape-card { flex: 0 0 116px; width: 116px; min-width: 0; border-radius: 8px; overflow: hidden; border: 2px solid var(--bg-1); cursor: pointer; background: var(--panel); }
.tape-img { aspect-ratio: 4/3; position: relative; }
.tape-img img { width: 100%; height: 100%; object-fit: cover; }
.tape-badge {
  position: absolute; top: 4px; right: 4px; font-size: 8px; font-weight: 700; color: #17070f;
  background: var(--tape); padding: 1px 5px; border-radius: 3px; font-family: var(--font-mono);
}
.tape-nm { font-size: 11px; padding: 6px 7px; color: var(--ink); font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 4) Channel Grid — uses shared .channel-grid/.channel-card above */

/* 5) Action — podium ranking (VCR counter style) */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding: 10px 16px; }
.podium-item { cursor: pointer; text-align: center; min-width: 0; }
.podium-item.p1 { width: 112px; order: 2; }
.podium-item.p2 { width: 84px; order: 1; }
.podium-item.p3 { width: 84px; order: 3; }
.podium-img { border-radius: 8px; overflow: hidden; aspect-ratio: 1/1; border: 2px solid var(--magenta); position: relative; }
.podium-item.p1 .podium-img { border-color: var(--tape); }
.podium-rank {
  position: absolute; top: 3px; left: 3px; font-size: 10px; font-weight: 700; color: #17070f;
  background: var(--cyan); padding: 0 5px; border-radius: 3px; font-family: var(--font-mono);
}
.podium-nm { font-size: 11px; margin-top: 5px; font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-dim); }

/* 6) Puzzle — rotated polaroid strip (horizontal scroll) */
.polaroid-row { display: flex; gap: 18px; padding: 14px 22px 18px; overflow-x: auto; }
.polaroid { flex: 0 0 92px; width: 92px; background: #1a1a26; padding: 6px 6px 16px; border-radius: 3px; border: 1px solid var(--panel-brd); cursor: pointer; }
.polaroid:nth-child(odd) { transform: rotate(-3deg); }
.polaroid:nth-child(even) { transform: rotate(3deg); }
.polaroid-img { aspect-ratio: 1/1; overflow: hidden; }
.polaroid-nm { font-size: 9px; text-align: center; color: var(--ink-dim); margin-top: 4px; font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 7) Kids — speech-bubble flex-wrap cards */
.bubble-wrap { display: flex; gap: 12px; padding: 10px 16px 16px; flex-wrap: wrap; }
.bubble-card { position: relative; flex: 1 1 26%; min-width: 80px; border-radius: 8px; padding: 8px; text-align: center; cursor: pointer; background: var(--panel); border: 1px solid var(--panel-brd); }
.bubble-img { border-radius: 6px; overflow: hidden; aspect-ratio: 1/1; }
.bubble-nm { font-size: 10px; margin-top: 4px; font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-dim); }

/* 8) Sports — zigzag alternating rows */
.zig-list { display: flex; flex-direction: column; gap: 12px; padding: 0 16px; }
.zig-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.zig-row.rev { flex-direction: row-reverse; }
.zig-img { width: 68px; height: 68px; border-radius: 8px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--panel-brd); }
.zig-img img { width: 100%; height: 100%; object-fit: cover; }
.zig-body { flex: 1; min-width: 0; }
.zig-row.rev .zig-body { text-align: right; }
.zig-nm { font-size: 14px; font-weight: 700; font-family: var(--font-mono); color: var(--ink); }
.zig-tag { font-size: 10px; color: var(--tape); font-family: var(--font-mono); text-transform: uppercase; }
.zig-desc { font-size: 11px; color: var(--ink-dim); margin-top: 3px; }

/* 9) Adventure — brick masonry grid */
.masonry-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 62px; gap: 8px; padding: 0 16px; }
.masonry-item { min-width: 0; border-radius: 6px; overflow: hidden; cursor: pointer; position: relative; border: 1px solid var(--panel-brd); }
.masonry-item img { width: 100%; height: 100%; object-fit: cover; }
.masonry-item:nth-child(3n+1) { grid-row: span 2; }
.masonry-nm { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: 10px; color: var(--ink); font-family: var(--font-mono); background: linear-gradient(transparent, rgba(0,0,0,.8)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 10) Racing — single wide banner */
.banner-single { position: relative; border-radius: 8px; overflow: hidden; margin: 0 16px; aspect-ratio: 16/8; cursor: pointer; border: 1px solid var(--panel-brd); }
.banner-single img { width: 100%; height: 100%; object-fit: cover; }
.banner-ovl { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.banner-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-bottom: 4px; background: var(--tape); color: #17070f; text-transform: uppercase; font-family: var(--font-mono); }
.banner-title { font-size: 16px; font-weight: 800; color: var(--ink); font-family: var(--font-mono); }
.banner-desc { font-size: 12px; color: var(--ink-dim); margin-top: 4px; }

/* 11) Girl — magazine list rows */
.mag-list { display: flex; flex-direction: column; gap: 0; padding: 0 16px; }
.mag-row { display: flex; gap: 12px; cursor: pointer; padding: 12px 0; border-bottom: 1px solid var(--panel-brd); }
.mag-row:last-child { border-bottom: none; }
.mag-img { width: 58px; height: 58px; border-radius: 6px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--panel-brd); }
.mag-img img { width: 100%; height: 100%; object-fit: cover; }
.mag-body { flex: 1; min-width: 0; }
.mag-nm { font-size: 14px; font-weight: 700; margin-bottom: 2px; font-family: var(--font-mono); color: var(--ink); }
.mag-desc { font-size: 11px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 12) Arcade — fanned stack of cards */
.stack-row { display: flex; padding: 20px 30px 12px; justify-content: center; }
.stack-card { width: 84px; aspect-ratio: 1/1; border-radius: 8px; overflow: hidden; margin-left: -20px; box-shadow: 0 6px 14px rgba(0,0,0,.5); cursor: pointer; border: 2px solid var(--bg-0); min-width: 0; }
.stack-card:first-child { margin-left: 0; }
.stack-card:nth-child(1) { transform: rotate(-7deg); }
.stack-card:nth-child(2) { transform: rotate(4deg); }
.stack-card:nth-child(3) { transform: rotate(-3deg); }
.stack-card:nth-child(4) { transform: rotate(6deg); }
.stack-card:nth-child(5) { transform: rotate(-5deg); }
.stack-card img { width: 100%; height: 100%; object-fit: cover; }

/* Hero split card */
.feat-split2 { display: flex; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--panel); min-height: 150px; border: 1px solid var(--panel-brd); }
.feat-split2-body { flex: 1; min-width: 0; padding: 16px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.feat-split2-badge { align-self: flex-start; font-size: 10px; font-weight: 700; background: var(--magenta); color: #17070f; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; font-family: var(--font-mono); }
.feat-split2-title { font-size: 18px; font-weight: 800; font-family: var(--font-mono); color: var(--ink); }
.feat-split2-desc { font-size: 12px; color: var(--ink-dim); }
.feat-split2-img { width: 42%; flex-shrink: 0; }
.feat-split2-img img { width: 100%; height: 100%; object-fit: cover; }
