/* ============================================================
   纯净小游戏 · 全局样式
   设计原则：轻量、纯净、无广告气质；移动优先响应式
   ============================================================ */

:root {
  --bg: #f4f6f8;
  --bg-soft: #eef1f4;
  --card: #ffffff;
  --line: #e6e9ee;
  --text: #212529;
  --text-2: #5c6670;
  --text-3: #8a929c;
  --accent: #ff6b35;
  --accent-soft: #fff1ea;
  --teal: #0ca678;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(20, 24, 33, 0.06);
  --shadow-hover: 0 8px 24px rgba(20, 24, 33, 0.12);
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand-logo {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--accent), #ff9f68);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.brand small { display: block; font-weight: 400; font-size: 10px; color: var(--text-3); line-height: 1.2; }

.nav { display: flex; gap: 4px; margin-left: 6px; }
.nav a {
  padding: 6px 10px; border-radius: 8px; font-size: 14px; color: var(--text-2);
  transition: background .15s, color .15s;
}
.nav a:hover, .nav a.active { background: var(--bg-soft); color: var(--text); }

.header-search { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.search-box {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px; width: 220px;
  transition: border-color .15s, box-shadow .15s;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,107,53,.12); background: #fff; }
.search-box input { border: none; outline: none; background: none; width: 100%; font-size: 14px; color: var(--text); }
.search-box .search-ico { color: var(--text-3); font-size: 13px; }

/* ---------- 主体 ---------- */
.site-main { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 18px 16px 48px; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, #fff6ef, #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px; margin-bottom: 22px;
}
.hero h1 { font-size: 26px; font-weight: 800; letter-spacing: .5px; }
.hero h1 .hl { color: var(--accent); }
.hero p { color: var(--text-2); margin: 8px 0 16px; font-size: 15px; }
.promise-list { display: flex; flex-wrap: wrap; gap: 10px; }
.promise {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--text-2);
}
.promise b { color: var(--teal); font-weight: 700; }

/* 区块标题 */
.section { margin: 26px 0 14px; display: flex; align-items: baseline; gap: 10px; }
.section h2 { font-size: 18px; font-weight: 700; }
.section .more { margin-left: auto; font-size: 13px; color: var(--text-3); }
.section .more a { color: var(--accent); font-weight: 600; }

/* 分类芯片 */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  padding: 7px 14px; border-radius: 999px; font-size: 13.5px;
  background: var(--card); border: 1px solid var(--line); color: var(--text-2);
  transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* 游戏卡片网格 */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.game-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column; cursor: pointer;
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.game-cover {
  position: relative; aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 44px; text-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.game-cover::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.28), transparent 55%);
}
.game-cover .cat-tag {
  position: absolute; left: 10px; top: 10px; z-index: 1;
  background: rgba(0,0,0,.35); color: #fff; font-size: 11px;
  padding: 3px 8px; border-radius: 999px; backdrop-filter: blur(4px);
}
.game-cover .cover-play {
  position: absolute; right: 10px; bottom: 10px; z-index: 1;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  opacity: 0; transform: translateY(4px); transition: all .18s;
}
.game-card:hover .cover-play { opacity: 1; transform: translateY(0); }
.game-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.game-info h3 { font-size: 15.5px; font-weight: 700; }
.game-info .sum { font-size: 12.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.game-info .meta { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.meta .tag { font-size: 11.5px; color: var(--text-3); background: var(--bg-soft); padding: 2px 8px; border-radius: 6px; }
.btn-play {
  margin-left: auto; background: var(--accent); color: #fff;
  padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  transition: background .15s;
}
.btn-play:hover { background: #e85a24; }

/* 空态 */
.empty { text-align: center; color: var(--text-3); padding: 40px 0; font-size: 14px; }

/* ---------- 详情页 ---------- */
.detail-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 22px; }
.detail-cover {
  aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 72px;
  position: relative; box-shadow: var(--shadow);
}
.detail-cover .cat-tag {
  position: absolute; left: 12px; top: 12px;
  background: rgba(0,0,0,.35); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 999px;
}
.detail-body h1 { font-size: 22px; font-weight: 800; }
.detail-body .sub { color: var(--text-2); font-size: 14px; margin: 6px 0 12px; }
.detail-actions { display: flex; gap: 10px; margin: 14px 0 20px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 22px; border-radius: 999px; font-size: 14.5px; font-weight: 700;
  transition: all .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #e85a24; }
.btn-ghost { background: var(--card); border: 1px solid var(--line); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-fav.on { background: var(--accent-soft); border-color: #ffb08a; color: var(--accent); }

.info-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 14px; }
.info-box h4 { font-size: 14px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.info-box p { font-size: 13.5px; color: var(--text-2); }
.feat-list { display: flex; flex-wrap: wrap; gap: 8px; }
.feat-list span { font-size: 12px; background: var(--bg-soft); border-radius: 6px; padding: 4px 10px; color: var(--text-2); }
.controls-line { font-size: 13px; color: var(--text-2); }

/* ---------- 游玩页（纯净） ---------- */
.play-page { background: #111418; }
.play-top {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; background: rgba(255,255,255,.04);
  color: #dfe3e8; font-size: 14px;
}
.play-top .back { color: #dfe3e8; }
.play-top .back:hover { color: #fff; }
.play-top .p-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-top .p-hint { font-size: 12px; color: #8a929c; white-space: nowrap; }
.play-top .btn-fs { margin-left: auto; }
.btn-fs {
  background: rgba(255,255,255,.12); color: #fff; border-radius: 8px;
  padding: 6px 14px; font-size: 13px;
}
.btn-fs:hover { background: rgba(255,255,255,.2); }
.play-frame-wrap { position: fixed; inset: 46px 0 0 0; }
.play-frame-wrap iframe { width: 100%; height: 100%; border: none; display: block; background: #111418; }

/* ---------- 关于 / 合规 ---------- */
.doc-wrap { max-width: 760px; margin: 0 auto; }
.doc-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; margin-bottom: 18px; }
.doc-card h2 { font-size: 19px; font-weight: 800; margin-bottom: 12px; }
.doc-card h3 { font-size: 15.5px; font-weight: 700; margin: 18px 0 8px; }
.doc-card p, .doc-card li { font-size: 14px; color: var(--text-2); margin-bottom: 8px; }
.doc-card ul { padding-left: 20px; }
.doc-card .rule { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 13.5px; color: #7a3b1d; margin: 10px 0; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--card); margin-top: auto; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 22px 16px;
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  color: var(--text-3); font-size: 12.5px;
}
.footer-inner .f-links { display: flex; gap: 14px; }
.footer-inner a:hover { color: var(--accent); }

/* 面包屑 */
.crumb { font-size: 13px; color: var(--text-3); margin-bottom: 16px; }
.crumb a:hover { color: var(--accent); }

/* 其他小工具类 */
.mobile-only { display: none; }
.link-btn { color: var(--text-3); font-size: 13px; }
.link-btn:hover { color: var(--accent); }
@media (max-width: 860px) { .mobile-only { display: flex; } }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .detail-wrap { grid-template-columns: 1fr; }
  .detail-cover { max-width: 420px; }
  .header-search { display: none; }
  .header-search.mobile-visible { display: flex; }
  .nav { gap: 2px; }
  .nav a { padding: 5px 8px; font-size: 13px; }
  .hero { padding: 22px 18px; }
  .hero h1 { font-size: 21px; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .game-cover { font-size: 32px; }
  .game-info h3 { font-size: 14px; }
  .btn-play { padding: 4px 10px; font-size: 12px; }
}
@media (max-width: 480px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .play-top .p-hint { display: none; }
}
