/* ============================================================
   求真牌 — 官网样式
   主题：深色学术（墨蓝 × 鎏金）
   ============================================================ */

:root {
  --bg: #0d1220;
  --bg-alt: #121a2d;
  --bg-card: #1a2338;
  --bg-card-hover: #212d49;
  --border: #2c3a5c;
  --border-soft: #24304d;
  --gold: #d4af37;
  --gold-bright: #f0c957;
  --gold-dim: #8f7430;
  --text: #e8e6df;
  --text-dim: #9aa4bd;
  --text-faint: #6b7690;
  --accent: #7fb2ff;
  --danger: #ff6b6b;
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 64px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  color: var(--text);
  line-height: 1.4;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--gold-bright); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(13, 18, 32, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
  z-index: 100;
}

.nav-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: 22px; font-weight: 700; color: var(--text);
  letter-spacing: 2px;
}
.brand img { width: 30px; height: 30px; border-radius: 6px; }
.brand span.hl { color: var(--gold-bright); }

.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a {
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  font-size: 15px;
}
.nav-links a:hover { color: var(--gold-bright); background: rgba(212, 175, 55, 0.08); }
.nav-links a.active { color: var(--gold-bright); }
.nav-cta {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #141414 !important;
  font-weight: 700;
  margin-left: 8px;
}
.nav-cta:hover { filter: brightness(1.12); color: #141414 !important; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border);
  color: var(--text); font-size: 20px;
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ---------- 英雄区 ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center;
  justify-content: center; text-align: center;
  padding: calc(var(--header-h) + 60px) 24px 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url("../img/bg.webp");
  background-size: cover;
  background-position: center;
  opacity: 0.16;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(13,18,32,0.1), var(--bg) 78%);
  z-index: 1;
}
.hero-inner { position: relative; z-index: 2; max-width: 860px; }

.hero .eyebrow {
  display: inline-block;
  color: var(--gold-bright);
  letter-spacing: 6px;
  font-size: 13px;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 26px;
}

.hero h1 {
  font-size: clamp(48px, 9vw, 92px);
  letter-spacing: 10px;
  margin-bottom: 18px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.hero .subtitle {
  font-size: clamp(16px, 2.2vw, 21px);
  color: var(--text-dim);
  margin-bottom: 12px;
}

.hero .tagline {
  color: var(--text-faint);
  font-size: 15px;
  margin-bottom: 40px;
}

.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 34px;
  border-radius: 999px;
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #141414;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ---------- 章节通用 ---------- */
.section { padding: 90px 0; }
.section.alt { background: var(--bg-alt); }

.section-head { text-align: center; margin-bottom: 56px; }
.section-head .kicker {
  color: var(--gold);
  letter-spacing: 4px;
  font-size: 13px;
  margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: 3px; }
.section-head p { color: var(--text-dim); margin-top: 12px; max-width: 640px; margin-left: auto; margin-right: auto; }

/* ---------- 游戏介绍 ---------- */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.intro-text p { color: var(--text-dim); margin-bottom: 16px; }
.intro-text p strong { color: var(--text); }
.intro-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.intro-cards img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.25s;
}
.intro-cards img:hover { transform: translateY(-6px) rotate(-1deg); }

/* ---------- 特色 ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.2s, border-color 0.2s;
}
.feature:hover { transform: translateY(-4px); border-color: var(--gold); }
.feature .f-icon {
  font-size: 30px; margin-bottom: 14px;
  display: inline-block;
}
.feature h3 { font-size: 19px; margin-bottom: 10px; letter-spacing: 1px; }
.feature p { color: var(--text-dim); font-size: 14.5px; }

/* ---------- 卡牌展示 ---------- */
.card-gallery { display: flex; gap: 20px; overflow-x: auto; padding: 14px 4px 20px; }
.card-gallery::-webkit-scrollbar { height: 8px; }
.card-gallery::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.gal-card { flex: 0 0 210px; text-align: center; }
.gal-card img {
  width: 210px; border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.25s;
}
.gal-card img:hover { transform: translateY(-6px) scale(1.03); }
.gal-card .c-name { margin-top: 10px; font-size: 14px; color: var(--text-dim); }
.gal-card .c-id { font-size: 12px; color: var(--text-faint); }

/* ---------- 下载横幅 ---------- */
.download-banner {
  text-align: center;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-alt));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 60px 30px;
}
.download-banner h2 { font-size: 30px; margin-bottom: 12px; letter-spacing: 3px; }
.download-banner p { color: var(--text-dim); margin-bottom: 28px; }

/* ---------- 下载页 ---------- */
.page-hero {
  padding: calc(var(--header-h) + 70px) 0 40px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, var(--bg-card), var(--bg) 70%);
  border-bottom: 1px solid var(--border-soft);
}
.page-hero h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: 4px; }
.page-hero p { color: var(--text-dim); margin-top: 10px; }

.version-note {
  margin-top: 14px; font-size: 14px; color: var(--text-faint);
}
.version-note code {
  background: var(--bg-card); padding: 2px 8px;
  border-radius: 6px; border: 1px solid var(--border-soft);
  color: var(--gold-bright);
}

.platform-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 50px 0 30px;
}
.platform {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 30px;
  transition: transform 0.2s, border-color 0.2s;
}
.platform:hover { transform: translateY(-2px); border-color: var(--gold); }
.platform .p-head { display: flex; align-items: center; gap: 12px; margin: 0; flex: 0 0 auto; min-width: 150px; }
.platform .p-icon { font-size: 32px; }
.platform h2 { font-size: 20px; letter-spacing: 1px; white-space: nowrap; }
.platform .p-meta { margin: 0; color: var(--text-faint); font-size: 13px; flex: 0 0 auto; }
.platform .p-meta span { display: inline-block; margin-right: 10px; }
.platform ul.p-list { list-style: none; margin: 0; flex: 1 1 280px; }
.platform ul.p-list li {
  padding: 4px 0 4px 22px;
  position: relative;
  color: var(--text-dim);
  font-size: 14px;
}
.platform ul.p-list li::before {
  content: "◆";
  position: absolute; left: 0; top: 4px;
  color: var(--gold); font-size: 10px;
}
.platform .p-dl { flex: 0 0 auto; min-width: 230px; text-align: center; }
.platform .dl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #141414; font-weight: 700; font-size: 15px;
  transition: transform 0.15s, filter 0.2s;
  text-align: center;
}
.platform .dl-btn:hover { filter: brightness(1.1); transform: translateY(-2px); color: #141414; }
.platform .dl-size { display: block; margin-top: 6px; font-size: 12px; color: var(--text-faint); }
/* 当前用户平台：置顶 + 高亮 */
.platform.is-yours { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35); }
.platform.is-yours::after {
  content: "你的平台";
  position: absolute; top: -11px; right: 22px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #141414; font-size: 12px; font-weight: 700;
  padding: 3px 12px; border-radius: 999px;
  letter-spacing: 1px;
}
.note-box {
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 30px 0;
  font-size: 14px; color: var(--text-dim);
}
.note-box strong { color: var(--gold-bright); }

/* ---------- 规则页 ---------- */
.rules-layout { display: grid; grid-template-columns: 260px 1fr; gap: 40px; padding: 40px 0 90px; align-items: start; }
.rules-toc {
  position: sticky; top: calc(var(--header-h) + 24px);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
}
.rules-toc h3 { font-size: 14px; color: var(--gold); letter-spacing: 2px; margin-bottom: 12px; }
.rules-toc ol { list-style: none; counter-reset: toc; }
.rules-toc a {
  display: block; padding: 7px 10px;
  color: var(--text-dim); font-size: 14px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.rules-toc a:hover { color: var(--gold-bright); background: rgba(212,175,55,0.07); }
.rules-toc a::before { counter-increment: toc; content: counter(toc, decimal-leading-zero) "  "; color: var(--text-faint); font-size: 12px; }

.rules-body article { margin-bottom: 40px; }
.rules-body article h2 {
  font-size: 24px; letter-spacing: 2px;
  padding-bottom: 12px; margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.rules-body article h2 .num { color: var(--gold); margin-right: 10px; }
.rules-body article h3 { font-size: 17px; color: var(--gold-bright); margin: 22px 0 10px; }
.rules-body p, .rules-body li { color: var(--text-dim); font-size: 15px; }
.rules-body p { margin-bottom: 12px; }
.rules-body ul, .rules-body ol { padding-left: 22px; margin-bottom: 14px; }
.rules-body li { margin-bottom: 6px; }
.rules-body strong { color: var(--text); }
.rules-body table {
  width: 100%; border-collapse: collapse; margin: 14px 0 20px;
  font-size: 14.5px;
}
.rules-body th, .rules-body td {
  border: 1px solid var(--border);
  padding: 9px 14px; text-align: left;
}
.rules-body th { background: var(--bg-card); color: var(--gold-bright); font-weight: 600; white-space: nowrap; }
.rules-body td { color: var(--text-dim); }
.rules-body code {
  background: var(--bg-card); padding: 1px 7px;
  border-radius: 5px; font-size: 13px;
  border: 1px solid var(--border-soft);
  color: var(--accent);
}
.rules-body .callout {
  border-left: 3px solid var(--gold);
  background: rgba(212,175,55,0.06);
  padding: 12px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 14px 0; font-size: 14.5px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0 44px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13.5px;
}
.site-footer .footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 18px;
}
.site-footer .footer-nav a { font-size: 14.5px; color: var(--text-dim); letter-spacing: 1px; }
.site-footer .footer-nav a:hover { color: var(--gold-bright); }
.site-footer .f-brand { color: var(--text-dim); font-family: "Songti SC", serif; letter-spacing: 2px; font-size: 15px; margin-bottom: 6px; }
.site-footer a { color: var(--text-faint); }
.site-footer a:hover { color: var(--gold-bright); }
.site-footer .footer-contact { margin-top: 10px; font-size: 13px; color: var(--text-faint); letter-spacing: 0.5px; }
.site-footer .footer-contact a { color: var(--gold); text-decoration: none; }
.site-footer .footer-contact a:hover { color: var(--gold-bright); text-decoration: underline; }
.site-footer .footer-icp { margin-top: 8px; font-size: 12px; color: var(--text-faint); letter-spacing: 0.5px; }
.site-footer .footer-icp a { color: var(--text-faint); text-decoration: none; }
.site-footer .footer-icp a:hover { color: var(--gold-bright); }

/* ---------- 图片占位色块 ---------- */
.img-placeholder {
  border: 2px dashed var(--border);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(212, 175, 55, 0.10), rgba(120, 140, 200, 0.12)),
    var(--bg-card);
  padding: 28px 24px;
  margin: 18px auto 8px;
  max-width: 480px;
  text-align: center;
  color: var(--text-dim);
}
.img-placeholder .ph-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: 10px;
  opacity: 0.9;
}
.img-placeholder .ph-title { font-size: 15px; color: var(--text-light); margin-bottom: 6px; }
.img-placeholder .ph-desc { font-size: 13px; line-height: 1.7; color: var(--text-dim); }

/* ---------- 商业化章节 ---------- */
.commercial-body {
  max-width: 780px;
  margin: 0 auto;
  text-align: left;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 2;
}
.commercial-body p { margin-bottom: 16px; }
.commercial-body strong { color: var(--text-light); }
.commercial-body .goals { list-style: none; padding: 0; margin: 20px 0; }
.commercial-body .goals li { padding: 10px 4px; border-bottom: 1px dashed var(--border-soft); }
.commercial-body .goals li:last-child { border-bottom: none; }
.commercial-body .ref { font-size: 12px; color: var(--text-faint); margin-top: 22px; }
.commercial-body .ref a { color: var(--text-faint); text-decoration: underline; }
.commercial-body .ref a:hover { color: var(--gold-bright); }

/* ---------- 规则页实战演示 ---------- */
.demo-video { text-align: center; margin: 22px 0 8px; }
.demo-video img {
  max-width: 300px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: #0c0f18;
}
.demo-caption { color: var(--text-faint); font-size: 12.5px; margin-top: 8px; letter-spacing: 0.5px; }

/* ---------- 滚动淡入 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].shown { opacity: 1; transform: translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .intro-grid { grid-template-columns: 1fr; gap: 36px; }
  .rules-layout { grid-template-columns: 1fr; }
  .rules-toc { position: static; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 4px;
    background: rgba(13, 18, 32, 0.97);
    padding: 16px 20px 24px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%);
    transition: transform 0.25s;
    align-items: stretch;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { text-align: center; padding: 12px; }
  .nav-cta { margin-left: 0; margin-top: 6px; }
  .section { padding: 60px 0; }
  /* 下载页：窄屏下平台卡片内纵向堆叠 */
  .platform { flex-direction: column; align-items: stretch; text-align: center; }
  .platform .p-head { justify-content: center; min-width: 0; }
  .platform .p-meta span { margin: 0 8px; }
  .platform .p-dl { min-width: 0; }
  .platform.is-yours::after { right: 50%; transform: translateX(50%); }
}
