:root {
  --bg: #f8f6f2;
  --surface: #ffffff;
  --surface-alt: #f2ede6;
  --text: #1c1f26;
  --text-muted: #5c6370;
  --border: rgba(28, 31, 38, 0.08);
  --coral: #ff7a59;
  --mint: #2ec4b6;
  --violet: #7b61ff;
  --gold: #f59e0b;
  --sky: #4d96ff;
  --shadow: 0 12px 32px rgba(28, 31, 38, 0.07);
  --radius: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141a;
    --surface: #1c2029;
    --surface-alt: #252a36;
    --text: #f3f4f6;
    --text-muted: #a1a8b6;
    --border: rgba(255, 255, 255, 0.09);
    --shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "PingFang TC", "PingFang SC", "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.94rem;
  font-weight: 600;
}
.nav-links a {
  color: var(--text-muted);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  background: var(--surface-alt);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.lang-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Hero */
.hero {
  padding: 56px 0 42px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 36px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(255, 122, 89, 0.14);
  color: var(--coral);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.025em;
}

.hero p {
  font-size: 1.08rem;
  color: var(--text-muted);
  margin: 0 0 26px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.96rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-primary {
  background: linear-gradient(135deg, var(--coral), var(--gold));
  color: #fff;
  box-shadow: 0 10px 22px rgba(255, 122, 89, 0.3);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-card {
  width: 100%;
  max-width: 360px;
  padding: 28px 24px;
  border-radius: 30px;
  background: linear-gradient(145deg, #ff7a59, #ff9978);
  color: #fff;
  text-align: center;
  box-shadow: 0 22px 44px rgba(255, 122, 89, 0.28);
}

.hero-card img {
  width: 190px;
  height: 190px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.18));
  margin: 4px auto 8px;
  display: block;
}

.hero-card .balance-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.86;
}
.hero-card .balance-num {
  font-size: 2.3rem;
  font-weight: 800;
  margin: 2px 0 8px;
}
.hero-card .xp-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 0.82rem;
  font-weight: 700;
}

/* Sections */
.section {
  padding: 36px 0;
}
.section-title {
  font-size: 1.65rem;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.section-sub {
  color: var(--text-muted);
  margin: 0 0 26px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.06rem;
}
.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.piggy-stage {
  text-align: center;
  padding: 18px 14px;
}
.piggy-stage img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  margin-bottom: 8px;
}
.piggy-stage .stage-lv {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 2px;
}

/* Doc pages (Privacy / Support) */
.doc-wrap {
  max-width: 780px;
  margin: 36px auto 64px;
}
.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 36px 34px;
  box-shadow: var(--shadow);
}
.doc-card h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  letter-spacing: -0.02em;
}
.doc-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}
.doc-card h2 {
  font-size: 1.2rem;
  margin: 26px 0 10px;
}
.doc-card p, .doc-card li {
  color: var(--text-muted);
  font-size: 0.97rem;
}
.doc-card ul, .doc-card ol {
  padding-left: 20px;
}
.doc-card li {
  margin-bottom: 6px;
}

.faq-item {
  border-top: 1px solid var(--border);
  padding: 18px 0;
}
.faq-item:first-of-type {
  border-top: none;
  padding-top: 4px;
}
.faq-item h3 {
  margin: 0 0 6px;
  font-size: 1.04rem;
}
.faq-item p {
  margin: 0;
}

.contact-box {
  margin-top: 26px;
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--surface-alt);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.footer-links {
  display: flex;
  gap: 18px;
}
.footer-links a {
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 32px;
    text-align: center;
  }
  .hero p {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-links {
    display: none;
  }
  .doc-card {
    padding: 24px 20px;
  }
}
