:root {
  --primary: #0f6cbd;
  --primary-light: #e6f1fb;
  --primary-dark: #0d5ca6;
  --danger: #c0392b;
  --warning: #f39c12;
  --success: #27ae60;
  --info: #2980b9;
  --text: #333333;
  --text-light: #555;
  --bg: #f7f9fc;
  --card-bg: #ffffff;
  --border: #dde5f0;
  --shadow: rgba(0, 0, 0, 0.03);
  --radius: 16px;
  --radius-sm: 12px;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* Header */
header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

header .logo-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  transition: background 0.3s;
}

header .logo-circle:hover {
  background: var(--primary-dark);
}

header h1 {
  font-size: 16px;
  margin: 0;
  font-weight: 600;
  color: #123a5d;
}

header button {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

header button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Main Layout */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #e6f1fb, #ffffff);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 24px;
  box-shadow: 0 6px 20px rgba(15, 108, 189, 0.08);
  border: 1px solid rgba(15, 108, 189, 0.1);
}

.hero h2 {
  font-size: 28px;
  margin: 0 0 10px;
  color: #123a5d;
  line-height: 1.3;
}

.hero h3 {
  font-size: 18px;
  margin: 0 0 16px;
  color: #34526f;
  font-weight: 500;
}

.hero p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.6;
}

.hero-note {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 20px;
}

.badge-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  background: rgba(15, 108, 189, 0.07);
  padding: 8px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  color: var(--primary);
  font-weight: 500;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-ghost {
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 108, 189, 0.2);
}

.btn-secondary {
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
}

.btn-secondary:hover {
  background: rgba(15, 108, 189, 0.05);
  transform: translateY(-2px);
}

.btn-ghost {
  border: 1px solid #ccd4e0;
  background: #fff;
  color: var(--text);
}

.btn-ghost:hover {
  background: #f5f7fa;
}

/* Common Sections */
.how-it-works,
.categories,
.about,
.faq,
.disclaimer {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.how-it-works h3,
.categories h3,
.about h3,
.faq h3,
.disclaimer h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 18px;
  color: #123a5d;
  font-weight: 600;
}

/* How it works steps */
.how-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.how-steps .step {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  font-size: 14px;
  line-height: 1.5;
  border-left: 4px solid var(--primary);
}

.how-steps .step strong {
  display: block;
  margin-bottom: 8px;
  color: #123a5d;
  font-size: 15px;
}

/* Categories grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.category-card {
  border-radius: var(--radius-sm);
  padding: 16px;
  background: #f3f6fb;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid #e8edf5;
  transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  color: #123a5d;
  font-size: 15px;
}

/* About section */
.about-content {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.about-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
  border: 3px solid white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.about-description {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 8px;
}

/* FAQ */
.faq-item {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.faq-item strong {
  display: block;
  margin-bottom: 8px;
  color: #123a5d;
  font-size: 15px;
}

/* Disclaimer */
.disclaimer p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-light);
}

/* Footer */
footer {
  text-align: center;
  font-size: 12px;
  color: #777;
  padding: 30px 10px;
  margin-top: 40px;
  border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h2 {
    font-size: 24px;
  }

  .hero h3 {
    font-size: 16px;
  }

  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-avatar {
    margin: 0 auto;
  }

  .how-steps {
    grid-template-columns: 1fr;
  }

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

  /* Hide header when quiz is active on mobile */
  body.quiz-active header {
    display: none;
  }
}

@media (max-width: 480px) {
  header {
    padding: 12px 16px;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  header .brand {
    justify-content: center;
  }

  header button {
    width: 100%;
  }

  .hero {
    padding: 20px 16px;
  }

  .hero h2 {
    font-size: 22px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

/* Quiz active state */
body.quiz-active .hero,
body.quiz-active .how-it-works,
body.quiz-active .categories,
body.quiz-active .about,
body.quiz-active .faq,
body.quiz-active .disclaimer {
  display: none;
}

/* Desktop: show header when quiz is active */
@media (min-width: 769px) {
  body.quiz-active header {
    display: flex;
  }
}
