/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #BB7D31;
    --primary-hover: #9d6828;
    --primary-inactive: rgba(187, 125, 49, 0.5);
    --text-white: #FFFFFF;
    --text-gray: #D0D0D0;
    --bg-dark: rgba(0, 0, 0, 0.6);
    --bg-option: rgba(30, 30, 30, 0.8);
    --bg-option-selected: rgba(50, 50, 50, 0.9);
    --border-color: rgba(187, 125, 49, 0.5);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Общие стили для экранов */
.quiz-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.quiz-screen.active {
    display: flex;
}

.quiz-screen:not(.active) {
    display: none;
}

/* ============================================
   ПЕРВЫЙ ЭКРАН (Intro)
   ============================================ */

.quiz-intro {
    position: relative;
    background: #000;
}

.intro-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.intro-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.intro-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.intro-title {
    font-family: 'Liberation Sans', Arial, sans-serif;
    font-size: clamp(32px, 4vw, 72px);
    font-weight: 400;
    text-transform: uppercase;
    color: var(--text-white);
    margin-bottom: clamp(40px, 6vw, 80px);
    line-height: 1.2;
    letter-spacing: 2px;
}

.title-line {
    display: block;
}

.btn-intro {
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    padding: clamp(16px, 2vw, 24px) clamp(48px, 6vw, 96px);
    font-size: clamp(16px, 2vw, 24px);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(187, 125, 49, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: clamp(60px, 10vw, 120px);
}

.btn-intro:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(187, 125, 49, 0.4);
}

.btn-intro:active {
    transform: translateY(0);
}

.intro-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(20px, 3vw, 40px);
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.feature-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--text-white);
    opacity: 0.3;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    flex: 1 1 calc(25% - 30px);
    min-width: 200px;
    max-width: 300px;
    margin-top: 20px;
}

.feature-number {
    color: var(--primary-color);
    font-size: clamp(14px, 1.5vw, 20px);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.feature-text {
    color: var(--text-white);
    font-size: clamp(12px, 1.2vw, 16px);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    text-align: left;
    width: 100%;
}

/* ============================================
   ЭКРАНЫ С ВОПРОСАМИ
   ============================================ */

.quiz-questions {
    position: relative;
    background: #000;
}

.question-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.question-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.quiz-wrapper {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 5%;
}

.quiz-container {
    padding: clamp(40px, 5vw, 60px);
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(30px, 4vw, 50px);
}

/* Экран результатов */
.quiz-result {
    position: relative;
    background: #000;
}

.result-container {
    text-align: center;
}

.result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.result-title {
    font-family: 'Liberation Sans', Arial, sans-serif;
    font-size: 40px;
    font-weight: 400;
    color: var(--text-white);
    line-height: 1.4;
    margin: 0;
}

.result-title.error {
    color: #ff6b6b;
}

.result-description {
    font-family: 'Inter', sans-serif;
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-white);
    line-height: 1.6;
    margin: 0;
    max-width: 600px;
}

.result-description.error {
    color: #ff9999;
}

.result-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
    padding: 16px 48px;
    font-size: clamp(16px, 2vw, 20px);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(187, 125, 49, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.question-title {
    font-family: 'Liberation Sans', Arial, sans-serif;
    font-size: 40px;
    font-weight: 400;
    color: var(--text-white);
    line-height: 1.4;
    text-align: center;
}

/* Варианты ответов */
.answer-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.answer-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-option);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.answer-option:hover {
    background: var(--bg-option-selected);
    border-color: var(--primary-color);
}

.answer-option.selected {
    background: var(--bg-option-selected);
    border-color: var(--primary-color);
}

/* Кастомные чекбоксы */
.answer-option input[type="radio"],
.answer-option input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    background: transparent;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.answer-option.selected .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.answer-option.selected .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-white);
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

.answer-option label {
    flex: 1;
    color: var(--text-white);
    font-size: clamp(18px, 2.5vw, 24px);
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    user-select: none;
}

/* Поле для телефона */
.phone-input-wrapper {
    margin-top: 10px;
}

.phone-input {
    width: 100%;
    padding: 20px 24px;
    background: var(--bg-option);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-white);
    font-size: clamp(16px, 2vw, 20px);
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.phone-input::placeholder {
    color: var(--text-gray);
}

.phone-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-option-selected);
}

/* Сообщение об ошибке */
.error-message {
    color: #ff6b6b;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 10px;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message.show {
    opacity: 1;
    display: block;
}

/* Навигация */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;    
}

.nav-left {
    display: flex;
    align-items: center;
}

.step-indicator {
    color: var(--text-white);
    font-size: clamp(14px, 1.5vw, 18px);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Кнопки */
.btn {
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-back {
    width: 48px;
    height: auto;
    min-height: 48px;
    background: var(--bg-option);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 14px 0;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back:hover:not(:disabled) {
    background: var(--primary-color);
    color: var(--text-white);
}

.btn-back:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--primary-inactive);
    color: var(--primary-inactive);
}

.btn-next {
    background: var(--primary-color);
    color: var(--text-white);
    padding: 14px 32px;
    font-size: clamp(14px, 1.5vw, 18px);
    min-width: 120px;
    height: auto;
    min-height: 48px;
}

.btn-next:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(187, 125, 49, 0.4);
}

.btn-next:disabled {
    background: var(--primary-inactive);
    color: var(--text-gray);
    cursor: not-allowed;
    transform: none;
}

.btn-next:active:not(:disabled) {
    transform: translateY(0);
}

/* Кнопка "Получить подборку" на последнем экране */
.btn-submit {
    background: var(--primary-color);
    color: var(--text-white);
    padding: 16px 48px;
    font-size: clamp(16px, 2vw, 20px);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.btn-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(187, 125, 49, 0.4);
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

/* Планшеты (768px - 1023px) */
@media (max-width: 1023px) {
    .intro-content {
        padding: 0 4%;
    }
    
    .intro-features {
        gap: 20px;
    }
    
    .feature-item {
        flex: 1 1 calc(50% - 20px);
        max-width: none;
    }
    
    .quiz-wrapper {
        padding: 30px 4%;
    }
    
    .quiz-container {
        padding: 40px 30px;
    }
}

/* Мобильные устройства (до 767px) */
@media (max-width: 767px) {
    .intro-content {
        padding: 0 20px;
    }
    
    .intro-title {
        margin-bottom: 40px;
    }
    
    .btn-intro {
        margin-bottom: 60px;
        padding: 18px 40px;
    }
    
    .intro-features {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px 16px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .feature-item {
        flex: none;
        max-width: none;
        min-width: 0;
        margin-top: 0;
    }
    
    .quiz-wrapper {
        padding: 20px;
        align-items: flex-start;
        padding-top: 40px;
    }
    
    .quiz-container {
        padding: 30px 20px;
    }
    
    .question-title {
        text-align: left;
    }
    
    .answer-option {
        padding: 16px 20px;
    }
    
    .answer-option label {
        font-size: 18px;
    }
    
    .quiz-navigation {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .nav-left {
        justify-content: flex-start;
        order: 2;
    }
    
    .nav-right {
        justify-content: space-between;
        width: 100%;
        order: 1;
    }
    
    .btn-next {
        flex: 1;
    }
    
    .phone-input {
        padding: 16px 20px;
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .intro-title {
        font-size: 24px;
        letter-spacing: 1px;
    }
    
    .btn-intro {
        padding: 16px 32px;
        font-size: 14px;
    }
    
    .feature-text {
        font-size: 12px;
    }
    
    .intro-features {
        gap: 16px 12px;
    }
    
    .feature-item {
        gap: 8px;
    }
    
    .quiz-container {
        padding: 24px 16px;
    }
    
    .question-title {
        font-size: 20px;
    }
    
    .answer-option {
        padding: 14px 16px;
        gap: 12px;
    }
    
    .checkbox-custom {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    
    .answer-option.selected .checkbox-custom::after {
        font-size: 20px;
    }
    
    .answer-option label {
        font-size: 16px;
    }
    
    .btn-back {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }
    
    .btn-next {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* Большие экраны (от 1920px) */
@media (min-width: 1920px) {
    .quiz-container {
        max-width: 900px;
    }
    
    .intro-content {
        max-width: 1600px;
    }
}

/* Очень большие экраны (от 2560px) */
@media (min-width: 2560px) {
    .quiz-container {
        max-width: 1000px;
        padding: 70px;
    }
    
    .intro-content {
        max-width: 2000px;
    }
}

/* Ультра широкие экраны (от 3000px) */
@media (min-width: 3000px) {
    .quiz-container {
        max-width: 1200px;
        padding: 80px;
    }
    
    .intro-content {
        max-width: 2400px;
    }
}

