/**
 * Стили фронтенда Quiz Calculator
 * Современный дизайн с адаптивностью
 */

.quiz-calculator-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.quiz-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

/* Прогресс-бар */
.quiz-progress {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #00a0d2);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Приветственный экран */
.quiz-welcome {
    text-align: center;
    padding: 40px 0;
}

.quiz-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.quiz-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Контент квиза */
.quiz-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-question {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.4;
}

.step-hint {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
    font-style: italic;
}

.step-media {
    margin: 20px 0;
    text-align: center;
}

.step-media img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.step-media video {
    max-width: 100%;
    border-radius: 8px;
}

/* Поля ввода */
.step-input {
    margin: 20px 0;
}

.quiz-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.quiz-input:focus {
    outline: none;
    border-color: #0073aa;
}

.quiz-slider {
    width: 100%;
    margin: 20px 0;
}

.slider-value {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #0073aa;
    margin-top: 10px;
}

/* Выбор */
.quiz-choice-label {
    display: block;
    padding: 15px;
    margin-bottom: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-choice-label:hover {
    border-color: #0073aa;
    background: #f5f5f5;
}

.quiz-choice-label input[type="radio"],
.quiz-choice-label input[type="checkbox"] {
    margin-right: 10px;
}

.quiz-choice-label input[type="radio"]:checked + span,
.quiz-choice-label input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #0073aa;
}

.quiz-choice-label:has(input:checked) {
    border-color: #0073aa;
    background: #e3f2fd;
}

/* Кнопки Yes/No */
.quiz-boolean-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.quiz-btn-yes,
.quiz-btn-no {
    flex: 1;
    padding: 15px 30px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-btn-yes:hover {
    border-color: #4caf50;
    background: #e8f5e9;
    color: #4caf50;
}

.quiz-btn-no:hover {
    border-color: #f44336;
    background: #ffebee;
    color: #f44336;
}

.quiz-btn-yes.active {
    border-color: #4caf50;
    background: #4caf50;
    color: #fff;
}

.quiz-btn-no.active {
    border-color: #f44336;
    background: #f44336;
    color: #fff;
}

/* Навигация */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Кнопки */
.quiz-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-btn-primary {
    background: #0073aa;
    color: #fff;
}

.quiz-btn-primary:hover {
    background: #005a87;
}

.quiz-btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.quiz-btn-secondary:hover {
    background: #e0e0e0;
}

/* Форма контактов */
.quiz-contact-form {
    animation: fadeIn 0.3s ease;
}

.quiz-contact-form h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

/* Результат */
.quiz-result {
    text-align: center;
    padding: 40px 0;
    animation: fadeIn 0.3s ease;
}

.result-value {
    font-size: 48px;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 20px;
}

.result-message {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
}

/* Адаптивность */
@media (max-width: 768px) {
    .quiz-wrapper {
        padding: 20px;
    }
    
    .quiz-title {
        font-size: 24px;
    }
    
    .step-question {
        font-size: 20px;
    }
    
    .quiz-boolean-buttons {
        flex-direction: column;
    }
    
    .quiz-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .quiz-btn {
        width: 100%;
    }
}

/* Темная тема */
.quiz-calculator-container[data-theme="dark"] {
    background: #1a1a1a;
    color: #fff;
}

.quiz-calculator-container[data-theme="dark"] .quiz-wrapper {
    background: #2a2a2a;
    color: #fff;
}

.quiz-calculator-container[data-theme="dark"] .quiz-title,
.quiz-calculator-container[data-theme="dark"] .step-question {
    color: #fff;
}

.quiz-calculator-container[data-theme="dark"] .quiz-input {
    background: #333;
    border-color: #555;
    color: #fff;
}

.quiz-calculator-container[data-theme="dark"] .quiz-choice-label {
    background: #333;
    border-color: #555;
}

.quiz-calculator-container[data-theme="dark"] .quiz-choice-label:hover {
    background: #444;
}
