@import url("https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap");

:root {
  --paper: #f4f1e8;
  --mist: #e7efea;
  --ink: #0f1f28;
  --ink-soft: #526069;
  --line: #d7e2de;
  --card: #ffffff;
  --brand: #0e7f87;
  --brand-deep: #09556b;
  --ok: #13824d;
  --danger: #bd3c36;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-1: 0 12px 30px rgba(12, 32, 38, 0.08);
  --shadow-2: 0 18px 42px rgba(12, 32, 38, 0.13);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Urbanist, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, #f8e4c5 0%, transparent 38%),
    radial-gradient(circle at 100% 8%, #cce8de 0%, transparent 36%),
    linear-gradient(145deg, var(--paper), var(--mist));
}

.bg-shape {
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  opacity: 0.24;
  filter: blur(46px);
}

.bg-shape-1 {
  width: 360px;
  height: 360px;
  top: -140px;
  left: -120px;
  background: #edc576;
}

.bg-shape-2 {
  width: 420px;
  height: 420px;
  right: -170px;
  bottom: -170px;
  background: #83c6ba;
}

.container {
  position: relative;
  z-index: 1;
  width: min(1180px, 94vw);
  margin: 26px auto 46px;
}

.hero,
.controls,
.question-panel,
.stepper-progress,
.question-card,
.result-header,
.result-summary,
.result-item {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(252, 255, 254, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-1);
}

.hero {
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(14, 127, 135, 0.18), transparent 70%);
}

.kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 800;
  font-size: 0.8rem;
  color: #0a6f79;
}

h1 {
  margin: 0;
  font-family: Sora, Urbanist, sans-serif;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.06;
}

.subtitle {
  margin: 12px 0 0;
  font-size: 1.12rem;
  color: #2f444c;
}

.disclaimer {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.controls {
  margin-top: 16px;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.control-group {
  display: grid;
  gap: 6px;
  min-width: 260px;
}

label {
  font-weight: 800;
}

select,
button {
  font: inherit;
}

select {
  min-height: 46px;
  border: 1px solid #c8d6d2;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
}

.btn {
  border: 0;
  border-radius: 13px;
  min-height: 46px;
  padding: 11px 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(125deg, var(--brand), var(--brand-deep));
  box-shadow: 0 14px 24px rgba(14, 127, 135, 0.28);
}

.btn-secondary {
  color: #fff;
  background: linear-gradient(125deg, #6f7c84, #5f6a72);
}

.btn-success {
  color: #fff;
  background: linear-gradient(125deg, #1e9158, #15693f);
  box-shadow: 0 14px 24px rgba(19, 130, 77, 0.24);
}

.meta {
  margin-top: 12px;
  font-size: 1.05rem;
  color: #4b5f68;
  font-weight: 700;
}

.meta p {
  margin: 4px 0;
}

.error {
  color: var(--danger);
}

.site-footer {
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(247, 252, 250, 0.88));
  box-shadow: var(--shadow-1);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.site-footer p {
  margin: 0;
  color: #35515b;
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #0a6175;
  font-weight: 800;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.cookie-consent {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(960px, calc(100vw - 24px));
  padding: 14px;
  border-radius: 14px;
  background: rgba(13, 32, 40, 0.95);
  border: 1px solid rgba(118, 166, 176, 0.45);
  color: #eaf6f7;
  box-shadow: 0 16px 34px rgba(12, 32, 38, 0.34);
  display: grid;
  gap: 10px;
}

.cookie-consent[hidden] {
  display: none !important;
}

.cookie-consent p {
  margin: 0;
  line-height: 1.45;
}

.cookie-consent a {
  color: #9de2e7;
  font-weight: 700;
}

.cookie-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.exam-layout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 14px;
}

.question-panel {
  position: sticky;
  top: 16px;
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: var(--shadow-1);
}

.question-panel h3 {
  margin: 0;
  font-family: Sora, Urbanist, sans-serif;
  font-size: 1.24rem;
}

.question-panel p {
  margin: 8px 0 0;
  color: #35515b;
  font-weight: 600;
}

.question-dots {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.dot {
  min-height: 38px;
  border: 1px solid #cad9d5;
  border-radius: 11px;
  background: #fff;
  color: #3f535c;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dot:hover {
  border-color: #9ec0bc;
  transform: translateY(-1px);
}

.dot.answered {
  background: #e7f8ef;
  border-color: #96d2b4;
  color: #146c43;
}

.dot.active {
  background: linear-gradient(125deg, var(--brand), var(--brand-deep));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 16px rgba(14, 127, 135, 0.3);
}

.question-workspace {
  min-width: 0;
}

.stepper-progress {
  margin-bottom: 10px;
  border-radius: var(--radius-lg);
  padding: 12px 14px;
}

.stepper-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-weight: 700;
  color: #314d57;
}

.stepper-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e8f0ee;
  overflow: hidden;
}

.stepper-track-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #17a2a8);
  transition: width 0.25s ease;
}

.question-card {
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-2);
}

.question-card h3 {
  margin: 0 0 10px;
  font-family: Sora, Urbanist, sans-serif;
  font-size: 1.5rem;
}

.question-text {
  margin: 0 0 16px;
  line-height: 1.62;
  font-size: 1.08rem;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border: 1px solid #d8e4e1;
  border-radius: 12px;
  padding: 11px 12px;
  transition: all 0.2s ease;
}

.option:hover {
  border-color: #aac8c3;
  background: #f8fffd;
}

.option:has(input:checked) {
  border-color: #4f9da0;
  box-shadow: 0 0 0 3px rgba(14, 127, 135, 0.16);
}

.option input {
  margin-top: 2px;
}

.stepper-actions {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.results {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.result-header {
  padding: 16px;
}

.result-header h2 {
  margin: 0;
}

.score-badge {
  margin: 8px 0 0;
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  background: #e6f4f1;
  color: #1b6060;
}

.result-summary {
  padding: 14px;
}

.theme-results {
  width: 100%;
  border-collapse: collapse;
}

.theme-results th,
.theme-results td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #e5efec;
}

.theme-results th {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.84rem;
  color: #39555e;
}

.result-details {
  display: grid;
  gap: 10px;
}

.result-item {
  border-radius: var(--radius-lg);
  padding: 12px;
}

.result-item.correct {
  border-left: 4px solid var(--ok);
}

.result-item.incorrect {
  border-left: 4px solid var(--danger);
}

.result-question {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.result-question h4 {
  margin: 0;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 800;
}

.badge-success {
  background: #e7f8ef;
  color: #176c44;
}

.badge-error {
  background: #fdece9;
  color: #8d2f26;
}

.result-answer p,
.result-explanation {
  margin: 8px 0 0;
  color: #2f4a53;
}

.seo-content {
  margin-top: 18px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seo-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(250, 255, 253, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: 18px;
}

.seo-card h2 {
  margin: 0 0 10px;
  font-family: Sora, Urbanist, sans-serif;
  font-size: 1.26rem;
}

.seo-card h3 {
  margin: 14px 0 6px;
  font-size: 1.04rem;
}

.seo-card p {
  margin: 0;
  line-height: 1.62;
  color: #2f4a53;
}

@media (max-width: 980px) {
  .exam-layout {
    grid-template-columns: 1fr;
  }

  .question-panel {
    position: static;
  }

  .question-dots {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .seo-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .container {
    margin-top: 18px;
  }

  .hero,
  .controls,
  .question-panel,
  .question-card,
  .result-header,
  .result-summary {
    border-radius: 18px;
  }

  .controls {
    align-items: stretch;
  }

  .control-group,
  .btn {
    width: 100%;
  }

  .stepper-progress-head {
    flex-direction: column;
    gap: 4px;
  }

  .stepper-actions {
    flex-direction: column;
  }

  .question-dots {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .cookie-actions {
    justify-content: stretch;
  }

  .cookie-actions .btn {
    width: 100%;
  }
}
