@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --bg-top: #fefce8;
  --bg-bottom: #e2e8f0;
  --card: rgba(255, 255, 255, 0.92);
  --text: #1f2937;
  --muted: #667085;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #ea580c;
  --danger: #b42318;
  --border: #d0d5dd;
  --shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 10%, #fef9c3 0%, transparent 38%),
    radial-gradient(circle at 90% 18%, #bae6fd 0%, transparent 30%),
    linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
  min-height: 100vh;
}

.container {
  max-width: 1080px;
  margin: 24px auto 48px;
  padding: 0 16px;
}

.hero {
  padding: 12px 6px 6px;
}

.eyebrow {
  margin: 0;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.hero h1 {
  margin: 8px 0;
  font-size: clamp(1.75rem, 4vw, 2.8rem);
  line-height: 1.15;
}

.hero-copy {
  margin: 0;
  color: var(--muted);
  max-width: 780px;
}

.card {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 18px;
  background: var(--card);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.mode-switch {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mode-btn {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
  color: var(--text);
}

.mode-btn.active {
  border-color: transparent;
  background: linear-gradient(120deg, var(--brand), var(--brand-dark));
  color: #fff;
}

h2,
h3 {
  margin-top: 0;
}

.form-grid label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
}

input,
textarea,
select,
button {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 11px 12px;
  font-size: 15px;
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus,
button:focus {
  outline: 2px solid rgba(15, 118, 110, 0.24);
  outline-offset: 1px;
}

textarea {
  resize: vertical;
  min-height: 110px;
}

.primary-btn,
.ghost-btn,
.review-btn,
.warn-btn,
.danger-btn {
  margin-top: 16px;
  cursor: pointer;
  font-weight: 700;
}

.primary-btn {
  border-color: transparent;
  background: linear-gradient(120deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.ghost-btn {
  background: #fff;
  color: #1f2937;
}

.review-btn {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.warn-btn {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fdba74;
}

.danger-btn {
  border-color: transparent;
  background: linear-gradient(120deg, #dc2626, var(--danger));
  color: #fff;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.exam-specs {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.7);
}

.exam-specs p {
  margin: 8px 0;
}

.hidden {
  display: none;
}

.test-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.stat {
  margin: 0;
  font-weight: 700;
}

.timer {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--danger);
}

.test-layout {
  margin-top: 14px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr);
}

.navigator {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.question-nav {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.nav-btn {
  margin: 0;
  padding: 8px 6px;
  font-size: 0.9rem;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1f2937;
}

.nav-btn.current {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}

.nav-btn.answered {
  background: #ecfdf3;
  border-color: #86efac;
}

.nav-btn.reviewed {
  background: #eff6ff;
  border-color: #93c5fd;
}

.nav-btn.skipped {
  background: #fff7ed;
  border-color: #fdba74;
}

.actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.option {
  display: block;
  margin: 10px 0;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
}

.option input {
  width: auto;
  margin-right: 8px;
}

.legend {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.legend span {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.dot.current {
  background: #0f766e;
}

.dot.answered {
  background: #16a34a;
}

.dot.reviewed {
  background: #3b82f6;
}

.dot.skipped {
  background: #f97316;
}

.dot.unanswered {
  background: #cbd5e1;
}

.time-warning {
  min-height: 20px;
  margin: 6px 0 0;
  color: #9a3412;
  font-weight: 700;
}

.muted {
  margin: 6px 0;
  color: var(--muted);
}

.message {
  min-height: 20px;
  margin-top: 12px;
  color: var(--danger);
  font-weight: 700;
}

.section-results {
  margin-top: 16px;
}

.section-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.section-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
}

.section-card h4 {
  margin: 0 0 8px;
}

.section-card p {
  margin: 4px 0;
}

.review-list {
  margin-top: 10px;
  display: grid;
  gap: 10px;
  max-height: 540px;
  overflow: auto;
  padding-right: 4px;
}

.review-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.review-head h4 {
  margin: 0;
}

.review-question {
  margin: 8px 0;
  font-weight: 600;
}

.review-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.review-status.correct {
  background: #ecfdf3;
  color: #166534;
}

.review-status.wrong {
  background: #fef2f2;
  color: #b42318;
}

.review-status.unanswered {
  background: #f8fafc;
  color: #475467;
}

.review-card.correct {
  border-color: #86efac;
}

.review-card.wrong {
  border-color: #fca5a5;
}

.review-card.unanswered {
  border-color: #cbd5e1;
}

.review-unanswered {
  color: #475467;
  font-style: italic;
}

.suggestion-list {
  margin-top: 16px;
}

.suggestion-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  margin-top: 10px;
}

.suggestion-item p {
  margin: 5px 0;
}

.error-text {
  color: var(--danger);
  font-weight: 700;
}

.qr-card {
  text-align: center;
}

.qr-image {
  width: min(100%, 360px);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px;
}

.centered-note {
  text-align: center;
}

.suggestion-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .test-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .mode-switch {
    grid-template-columns: 1fr;
  }

  .question-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

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

  .suggestion-actions {
    grid-template-columns: 1fr;
  }
}
