/* Fonts loaded via <link> in each HTML page — no duplicate @import needed */

:root {
  --bg: #faf9f7;
  --primary: #6d28d9;
  --primary-light: #ede9fe;
  --primary-dark: #5b21b6;
  --secondary: #f43f5e;
  --tertiary: #f59e0b;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --muted: #6b7280;
  --success: #10b981;
  --border: #e5e7eb;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.14);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
}

/* ─── DARK MODE ──────────────────────────────── */
[data-theme="dark"] {
  --bg: #0f0f1a;
  --card-bg: #1a1a2e;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --primary: #a78bfa;
  --primary-light: #2d1b6e;
  --primary-dark: #c4b5fd;
  --secondary: #fb7185;
  --tertiary: #fbbf24;
  --border: #2d2d4a;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.6);
  --success: #34d399;
}
[data-theme="dark"] body { background: var(--bg); color: var(--text); }
[data-theme="dark"] .navbar,
[data-theme="dark"] .quiz-header { background: rgba(15,15,26,0.97) !important; border-color: var(--border); }
[data-theme="dark"] .hero { background: var(--bg); }
[data-theme="dark"] .footer { background: #050510; }
[data-theme="dark"] .footer-col a { color: rgba(226,232,240,0.55); }
[data-theme="dark"] .footer-col a:hover { color: var(--text); }
[data-theme="dark"] .quiz-card-item,
[data-theme="dark"] .related-card { background: var(--card-bg); color: var(--text); }
[data-theme="dark"] .quiz-card-desc,
[data-theme="dark"] .quiz-card-meta,
[data-theme="dark"] .quiz-card-taken { color: var(--muted); }
[data-theme="dark"] .quiz-card-footer { border-color: var(--border); }
[data-theme="dark"] .featured-card { box-shadow: 0 8px 40px rgba(167,139,250,0.3); }
[data-theme="dark"] .disclaimer-box { background: #1a160a; border-color: #4a3800; color: #fbbf24; }
[data-theme="dark"] .section { background: transparent; }
[data-theme="dark"] #about { background: var(--card-bg) !important; }
[data-theme="dark"] .card { background: var(--card-bg); }

/* ─── DARK MODE TOGGLE BUTTON ───────────────── */
.dark-mode-toggle {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 34px; height: 34px;
  cursor: pointer; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 150ms ease, border-color 150ms ease, transform 200ms ease;
  flex-shrink: 0; line-height: 1; padding: 0;
  margin-left: 6px;
}
.dark-mode-toggle:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: rotate(20deg);
}

/* ─── QUIZ PREVIEW TOOLTIP ──────────────────── */
.quiz-preview-tooltip {
  position: fixed; z-index: 9998;
  background: var(--text); color: var(--bg);
  padding: 10px 14px; border-radius: 10px;
  font-size: 13px; font-family: 'DM Sans', sans-serif;
  max-width: 260px; line-height: 1.5;
  pointer-events: none;
  opacity: 0; transition: opacity 200ms ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  white-space: normal; word-break: break-word;
  transform: translateX(-50%);
}
.quiz-preview-tooltip::before {
  content: ''; position: absolute;
  top: -6px; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: var(--text);
  border-top: 0; width: 0; height: 0;
}
.quiz-preview-tooltip.visible { opacity: 1; }
@media (hover: none) { .quiz-preview-tooltip { display: none !important; } }

/* ─── RESULT TYPE TEASER PILLS ──────────────── */
.quiz-card-types {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 0 28px 20px;
}
.type-pill {
  padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600;
  background: var(--primary-light); color: var(--primary);
  transition: background 150ms ease, color 150ms ease;
  white-space: nowrap;
}
.quiz-card-item:hover .type-pill { background: var(--primary); color: white; }
[data-theme="dark"] .type-pill { color: var(--primary-dark); }

/* ─── SOCIAL PROOF BADGE ────────────────────── */
.social-proof-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 100px;
  background: #fff4e6; color: #92400e;
  font-size: 13px; font-weight: 600;
  animation: proofPulse 2.5s ease-in-out infinite;
}
[data-theme="dark"] .social-proof-badge { background: #2d1a00; color: #fbbf24; }
@keyframes proofPulse { 0%,100%{opacity:1} 50%{opacity:0.7} }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  animation: pageIn 400ms ease;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

h1,h2,h3,h4 { font-family: 'Playfair Display', serif; }
h1 { font-size: clamp(32px,5vw,48px); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(24px,4vw,32px); font-weight: 700; line-height: 1.3; }
h3 { font-size: clamp(18px,3vw,22px); font-weight: 700; line-height: 1.4; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--primary); text-decoration: none; transition: color 150ms ease; }
a:hover { color: var(--primary-dark); }

/* ─── NAVBAR ─────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding: 0 24px;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700;
  color: var(--primary); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 500; transition: color 150ms; }
.nav-links a:hover { color: var(--text); }

/* ─── BUTTONS ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 100px;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.btn:hover { transform: scale(1.02); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: white;
  box-shadow: 0 4px 16px rgba(109,40,217,0.3);
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(109,40,217,0.4); color: white; }
.btn-ghost {
  background: transparent; color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-ghost:hover { background: var(--primary-light); color: var(--primary); }
.btn-lg { padding: 16px 40px; font-size: 17px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ─── CARDS ───────────────────────────────────── */
.card {
  background: var(--card-bg); border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

/* ─── PILLS / BADGES ──────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: 100px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.pill-purple  { background: var(--primary-light); color: var(--primary); }
.pill-rose    { background: #fff1f2; color: #e11d48; }
.pill-amber   { background: #fffbeb; color: #b45309; }
.pill-green   { background: #d1fae5; color: #065f46; }
.pill-gray    { background: var(--border); color: var(--muted); }
.pill-blue    { background: #eff6ff; color: #1d4ed8; }

/* ─── LAYOUT ──────────────────────────────────── */
.section { padding: 80px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-title { margin-bottom: 8px; }
.section-subtitle { color: var(--muted); font-size: 17px; margin-bottom: 48px; }

/* ─── HERO ────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 100px 24px 80px;
  text-align: center;
}
.hero-blobs {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
}
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.12;
}
.blob-1 { width: 600px; height: 600px; background: var(--primary); top: -200px; left: -100px; }
.blob-2 { width: 500px; height: 500px; background: var(--secondary); top: -100px; right: -150px; }
.blob-3 { width: 400px; height: 400px; background: var(--tertiary); bottom: -100px; left: 50%; transform: translateX(-50%); }
.hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.hero h1 { margin-bottom: 20px; }
.hero-sub { font-size: 18px; color: var(--muted); max-width: 580px; margin: 0 auto 32px; line-height: 1.7; }
.trust-badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }

/* ─── FEATURED QUIZ ───────────────────────────── */
.featured-quiz {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px 16px;
}
.featured-card {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 60%, #a855f7 100%);
  border-radius: var(--radius); color: white;
  padding: 56px 48px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 32px; align-items: center;
  box-shadow: 0 8px 40px rgba(109,40,217,0.35);
  text-decoration: none; transition: transform 200ms ease, box-shadow 200ms ease;
}
.featured-card:hover { transform: translateY(-4px); box-shadow: 0 14px 56px rgba(109,40,217,0.45); color: white; }
.featured-card-content { min-width: 0; }
.featured-label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.8; margin-bottom: 12px; }
.featured-card h2 { color: white; font-size: clamp(26px,4vw,40px); margin-bottom: 12px; }
.featured-card p { opacity: 0.9; font-size: 16px; margin-bottom: 24px; }
.featured-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.featured-meta span { font-size: 14px; opacity: 0.8; }
.featured-badge { opacity: 0.8; font-size: 72px; line-height: 1; flex-shrink: 0; }

/* ─── QUIZ GRID ───────────────────────────────── */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.quiz-card-item {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 200ms ease, box-shadow 200ms ease;
  text-decoration: none; color: var(--text);
}
.quiz-card-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); color: var(--text); }
.quiz-card-accent { height: 4px; width: 100%; }
.quiz-card-body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.quiz-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.quiz-card-title { font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 700; margin-bottom: 10px; line-height: 1.35; }
.quiz-card-desc { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 16px; flex: 1; }
.quiz-card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--border); margin-top: auto; }
.quiz-card-meta { font-size: 13px; color: var(--muted); }
.quiz-card-taken { font-size: 12px; color: var(--muted); margin-top: 2px; }
.quiz-card-footer-left { display: flex; flex-direction: column; }
.quiz-card-cta {
  display: inline-flex; align-items: center;
  padding: 8px 16px; border-radius: 100px;
  background: var(--primary); color: white;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background 150ms ease, transform 150ms ease;
  flex-shrink: 0;
}
.quiz-card-item:hover .quiz-card-cta {
  background: var(--primary-dark); transform: translateX(2px);
}

/* ─── ABOUT GRID ──────────────────────────────── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Ad placeholders hidden by default */
.adsense-placeholder { display: none; }

/* ─── FOOTER ──────────────────────────────────── */
.footer {
  background: var(--text); color: rgba(255,255,255,0.75);
  padding: 56px 24px 40px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-brand .logo { color: white; }
.footer-brand p { margin-top: 12px; font-size: 14px; opacity: 0.7; line-height: 1.6; }
.footer-col h4 { color: white; font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-col a { display: block; color: rgba(255,255,255,0.65); font-size: 14px; margin-bottom: 10px; transition: color 150ms; }
.footer-col a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.footer-copy { font-size: 13px; opacity: 0.6; }
.footer-disclaimer { font-size: 12px; opacity: 0.5; max-width: 520px; line-height: 1.6; }

/* ─── ACCESSIBILITY ───────────────────────────── */
/* Visually hidden but readable by screen readers and search bots */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─── UTILITIES ───────────────────────────────── */
.text-muted    { color: var(--muted); }
.text-primary  { color: var(--primary); }
.text-center   { text-align: center; }
.flex          { display: flex; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.items-center  { align-items: center; }
.gap-8   { gap: 8px; }
.gap-16  { gap: 16px; }
.gap-24  { gap: 24px; }
.mt-8    { margin-top: 8px; }
.mt-16   { margin-top: 16px; }
.mt-24   { margin-top: 24px; }
.mt-32   { margin-top: 32px; }
.mt-48   { margin-top: 48px; }
.mb-0    { margin-bottom: 0; }
.w-full  { width: 100%; }

/* ─── RESPONSIVE ──────────────────────────────── */
@media (max-width: 1024px) {
  .quiz-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .section { padding: 56px 20px; }
  .hero { padding: 72px 20px 56px; }
  .nav-links { display: none; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-badge { display: none; }
  .quiz-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 28px; }
  .featured-card { padding: 32px 24px; }
}
