:root {
  --ink: #10243a;
  --muted: #506379;
  --accent: #f28c28;
  --accent-dark: #c86c16;
  --surface: #ffffff;
  --surface-alt: #f4f1ea;
  --edge: #d6d1c8;
  --shadow: rgba(16, 36, 58, 0.12);
  --highlight: #f7d9b0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "IBM Plex Sans", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top right, #f9efe0 0%, #f2f6f7 45%, #e5eff4 100%);
  min-height: 100vh;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.app-header {
  padding: 40px 0 24px;
  background: linear-gradient(120deg, #f8e0c2 0%, #f1f4f6 55%, #e6f0f5 100%);
  border-bottom: 1px solid var(--edge);
}

.header-content {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.app-title {
  font-size: clamp(1.8rem, 2.5vw, 2.6rem);
  margin: 8px 0 0;
  max-width: 520px;
}

.eyebrow {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 16px;
}

.link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

main {
  padding: 32px 0 48px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 20px;
  box-shadow: 0 20px 40px -30px var(--shadow);
  margin-bottom: 24px;
}

.card-body {
  padding: 28px;
}

.card.info {
  background: linear-gradient(135deg, var(--surface-alt), #ffffff 80%);
}

.form-grid {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input[type="number"] {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--edge);
  font-size: 1rem;
}

.checkbox {
  grid-auto-flow: column;
  align-items: center;
  justify-content: start;
  gap: 12px;
  font-weight: 600;
}

.primary,
.secondary {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.primary {
  background: var(--accent);
  color: #1a1a1a;
  box-shadow: 0 12px 24px -16px rgba(242, 140, 40, 0.8);
}

.primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.secondary {
  background: #f0ede6;
  color: var(--ink);
}

.secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.muted {
  color: var(--muted);
  margin-top: 8px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 8px;
}

.exam-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.timer {
  background: #0f253c;
  color: #fff;
  border-radius: 16px;
  padding: 16px 20px;
  min-width: 160px;
  text-align: center;
}

.timer-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.7;
}

.timer-value {
  font-size: 1.6rem;
  font-weight: 700;
}

.options {
  border: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 12px;
}

.option {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--edge);
  cursor: pointer;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.option input {
  margin: 0;
}

.option:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 20px -16px rgba(242, 140, 40, 0.8);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.score {
  text-align: center;
}

.score-value {
  font-size: 3rem;
  font-weight: 700;
  margin: 12px 0;
}

.review-item h3 {
  margin-top: 6px;
}

.option-review {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--edge);
  margin-bottom: 8px;
}

.option-review.correct {
  border-color: #3a7c4a;
  background: #e7f6ec;
}

.option-review.incorrect {
  border-color: #c45c4a;
  background: #fde9e4;
}

.badge {
  background: var(--highlight);
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.explanation {
  margin-top: 12px;
  font-style: italic;
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .exam-meta {
    flex-direction: column;
  }

  .timer {
    width: 100%;
  }
}
