/* ===== Стили страницы Квиза ===== */
.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
.card { background: white; border-radius: 10px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }

/* Прогресс-бар */
.progress-container { margin-bottom: 20px; }
.progress-info { display: flex; justify-content: space-between; font-size: 13px; color: #6b7280; margin-bottom: 8px; }
.progress-bar-bg { background: #e5e7eb; height: 8px; border-radius: 4px; overflow: hidden; }
.progress-bar-fill { background: #4a6cf7; height: 100%; width: 0%; transition: width 0.3s ease; }

/* Карточка вопроса */
.question-card { margin-bottom: 20px; }
.question-text { font-size: 18px; font-weight: 600; margin-bottom: 16px; line-height: 1.4; }
.option-label { display: block; padding: 12px; border: 2px solid #e5e7eb; border-radius: 8px; margin-bottom: 8px; cursor: pointer; transition: all 0.15s; font-size: 15px; }
.option-label:hover { border-color: #c7d2fe; background: #f8fafc; }
.option-label:has(input:checked) { border-color: #4a6cf7; background: #eef2ff; color: #1e40af; font-weight: 600; }
.option-label input { margin-right: 10px; }

/* Поля ввода для открытых вопросов */
textarea { width: 100%; min-height: 100px; padding: 12px; border: 1px solid #ccc; border-radius: 8px; font-family: inherit; font-size: 15px; resize: vertical; margin-bottom: 12px; }
textarea:focus { border-color: #4a6cf7; outline: none; }

/* Кнопки */
.btn { padding: 10px 20px; border-radius: 8px; border: none; font-weight: 600; cursor: pointer; font-size: 15px; transition: 0.2s; width: 100%; }
.btn-primary { background: #4a6cf7; color: white; }
.btn-primary:hover { background: #3a5ce7; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Бейджи уровней */
.badge { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-grey { background: #e5e7eb; color: #4b5563; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #dc2626; }

/* Результат */
.result-card { text-align: center; }
.result-score { font-size: 48px; font-weight: 800; color: #4a6cf7; margin: 10px 0; }
.result-meta { font-size: 15px; color: #6b7280; margin-bottom: 20px; }

/* Модалка настроек */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.visible { display: flex; }
.modal { background: white; border-radius: 12px; padding: 20px; max-width: 400px; width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.modal h3 { margin-top: 0; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button { flex: 1; padding: 10px; border-radius: 6px; border: none; cursor: pointer; font-weight: 600; }

/* Лог */
#log { background: #1e1e1e; color: #d4d4d4; padding: 10px; border-radius: 6px; font-family: Consolas, monospace; font-size: 11px; height: 120px; overflow-y: auto; white-space: pre-wrap; margin-top: 14px; }
.log-info { color: #9cdcfe; } .log-error { color: #f48771; } .log-ok { color: #4ec9b0; }

/* Мобильная адаптивность */
@media (max-width: 640px) {
    .wrap { padding: 8px; }
    .card { padding: 12px; }
    .question-text { font-size: 16px; }
    .option-label { font-size: 14px; padding: 10px; }
}
