:root {
  --bg-deep: #0c1014;
  --bg-mid: #141a22;
  --ink: #f3efe6;
  --ink-muted: #a8a194;
  --gold: #c6a45a;
  --gold-soft: #e0c88a;
  --line: rgba(198, 164, 90, 0.28);
  --panel: rgba(20, 26, 34, 0.92);
  --danger: #e07a6a;
  --radius: 4px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-deep);
  line-height: 1.55;
}

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

button,
input {
  font: inherit;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 55% at 15% 10%, rgba(198, 164, 90, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 20%, rgba(70, 100, 130, 0.22), transparent 50%),
    linear-gradient(165deg, #0b0f14 0%, #121820 45%, #0a0d11 100%);
  animation: ambient-drift 18s ease-in-out infinite alternate;
}

@keyframes ambient-drift {
  from { filter: hue-rotate(0deg) brightness(1); }
  to { filter: hue-rotate(8deg) brightness(1.05); }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(12, 16, 20, 0.55);
  border-bottom: 1px solid transparent;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lang-switcher-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-switcher-label {
  font-size: 0.72rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

.lang-switcher {
  appearance: none;
  min-height: 2rem;
  max-width: 9.5rem;
  padding: 0.3rem 1.6rem 0.3rem 0.55rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%) calc(100% - 12px) / 5px 5px no-repeat,
    linear-gradient(135deg, var(--gold) 50%, transparent 50%) calc(100% - 7px) / 5px 5px no-repeat,
    rgba(0, 0, 0, 0.28);
  color: var(--ink);
  font-size: 0.78rem;
  cursor: pointer;
}

.lang-switcher:focus {
  outline: 1px solid var(--gold);
}

.result-lang {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
}

html[dir="rtl"] .topbar-right {
  flex-direction: row-reverse;
}

html[dir="rtl"] .result-lang {
  right: auto;
  left: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold-soft);
}

.nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

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

.nav-wa {
  color: var(--gold) !important;
}

.hero {
  min-height: calc(100vh - 4.5rem);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 6vh, 4rem) clamp(1.25rem, 4vw, 3rem) 3rem;
}

.brand-mark {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 10vw, 6.5rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: 0.04em;
  color: var(--ink);
  animation: rise-in 0.9s ease both;
}

.tagline {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--gold-soft);
  animation: rise-in 1s ease 0.1s both;
}

.lede {
  margin: 1.1rem 0 0;
  max-width: 28rem;
  color: var(--ink-muted);
  font-size: 1.02rem;
  animation: rise-in 1s ease 0.18s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
  animation: rise-in 1s ease 0.28s both;
}

.pay-note {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
  animation: rise-in 1s ease 0.35s both;
}

.pay-note.warn {
  color: var(--danger);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-primary,
.btn-ghost,
.btn-secondary,
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #d4b36a, #a8843c);
  color: #1a1408;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-soft);
}

.btn-secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

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

.btn-whatsapp {
  background: #1f3d32;
  border-color: #2f6b54;
  color: #b8e6d2;
}

.btn-whatsapp:hover {
  background: #274f41;
}

.btn-block {
  width: 100%;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
}

.pp-card {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 1.586 / 1;
  border-radius: 18px;
  padding: 1.6rem 1.7rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 40%),
    linear-gradient(160deg, #1c2430 0%, #0f141b 55%, #1a1510 100%);
  border: 1px solid rgba(198, 164, 90, 0.35);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  animation: card-float 5.5s ease-in-out infinite;
}

@keyframes card-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(-1deg); }
}

.pp-card-shine {
  position: absolute;
  inset: -40% -20%;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.12) 48%, transparent 62%);
  animation: shine-sweep 4.5s ease-in-out infinite;
}

@keyframes shine-sweep {
  0%, 100% { transform: translateX(-30%); }
  50% { transform: translateX(30%); }
}

.pp-card-brand {
  position: relative;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.12em;
  color: var(--gold-soft);
}

.pp-card-title {
  position: absolute;
  left: 1.7rem;
  bottom: 1.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--ink-muted);
}

.pp-card-price {
  position: absolute;
  right: 1.2rem;
  bottom: 1.4rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--ink);
}

.pp-card-chip {
  position: absolute;
  top: 48%;
  left: 1.7rem;
  width: 42px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #d8c07a, #8f7340);
  opacity: 0.9;
}

.support {
  padding: 4rem clamp(1.25rem, 4vw, 3rem) 5rem;
  border-top: 1px solid var(--line);
  max-width: 720px;
}

.support h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 600;
}

.support > p {
  margin: 0.6rem 0 0;
  color: var(--ink-muted);
}

.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--ink-muted);
  font-size: 0.85rem;
}

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

/* Modal */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.modal-panel {
  position: relative;
  width: min(100%, 420px);
  padding: 1.75rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: rise-in 0.25s ease both;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.85rem;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-panel h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
}

.modal-price {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold-soft);
}

.modal-price span {
  font-size: 1rem;
  color: var(--ink-muted);
}

.modal-desc {
  margin: 0.5rem 0 1.25rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.field input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  outline: none;
}

.field input:focus {
  border-color: var(--gold);
}

.form-error {
  margin: 0.75rem 0 0;
  color: var(--danger);
  font-size: 0.88rem;
}

/* Chat */
.chat-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 30;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #2a3340, #171d26);
  color: var(--gold-soft);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.chat-fab:hover {
  transform: scale(1.05);
}

.chat-panel[hidden] {
  display: none;
}

.chat-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 5.25rem;
  z-index: 31;
  width: min(calc(100vw - 2rem), 360px);
  height: min(70vh, 480px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  animation: rise-in 0.25s ease both;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.chat-header strong {
  display: block;
  font-size: 0.95rem;
}

.chat-header span {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.chat-close {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 1.35rem;
  cursor: pointer;
  line-height: 1;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.bubble {
  max-width: 88%;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.bubble.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.bubble.user {
  align-self: flex-end;
  background: rgba(198, 164, 90, 0.2);
  color: var(--gold-soft);
}

.chat-tools {
  padding: 0 1rem 0.5rem;
}

.chat-wa {
  display: inline-flex;
  font-size: 0.8rem;
  color: #8fd4b3;
  border-bottom: 1px solid rgba(143, 212, 179, 0.35);
}

.chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  padding: 0.6rem 0.75rem;
  outline: none;
}

.chat-form button {
  border: 0;
  border-radius: var(--radius);
  background: var(--gold);
  color: #1a1408;
  font-weight: 600;
  padding: 0 0.9rem;
  cursor: pointer;
}

/* Result pages */
.result-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  text-align: center;
}

.result-page h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
}

.result-page p {
  margin: 0.85rem auto 0;
  max-width: 28rem;
  color: var(--ink-muted);
}

.result-actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

@media (max-width: 860px) {
  body {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }

  .topbar {
    padding: 0.85rem 1rem;
    padding-top: max(0.85rem, env(safe-area-inset-top));
    flex-wrap: wrap;
  }

  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .lang-switcher-label {
    display: none;
  }

  .lang-switcher {
    max-width: 8.2rem;
  }

  .logo {
    font-size: 1.35rem;
  }

  .nav {
    gap: 0.75rem;
    font-size: 0.82rem;
  }

  .nav a:not(.nav-wa) {
    display: inline;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 1.25rem 1rem 2rem;
    gap: 1.5rem;
  }

  .hero-visual {
    order: -1;
    min-height: auto;
  }

  .pp-card {
    width: min(100%, 300px);
    margin: 0 auto;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 14vw, 3.8rem);
  }

  .tagline {
    font-size: 1.25rem;
  }

  .lede {
    font-size: 0.95rem;
  }

  .cta-row {
    flex-direction: column;
    margin-top: 1.35rem;
  }

  .cta-row .btn-primary,
  .cta-row .btn-ghost {
    width: 100%;
    min-height: 3.15rem;
    font-size: 1rem;
  }

  /* 手机首屏 CTA 保留，底部 dock 作常驻入口 */
  .chat-fab {
    display: none;
  }

  .support {
    padding: 2.5rem 1rem 2rem;
  }

  .support-actions .btn-whatsapp {
    width: 100%;
    min-height: 3.15rem;
  }

  .footer {
    padding: 1.25rem 1rem 1.5rem;
    font-size: 0.8rem;
  }

  .modal-panel {
    width: min(100%, 420px);
    max-height: min(90vh, 640px);
    overflow-y: auto;
    padding: 1.35rem 1.15rem calc(1.35rem + env(safe-area-inset-bottom, 0px));
  }

  .mobile-dock {
    display: flex;
  }
}

/* 手机底部固定栏：购买 + WhatsApp */
.mobile-dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  background: rgba(12, 16, 20, 0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}

.mobile-dock-buy,
.mobile-dock-wa {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}

.mobile-dock-buy {
  background: linear-gradient(135deg, #d4b36a, #a8843c);
  color: #1a1408;
}

.mobile-dock-wa {
  background: #1f3d32;
  border: 1px solid #2f6b54 !important;
  color: #b8e6d2;
}

@media (min-width: 861px) {
  .mobile-dock {
    display: none !important;
  }
}

