/* ═══ SideStrip — Poki-style Game Portal ═══ */
:root {
  --bg: #f9fafb;
  --white: #fff;
  --card: #fff;
  --border: #e5e7eb;
  --text: #1f2937;
  --text2: #6b7280;
  --accent: #7c3aed;
  --accent-h: #6d28d9;
  --hot: #f97316;
  --green: #10b981;
  --blue: #3b82f6;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-h: 0 4px 12px rgba(0,0,0,.1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
::-webkit-scrollbar { display: none; width: 0; height: 0; }
* { scrollbar-width: none; -ms-overflow-style: none; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Inter,sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; min-height: 100vh; }

/* ── Header ── */
.hd { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.hd-in { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; height: 56px; padding: 0 24px; gap: 6px; }
.hd-logo { display: flex; align-items: center; gap: 6px; text-decoration: none; font-size: 20px; font-weight: 800; color: var(--accent); flex-shrink: 0; margin-right: 12px; }
.hd-logo span { color: var(--text); }
.hd-nav { display: flex; gap: 0; overflow-x: auto; flex: 1; }
.hd-nav a { flex: 0 0 auto; padding: 8px 14px; color: var(--text2); text-decoration: none; font-size: 13px; font-weight: 600; border-radius: 8px; white-space: nowrap; transition: .18s; cursor: pointer; background: none; border: none; }
.hd-nav a:hover, .hd-nav a.active { color: var(--accent); background: rgba(124,58,237,.08); }
.hd-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.hd-search { border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; font-size: 13px; color: var(--text); outline: none; background: var(--bg); width: 160px; transition: .2s; }
.hd-search:focus { border-color: var(--accent); width: 200px; }
.hd-search::placeholder { color: var(--text2); }

/* ── Page ── */
.page { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ── Greeting ── */
.greet { padding: 32px 0 20px; }
.greet h1 { font-size: 28px; font-weight: 800; letter-spacing: -.3px; }
.greet p { font-size: 15px; color: var(--text2); margin-top: 4px; }

/* ── Section Header ── */
.sec-hd { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.sec-hd h2 { font-size: 20px; font-weight: 800; }
.sec-hd a { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; cursor: pointer; }
.sec-hd a:hover { text-decoration: underline; }

/* ── Featured Large Cards ── */
.featured { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-bottom: 36px; }
.feat-card { background: var(--white); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); transition: .25s; box-shadow: var(--shadow); position: relative; }
.feat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-h); }
.feat-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.feat-info { padding: 16px 18px 20px; }
.feat-name { font-size: 17px; font-weight: 700; line-height: 1.3; }
.feat-cat { font-size: 13px; color: var(--text2); margin-top: 4px; }
.feat-hot { position: absolute; top: 12px; right: 12px; background: var(--hot); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; display: flex; align-items: center; gap: 3px; }

/* ── Hot Row ── */
.hot-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 28px; }
.hot-card { flex: 0 0 106px; text-decoration: none; color: var(--text); transition: .2s; }
.hot-card:hover { transform: translateY(-3px); }
.hot-card img { width: 106px; height: 106px; border-radius: var(--radius-sm); object-fit: cover; box-shadow: var(--shadow-sm); background: #e8ecf4; display: block; }
.hot-name { font-size: 12px; font-weight: 600; line-height: 1.3; margin-top: 7px; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Ad ── */
.ad-w { display: flex; justify-content: center; padding: 8px 0 20px; }

/* ── Game Grid (medium cards) ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; padding-bottom: 40px; }
.gc { background: var(--white); border-radius: var(--radius-sm); overflow: hidden; text-decoration: none; color: var(--text); transition: .22s; box-shadow: var(--shadow-sm); }
.gc:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); }
.gc img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; background: #e8ecf4; }
.gc-info { padding: 10px 12px 12px; }
.gc-name { font-size: 13px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gc-cat { font-size: 11px; color: var(--text2); margin-top: 3px; }

/* ── Category Cards ── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; padding-bottom: 28px; }
.cat-card { background: var(--white); border-radius: var(--radius-sm); overflow: hidden; text-decoration: none; color: var(--text); transition: .22s; box-shadow: var(--shadow-sm); }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); }
.cat-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; background: #e8ecf4; }
.cat-info { padding: 10px 12px 12px; }
.cat-name { font-size: 14px; font-weight: 700; }
.cat-num { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* ── Category Pills (homepage) ── */
.pills-wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px 28px; }
.pills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.pill-card { background: var(--white); border-radius: 10px; padding: 16px 12px; text-align: center; text-decoration: none; color: var(--text); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-sm); transition: .2s; }
.pill-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); color: var(--accent); }
.pill-card .pc-emoji { font-size: 24px; margin-bottom: 4px; display: block; }

/* ── Load More ── */
.lm { display: flex; justify-content: center; padding-bottom: 40px; }
.lm-btn { padding: 12px 40px; background: var(--accent); color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; transition: .2s; }
.lm-btn:hover { background: var(--accent-h); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(124,58,237,.35); }

/* ── Footer ── */
.ft { background: #f3f4f6; border-top: 1px solid var(--border); padding: 40px 24px; margin-top: 20px; }
.ft-in { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.ft-col h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.ft-col a { display: block; color: var(--text2); text-decoration: none; font-size: 14px; padding: 4px 0; transition: .2s; }
.ft-col a:hover { color: var(--accent); }
.ft-bottom { max-width: 1280px; margin: 24px auto 0; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--text2); }
.ft-bottom a { color: var(--text2); text-decoration: none; }

/* ── Game Page ── */
.game-main { max-width: 960px; margin: 0 auto; padding: 20px 24px 40px; }
.bc { font-size: 13px; color: var(--text2); margin-bottom: 12px; }
.bc a { color: var(--text2); text-decoration: none; }
.bc a:hover { color: var(--accent); }
.g-title { font-size: clamp(22px,3.5vw,28px); font-weight: 800; margin-bottom: 8px; }
.g-meta { font-size: 14px; color: var(--text2); margin-bottom: 16px; display: flex; gap: 16px; flex-wrap: wrap; }
.g-meta b { color: var(--text); font-weight: 600; }
.iframe-w { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; }
.iframe-w iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ad-slot-sm { display: flex; justify-content: center; margin: 24px 0; }
.rel-section { margin-top: 32px; }
.sec-title { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.rel-card { background: var(--white); border-radius: var(--radius-sm); overflow: hidden; text-decoration: none; color: var(--text); transition: .2s; box-shadow: var(--shadow-sm); }
.rel-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); }
.rel-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; background: #e8ecf4; }
.rel-card span { display: block; padding: 9px 10px; font-size: 12px; font-weight: 700; }

/* ═══ MOBILE ═══ */
@media (max-width: 768px) {
  .hd-in { padding: 0 16px; height: 50px; }
  .hd-logo { font-size: 17px; margin-right: 8px; }
  .hd-nav { display: none; }
  .hd-hamburger { display: block !important; }
  .hd-search { width: 100px; }
  .hd-search:focus { width: 130px; }
  .greet { padding: 22px 0 14px; }
  .greet h1 { font-size: 22px; }
  .page { padding: 0 16px; }
  .featured { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .feat-info { padding: 10px 12px 14px; }
  .feat-name { font-size: 14px; }
  .hot-card { flex: 0 0 90px; }
  .hot-card img { width: 90px; height: 90px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .gc-info { padding: 7px 8px 9px; }
  .gc-name { font-size: 12px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pills-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .pill-card { padding: 12px 8px; font-size: 12px; }
  .ft-in { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .game-main { padding: 14px 16px 40px; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
