:root {
  --bg: #faf8f4;
  --bg-alt: #f3efe7;
  --fg: #1d1c18;
  --muted: #6d6a5e;
  --accent: #3d8b5f;
  --accent-strong: #2f6b49;
  --accent-soft: #e7f0ea;
  --warm: #d98a3d;
  --card: #ffffff;
  --border: #e6e1d6;
  --shadow: 0 10px 30px rgba(31, 41, 34, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141412;
    --bg-alt: #1a1a17;
    --fg: #eae7df;
    --muted: #a3a094;
    --accent: #5cc08a;
    --accent-strong: #79d3a0;
    --accent-soft: #1d2b22;
    --warm: #e0a05c;
    --card: #1c1c18;
    --border: #2c2b25;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  font-size: 17px;
}

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

main { flex: 1 0 auto; }

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

/* 语言切换：默认中文，?lang=en 显示英文 */
html:not([lang="en"]) .en { display: none; }
html[lang="en"] .zh { display: none; }
[hidden] { display: none !important; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
}
.nav a:hover { color: var(--fg); background: var(--bg-alt); text-decoration: none; }
.lang-toggle {
  margin-left: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-toggle:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 80px 0 64px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(1000px 420px at 50% -12%, var(--accent-soft), transparent 70%);
}
.hero .eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(40px, 7vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.hero .sub {
  margin: 0 auto;
  max-width: 600px;
  color: var(--muted);
  font-size: 19px;
}
.hero .cta { margin-top: 30px; }
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { background: var(--accent-strong); text-decoration: none; transform: translateY(-1px); }
.btn.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}
.btn.ghost:hover { background: var(--bg-alt); }

/* 产品页 hero */
.app-hero .app-icon {
  width: 120px; height: 120px;
  border-radius: 28px;
  box-shadow: var(--shadow);
  margin: 0 auto 24px;
  display: block;
}
.app-hero h1 { font-size: clamp(34px, 5vw, 48px); }
.app-hero .tagline { color: var(--accent); font-weight: 600; font-size: 18px; margin: 0 0 12px; }

/* ===== 游戏风格 Hero（首页） ===== */
.game-hero {
  position: relative;
  padding: 88px 0 96px;
  color: #eef5ef;
  background:
    radial-gradient(900px 480px at 82% -12%, rgba(92, 192, 138, 0.4), transparent 62%),
    radial-gradient(700px 400px at 8% 110%, rgba(217, 138, 61, 0.18), transparent 60%),
    linear-gradient(160deg, #0e2a1b 0%, #173f2a 55%, #0c2418 100%);
  overflow: hidden;
}
.game-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.game-hero-copy .badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #9fe6bb;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 22px;
}
.game-hero-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 900;
  color: #ffffff;
}
.game-hero-copy .tagline {
  color: #9fe6bb;
  font-size: 20px;
  font-weight: 600;
}
.game-hero-copy .sub {
  margin: 14px 0 28px;
  color: rgba(238, 245, 239, 0.72);
  font-size: 17px;
  max-width: 460px;
}
.game-hero-copy .cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.game-hero .btn {
  background: #5cc08a;
  color: #0e2a1b;
}
.game-hero .btn:hover { background: #79d3a0; }
.game-hero .btn.ghost {
  color: #eef5ef;
  border-color: rgba(255, 255, 255, 0.35);
  background: transparent;
}
.game-hero .btn.ghost:hover { background: rgba(255, 255, 255, 0.08); color: #eef5ef; }
.game-hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.game-hero-visual .shot {
  width: 240px;
  height: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}
.game-hero-visual .shot-a { transform: rotate(-5deg) translateY(12px); z-index: 1; }
.game-hero-visual .shot-b { transform: rotate(5deg) translateY(-12px); margin-left: -34px; }

@media (max-width: 800px) {
  .game-hero-grid { grid-template-columns: 1fr; }
  .game-hero-visual { display: none; }
}

/* ===== 区块通用 ===== */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head .kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.section-head h2 {
  margin: 8px 0 12px;
  font-size: 32px;
  letter-spacing: -0.02em;
}
.section-head p { margin: 0; color: var(--muted); }

/* ===== 作品 / 游戏卡片 ===== */
.games-carousel { position: relative; }
.games-grid {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 16px;
  scrollbar-width: none;
}
.games-grid::-webkit-scrollbar { display: none; }
.game-card {
  flex: 0 0 340px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.game-card:hover { transform: translateY(-3px); text-decoration: none; }
.game-card .icon {
  flex: 0 0 auto;
  width: 84px; height: 84px;
  border-radius: 20px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}
.game-card .body { flex: 1 1 auto; }
.game-card .title-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.game-card h3 { margin: 0; font-size: 24px; color: var(--fg); }
.game-card .tagline { color: var(--accent); font-weight: 600; font-size: 16px; }
.card-title { display: block; color: inherit; }
.card-title:hover { text-decoration: none; }
.card-title:hover h3 { color: var(--accent); }
.game-card .desc { margin: 10px 0 16px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.game-card .actions { display: flex; flex-wrap: wrap; gap: 14px; font-size: 15px; }
.game-card .arrow { align-self: center; color: var(--muted); font-size: 22px; }
.game-card .icon img { width: 100%; height: 100%; border-radius: 20px; object-fit: cover; display: block; }

/* ===== 截图画廊 ===== */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.shot { margin: 0; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.shot figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.more-card {
  flex: 0 0 340px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  min-height: 200px;
}

/* 游戏左右翻动箭头 */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.carousel-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.carousel-btn.prev { left: -14px; }
.carousel-btn.next { right: -14px; }

/* ===== 关于 ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.about-item { padding: 8px 4px; }
.about-item .em { font-size: 30px; margin-bottom: 12px; }
.about-item h3 { margin: 0 0 6px; font-size: 18px; }
.about-item p { margin: 0; color: var(--muted); }

/* ===== 联系（首页大卡片） ===== */
.contact-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
}
.contact-card .label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}
.contact-card a { font-size: 22px; font-weight: 700; word-break: break-all; }

/* 内容页内的联系邮箱框（紧凑） */
.contact-box {
  margin: 24px 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}
.contact-box .label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.contact-box a { font-size: 18px; font-weight: 600; }

/* ===== 页脚（紧凑居中，sticky 底部） ===== */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 28px 24px;
  color: var(--muted);
  font-size: 13px;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-brand { font-weight: 700; color: var(--fg); letter-spacing: -0.3px; }
.footer-sep { color: var(--border); }
.footer-copy { font-size: 12.5px; }
.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}
.footer-dot { color: var(--border); }
.footer-meta { font-size: 12px; opacity: 0.7; }
.site-footer a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }

/* ===== 内容页（support / privacy / teascore 产品页） ===== */
.page { padding: 32px 0 48px; }
.page .container { max-width: 760px; }
.page h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.page .lede { color: var(--muted); margin: 0 0 28px; }
.page h2 { margin: 32px 0 10px; font-size: 20px; }
.page h3 { margin: 24px 0 8px; font-size: 17px; }
.page p { margin: 0 0 14px; }
.page ul, .page ol { margin: 0 0 16px; padding-left: 22px; }
.page li { margin: 6px 0; }
.page .updated { color: var(--muted); font-size: 14px; }

.faq { list-style: none; padding-left: 0; }
.faq li {
  margin: 0 0 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}
.faq .q { font-weight: 600; margin-bottom: 4px; }
.faq .a { color: var(--muted); margin: 0; }

.backlink { font-size: 14px; color: var(--muted); }

@media (max-width: 640px) {
  .nav { gap: 2px; }
  .nav a { padding: 8px 8px; font-size: 14px; }
  .hero { padding: 56px 0 48px; }
  .game-card { flex-direction: column; padding: 24px; flex-basis: 280px; }
  .more-card { flex-basis: 280px; }
  .game-card .icon { width: 64px; height: 64px; font-size: 34px; }
  .game-card .arrow { display: none; }
  .section { padding: 48px 0; }
  .contact-card { padding: 28px 20px; }
  .contact-card a { font-size: 18px; }
  .page h1 { font-size: 26px; }
}
