@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --blue: #004f9e;
  --blue-dark: #003873;
  --blue-soft: #e9f2ff;
  --yellow: #f5b400;
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #0f1b2d;
  --muted: #5d6b83;
  --border: #e4e8f1;
  --shadow: 0 18px 40px rgba(0, 56, 115, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --gradient: radial-gradient(120% 120% at 80% 10%, #b9d7ff 0%, rgba(185, 215, 255, 0) 55%),
               radial-gradient(120% 120% at 15% 0%, #d8e8ff 0%, rgba(216, 232, 255, 0) 45%),
               linear-gradient(135deg, #f9fbff 0%, #f3f6fc 60%, #eef2fa 100%);
}

* { box-sizing: border-box; }

html { font-size: 62.5%; }

body {
  margin: 0;
  font-family: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 1.6rem;
  background: var(--gradient);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.page-shell {
  position: relative;
  flex: 1;
  padding: 2.4rem clamp(1.6rem, 3vw, 4.4rem) 3.2rem;
}

.soft-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(45% 30% at 30% 20%, rgba(0, 89, 162, 0.08), transparent),
              radial-gradient(45% 30% at 80% 15%, rgba(0, 89, 162, 0.06), transparent);
  filter: blur(28px);
  opacity: 0.85;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 14px;
  padding: 1.2rem 1.6rem;
  margin: 0 clamp(0.8rem, 2vw, 2.4rem) 1.6rem;
  box-shadow: 0 10px 30px rgba(0, 56, 115, 0.08);
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: .8rem;
  color: var(--blue);
}

.brand-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 0 0 6px rgba(0, 89, 162, 0.15);
}

.nav-links {
  margin-left: auto;
  display: flex;
  gap: 1rem;
}

.nav-link {
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
  transition: 160ms ease;
}

.nav-link:hover { background: #eef4ff; color: var(--blue-dark); }

.content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2.4rem;
  max-width: 1100px;
  margin: 1.6rem auto 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section-head h2 {
  margin: 0;
  font-size: 2.4rem;
  letter-spacing: -0.02em;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: clamp(1.6rem, 2vw, 2.4rem);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(0, 89, 162, 0.06), transparent 60%);
  opacity: 0.4;
  pointer-events: none;
}

.card h1,
.card h2,
.card h3 { margin-top: 0; }

.hero {
  display: grid;
  gap: 1rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 4vw, 3.6rem);
  letter-spacing: -0.03em;
  margin: 0;
}

.hero p {
  color: var(--muted);
  margin: 0;
  max-width: 70ch;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.3rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  letter-spacing: 0.01em;
}

.pill.dot::before {
  content: '';
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 79, 158, 0.18);
}

.card-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.quiz-card {
  position: relative;
  padding: 1.6rem 1.6rem 1.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #ffffff 0%, #f7faff 100%);
  box-shadow: 0 10px 28px rgba(0, 56, 115, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.quiz-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 56, 115, 0.15);
}

.quiz-card h3 {
  margin: 0.4rem 0;
  font-size: 1.9rem;
  letter-spacing: -0.01em;
}

.quiz-card p { margin: 0; color: var(--muted); }

.quiz-card .arrow {
  position: absolute;
  right: 1.6rem;
  top: 1.6rem;
  font-weight: 800;
  color: var(--blue-dark);
}

.btn-row { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.0rem 1.6rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: 150ms ease;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 56, 115, 0.25);
}

.btn-primary:hover { filter: brightness(0.95); }

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

.form-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .topbar { position: relative; margin: 0 1rem; }
}

label { font-weight: 700; color: var(--text); }

input[type='number'],
input[type='text'],
input[type='email'],
input[type='password'],
input[type='search'],
textarea,
select {
  width: 100%;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font: inherit;
  color: var(--text);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 79, 158, 0.15);
}

input[type='range'] {
  -webkit-appearance: none;
  width: 100%;
  height: 10px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-dark) 100%);
  border-radius: 999px;
  outline: none;
  border: none;
}

input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--blue-dark);
  box-shadow: 0 10px 20px rgba(0, 56, 115, 0.25);
  cursor: pointer;
}

input[type='range']::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--blue-dark);
  box-shadow: 0 10px 20px rgba(0, 56, 115, 0.25);
  cursor: pointer;
}

.hint {
  color: var(--muted);
  font-size: 1.4rem;
  margin: 0.2rem 0 0;
}

.stat {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  background: #f0f5ff;
  color: var(--blue-dark);
  font-weight: 700;
}

.question-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  background: #fff;
  box-shadow: 0 12px 26px rgba(0, 56, 115, 0.08);
  margin-bottom: 1.4rem;
}

.question-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.8rem;
  color: var(--text);
}

.media-img {
  width: 240px;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f7f9fc;
  padding: 0.6rem;
  box-shadow: 0 8px 20px rgba(0, 56, 115, 0.08);
}

.options { display: grid; gap: 0.6rem; margin-top: 0.8rem; }

.option-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: start;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: #f8fbff;
  border: 1px solid transparent;
  transition: 120ms ease;
}

.option-line:hover { border-color: #d7e6ff; }

input[type='checkbox'] { width: 1.8rem; height: 1.8rem; accent-color: var(--blue); }

.result-hero {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.score-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--blue-dark);
}

.score-badge small { color: var(--muted); font-weight: 600; }

.wrong-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }

.wrong-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  background: #fff;
  box-shadow: 0 12px 24px rgba(0, 56, 115, 0.08);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.3rem;
}

.tag.ok { background: #e8f8ef; color: #0a8b4f; }
.tag.bad { background: #fff1f1; color: #c62828; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 1.6rem 0;
  border: 0;
}

.muted { color: var(--muted); }

.text-link { color: var(--blue); font-weight: 700; }
.text-link:hover { color: var(--blue-dark); }

/* Subtle entrance */
.fade-in { animation: fadeIn 240ms ease forwards; opacity: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
