:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  --bg: #f5f6fb;
  --surface: #ffffff;
  --text: #1f2430;
  --muted: #727a8d;
  --border: #e7e9f2;
  --accent: #5b5bd6;
  --accent-dark: #4d4dc4;
  --accent-soft: #efefff;
  --success: #2f9e6e;
  --danger: #c9435a;
  --shadow-sm: 0 4px 16px rgba(31, 36, 48, 0.05);
  --shadow: 0 12px 36px rgba(31, 36, 48, 0.08);
  --shadow-lg: 0 24px 64px rgba(31, 36, 48, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1120px, calc(100% - 40px));
  min-height: 66px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #6d6de8, #4d4dc4);
  color: #fff;
  box-shadow: 0 6px 16px rgba(91, 91, 214, 0.3);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a {
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid rgba(91, 91, 214, 0.32);
  border-radius: 999px;
  background: linear-gradient(135deg, #f5f5ff, #ececff);
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.nav-upgrade svg {
  width: 15px;
  height: 15px;
}

.nav-upgrade:hover {
  color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
  border-color: rgba(91, 91, 214, 0.55);
  background: linear-gradient(135deg, #ececff, #dfdfff);
  box-shadow: 0 6px 16px rgba(91, 91, 214, 0.18);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 11px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, #6d6de8, #4d4dc4);
  color: #fff;
  box-shadow: 0 8px 22px rgba(91, 91, 214, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 10px 28px rgba(91, 91, 214, 0.38);
  color: #fff;
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.btn-small {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 20px 96px;
  background:
    radial-gradient(circle at 12% 8%, rgba(109, 109, 232, 0.16), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(109, 109, 232, 0.12), transparent 30%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(100deg, #6d6de8, #9b5bd6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 520px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.hero-visual {
  position: relative;
}

.mock-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-6deg) rotateX(3deg);
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: #fafaff;
}

.mock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e2e4ee;
}

.mock-body {
  padding: 20px;
}

.mock-group {
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow: hidden;
}

.mock-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--accent-soft);
  font-size: 14px;
  font-weight: 600;
}

.mock-count {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
}

.mock-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  border-top: 1px solid #f1f2f7;
}

.mock-favicon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #ececf6;
}

.mock-url {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.float-card {
  position: absolute;
  right: -18px;
  bottom: -26px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 13px;
}

.float-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eaf7f0;
  color: var(--success);
  font-size: 18px;
}

/* ---------- Common Sections ---------- */
.section {
  padding: 78px 20px;
}

.section.tint {
  background: #f0f1f8;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.container {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Plan Cards ---------- */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.plan-card.featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.plan-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.plan-name {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 700;
}

.plan-desc {
  min-height: 42px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 20px;
}

.plan-price .currency {
  font-size: 18px;
  font-weight: 600;
}

.plan-price .amount {
  font-size: 38px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.plan-price .period {
  color: var(--muted);
  font-size: 13px;
}

.plan-saving {
  margin: -8px 0 16px;
  padding: 8px 12px;
  border-radius: 9px;
  background: #fff7e8;
  color: #9a6212;
  font-size: 13px;
  font-weight: 600;
}

.plan-features {
  display: grid;
  gap: 11px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.plan-features li::before {
  content: "✓";
  flex: none;
  color: var(--success);
  font-weight: 700;
}

.plan-card .btn {
  margin-top: auto;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 10px;
}

.site-footer .footer-links a {
  color: var(--muted);
}

.site-footer .footer-links a:hover {
  color: var(--accent);
}

/* ---------- Policy Documents ---------- */
.policy-wrap {
  width: min(780px, calc(100% - 32px));
  margin: 56px auto;
}

.policy-doc {
  padding: 40px 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.policy-doc h1 {
  margin: 0 0 6px;
  font-size: 30px;
  letter-spacing: -0.02em;
}

.policy-doc .updated {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.policy-doc .intro {
  margin: 0 0 28px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}

.policy-doc h2 {
  margin: 30px 0 10px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.policy-doc p,
.policy-doc li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.policy-doc p {
  margin: 0 0 12px;
}

.policy-doc ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.policy-doc a {
  color: var(--accent);
}

.policy-doc .callout {
  margin: 18px 0;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: #f7f7fd;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

/* ---------- Auth / Form Pages ---------- */
.auth-wrap,
.panel-wrap {
  width: min(460px, calc(100% - 32px));
  margin: 64px auto;
}

.panel-wrap.wide {
  width: min(760px, calc(100% - 32px));
}

.panel {
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.panel h1 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.panel .subtitle {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 14px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 91, 214, 0.12);
}

.form-error {
  min-height: 20px;
  margin: 4px 0 12px;
  color: var(--danger);
  font-size: 13px;
}

.switch-auth {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.switch-auth button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Status Bar ---------- */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.status-pill.free {
  background: #f0f1f7;
  color: var(--muted);
}

.status-pill.paid {
  background: #eaf7f0;
  color: var(--success);
}

.status-note {
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Orders ---------- */
.order-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
}

.order-row .order-main {
  display: grid;
  gap: 3px;
}

.order-row .order-meta {
  color: var(--muted);
  font-size: 12px;
}

.order-status {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.order-status.pending {
  background: #fff4e2;
  color: #a8680f;
}

.order-status.paid {
  background: #eaf7f0;
  color: var(--success);
}

/* ---------- Payment Page ---------- */
.pay-summary {
  margin-bottom: 22px;
  padding: 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7f7ff, #f0f0fb);
  border: 1px solid var(--border);
}

.pay-amount {
  margin: 8px 0 0;
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.pay-rows {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 14px;
}

.pay-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.pay-row span:first-child {
  color: var(--muted);
}

.pay-success {
  text-align: center;
  padding: 20px 0;
}

.success-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #eaf7f0;
  color: var(--success);
  font-size: 32px;
}

.pay-success h1 {
  margin: 0 0 8px;
}

.pay-success p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.hint-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff7e8;
  color: #9a6212;
  font-size: 13px;
  line-height: 1.7;
}

.loading {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-visual {
    max-width: 460px;
  }
  .feature-grid,
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .plan-card.featured {
    transform: none;
  }
  .nav-links {
    gap: 14px;
  }
}

@media (max-width: 520px) {
  .nav-links a.hide-mobile {
    display: none;
  }
  .hero {
    padding-top: 56px;
  }
  .panel {
    padding: 24px;
  }
  .float-card {
    right: 0;
  }
}
