/* =====================================================================
   THEME: Desert / Wild West — 沙漠西部主题
   Palette: sandy tan / terracotta / rust / cactus-green, sun-bleached wood
   textures via CSS gradients, wanted-poster & rope-border motifs.
   All effects are pure CSS (gradients, borders, shadows) — no images/fonts/scripts.
   ===================================================================== */
:root {
  --sand-0: #e8d2a0;
  --sand-1: #f1e2bd;
  --wood: #a9743f;
  --wood-dark: #7a4e28;
  --terracotta: #c1633a;
  --rust: #9c3f24;
  --cactus: #4c7a4a;
  --cactus-dark: #33552f;
  --ink: #3a2414;
  --ink-dim: #7a5c3d;
  --paper: #f4e8c9;
  --panel: rgba(244, 232, 201, .82);
  --panel-brd: rgba(122, 78, 40, .35);
  --font-display: Georgia, 'Times New Roman', serif;
  --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:
    radial-gradient(ellipse at 20% 0%, rgba(255,244,214,.5), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(193,99,58,.18), transparent 60%),
    linear-gradient(180deg, #f2e2b8 0%, #e8d19b 45%, #ddc088 100%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.4;
  padding-bottom: 24px;
  overflow-x: hidden;
  position: relative;
}
/* Sun-bleached grain / speckle overlay, pure CSS */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: repeating-linear-gradient(90deg, rgba(122,78,40,.025) 0px, rgba(122,78,40,.025) 1px, transparent 1px, transparent 4px);
  opacity: .5;
}
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(122,78,40,.35) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 76% 6%, rgba(156,63,36,.3) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 42% 28%, rgba(122,78,40,.3) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 60% 55%, rgba(76,122,74,.25) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 22% 68%, rgba(122,78,40,.3) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 90% 40%, rgba(193,99,58,.3) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 12% 88%, rgba(122,78,40,.25) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 68% 82%, rgba(76,122,74,.25) 0, transparent 100%);
  opacity: .7;
}
[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 (weathered wood plank) ===== */
.topbar {
  position: static; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(180deg, var(--wood) 0%, var(--wood-dark) 100%);
  border-bottom: 4px solid var(--rust);
  box-shadow: 0 3px 0 rgba(0,0,0,.15), inset 0 1px 0 rgba(255,255,255,.15);
}
.topbar-logo {
  font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: .03em;
  color: var(--sand-1);
  text-shadow: 1px 1px 0 rgba(0,0,0,.35);
}
.topbar-search-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--terracotta); color: var(--sand-1);
  border: 2px solid var(--sand-1);
  box-shadow: 0 2px 3px rgba(0,0,0,.25);
}
/* ===== Category Tabs (rope-strung signs) ===== */
.cat-tabs {
  position: static; top: 60px; z-index: 30;
  background: linear-gradient(180deg, var(--sand-1), var(--sand-0));
  border-bottom: 3px dashed var(--wood);
  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: 3px;
  background: var(--paper); color: var(--ink-dim); font-size: 12px; font-weight: 700; font-family: var(--font-display);
  border: 2px solid var(--panel-brd);
  box-shadow: 0 2px 0 rgba(122,78,40,.2);
}
.cat-tab.active {
  background: var(--rust); color: var(--sand-1);
  border-color: var(--wood-dark);
  box-shadow: 0 0 0 2px var(--sand-1) inset;
}
/* ===== Search ===== */
.search-bar-wrap {
  position: static; top: 60px; z-index: 30;
  display: flex; gap: 8px; padding: 10px 16px;
  background: var(--sand-1); border-bottom: 3px dashed var(--wood);
}
.search-input {
  flex: 1; padding: 9px 14px; border-radius: 4px; border: 2px solid var(--panel-brd);
  background: var(--paper); color: var(--ink); font-size: 14px; font-family: var(--font-body);
}
.search-cancel { font-size: 13px; color: var(--rust); font-weight: 700; padding: 0 4px; font-family: var(--font-display); }
/* ===== Loading ===== */
.loading-full { display: flex; align-items: center; justify-content: center; padding: 80px 0; }
.loading-ring {
  width: 34px; height: 34px; border-radius: 50%;
  border: 4px solid rgba(156,63,36,.2); border-top-color: var(--cactus);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes swing { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
/* ===== Section spacing ===== */
section[class$="-sec"] { margin-bottom: 32px; }
/* ===== Section Header (branded wood sign) ===== */
.sec-hd { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 10px; }
.sec-label {
  font-size: 15px; font-weight: 700; color: var(--sand-1); font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: .04em;
  background: linear-gradient(180deg, var(--wood), var(--wood-dark));
  padding: 5px 14px; border-radius: 3px;
  box-shadow: 0 2px 0 rgba(0,0,0,.2);
}
.sec-more { font-size: 11px; color: var(--rust); font-weight: 700; font-family: var(--font-display); text-transform: uppercase; }
.sec-cnt { font-size: 12px; color: var(--ink-dim); font-family: var(--font-body); }
/* ===== Featured ===== */
.featured-sec { padding: 12px 16px 0; }

/* ===== Generic responsive icon grid ===== */
.all-grid, .games-grid, .badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 16px 8px;
}
@media (min-width: 480px) {
  .all-grid, .games-grid, .badge-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 860px) {
  .all-grid, .games-grid, .badge-grid { grid-template-columns: repeat(8, 1fr); }
}
.agcard, .gcard, .badge-card { cursor: pointer; min-width: 0; }
.agcard-img, .gcard-img {
  aspect-ratio: 1/1 !important; width: 100%; height: auto; overflow: hidden;
  border-radius: 6px; border: 2px solid var(--panel-brd); position: relative;
  box-shadow: 0 2px 4px rgba(122,78,40,.2);
}
.agcard-img img, .gcard-img img { width: 100%; height: 100%; object-fit: cover; }
.agcard-nm, .gcard-nm {
  font-size: 11px; margin-top: 5px; text-align: center; color: var(--ink-dim); font-family: var(--font-body);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* ===== Load more ===== */
.more-wrap, .loadmore-wrap { display: flex; justify-content: center; padding: 16px; }
.more-btn, .loadmore-btn {
  padding: 10px 24px; border-radius: 4px; background: linear-gradient(180deg, var(--terracotta), var(--rust)); color: var(--sand-1);
  font-size: 12px; font-weight: 700; border: 2px solid var(--wood-dark); font-family: var(--font-display); text-transform: uppercase;
  box-shadow: 0 2px 0 rgba(0,0,0,.2);
}
/* ===== Filter header ===== */
.filter-hdr { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.filter-back { font-size: 12px; color: var(--rust); font-weight: 700; font-family: var(--font-display); }
.filter-title { flex: 1; font-size: 15px; font-weight: 700; color: var(--ink); font-family: var(--font-display); }
.filter-cnt { font-size: 12px; color: var(--ink-dim); font-family: var(--font-body); }
.empty-msg { text-align: center; padding: 60px 0; color: var(--ink-dim); font-size: 13px; font-family: var(--font-display); }
/* ===== Footer ===== */
.site-footer { display: flex; justify-content: center; gap: 10px; padding: 24px 16px; font-size: 12px; color: var(--ink-dim); font-family: var(--font-body); }
/* ===== Back to top (branding iron button) ===== */
.totop-btn {
  position: fixed; right: 16px; bottom: 20px; z-index: 50;
  width: 42px; height: 42px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--terracotta), var(--rust)); color: var(--sand-1); font-size: 16px; font-weight: 700;
  border: 3px solid var(--sand-1);
  box-shadow: 0 3px 6px rgba(0,0,0,.3);
}

/* =====================================================================
   14 SECTION LAYOUTS (all distinct, Wild West flavored)
   ===================================================================== */

/* Hero — Wanted Poster */
.wanted-poster {
  position: relative; border-radius: 4px; overflow: hidden; cursor: pointer;
  background: var(--paper);
  border: 6px double var(--wood-dark);
  box-shadow: 0 4px 10px rgba(122,78,40,.35);
  padding: 14px;
}
.wanted-poster-img { aspect-ratio: 16/9; border: 3px solid var(--ink); border-radius: 2px; overflow: hidden; filter: sepia(.25) contrast(1.05); }
.wanted-poster-img img { width: 100%; height: 100%; object-fit: cover; }
.wanted-poster-body { text-align: center; margin-top: 10px; }
.wanted-poster-badge {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .12em;
  background: var(--rust); color: var(--sand-1); padding: 3px 12px; border-radius: 2px;
  text-transform: uppercase; font-family: var(--font-display); margin-bottom: 6px;
}
.wanted-poster-title { font-size: 20px; font-weight: 800; font-family: var(--font-display); color: var(--ink); text-transform: uppercase; letter-spacing: .05em; }
.wanted-poster-desc { font-size: 12px; color: var(--ink-dim); margin-top: 6px; }

/* 1) Hot Games — Saloon Doors row (1 big + 4 small) */
.saloon-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; padding: 0 16px; }
.saloon-item {
  min-width: 0; border-radius: 4px 4px 30px 30px; overflow: hidden; position: relative; cursor: pointer;
  border: 3px solid var(--wood-dark); background: var(--paper);
}
.saloon-item:first-child { grid-row: span 2; }
.saloon-img { aspect-ratio: 1/1; }
.saloon-img img { width: 100%; height: 100%; object-fit: cover; }
.saloon-nm {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 6px; font-size: 10px; color: var(--sand-1); font-family: var(--font-display);
  background: linear-gradient(transparent, rgba(58,36,20,.88)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.saloon-star {
  position: absolute; top: 5px; left: 5px; font-size: 12px; color: var(--terracotta);
  text-shadow: 0 1px 1px rgba(0,0,0,.4);
}

/* 2) Spotlight Picks — Telegraph list */
.telegraph-list { display: flex; flex-direction: column; gap: 0; padding: 0 16px; }
.telegraph-item { cursor: pointer; padding: 12px 0; border-bottom: 2px dotted var(--panel-brd); min-width: 0; }
.telegraph-item:last-child { border-bottom: none; }
.telegraph-bullet { color: var(--cactus); margin-right: 6px; font-family: monospace; letter-spacing: -1px; }
.telegraph-name { font-size: 14px; font-weight: 700; color: var(--ink); font-family: var(--font-display); }
.telegraph-cat { font-size: 10px; color: var(--rust); margin-left: 8px; font-family: var(--font-display); text-transform: uppercase; }
.telegraph-desc { font-size: 12px; color: var(--ink-dim); margin-top: 4px; margin-left: 30px; }

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

/* 4) Browse Channels — Sheriff Badge circular grid */
.badge-img {
  aspect-ratio: 1/1 !important; width: 100%; height: auto; overflow: hidden;
  border-radius: 50%; border: 3px solid var(--wood-dark); position: relative;
  box-shadow: 0 2px 4px rgba(122,78,40,.3), 0 0 0 3px var(--sand-1) inset;
}
.badge-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.badge-nm {
  font-size: 11px; margin-top: 5px; text-align: center; color: var(--ink-dim); font-family: var(--font-display);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.badge-num {
  position: absolute; top: -2px; right: -2px; font-size: 8px; font-weight: 700; color: var(--sand-1);
  background: var(--rust); padding: 2px 5px; border-radius: 50%; font-family: var(--font-display);
  border: 1px solid var(--sand-1);
}

/* 5) Action — Showdown podium */
.showdown { display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding: 10px 16px; }
.showdown-item { cursor: pointer; text-align: center; min-width: 0; }
.showdown-item.p1 { width: 112px; order: 2; }
.showdown-item.p2 { width: 84px; order: 1; }
.showdown-item.p3 { width: 84px; order: 3; }
.showdown-img { border-radius: 6px; overflow: hidden; aspect-ratio: 1/1; border: 3px solid var(--rust); position: relative; }
.showdown-item.p1 .showdown-img { border-color: var(--terracotta); box-shadow: 0 0 0 2px var(--sand-1) inset; }
.showdown-rank {
  position: absolute; top: 3px; left: 3px; font-size: 10px; font-weight: 700; color: var(--sand-1);
  background: var(--cactus-dark); padding: 0 5px; border-radius: 2px; font-family: var(--font-display);
}
.showdown-nm { font-size: 11px; margin-top: 5px; font-family: var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-dim); }

/* 6) Puzzle — Tumbleweed scroll row (circular, slight rotation) */
.tumbleweed-row { display: flex; gap: 18px; padding: 14px 22px 18px; overflow-x: auto; }
.tumbleweed { flex: 0 0 92px; width: 92px; cursor: pointer; }
.tumbleweed:nth-child(odd) { transform: rotate(-4deg); }
.tumbleweed:nth-child(even) { transform: rotate(4deg); }
.tumbleweed-img { aspect-ratio: 1/1; overflow: hidden; border-radius: 50%; border: 3px dashed var(--wood); padding: 3px; background: var(--paper); }
.tumbleweed-nm { font-size: 9px; text-align: center; color: var(--ink-dim); margin-top: 4px; font-family: var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

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

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

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

/* 10) Racing — Train banner */
.train-banner { position: relative; border-radius: 6px; overflow: hidden; margin: 0 16px; aspect-ratio: 16/8; cursor: pointer; border: 4px solid var(--wood-dark); }
.train-banner img { width: 100%; height: 100%; object-fit: cover; }
.train-ovl { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; background: linear-gradient(transparent, rgba(58,36,20,.9)); }
.train-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 2px; margin-bottom: 4px; background: var(--terracotta); color: var(--sand-1); text-transform: uppercase; font-family: var(--font-display); }
.train-title { font-size: 16px; font-weight: 800; color: var(--sand-1); font-family: var(--font-display); }
.train-desc { font-size: 12px; color: var(--sand-0); margin-top: 4px; }

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

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

/* All Games / Filtered — Dusty Trail grid uses shared .all-grid/.games-grid above */
