/* ======================== TYPEQUEST — STYLES ======================== */

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

:root {
  --bg: #0b0b14;
  --bg-2: #13132a;
  --surface: #1a1a35;
  --surface-2: #22224a;
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef0f7;
  --text-dim: #a4a7c5;
  --text-muted: #6b6e8a;
  --primary: #8b5cf6;
  --primary-2: #06b6d4;
  --primary-3: #ec4899;
  --success: #10b981;
  --warning: #f59e0b;

  --grad-1: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 50%, #ec4899 100%);
  --grad-soft: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.15));
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.3);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

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

/* ======================== BACKGROUND BLOBS ======================== */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  animation: float 18s ease-in-out infinite;
}
.blob-1 {
  width: 600px;
  height: 600px;
  background: #8b5cf6;
  top: -200px;
  left: -200px;
}
.blob-2 {
  width: 500px;
  height: 500px;
  background: #06b6d4;
  top: 40%;
  right: -150px;
  animation-delay: -6s;
}
.blob-3 {
  width: 400px;
  height: 400px;
  background: #ec4899;
  bottom: -150px;
  left: 30%;
  animation-delay: -12s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.08); }
  66%      { transform: translate(-30px, 40px) scale(0.95); }
}

/* ======================== NAV ======================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(11, 11, 20, 0.6);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo-icon {
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex;
  gap: 24px;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }

/* ======================== PAGES ======================== */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 60px 0 120px;
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.page.active {
  display: block;
  opacity: 1;
}

/* ======================== LANDING ======================== */
.hero {
  text-align: center;
  padding: 60px 0 80px;
}
.badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.badge-result {
  margin-bottom: 20px;
  color: var(--primary-2);
  border-color: rgba(6, 182, 212, 0.3);
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(40px, 7vw, 78px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 24px;
}
.gradient-text {
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 36px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
}
.stat { text-align: center; }
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  transition: transform var(--transition), border-color var(--transition);
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.3);
}
.feature-icon { font-size: 32px; margin-bottom: 14px; }
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-dim); line-height: 1.55; }

/* ======================== BUTTONS ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn-primary {
  background: var(--grad-1);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 80px rgba(139, 92, 246, 0.5);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ======================== TEST PAGE ======================== */
.progress-wrap {
  margin-bottom: 40px;
}
.progress-bar {
  height: 6px;
  background: var(--surface);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 12px;
}
.progress-fill {
  height: 100%;
  background: var(--grad-1);
  border-radius: 100px;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-text {
  font-size: 14px;
  color: var(--text-dim);
  text-align: right;
}

.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.5s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.question-text {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 32px;
}
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.option-btn {
  width: 100%;
  text-align: left;
  padding: 18px 22px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.option-btn:hover {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.08);
}
.option-btn.selected {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.15);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.test-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
}

/* ======================== LOADING ======================== */
.loader {
  text-align: center;
  padding: 120px 0;
}
.loader-ring {
  width: 80px;
  height: 80px;
  border: 4px solid var(--surface);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 28px;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text {
  font-size: 18px;
  color: var(--text-dim);
}

/* ======================== RESULT PAGE ======================== */
.result-header {
  text-align: center;
  padding: 40px 0 60px;
}
.result-type {
  font-family: 'Playfair Display', serif;
  font-size: clamp(64px, 14vw, 140px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 6px;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.result-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}
.result-tagline {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto;
}

/* Dimensions */
.dimensions {
  display: grid;
  gap: 16px;
  margin-bottom: 40px;
}
.dim-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
}
.dim-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.dim-l { color: var(--text-muted); }
.dim-r { color: var(--text-muted); text-align: right; }
.dim-bar {
  height: 10px;
  background: var(--surface-2);
  border-radius: 100px;
  position: relative;
  overflow: visible;
}
.dim-fill {
  position: absolute;
  top: 0; bottom: 0;
  border-radius: 100px;
  background: var(--grad-1);
}
.dim-marker {
  position: absolute;
  top: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px var(--primary), 0 2px 8px rgba(0,0,0,0.3);
  transform: translateX(-50%);
  transition: left 1s ease;
}

/* Result grid */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.result-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
}
.result-card ul {
  list-style: none;
}
.result-card li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  color: var(--text-dim);
  font-size: 14px;
}
.result-card li::before {
  content: '';
  position: absolute;
  left: 0; top: 16px;
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
}
.result-card.strengths li::before { background: var(--success); }
.result-card.weaknesses li::before { background: var(--warning); }
.result-card p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 48px;
}

/* ======================== 16 TYPES PAGE ======================== */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 10px;
  padding-top: 60px;
}
.section-sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 17px;
  margin-bottom: 48px;
}
.types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.type-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.type-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
}
.type-card .code {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 800;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 3px;
}
.type-card .role {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ======================== FOOTER ======================== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 30px 24px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero-stats { gap: 30px; }
  .question-card { padding: 32px 24px; }
  .question-text { font-size: 22px; }
  .result-header { padding: 20px 0 40px; }
  .types-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ======================== PREMIUM PAYWALL ======================== */
.premium-locked {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.premium-locked::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 40%, var(--bg) 100%);
  pointer-events: none;
  z-index: 1;
}
.lock-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 36px 28px 28px;
}
.lock-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.lock-overlay h3 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
}
.lock-overlay p {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 24px;
}
.pricing-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.price-option {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  text-align: center;
  min-width: 140px;
}
.price-amount {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 800;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.price-per {
  font-size: 14px;
  font-weight: 500;
}
.price-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.price-divider {
  color: var(--text-muted);
  font-size: 14px;
}
#paypal-button-container {
  max-width: 400px;
  margin: 0 auto;
  min-height: 48px;
}
.secure-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
  margin-bottom: 0;
}
.premium-content {
  animation: fadeUp 0.5s ease;
}
