.quiz-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.quiz-overlay.is-open {
  display: flex;
}

.quiz-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.quiz-modal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1240px;
  max-height: 100vh;
  max-height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
  background: linear-gradient(135deg, #171719 0%, #0b0b0d 100%);
  border: 1px solid #5a5a60;
  overflow: hidden;
}

@media (min-width: 900px) {
  .quiz-modal {
    grid-template-columns: 528px 1fr;
    max-height: 760px;
    margin: 20px;
    border-radius: 20px;
  }
}

.quiz-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 24px;
  background: rgba(0,0,0,0.4);
  border-radius: 50%;
  transition: color 0.2s;
}

.quiz-modal__close:hover { color: #fff; }

.quiz-left {
  display: none;
  position: relative;
  overflow: hidden;
}

@media (min-width: 900px) {
  .quiz-left { display: block; }
}

.quiz-left__bg {
  position: absolute;
  inset: 0;
}

.quiz-left__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px 0 0 20px;
}

.quiz-left__content {
  position: relative;
  z-index: 1;
  padding: 40px 32px;
  color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.quiz-left__title {
  font-size: 39px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}

.quiz-left__subtitle {
  font-size: 21px;
  color: #c9c9c9;
  margin-bottom: 32px;
}

.quiz-left__benefits {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quiz-left__benefit {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  font-size: 14px;
  color: #e5e5e5;
}

.quiz-left__benefit::before {
  content: '✓';
  color: var(--color-red);
  font-weight: 700;
  flex-shrink: 0;
}

.quiz-right {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@media (min-width: 900px) {
  .quiz-right { padding: 40px 48px 32px; }
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.quiz-progress__text {
  font-size: 14px;
  color: #c9c9c9;
  margin-right: 8px;
}

.quiz-progress__bar {
  height: 5px;
  flex: 1;
  max-width: 94px;
  background: #2a2a2d;
  border-radius: 2px;
}

.quiz-progress__bar.is-active {
  background: linear-gradient(135deg, #ff2430 0%, #dd111c 100%);
}

.quiz-step__title {
  font-size: clamp(22px, 4vw, 31px);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 8px;
}

.quiz-step__subtitle {
  font-size: 14px;
  color: #8f8f93;
  margin-bottom: 24px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

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

@media (min-width: 600px) {
  .quiz-options--grid { grid-template-columns: 1fr 1fr; }
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #151518;
  border: 1px solid #3a3a3f;
  color: #e5e5e5;
  font-size: 14px;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
  width: 100%;
}

.quiz-option:hover { border-color: #555; }

.quiz-option.is-selected {
  background: #111114;
  border-color: var(--color-red);
  border-width: 1.4px;
}

.quiz-option__check {
  width: 16px;
  height: 16px;
  border: 2px solid #555;
  border-radius: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.quiz-option.is-selected .quiz-option__check {
  border-color: var(--color-red);
  background: var(--color-red);
  color: white;
}

.quiz-option--radio .quiz-option__check { border-radius: 50%; }

.quiz-nav {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  padding-top: 16px;
}

.quiz-btn-back {
  padding: 10px 24px;
  border: 1px solid #fff;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  border-radius: var(--btn-radius-quiz);
}

.quiz-btn-next {
  padding: 10px 24px;
  background: linear-gradient(180deg, #ff4a3d 0%, #ff241f 52%, #d91618 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-left: auto;
  border-radius: var(--btn-radius-quiz);
}

.quiz-btn-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.quiz-form-step {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .quiz-form-step { grid-template-columns: 1fr 1fr; }
}

.quiz-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quiz-results__heading {
  font-size: 38px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.quiz-stat-cards {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.quiz-stat-card {
  flex: 1;
  min-width: 140px;
  padding: 16px 20px;
  background: linear-gradient(142deg, #1c1c20 0%, #0d0d10 100%);
  border: 1px solid #39393f;
}

.quiz-stat-card__num {
  font-size: 54px;
  font-weight: 700;
  color: var(--color-red);
  line-height: 1;
}

.quiz-stat-card__label {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
}

.quiz-stat-card__sub {
  font-size: 12px;
  color: #9c9ca2;
}

.quiz-highlight {
  padding: 16px 20px;
  background: #111114;
  border: 1px solid #3b3b40;
  border-left: 4px solid var(--color-red);
}

.quiz-highlight__title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.quiz-highlight__text {
  font-size: 14px;
  color: #b8b8be;
  margin-top: 4px;
}

.quiz-cert {
  padding: 16px 20px;
  background: #151517;
  border: 1px solid #39393e;
  display: flex;
  gap: 16px;
  align-items: center;
}

.quiz-cert__icon {
  width: 42px;
  height: 38px;
  background: var(--color-red);
  border-radius: 4px;
  flex-shrink: 0;
}

.quiz-form-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quiz-field label {
  display: block;
  font-size: 13px;
  color: #bdbdc3;
  margin-bottom: 8px;
}

.quiz-field input {
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(166deg, #151518 0%, #101012 100%);
  border: 1px solid #39393f;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
}

.quiz-field input::placeholder { color: #727279; }

.quiz-field input:focus {
  outline: none;
  border-color: var(--color-red);
}

.quiz-submit {
  width: 100%;
  padding: 20px;
  background: linear-gradient(136deg, #ff3a45 0%, #ff202d 48%, #d90e19 100%);
  border: 2px solid rgba(255, 154, 160, 0.5);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  margin-top: 8px;
}

.quiz-thankyou {
  display: grid;
  gap: 32px;
  color: #fff;
}

@media (min-width: 900px) {
  .quiz-thankyou { grid-template-columns: 1fr 1fr; }
}

.quiz-thankyou__title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.1;
}

.quiz-thankyou__text {
  font-size: 24px;
  font-weight: 700;
  margin-top: 24px;
}

.quiz-thankyou__sub {
  font-size: 14px;
  color: #c8c8ce;
  margin-top: 12px;
  line-height: 1.5;
}

.quiz-thankyou__cert {
  margin-top: 24px;
  padding: 16px 24px;
  background: #121215;
  border: 1px solid #3a3a40;
  border-left: 4px solid var(--color-red);
}

.quiz-thankyou__actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quiz-action-card {
  padding: 18px 24px;
  background: linear-gradient(154deg, #17171a 100%, #101012 100%);
  border: 1px solid #3a3a40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  transition: border-color 0.2s;
  color: inherit;
  text-decoration: none;
}

.quiz-action-card:hover { border-color: #555; }

.quiz-action-card--primary {
  background: linear-gradient(126deg, #ff3440 0%, #ff202d 50%, #d90e19 100%);
  border: none;
}

.quiz-action-card__title {
  font-size: 18px;
  font-weight: 700;
}

.quiz-action-card__sub {
  font-size: 12px;
  color: #afafb5;
  margin-top: 4px;
}

.quiz-action-card--primary .quiz-action-card__sub { color: #ffe1e3; }

.quiz-mobile-header {
  display: block;
  margin-bottom: 16px;
}

@media (min-width: 900px) {
  .quiz-mobile-header { display: none; }
}

.quiz-mobile-header__title {
  font-size: 25px;
  font-weight: 700;
  color: #fff;
}
