/* ─── CSS Reset & Variables ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #6C63FF;
  --green-dark: #5A52E0;
  --green-light: #EEF0FF;
  --green-bg: #F5F4FF;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e8e8e8;
  --gray-400: #bdbdbd;
  --gray-500: #9e9e9e;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-900: #212121;
  --white: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.07);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.12);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

[x-cloak] { display: none !important; }

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-center { text-align: center; }
.mt-12 { margin-top: 12px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-auto { margin-top: auto; }

/* ─── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: 60px;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--green);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--gray-700);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--green);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--gray-700);
  padding: 4px;
  line-height: 1;
}

/* ─── Language Switch ────────────────────────────────────────────────────── */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
}

.lang-btn {
  color: var(--gray-500);
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 3px;
  transition: color 0.15s;
}

.lang-btn:hover {
  color: var(--gray-800);
}

.lang-active {
  color: var(--primary);
  font-weight: 600;
}

.lang-divider {
  color: var(--gray-300);
  user-select: none;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: var(--font);
  line-height: 1.4;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}

.btn-outline:hover {
  background: var(--green-light);
}

.btn-lg {
  padding: 14px 36px;
  font-size: 1rem;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--gray-400);
}

/* ─── Tags ───────────────────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.tag-gray    { background: var(--gray-100); color: var(--gray-600); }
.tag-pink    { background: #fde8f0; color: #c0396e; }
.tag-blue    { background: #e3f0fd; color: #1a6bbf; }
.tag-yellow  { background: #fef9e3; color: #b07d10; }
.tag-purple  { background: #f0ebfd; color: #7c3aed; }
.tag-green   { background: var(--green-light); color: #1a7a4a; }
.tag-orange  { background: #fff0e6; color: #c05c00; }
.tag-teal    { background: #e6f7f4; color: #0e7b6c; }
.tag-red     { background: #fde8e8; color: #c0392b; }
.tag-indigo  { background: #eaecfd; color: #3444c2; }

/* ─── Progress bar ───────────────────────────────────────────────────────── */
.progress-track {
  background: var(--gray-200);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.progress-fill {
  background: var(--green);
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* ─── Grids ──────────────────────────────────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, #f8fffe 0%, #f0faf5 60%, #e8f5ee 100%);
  padding: 80px 0 60px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  align-items: start;
}

.hero-text {
  padding-top: 16px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--gray-900);
  letter-spacing: -0.5px;
}

.hero-highlight {
  color: var(--green);
  font-style: italic;
}

.hero-sub {
  color: var(--gray-600);
  font-size: 1.05rem;
  margin-top: 16px;
  margin-bottom: 28px;
  line-height: 1.7;
  max-width: 420px;
}

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

.featured-card {
  padding: 18px;
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

/* ─── Tag Cloud Section ──────────────────────────────────────────────────── */
.tag-cloud-section {
  background: var(--gray-50);
  padding: 64px 24px;
}

.tag-cloud-section .section-title {
  margin-bottom: 28px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}

.tag-cloud .tag {
  font-size: 0.85rem;
  padding: 7px 18px;
}

/* ─── Steps Section ──────────────────────────────────────────────────────── */
.steps-section {
  padding: 80px 24px;
  background: var(--white);
}

.steps-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-top: 48px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.step {
  flex: 1;
  text-align: center;
  padding: 0 24px;
}

.step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid var(--green);
  color: var(--green);
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.step-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.6;
}

.step-connector {
  width: 80px;
  height: 2px;
  background: var(--gray-200);
  margin-top: 26px;
  flex-shrink: 0;
}

/* ─── Section Titles ─────────────────────────────────────────────────────── */
.section-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.3px;
}

/* ─── Featured Tests Section ─────────────────────────────────────────────── */
.featured-section {
  background: var(--gray-50);
  padding: 80px 24px;
}

.featured-row {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.featured-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  border: 1.5px solid var(--gray-200);
}

.featured-item-reverse {
  direction: ltr;
}

.featured-label {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.featured-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 12px;
  line-height: 1.3;
}

.featured-desc {
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 16px;
}

.featured-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.illustration-placeholder {
  background: linear-gradient(135deg, var(--green-light), var(--green-bg));
  border-radius: 16px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.illustration-warm {
  background: linear-gradient(135deg, #fff0f3, #fde8f0);
}

.illustration-emoji {
  font-size: 5rem;
}

/* ─── FAQ ────────────────────────────────────────────────────────────────── */
.faq-section {
  background: var(--white);
  padding: 80px 24px;
}

.faq-list {
  margin-top: 40px;
}

.faq-item {
  border-bottom: 1px solid var(--gray-200);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
  text-align: left;
  gap: 16px;
  font-family: var(--font);
  transition: color 0.15s;
}

.faq-question:hover {
  color: var(--green);
}

.faq-chevron {
  font-size: 1.2rem;
  color: var(--green);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-chevron.rotated {
  transform: rotate(180deg);
}

.faq-answer {
  padding-bottom: 20px;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ─── Library Page ───────────────────────────────────────────────────────── */
.library-header {
  background: var(--white);
  padding: 64px 24px 48px;
  border-bottom: 1px solid var(--gray-200);
}

.library-title {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--gray-900);
  letter-spacing: -0.4px;
}

.library-subtitle {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--green);
  margin-top: 4px;
}

.library-desc {
  color: var(--gray-500);
  margin-top: 12px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.library-main {
  padding: 48px 0 80px;
  background: var(--gray-50);
  min-height: 60vh;
}

.test-card {
  padding: 24px;
  min-height: 280px;
}

.test-card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.test-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.test-card-desc {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.55;
  margin-bottom: 12px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.test-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 16px;
}

/* ─── Quiz Page ──────────────────────────────────────────────────────────── */
.quiz-container {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px 80px;
  background: var(--gray-50);
}

.quiz-inner {
  width: 100%;
  max-width: 640px;
}

.quiz-progress {
  margin-bottom: 40px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 8px;
  font-weight: 500;
}

.quiz-question-wrap {
  margin-bottom: 32px;
}

.quiz-test-name {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 12px;
}

.quiz-question {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.4;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  width: 100%;
  text-align: left;
  padding: 16px 22px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  font-size: 0.975rem;
  color: var(--gray-900);
  transition: border-color 0.15s, background 0.15s, opacity 0.2s;
  font-family: var(--font);
  line-height: 1.5;
  min-height: 56px;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--green);
  background: var(--green-bg);
}

.option-btn.selected {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.option-btn.dimmed {
  opacity: 0.35;
  cursor: not-allowed;
}

.option-btn:disabled {
  cursor: not-allowed;
}

/* ─── Not Found ──────────────────────────────────────────────────────────── */
.not-found-container {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.not-found-inner {
  text-align: center;
  max-width: 480px;
}

.not-found-emoji {
  font-size: 4rem;
  margin-bottom: 20px;
}

.not-found-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.not-found-desc {
  color: var(--gray-500);
  margin-bottom: 28px;
  line-height: 1.7;
}

/* ─── Result Page ────────────────────────────────────────────────────────── */
.result-container {
  padding: 64px 24px 80px;
  background: var(--gray-50);
  min-height: calc(100vh - 120px);
}

.result-header {
  text-align: center;
  margin-bottom: 32px;
}

.result-test-name {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 16px;
}

.result-type-badge {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 800;
  padding: 8px 24px;
  border-radius: 999px;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.result-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gray-900);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.result-body {
  margin-bottom: 32px;
}

.result-desc-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 20px;
  padding: 32px;
}

.result-description {
  color: var(--gray-700);
  font-size: 1.05rem;
  line-height: 1.8;
}

.result-save-prompt {
  background: #f0faf4;
  border: 1px solid #c3e6d1;
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 24px;
}

.result-save-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.result-save-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.result-save-desc {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.result-save-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.result-save-login {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin: 0;
}

.result-save-login a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.result-save-login a:hover {
  text-decoration: underline;
}

.result-share {
  text-align: center;
  margin-bottom: 28px;
}

.result-share-text {
  color: var(--gray-400);
  font-size: 0.9rem;
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Share page */
.share-source-banner {
  background: #f0faf4;
  border: 1px solid #c3e6cb;
  border-radius: 8px;
  padding: 10px 18px;
  text-align: center;
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.share-actions {
  margin-top: 32px;
}

.share-expired {
  text-align: center;
  padding: 64px 24px;
}

.share-expired-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.share-expired-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
}

.share-expired-desc {
  color: #888;
  margin-bottom: 28px;
}

/* Auth pages (login / register) */
.auth-page {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.auth-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
  padding: 40px;
  width: 100%;
  max-width: 480px;
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.auth-subtitle {
  color: var(--gray-400);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group input:focus {
  border-color: var(--green);
}

.form-hint {
  color: var(--gray-400);
  font-size: 0.8rem;
  margin-top: 4px;
}

.form-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  color: #b91c1c;
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.btn-full {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--gray-400);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--green);
  font-weight: 600;
}

/* Navbar user email */
.navbar-user-email {
  color: var(--green);
  font-size: 0.875rem;
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
  text-decoration: none;
}

.navbar-user-email:hover {
  text-decoration: underline;
}

/* Account page */
.account-page {
  padding: 48px 0;
}

.account-header {
  margin-bottom: 32px;
}

.account-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.account-email {
  color: var(--gray-400);
  font-size: 0.95rem;
}

.account-empty {
  text-align: center;
  padding: 48px 0;
}

.account-empty-text {
  color: var(--gray-400);
  margin-bottom: 20px;
}

.account-history {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  padding: 16px 20px;
  gap: 12px;
}

.history-test-name {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.history-result-type {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
}

.history-card-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.history-date {
  color: var(--gray-400);
  font-size: 0.85rem;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

/* Big 5 Result Bars */
.result-big5 {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 24px;
}

.big5-bar-row {
  margin-bottom: 20px;
}

.big5-bar-row:last-child {
  margin-bottom: 0;
}

.big5-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.big5-dim-name {
  font-weight: 600;
  color: var(--gray-900);
}

.big5-dim-level {
  font-weight: 700;
  font-size: 0.875rem;
}

/* ─── Pricing Page ───────────────────────────────────────────────────────── */
.pricing-hero {
  background: linear-gradient(160deg, var(--white) 0%, var(--green-bg) 100%);
  padding: 80px 24px 64px;
}

.pricing-title {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--gray-900);
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.pricing-sub {
  color: var(--gray-600);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

.pricing-cards-section {
  padding: 64px 24px;
  background: var(--white);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: 20px;
  padding: 36px 28px;
  position: relative;
}

.pricing-card-featured {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
  transform: scale(1.04);
  box-shadow: 0 8px 32px rgba(76, 175, 125, 0.3);
}

.plan-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.plan-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.plan-price {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
}

.plan-billing {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 24px;
}

.plan-features {
  list-style: none;
  margin-bottom: 28px;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

.pricing-card-featured .plan-features li {
  border-bottom-color: rgba(255,255,255,0.2);
}

.check {
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.pricing-card-featured .check {
  color: var(--white);
}

.plan-cta {
  font-size: 0.95rem;
  padding: 12px 24px;
}

.pricing-card-featured .btn-outline {
  border-color: var(--white);
  color: var(--white);
}

.pricing-card-featured .btn-outline:hover {
  background: rgba(255,255,255,0.15);
}

.pricing-card-featured .btn-primary {
  background: var(--white);
  color: var(--green);
  border-color: var(--white);
}

.pricing-card-featured .btn-primary:hover {
  background: var(--green-light);
}

/* Why Section */
.why-section {
  background: var(--gray-50);
  padding: 80px 24px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.why-card {
  text-align: center;
}

.why-icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.why-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.why-desc {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ─── About Page ─────────────────────────────────────────────────────────── */
.about-container {
  padding: 64px 24px 80px;
  background: var(--white);
}

.about-hero {
  margin-bottom: 56px;
}

.about-logo-big {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 16px;
}

.about-title {
  font-size: 2.4rem;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.about-tagline {
  color: var(--gray-500);
  font-size: 1.1rem;
  font-style: italic;
}

.about-body p {
  color: var(--gray-700);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 40px 0;
}

.about-value {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.about-value-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.about-value h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.about-value p {
  font-size: 0.875rem !important;
  color: var(--gray-600) !important;
  margin-bottom: 0 !important;
}

.about-disclaimer {
  font-size: 0.85rem !important;
  color: var(--gray-500) !important;
  font-style: italic;
  padding: 16px 20px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gray-300, #ccc);
  margin-top: 24px;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 28px 24px 20px;
}

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

.footer-copy {
  color: var(--gray-400);
  font-size: 0.85rem;
}

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

.footer-links a {
  color: var(--gray-400);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s;
}

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

.disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 14px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--gray-200);
    z-index: 50;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    border-bottom: 1px solid var(--gray-100);
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
  }

  .hamburger {
    display: block;
  }

  .navbar-inner {
    position: relative;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-cards {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .steps-row {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .step-connector {
    width: 2px;
    height: 40px;
    margin: 0;
  }

  .featured-item {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card-featured {
    transform: none;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .about-values {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .result-actions {
    flex-direction: column;
    align-items: center;
  }

  .quiz-question {
    font-size: 1.15rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── 2-column Pricing Grid ──────────────────────────────────────────────── */
.pricing-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 680px;
}

/* ─── Membership Required Page ───────────────────────────────────────────── */
.membership-required-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 80px 24px;
}

.membership-required-inner {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.mr-icon {
  font-size: 5rem;
  margin-bottom: 24px;
}

.mr-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.mr-subtitle {
  font-size: 1.05rem;
  color: var(--gray-600);
  margin-bottom: 32px;
  line-height: 1.7;
}

.mr-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 36px;
  text-align: left;
  background: var(--gray-50);
  border-radius: 14px;
  padding: 20px 24px;
}

.mr-feature {
  font-size: 0.95rem;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 10px;
}

.mr-check {
  color: var(--green);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.mr-back {
  margin-top: 20px;
}

.mr-back a {
  color: var(--gray-400);
  font-size: 0.875rem;
  text-decoration: none;
}

.mr-back a:hover {
  color: var(--gray-700);
}

/* ─── Membership Status (Account Page) ───────────────────────────────────── */
.membership-status {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.membership-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.membership-badge-gold {
  background: #fef3c7;
  color: #92400e;
}

.membership-badge-blue {
  background: #dbeafe;
  color: #1e40af;
}

.membership-expiry {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.membership-renew {
  font-size: 0.85rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}

.membership-renew:hover {
  text-decoration: underline;
}

/* ─── WeChat Pay Modal ───────────────────────────────────────────────────── */
.pay-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pay-modal-card {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  overflow: hidden;
}

.pay-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}

.pay-modal-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--gray-900);
}

.pay-modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--gray-500);
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.pay-modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.pay-modal-body {
  padding: 24px 20px;
  text-align: center;
}

#pay-qrcode-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

#pay-qrcode-wrap canvas,
#pay-qrcode-wrap img {
  border: 1px solid var(--gray-200);
  border-radius: 10px;
}

.pay-amount {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.pay-countdown {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

.pay-status {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 16px;
}

.pay-status-error {
  color: #e53e3e;
}

.pay-sandbox-notice {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 12px;
}

.pay-sandbox-notice p {
  font-size: 0.8rem;
  color: #92400e;
  margin-bottom: 10px;
}

/* ─── Payment Success Overlay ────────────────────────────────────────────── */
.pay-success-card {
  text-align: center;
  padding: 48px 32px;
}

.pay-success-icon {
  width: 72px;
  height: 72px;
  background: #d1fae5;
  color: #065f46;
  border-radius: 50%;
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.pay-success-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.pay-success-sub {
  color: var(--gray-500);
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .pricing-grid-2 {
    grid-template-columns: 1fr;
  }
}
