/* 记忆翻牌乐 —— 官网样式
   三个页面（首页 / 用户协议 / 隐私政策）共用这一份。
   没有外部依赖，不引 CDN，断网也能正常显示。 */

:root {
  --brand: #4f5bd5;
  --brand-dark: #3b45b0;
  --brand-light: #eef0ff;
  --accent: #ff8a3d;
  --text: #1f2333;
  --text-muted: #6b7186;
  --border: #e4e6ef;
  --bg: #ffffff;
  --bg-soft: #f7f8fc;
  --radius: 12px;
  --maxw: 960px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 顶部导航 ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.logo:hover {
  text-decoration: none;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  flex: none;
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
}

.site-nav a {
  color: var(--text-muted);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--brand);
}

/* ---------- 首页 Hero ---------- */

.hero {
  background: linear-gradient(180deg, var(--brand-light) 0%, #fff 100%);
  padding: 64px 0 56px;
  text-align: center;
}

.hero h1 {
  font-size: 40px;
  line-height: 1.25;
  margin: 0 0 14px;
  letter-spacing: -0.5px;
}

.hero .tagline {
  font-size: 18px;
  color: var(--text-muted);
  margin: 0 auto;
  max-width: 620px;
}

.hero .cta {
  display: inline-block;
  margin-top: 28px;
  padding: 12px 30px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

.hero .cta:hover {
  background: var(--brand-dark);
  text-decoration: none;
}

/* ---------- 通用区块 ---------- */

section {
  padding: 56px 0;
}

section.soft {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

h2 {
  font-size: 26px;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}

.section-lead {
  color: var(--text-muted);
  margin: 0 0 32px;
  max-width: 680px;
}

/* ---------- 卡片栅格 ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  background: #fff;
}

.card .icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.card h3 {
  font-size: 17px;
  margin: 0 0 6px;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------- 玩法步骤 ---------- */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  color: var(--text-muted);
  font-size: 15px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.steps li strong {
  display: block;
  color: var(--text);
  font-size: 16px;
}

/* ---------- 法律页（协议 / 隐私） ---------- */

.page-head {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 40px 0 32px;
}

.page-head h1 {
  font-size: 30px;
  margin: 0 0 10px;
}

.page-head .meta {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.legal {
  padding: 40px 0 20px;
}

.legal h2 {
  font-size: 20px;
  margin: 36px 0 10px;
}

.legal h3 {
  font-size: 16px;
  margin: 22px 0 6px;
}

.legal p,
.legal li {
  color: #33374a;
}

.legal ol,
.legal ul {
  padding-left: 22px;
}

.legal li {
  margin-bottom: 6px;
}

.legal .notice {
  background: var(--brand-light);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 15px;
}

.legal .notice p:first-child {
  margin-top: 0;
}

.legal .notice p:last-child {
  margin-bottom: 0;
}

/* 第三方 SDK 表格 */
.table-scroll {
  overflow-x: auto;
  margin: 18px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  font-size: 14px;
}

th,
td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--bg-soft);
  font-weight: 600;
  white-space: nowrap;
}

td a {
  word-break: break-all;
}

/* ---------- 页脚 ---------- */

.site-footer {
  background: #23273a;
  color: #c3c7d6;
  padding: 40px 0 32px;
  font-size: 14px;
  margin-top: 40px;
}

.site-footer a {
  color: #c3c7d6;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.site-footer h4 {
  color: #fff;
  font-size: 14px;
  margin: 0 0 10px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 6px;
}

.copyright {
  border-top: 1px solid #383d55;
  padding-top: 20px;
  color: #8f95aa;
  font-size: 13px;
  line-height: 2;
}

.copyright p {
  margin: 0;
}

/* ---------- 移动端 ---------- */

@media (max-width: 600px) {
  .hero {
    padding: 44px 0 40px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero .tagline {
    font-size: 16px;
  }

  section {
    padding: 40px 0;
  }

  h2 {
    font-size: 22px;
  }

  .site-nav {
    gap: 16px;
    font-size: 14px;
  }
}
