.quiz-container {
  max-width: 800px;
  margin: 0 auto;
  font-family: sans-serif;
  padding: 16px;
}

.quiz-header {
  margin-bottom: 24px;
}

.quiz-header h1 {
  margin: 0 0 10px;
  font-size: 32px;
}

.quiz-intro {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 18px;
  color: #333;
}

.q-card {
  background: #fff;
  padding: 20px;
  display: flex;
  gap: 10px;
  border-radius: 12px;
  margin-bottom: 25px;
  border: 2px solid #eee;
  /* Дефолтная граница карточки */
  transition: 0.3s;
  flex-direction: column;
  align-items: stretch;
}

.q-card.locked {
  pointer-events: none;
  /* Отключает все клики внутри карточки */
  cursor: default;
}

/* Статусы карточки после проверки */
.q-card.is-correct-card {
  border-color: #28a745;
  background: #f8fff9;
}

.q-card.is-wrong-card {
  border-color: #dc3545;
  background: #fff8f8;
}

.variants-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  /* margin-top: 15px; */
  align-items: stretch;
}

@media (max-width: 600px) {
  .variants-grid {
    grid-template-columns: 1fr;
  }
}

.variant-item {
  display: flex;
  position: relative;
  cursor: pointer;
  margin: 0;
}

.variant-item input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.variant-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 15px;
  width: 100%;
  /* Занимает всю ширину колонки */
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 10px;
  box-sizing: border-box;
  /* Важно: чтобы padding не раздувал блок */
  transition: all 0.2s ease-in-out;
}

.variant-item:hover .variant-content {
  border-color: #007bff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.variant-item input:checked + .variant-content {
  border-color: #007bff;
  background-color: #f0f7ff;
}

.variant-img-wrapper {
  width: 100%;
  height: 100%;
  max-height: 50vh;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 6px;
  flex-shrink: 0;
  /* Запрещаем сжиматься картинке */
}

.variant-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.variant-text {
  font-size: 15px;
  line-height: 1.4;
  word-break: break-word;
  /* Чтобы длинные слова не вылезали */
}

.question-image {
  margin: 15px 0;
  text-align: center;
}

.correct-answer-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}
.correct-answer-image {
  margin: 0 auto;
}
.question-image img,
.correct-answer-image img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 8px;
}

.image-description {
  margin-top: 10px;
  font-size: 16px;
  color: #666;
}

/* Блок результата */
.quiz-result-box {
  margin-bottom: 20px;
  padding: 20px;
  text-align: center;
  font-weight: bold;
  font-size: 20px;
  border-radius: 8px;
  display: none;
  /* Скрыт по дефолту */
}

.quiz-result-box.show {
  display: block;
  background: #f0f7ff;
  border: 1px solid #007bff;
}

.quiz-btn {
  width: 100%;
  padding: 15px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.3s;
}

/* Стиль кнопки в режиме сброса */
.quiz-btn.reset-mode {
  background: #6c757d;
}

.quiz-btn.reset-mode:hover {
  background: #5a6268;
}

/* Выделение выбранного варианта */
.variant-content.selected {
  border-color: #007bff !important;
  background-color: #f0f7ff !important;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.3);
}
