:root {
  --purple: #6C63FF;
  --blue: #3B82F6;
  --teal: #14B8A6;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --text: #1E293B;
  --muted: #64748B;
  --border: #E2E8F0;
  --danger: #DC2626;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.brand-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--purple); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted);
}
.nav-links a:hover, .nav-links a.active { background: #F1F5F9; color: var(--text); }
.header-actions { display: flex; gap: 10px; align-items: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 14px; font-weight: 700; font-size: 15px;
  border: none; cursor: pointer; transition: .15s;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: #5b53e6; }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { background: #F1F5F9; }
.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: 18px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.card-pad { padding: 28px; }

/* Hero */
.hero { text-align: center; padding: 72px 0 56px; }
.hero h1 { font-size: 44px; font-weight: 800; letter-spacing: -0.02em; margin: 18px 0 14px; }
.hero p { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 auto; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #F1F5F9; color: var(--muted); font-weight: 600; font-size: 13px;
  padding: 6px 14px; border-radius: 999px;
}

/* Grid of test cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.test-card { position: relative; display: flex; flex-direction: column; }
.test-card .tag {
  position: absolute; top: 16px; right: 16px; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; background: rgba(20,184,166,.1); color: var(--teal);
}
.test-card .tag.premium { background: rgba(108,99,255,.1); color: var(--purple); }
.test-card h3 { margin: 10px 0 4px; }
.test-card p { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.meta-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pill { background: #F1F5F9; color: var(--muted); font-size: 12px; padding: 4px 10px; border-radius: 999px; }

/* Progress bar */
.progress-track { height: 10px; background: #EDF0F5; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--purple)); transition: width .4s ease; }

/* Answer options */
.answer-option {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 16px 18px; border-radius: 16px; border: 2px solid var(--border);
  background: var(--card); font-size: 15px; font-weight: 600; cursor: pointer; margin-bottom: 10px;
}
.answer-option:hover { border-color: rgba(108,99,255,.4); background: #F8F7FF; }
.answer-option.selected { border-color: var(--purple); background: rgba(108,99,255,.06); }
.answer-badge {
  width: 26px; height: 26px; border-radius: 999px; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--muted);
  flex-shrink: 0;
}
.answer-option.selected .answer-badge { border-color: var(--purple); background: var(--purple); color: #fff; }

/* Score bar */
.score-bar-row { margin-bottom: 16px; }
.score-bar-label { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.score-bar-track { height: 10px; border-radius: 999px; background: #EDF0F5; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 999px; }

/* Gauge */
.gauge-wrap { position: relative; width: 220px; height: 220px; margin: 0 auto; }
.gauge-score { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-score .num { font-size: 44px; font-weight: 800; }
.gauge-score .lvl { margin-top: 8px; padding: 4px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; }

/* Utility */
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-3 { gap: 12px; }
.section { padding: 40px 0; }
.alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #FEF2F2; color: var(--danger); border: 1px solid #FECACA; }
.alert-success { background: #F0FDFA; color: #0F766E; border: 1px solid #99F6E4; }

/* Forms */
.form-group { margin-bottom: 16px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--border); font-size: 15px;
}
input:focus, textarea:focus { outline: none; border-color: var(--purple); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: #fff; padding: 40px 0; margin-top: 60px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; color: var(--muted); margin-top: 14px; }
.disclaimer { font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 16px; margin-top: 24px; }

@media (max-width: 720px) {
  .hero h1 { font-size: 30px; }
  .nav-links { display: none; }
}
