/* ==================================================
   站立游戏 · 全站样式
   三大版块：小游戏 / 测试问卷 / 下载游戏
   纯手写 CSS，零依赖，适配手机 / 平板 / 电脑
   ================================================== */

/* ---------- 主题变量 ---------- */
:root {
  --bg: #0a0f1c;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e6eaf2;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-2: #a78bfa;
  --accent-3: #f472b6;
  --grad: linear-gradient(120deg, var(--accent), var(--accent-2));
  --radius: 18px;
  --container: 1080px;
  --header-h: 68px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI",
    system-ui, -apple-system, sans-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);
  background: transparent;
  color: var(--text);
  line-height: 1.7;
  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(34, 211, 238, 0.3);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  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(34, 211, 238, 0.12), transparent 60%),
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  -webkit-mask-image: linear-gradient(#000 0%, #000 40%, transparent 85%);
  mask-image: linear-gradient(#000 0%, #000 40%, transparent 85%);
}

/* 漂浮光斑 */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  will-change: transform;
}
.orb-1 {
  width: 520px;
  height: 520px;
  top: -160px;
  left: -120px;
  background: #0e7490;
  animation: drift1 22s ease-in-out infinite alternate;
}
.orb-2 {
  width: 460px;
  height: 460px;
  top: 30%;
  right: -160px;
  background: #6d28d9;
  animation: drift2 26s ease-in-out infinite alternate;
}
.orb-3 {
  width: 380px;
  height: 380px;
  bottom: -120px;
  left: 30%;
  background: #be185d;
  opacity: 0.22;
  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;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  background: rgba(10, 15, 28, 0.8);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
}

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

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

.nav {
  display: flex;
  gap: 30px;
}
.nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  padding: 6px 2px;
  transition: color 0.2s ease;
}
.nav a:hover {
  color: var(--text);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  border-radius: 2px;
  background: var(--grad);
  transition: width 0.25s ease;
}
.nav a:hover::after {
  width: 100%;
}

/* 汉堡按钮（移动端） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 首屏（纯视频背景：播放一次，结束定格） ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  padding: 0;
}

/* 视频顶部的三个入口 */
.hero-top {
  position: absolute;
  top: calc(var(--header-h) + 26px);
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 16px;
}
.hero-top a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 15, 28, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.hero-top a:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(10, 15, 28, 0.72);
}

/* ---------- 首屏背景视频 ---------- */
.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* 仅顶部轻微压暗，保证顶栏文字可读，视频颜色保持正常 */
  background: linear-gradient(
    180deg,
    rgba(10, 15, 28, 0.45) 0,
    rgba(10, 15, 28, 0) 220px
  );
}

/* 声音开关（网页右上角） */
.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font);
  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(34, 211, 238, 0.45);
  background: var(--surface-2);
}
.sound-toggle.on {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
}


/* ---------- 通用区块 ---------- */
.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: 16px;
  background: var(--sec-soft);
  border: 1px solid var(--sec-line);
}
.section-no {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--sec);
  margin-bottom: 2px;
}
.section-head h2 {
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 800;
  line-height: 1.3;
}
.section-desc-left {
  color: var(--muted);
  margin: 10px 0 40px 74px;
  max-width: 560px;
}

/* 每个版块的主题色 */
.sec-mini {
  --sec: #22d3ee;
  --sec-soft: rgba(34, 211, 238, 0.12);
  --sec-line: rgba(34, 211, 238, 0.4);
}
.sec-quiz {
  --sec: #a78bfa;
  --sec-soft: rgba(167, 139, 250, 0.12);
  --sec-line: rgba(167, 139, 250, 0.4);
}
.sec-dl {
  --sec: #fbbf24;
  --sec-soft: rgba(251, 191, 36, 0.12);
  --sec-line: rgba(251, 191, 36, 0.4);
}

/* ---------- 卡片通用（小游戏 / 测试问卷） ---------- */
.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: var(--surface);
  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: var(--surface-2);
  box-shadow: 0 18px 44px rgba(2, 8, 23, 0.5);
}
.game-card:hover::before,
.quiz-card:hover::before {
  opacity: 1;
}

.game-card h3,
.quiz-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.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: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  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: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  padding: 4px 10px;
  border-radius: 999px;
}
.game-tag .dot {
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}

/* 在线状态（绿色） */
.game-tag.tag-on,
.quiz-tag.tag-on {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.25);
}
.game-tag.tag-on .dot,
.quiz-tag.tag-on .dot {
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

/* 小游戏图标 */
.game-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  font-size: 38px;
  border-radius: 18px;
  background: var(--surface-2);
  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: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: transform 0.25s ease;
}
.quiz-card:hover .quiz-icon {
  transform: scale(1.08) rotate(-4deg);
}
.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 {
  background: var(--sec);
  box-shadow: 0 0 8px var(--sec);
}
.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: var(--surface);
  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: var(--surface-2);
  box-shadow: 0 18px 44px rgba(2, 8, 23, 0.5);
}
.dl-cover {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  font-size: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(244, 114, 182, 0.1));
  border: 1px solid var(--border);
}
.dl-info h3 {
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dl-size {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  background: var(--surface-2);
  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: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}
.dl-btn {
  padding: 11px 24px;
  border-radius: 999px;
  background: linear-gradient(120deg, #f59e0b, #f472b6);
  color: #1a1005;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

/* ---------- 关于 ---------- */
.section-title {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 800;
  text-align: center;
}
.section-title::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad);
  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: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.about-card h3 {
  font-size: 17px;
  margin-bottom: 16px;
}
.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: rgba(255, 255, 255, 0.015);
}
.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(17, 24, 39, 0.92);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 12px 40px rgba(2, 8, 23, 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);
  }
  .nav-toggle {
    display: inline-flex;
  }
  .nav {
    display: none;
    position: absolute;
    top: calc(var(--header-h) + 8px);
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: rgba(13, 20, 36, 0.97);
    border: 1px solid var(--border);
    border-radius: 14px;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 44px rgba(2, 8, 23, 0.5);
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    padding: 10px 12px;
  }
  .nav a::after {
    display: none;
  }
  .section {
    padding: 64px 0;
  }
  .hero {
    padding: calc(var(--header-h) + 64px) 0 64px;
  }
  .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;
  }
}
