/* === Design System === */
:root {
  --primary: #0EA5E9;
  --primary-dark: #0284C7;
  --primary-light: #38BDF8;
  --cta: #F97316;
  --cta-dark: #EA580C;
  --bg: #F0F9FF;
  --bg-white: #FFFFFF;
  --text: #0C4A6E;
  --text-muted: #475569;
  --text-light: #94A3B8;
  --border: #E2E8F0;
  --success: #10B981;
  --error: #EF4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Work Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Outfit', 'PingFang SC', sans-serif; font-weight: 600; }

.page { display: none; min-height: 100vh; }
.page.active { display: block; }

/* === Navbar === */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 60px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 18px;
  color: var(--text);
}
.nav-logo { width: 24px; height: 24px; color: var(--primary); }
.nav-actions, .nav-user { display: flex; align-items: center; gap: 8px; }
.nav-username {
  font-size: 14px; color: var(--text-muted);
  padding: 4px 12px;
  background: var(--bg); border-radius: 20px;
}
.nav-btn {
  padding: 6px 16px; border-radius: 6px;
  font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .2s;
  border: none;
}
.nav-btn-ghost {
  background: transparent; color: var(--text-muted);
}
.nav-btn-ghost:hover { color: var(--primary); background: var(--bg); }
.nav-btn-primary {
  background: var(--primary); color: #fff;
}
.nav-btn-primary:hover { background: var(--primary-dark); }

/* === Hero === */
.hero {
  padding: 120px 24px 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-white) 100%);
}
.hero-inner { max-width: 640px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  padding: 4px 14px; margin-bottom: 20px;
  font-size: 13px; font-weight: 500;
  color: var(--primary); background: rgba(14,165,233,.1);
  border-radius: 20px; border: 1px solid rgba(14,165,233,.2);
}
.hero h1 {
  font-size: clamp(32px, 7vw, 48px);
  line-height: 1.2; margin-bottom: 16px;
  color: var(--text);
}
.hero-desc {
  font-size: 16px; line-height: 1.8;
  color: var(--text-muted); margin-bottom: 32px;
}
.btn-cta {
  display: inline-block;
  padding: 14px 40px; border: none;
  background: var(--cta); color: #fff;
  font-size: 16px; font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-cta:hover { background: var(--cta-dark); }
.btn-cta:active { transform: scale(.97); }
.btn-full { width: 100%; }
.hero-price {
  margin-top: 12px;
  font-size: 14px; color: var(--text-light);
}

/* === Sections === */
.section {
  padding: 64px 24px;
  max-width: 960px; margin: 0 auto;
}
.section-title {
  text-align: center; font-size: 24px;
  margin-bottom: 8px; color: var(--text);
}
.section-subtitle {
  text-align: center; font-size: 14px;
  color: var(--text-muted); margin-bottom: 40px;
}
.section-title + .feature-grid,
.section-title + .flow-steps,
.section-title + .pricing-card,
.section-title + .service-grid { margin-top: 40px; }

/* === Features === */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.feature-item {
  background: var(--bg-white);
  padding: 32px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: box-shadow .2s;
}
.feature-item:hover { box-shadow: var(--shadow-md); }
.feature-icon {
  width: 48px; height: 48px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14,165,233,.1);
  border-radius: 10px;
}
.feature-icon svg { width: 24px; height: 24px; color: var(--primary); }
.feature-item h3 { font-size: 16px; margin-bottom: 8px; }
.feature-item p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* === Flow Steps === */
.flow-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: wrap; padding: 20px 0;
}
.flow-step { text-align: center; }
.step-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff; font-family: 'Outfit', sans-serif;
  font-size: 18px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px;
}
.step-text { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.step-line {
  width: 48px; height: 2px;
  background: var(--border);
  margin: 0 4px; margin-bottom: 28px;
}

/* === Pricing === */
.pricing-card {
  max-width: 420px; margin: 0 auto;
  background: var(--bg-white);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.pricing-label {
  font-size: 14px; font-weight: 600;
  color: var(--primary); text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 8px;
}
.pricing-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 48px; font-weight: 700;
  color: var(--text); margin-bottom: 24px;
}
.currency { font-size: 24px; vertical-align: super; }
.per { font-size: 16px; color: var(--text-muted); font-weight: 400; }
.pricing-list {
  list-style: none; text-align: left;
  margin-bottom: 32px;
}
.pricing-list li {
  padding: 8px 0;
  font-size: 15px; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border);
}
.pricing-list li:last-child { border-bottom: none; }
.pricing-list svg { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; }

/* === Sample === */
.sample-card {
  max-width: 540px; margin: 0 auto;
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sample-head {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(14,165,233,.05), rgba(56,189,248,.05));
  border-bottom: 1px solid var(--border);
}
.sample-avatar {
  width: 48px; height: 48px;
  background: rgba(14,165,233,.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.sample-avatar svg { width: 28px; height: 28px; color: var(--primary); }
.sample-name { font-weight: 600; font-size: 16px; }
.sample-tagline { font-size: 13px; color: var(--text-muted); }
.sample-content { padding: 24px; }
.blurred-content { filter: blur(3px); user-select: none; pointer-events: none; }
.sample-block { margin-bottom: 16px; }
.sample-block:last-child { margin-bottom: 0; }
.sample-block-title {
  font-size: 13px; font-weight: 600;
  color: var(--primary); margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: .5px;
}
.sample-block p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.sample-footer {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px;
  background: var(--bg);
  font-size: 13px; color: var(--text-light);
  border-top: 1px solid var(--border);
}
.sample-footer svg { color: var(--text-light); }

/* === Service === */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.service-item {
  background: var(--bg-white);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.service-icon {
  width: 40px; height: 40px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14,165,233,.08);
  border-radius: var(--radius-sm);
}
.service-icon svg { width: 20px; height: 20px; color: var(--primary); }
.service-item h4 { font-size: 15px; margin-bottom: 8px; }
.service-item p { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* === Footer === */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,.7);
  padding: 48px 24px 32px;
  text-align: center;
}
.footer-inner { max-width: 640px; margin: 0 auto; }
.footer-company {
  font-family: 'Outfit', sans-serif;
  font-size: 16px; font-weight: 600;
  color: #fff; margin-bottom: 8px;
}
.footer-meta { font-size: 13px; margin-bottom: 16px; }
.footer-links { margin-bottom: 12px; }
.footer-links a {
  color: rgba(255,255,255,.6);
  text-decoration: none; font-size: 13px;
  transition: color .2s;
}
.footer-links a:hover { color: #fff; }
.footer-icp { margin-bottom: 8px; }
.footer-icp a {
  color: rgba(255,255,255,.5);
  text-decoration: none; font-size: 12px;
}
.footer-icp a:hover { color: rgba(255,255,255,.8); }
.footer-copy { font-size: 12px; color: rgba(255,255,255,.4); }

/* === Auth Pages === */
.auth-container {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 24px 40px;
  background: var(--bg);
  position: relative;
}
.auth-back {
  position: absolute; top: 20px; left: 20px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-white);
  cursor: pointer;
  transition: all .2s;
}
.auth-back:hover { border-color: var(--primary); }
.auth-back svg { width: 20px; height: 20px; color: var(--text-muted); }
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 40px 32px;
  box-shadow: var(--shadow-md);
}
.auth-card h2 { font-size: 24px; margin-bottom: 4px; }
.auth-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13px; font-weight: 500;
  color: var(--text); margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-group input::placeholder { color: var(--text-light); }
.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14,165,233,.12);
}
.form-error {
  font-size: 13px; color: var(--error);
  min-height: 20px; margin-bottom: 4px;
}
.auth-switch {
  text-align: center;
  font-size: 14px; color: var(--text-muted);
  margin-top: 20px;
}
.auth-switch a {
  color: var(--primary); text-decoration: none; font-weight: 500;
}
.auth-switch a:hover { text-decoration: underline; }

/* === Quiz === */
.quiz-container {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 80px 24px 40px;
}
.quiz-header { text-align: center; margin-bottom: 32px; width: 100%; max-width: 560px; }
.quiz-header h2 { font-size: 20px; margin-bottom: 8px; }
.quiz-progress { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.progress-bar {
  width: 100%; height: 4px;
  background: var(--border); border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%; width: 20%;
  background: var(--primary);
  border-radius: 2px;
  transition: width .4s ease;
}
.quiz-card { width: 100%; max-width: 560px; }
.quiz-q {
  font-size: 17px; font-weight: 500;
  line-height: 1.6; margin-bottom: 24px;
  color: var(--text);
}
.quiz-options { display: flex; flex-direction: column; gap: 12px; }
.quiz-opt {
  width: 100%; text-align: left;
  padding: 14px 18px;
  font-size: 15px; font-family: inherit;
  color: var(--text);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s;
  line-height: 1.5;
}
.quiz-opt:hover {
  border-color: var(--primary);
  background: rgba(14,165,233,.04);
}
.quiz-opt:active { transform: scale(.98); }

/* === Preview === */
.preview-container {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 24px;
  text-align: center;
}
.preview-icon { margin-bottom: 16px; color: var(--primary); }
.preview-container h2 { font-size: 24px; margin-bottom: 6px; }
.preview-tagline { font-size: 15px; color: var(--text-muted); margin-bottom: 32px; }
.preview-card {
  width: 100%; max-width: 480px;
  position: relative;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  overflow: hidden;
}
.blurred-text { filter: blur(4px); user-select: none; pointer-events: none; }
.blurred-text p { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.7; }
.lock-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(2px);
}
.lock-overlay svg { color: var(--text-light); }
.lock-overlay span { font-size: 14px; font-weight: 500; color: var(--text-muted); }
.btn-pay {
  padding: 14px 48px;
  background: var(--cta); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.btn-pay:hover { background: var(--cta-dark); }
.preview-note { font-size: 13px; color: var(--text-light); margin-top: 10px; }
.preview-refund { font-size: 12px; color: var(--text-light); margin-top: 6px; }
.preview-refund a { color: var(--text-muted); }

/* === Result === */
.result-container {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 24px;
}
.result-card {
  width: 100%; max-width: 560px;
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 40px 32px;
  box-shadow: var(--shadow-md);
}
.result-head {
  text-align: center;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.result-head svg { color: var(--primary); margin-bottom: 12px; }
.result-head h2 { font-size: 22px; margin-bottom: 4px; }
.result-head p { font-size: 14px; color: var(--text-muted); }
.result-block { margin-bottom: 24px; }
.result-block h3 {
  font-size: 14px; font-weight: 600;
  color: var(--primary); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .5px;
}
.result-block p { font-size: 15px; line-height: 1.7; color: var(--text); }
.result-block ul { list-style: none; }
.result-block li {
  padding: 6px 0;
  font-size: 14px; color: var(--text);
  padding-left: 18px;
  position: relative;
}
.result-block li::before {
  content: '';
  position: absolute; left: 0; top: 14px;
  width: 6px; height: 6px;
  background: var(--primary); border-radius: 50%;
}
.result-stamp {
  text-align: center;
  padding-top: 24px; margin-top: 8px;
  border-top: 1px solid var(--border);
}
.result-stamp span {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--text-light); letter-spacing: 2px;
}
.result-stamp small { font-size: 12px; color: var(--text-light); }
.result-actions {
  display: flex; gap: 12px;
  margin-top: 24px;
}
.btn-outline {
  padding: 12px 24px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* === Legal === */
.legal-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}
.legal-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 32px;
}
.legal-header h2 { font-size: 22px; }
.legal-body h3 {
  font-size: 16px; margin-top: 28px; margin-bottom: 8px;
  color: var(--text);
}
.legal-body p {
  font-size: 14px; color: var(--text-muted); line-height: 1.8;
  margin-bottom: 6px;
}
.legal-date {
  font-size: 13px; color: var(--text-light); margin-bottom: 20px;
}

/* === Responsive === */
@media (max-width: 640px) {
  .navbar { padding: 0 16px; }
  .hero { padding: 100px 16px 40px; }
  .hero h1 { font-size: 28px; }
  .hero-desc { font-size: 15px; }
  .section { padding: 48px 16px; }
  .feature-grid, .service-grid { grid-template-columns: 1fr; }
  .flow-steps { flex-direction: column; gap: 0; }
  .step-line { width: 2px; height: 24px; margin: 4px 0; }
  .pricing-card { padding: 32px 20px; }
  .auth-card { padding: 32px 20px; }
  .result-card { padding: 28px 20px; }
  .result-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
