:root {
  color-scheme: light;
  --navy: #0B0D2E;
  --navy-elev: #141747;
  --navy-line: rgba(243, 238, 232, 0.14);
  --ivory: #F3EEE8;
  --ivory-soft: #FAF7F2;
  --white: #FFFFFF;
  --ink: #12142B;
  --ink-soft: #43476B;
  --ink-mute: #676B8E;
  --line: rgba(11, 13, 46, 0.12);
  --pink: #FF3D80;
  --purple: #7D4DFF;
  --cyan: #06E5D0;
  --cyan-ink: #007A6E;
  --purple-ink: #5A2ED6;
  --pink-ink: #C81E5D;
  --max-w: 1180px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  --r-md: 14px;
  --r-lg: 20px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  background: var(--navy);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

:root[data-lang="en"] .zh-only { display: none !important; }
:root[data-lang="zh"] .en-only { display: none !important; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

.tri-bar {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--pink) 0%, var(--purple) 52%, var(--cyan) 100%);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 46, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--navy-line);
  color: var(--ivory);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ivory);
  flex-shrink: 0;
}

.brand-link img {
  height: 28px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(243, 238, 232, 0.8);
}

.header-nav a:hover {
  color: var(--cyan);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(243, 238, 232, 0.24);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: rgba(243, 238, 232, 0.78);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
}

.lang-switch button.is-active {
  background: var(--ivory);
  color: var(--navy);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--pink);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(255, 61, 128, 0.28);
}

.btn-primary:hover {
  background: #ff2570;
}

.btn-secondary {
  background: rgba(243, 238, 232, 0.08);
  color: var(--ivory);
  border-color: rgba(243, 238, 232, 0.24);
}

.btn-secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-dark-outline {
  background: var(--white);
  color: var(--navy);
  border-color: var(--line);
}

.btn-dark-outline:hover {
  border-color: var(--purple);
  color: var(--purple-ink);
}

/* Hero */
.hero {
  position: relative;
  background:
    radial-gradient(620px 360px at 82% 18%, rgba(125, 77, 255, 0.22), transparent 66%),
    radial-gradient(500px 340px at 14% 78%, rgba(6, 229, 208, 0.14), transparent 64%),
    radial-gradient(460px 260px at 56% 12%, rgba(255, 61, 128, 0.14), transparent 62%),
    var(--navy);
  color: var(--ivory);
  padding: 76px 0 88px;
  border-bottom: 1px solid var(--navy-line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(243, 238, 232, 0.09);
  border: 1px solid rgba(243, 238, 232, 0.18);
  color: var(--cyan);
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #ffffff;
}

.hero-sub {
  margin: 0 0 30px;
  font-size: 18px;
  line-height: 1.65;
  color: rgba(243, 238, 232, 0.82);
  max-width: 56ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-showcase {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(243, 238, 232, 0.14);
  border-radius: var(--r-lg);
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.hero-lockup {
  width: min(320px, 100%);
  margin: 0 auto 24px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(243, 238, 232, 0.12);
}

.stat-item strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.stat-item span {
  display: block;
  font-size: 12px;
  color: rgba(243, 238, 232, 0.72);
  margin-top: 2px;
}

/* Light Sections */
.section {
  padding: 76px 0;
}

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

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--purple-ink);
  margin-bottom: 8px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--navy);
}

.section-lead {
  margin: 8px 0 0;
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* Pillars */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.pillar-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 26px;
  position: relative;
  overflow: hidden;
}

.pillar-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.pillar-accent.pink { background: var(--pink); }
.pillar-accent.purple { background: var(--purple); }
.pillar-accent.cyan { background: var(--cyan); }

.pillar-card h3 {
  margin: 8px 0 10px;
  font-size: 19px;
  font-weight: 750;
  color: var(--navy);
}

.pillar-card p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.game-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(11, 13, 46, 0.08);
  border-color: rgba(125, 77, 255, 0.35);
}

.game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.game-code {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-live {
  background: rgba(6, 229, 208, 0.18);
  color: var(--cyan-ink);
}

.badge-proto {
  background: rgba(125, 77, 255, 0.13);
  color: var(--purple-ink);
}

.badge-concept {
  background: rgba(255, 61, 128, 0.12);
  color: var(--pink-ink);
}

.game-card h3 {
  margin: 10px 0 8px;
  font-size: 22px;
  line-height: 1.25;
  color: var(--navy);
}

.game-card p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.game-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  background: var(--ivory);
  color: var(--navy);
  border: 1px solid var(--line);
}

.link-pill.primary {
  background: var(--navy);
  color: var(--ivory);
  border-color: var(--navy);
}

.link-pill:hover {
  border-color: var(--purple);
}

/* Docs Portal Band */
.docs-band {
  background: var(--navy);
  color: var(--ivory);
  padding: 68px 0;
}

.docs-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(243, 238, 232, 0.16);
  border-radius: var(--r-lg);
  padding: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.docs-panel h2 {
  margin: 8px 0 10px;
  font-size: clamp(24px, 3vw, 30px);
  color: #ffffff;
}

.docs-panel p {
  margin: 0;
  font-size: 15px;
  color: rgba(243, 238, 232, 0.8);
  max-width: 60ch;
}

/* Contact & Legal */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.info-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 28px;
}

.info-card h3 {
  margin: 0 0 14px;
  font-size: 19px;
  color: var(--navy);
}

.kv-list {
  display: grid;
  gap: 12px;
}

.kv-item {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.kv-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.kv-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.kv-val {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  overflow-wrap: anywhere;
}

.kv-val a {
  color: var(--purple-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(243, 238, 232, 0.72);
  padding: 34px 0 40px;
  border-top: 1px solid var(--navy-line);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--cyan);
}

/* Subpages (Privacy Policy) */
.legal-main {
  padding: 52px 0 76px;
}

.legal-sheet {
  max-width: 820px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 40px;
}

.legal-sheet h1 {
  margin: 0 0 10px;
  font-size: 32px;
  color: var(--navy);
}

.legal-meta {
  margin: 0 0 28px;
  font-size: 13px;
  color: var(--ink-mute);
}

.legal-sheet h2 {
  margin: 26px 0 8px;
  font-size: 19px;
  color: var(--navy);
}

.legal-sheet p, .legal-sheet li {
  font-size: 15px;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .hero-grid,
  .pillar-grid,
  .games-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .docs-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 680px) {
  .container {
    padding: 0 18px;
  }
  .header-nav {
    display: none;
  }
  .hero {
    padding: 48px 0 56px;
  }
  .section {
    padding: 52px 0;
  }
  .legal-sheet {
    padding: 24px 20px;
  }
}
