﻿:root {
  --bg-1: #f8fafc;
  --bg-2: #eef2ff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #4f46e5;
  --primary-strong: #4338ca;
  --primary-soft: #e0e7ff;
  --accent: #06b6d4;
  --accent-soft: #cffafe;
  --border: #e5e7eb;
  --option-bg: #f8fafc;
  --option-hover: #eef2ff;
  --option-selected: #e0e7ff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--accent-soft) 0%, transparent 60%),
    radial-gradient(900px 500px at 110% 10%, var(--primary-soft) 0%, transparent 65%),
    linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 100%);
  min-height: 100vh;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 20px 56px;
}

.card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 34px 30px 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -20%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.16) 0%, rgba(79, 70, 229, 0) 70%);
  pointer-events: none;
}

h1, h2 {
  margin: 0 0 12px;
  text-align: center;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 32px;
  font-weight: 800;
}

h2 {
  font-size: 24px;
  font-weight: 800;
}

p.lead {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 24px;
  font-size: 16.5px;
  line-height: 1.6;
  max-width: 62ch;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 700;
  font-size: 13px;
  margin: 0 auto 18px;
}

.badge-wrap {
  display: flex;
  justify-content: center;
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

button, .cta {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.04s ease, background 0.2s ease, box-shadow 0.2s ease;
}

button:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  color: white;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-strong) 0%, var(--primary) 100%);
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.28);
}

.btn-ghost {
  background: white;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
}

.btn-ghost:hover {
  border-color: #c7d2fe;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.progress {
  margin: 4px 0 8px;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #eef2ff;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #e0e7ff;
  margin: 0 0 18px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.category {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin: 6px 0 8px;
  text-align: center;
  font-weight: 800;
}

.question {
  font-size: 26px;
  margin: 0 0 20px;
  text-align: center;
  line-height: 1.3;
  font-weight: 800;
}

.options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--option-bg);
  cursor: pointer;
  font-size: 16px;
  color: var(--text);
  font-weight: 700;
  position: relative;
}

.option:hover {
  background: var(--option-hover);
  border-color: #c7d2fe;
}

.option.selected {
  background: var(--option-selected);
  border-color: #a5b4fc;
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.18);
}

.option.selected::after {
  content: "✓";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 900;
  color: var(--primary-strong);
}

form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

form .full { grid-column: 1 / -1; }

label {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin: 0 0 6px;
  font-weight: 800;
}

input, select {
  width: 100%;
  padding: 13px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 15.5px;
  outline: none;
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

.hint {
  grid-column: 1 / -1;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: -4px;
}

.result {
  text-align: center;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 8px;
}

.result-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  text-align: left;
}

.result-card .label {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.result-card .value {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
}

.score {
  font-size: 36px;
  margin: 10px 0 6px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.score-sub {
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.6;
}

.guidance {
  margin: 14px 0 2px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}

.guidance h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.guidance p {
  margin: 6px 0;
  color: var(--text);
  font-weight: 600;
  line-height: 1.65;
}

.guidance-list {
  margin: 6px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.guidance-list li {
  color: var(--text);
  font-weight: 600;
  line-height: 1.6;
}

.cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  margin-top: 12px;
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.25);
}

.meta {
  margin-top: 18px;
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  text-align: left;
  font-size: 14.5px;
  color: var(--text);
  background: #ffffff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}

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

.quiz-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  gap: 10px;
}

.quiz-actions .left,
.quiz-actions .right {
  display: flex;
  gap: 8px;
}

.btn-disabled,
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 720px) {
  .container { padding: 26px 14px 42px; }
  .card { padding: 26px 20px 22px; }
  .question { font-size: 23px; }
  .result-grid { grid-template-columns: 1fr; }
  .meta { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  form { grid-template-columns: 1fr; }
  h1 { font-size: 28px; }
}
