/* ==================================================
   站立游戏 · 全站样式（水墨古风 · 玄纸版）
   玄墨底 · 留白字 · 铅灰线 · 楷体标题
   ================================================== */

/* ---------- 主题变量 ---------- */
:root {
  --bg: #0e0e10;              /* 玄墨 */
  --bg-deep: #08080a;         /* 墨深处 */
  --surface: rgba(255, 255, 255, 0.04);   /* 淡墨晕染 */
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.13);    /* 铅灰线 */
  --text: #e9eaec;            /* 留白 */
  --muted: #9a9ba2;           /* 灰墨 */
  --accent: #dfe3e8;          /* 霜白 */
  --accent-2: #b7bcc4;        /* 铅灰 */
  --accent-3: #8f959e;        /* 深灰 */
  --ok: #dfe3e8;              /* 在线=霜白 */
  --grad: linear-gradient(120deg, #f2f3f5, #a9aeb7);
  --radius: 14px;
  --container: 1080px;
  --header-h: 68px;
  --seal: #eceef1;            /* 印章（留白） */
  --font-song: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong",
    "SimSun", "宋体", serif;
  --font-kai: "Kaiti SC", "STKaiti", "KaiTi", "楷体", "Noto Serif SC",
    "Songti SC", serif;
}

/* ---------- 基础 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  /* 锚点跳转时避开固定头部 */
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-song);
  background: transparent;
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.container {
  width: min(var(--container), 100% - 40px);
  margin-inline: auto;
}

::selection {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: #2c2e33;
  border-radius: 8px;
}

/* ---------- 背景：墨韵网格 + 淡雾 ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(255, 255, 255, 0.06), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  -webkit-mask-image: linear-gradient(#000 0%, #000 45%, transparent 90%);
  mask-image: linear-gradient(#000 0%, #000 45%, transparent 90%);
}

/* 淡雾漂浮（白灰水墨） */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.1;
  will-change: transform;
}
.orb-1 {
  width: 520px;
  height: 520px;
  top: -160px;
  left: -120px;
  background: #dfe3e8;
  animation: drift1 22s ease-in-out infinite alternate;
}
.orb-2 {
  width: 460px;
  height: 460px;
  top: 30%;
  right: -160px;
  background: #8f959e;
  animation: drift2 26s ease-in-out infinite alternate;
}
.orb-3 {
  width: 380px;
  height: 380px;
  bottom: -120px;
  left: 30%;
  background: #b7bcc4;
  opacity: 0.06;
  animation: drift3 30s ease-in-out infinite alternate;
}
@keyframes drift1 {
  to {
    transform: translate(60px, 40px) scale(1.1);
  }
}
@keyframes drift2 {
  to {
    transform: translate(-50px, 60px) scale(0.95);
  }
}
@keyframes drift3 {
  to {
    transform: translate(40px, -50px) scale(1.05);
  }
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  /* 顶部墨色轻纱，保证压在图上的字可读 */
  background: linear-gradient(
    180deg,
    rgba(14, 14, 16, 0.85) 0,
    rgba(14, 14, 16, 0) 100%
  );
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  background: rgba(14, 14, 16, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* 整体下移，使印章与声音按钮落在视频范围内 */
  padding: 20px 0 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.04em;
  font-family: var(--font-kai);
}
.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: block;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
.brand-name i {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 首屏（视频贴页面最顶部） ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 0 20px 56px;
}

/* 顶部视频：等比缩放居中 */
.hero-video {
  position: relative;
  z-index: 0;
  width: min(100%, 1144px);
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: contain;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  background: #000;
}

/* 视频下方的入口按钮 */
.hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  /* 上移，略微压住视频底部圆角 */
  margin-top: -18px;
}
.hero-top a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(20, 20, 23, 0.8);
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-family: var(--font-kai);
  letter-spacing: 0.06em;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease,
    box-shadow 0.2s ease;
}
.hero-top a:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(30, 30, 34, 0.9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

/* 声音开关（网页右上角） */
.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(20, 20, 23, 0.8);
  color: var(--muted);
  font-family: var(--font-song);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.sound-toggle:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.35);
}
.sound-toggle.on {
  color: #f2f3f5;
  border-color: rgba(255, 255, 255, 0.45);
}

/* ---------- 通用区块 ---------- */
.section {
  padding: 84px 0;
}

/* ---------- 版块标题（三大版块） ---------- */
.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.section-icon {
  width: 58px;
  height: 58px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 30px;
  border-radius: var(--radius);
  background: var(--sec-soft);
  border: 1px solid var(--sec-line);
}
.section-no {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #141416;
  background: var(--seal);
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-family: var(--font-kai);
}
.section-head h2 {
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-weight: 800;
  line-height: 1.3;
  font-family: var(--font-kai);
  letter-spacing: 0.06em;
}
.section-desc-left {
  color: var(--muted);
  margin: 10px 0 40px 74px;
  max-width: 560px;
}

/* 每个版块的主题色（白灰水墨阶） */
.sec-mini {
  --sec: #eef0f3;
  --sec-soft: rgba(255, 255, 255, 0.08);
  --sec-line: rgba(255, 255, 255, 0.35);
}
.sec-quiz {
  --sec: #a9aeb7;
  --sec-soft: rgba(255, 255, 255, 0.05);
  --sec-line: rgba(255, 255, 255, 0.22);
}
.sec-dl {
  --sec: #767c87;
  --sec-soft: rgba(255, 255, 255, 0.035);
  --sec-line: rgba(255, 255, 255, 0.15);
}
.sec-tools {
  --sec: #c6cad1;
  --sec-soft: rgba(255, 255, 255, 0.06);
  --sec-line: rgba(255, 255, 255, 0.28);
}

/* ---------- 卡片通用（小游戏 / 测试问卷） ---------- */
.game-grid,
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.game-card,
.quiz-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease, background 0.25s ease;
}
.game-card::before,
.quiz-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--sec);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.game-card:hover,
.quiz-card:hover {
  transform: translateY(-6px);
  border-color: var(--sec-line);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}
.game-card:hover::before,
.quiz-card:hover::before {
  opacity: 1;
}

.game-card h3,
.quiz-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  font-family: var(--font-kai);
  letter-spacing: 0.04em;
}
.game-card p,
.quiz-card p {
  font-size: 14px;
  color: var(--muted);
}

/* 卡片底部按钮 */
.card-btn {
  align-self: flex-start;
  margin-top: auto;
  padding: 9px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: var(--font-kai);
  letter-spacing: 0.06em;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.game-card:hover .card-btn,
.quiz-card:hover .card-btn {
  color: var(--sec);
  border-color: var(--sec-line);
}

/* 状态标签（开发中 / 待上线） */
.game-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #b7bcc4;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 4px 10px;
  border-radius: 999px;
}
.game-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b7bcc4;
  flex: none;
}

/* 小游戏图标 */
.game-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  font-size: 38px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  margin-bottom: 18px;
  transition: transform 0.25s ease;
}
.game-card:hover .game-icon {
  transform: scale(1.08) rotate(-4deg);
}

/* ---------- 测试问卷卡片 ---------- */
.quiz-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.quiz-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  font-size: 34px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  transition: transform 0.25s ease;
  overflow: hidden;
}
.quiz-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.quiz-card:hover .quiz-icon {
  transform: scale(1.08) rotate(-4deg);
}

/* ---------- 更多待上线（空白卡） ---------- */
.more-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 214px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-kai);
  letter-spacing: 0.1em;
}
.more-ico {
  font-size: 34px;
  opacity: 0.55;
}
.more-txt {
  font-size: 15px;
}
.more-row {
  cursor: default;
}
.more-row:hover {
  transform: none;
  border-color: var(--sec-line);
  background: rgba(255, 255, 255, 0.02);
}
.more-row .dl-cover {
  border-style: dashed;
  color: var(--muted);
}
.quiz-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--sec);
  background: var(--sec-soft);
  border: 1px solid var(--sec-line);
  padding: 4px 10px;
  border-radius: 999px;
}
.quiz-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sec);
  flex: none;
}
.quiz-meta {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 18px;
}

/* ---------- 下载游戏卡片 ---------- */
.dl-list {
  display: grid;
  gap: 16px;
}
.dl-card {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 20px;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease, background 0.25s ease;
}
.dl-card:hover {
  transform: translateY(-3px);
  border-color: var(--sec-line);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}
.dl-cover {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  font-size: 42px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
}
.dl-info h3 {
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-kai);
  letter-spacing: 0.04em;
}
.dl-size {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 6px;
}
.dl-info p {
  font-size: 14px;
  color: var(--muted);
  margin: 6px 0 10px;
}
.dl-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--muted);
}
.dl-btn {
  padding: 11px 24px;
  border-radius: 999px;
  background: linear-gradient(120deg, #f2f3f5, #b7bcc4);
  color: #141416;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  font-family: var(--font-kai);
  letter-spacing: 0.06em;
}

/* ---------- 关于 ---------- */
.section-title {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 800;
  text-align: center;
  font-family: var(--font-kai);
  letter-spacing: 0.08em;
}
.section-title::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  border-radius: 3px;
  background: var(--seal);
  margin: 14px auto 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}
.about-text .section-title {
  text-align: left;
}
.about-text .section-title::after {
  margin-left: 0;
}
.about-text p {
  color: var(--muted);
  margin-top: 16px;
}
.about-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.about-card h3 {
  font-size: 17px;
  margin-bottom: 16px;
  font-family: var(--font-kai);
  letter-spacing: 0.06em;
}
.about-card ul {
  list-style: none;
  display: grid;
  gap: 12px;
}
.about-card li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}
.about-card li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.about-card li span {
  color: var(--muted);
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 34px 0 42px;
  margin-top: 40px;
  background: var(--bg-deep);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 滚动显现动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- 轻提示 toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 100;
  transform: translate(-50%, 16px);
  background: rgba(20, 20, 23, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-family: var(--font-kai);
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: calc(var(--header-h) + 8px);
  }
  .section {
    padding: 64px 0;
  }
  .hero {
    padding: 0 14px 44px;
  }
  .hero-video {
    border-radius: 0 0 16px 16px;
  }
  .section-desc-left {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .dl-card {
    grid-template-columns: 64px 1fr;
  }
  .dl-cover {
    width: 64px;
    height: 64px;
    font-size: 30px;
  }
  .dl-btn {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: center;
  }
}

/* ---------- 减少动态效果偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
