:root {
    --black: #000000;
    --dark-grey: #1a1a1a;
    --grey: #404040;
    --light-grey: #a6a6a6;
    --orange: #fbbd61;
    --white: #ffffff;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: var(--black);
    color: var(--white);
    display: flex;
    justify-content: center;
}

.main-container {
    width: 100%;
    max-width: 450px;
    height: 100vh;
    overflow-y: auto;
    position: relative;
}

/* Секция "До квиза" */
#pre-quiz, #quiz, #success-screen {
    display: none;
    flex-direction: column;
}

#pre-quiz.active, #quiz.active, #success-screen.active {
    display: flex !important;
}

.banner-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
}

#pre-quiz .header-image {
    width: 100%;
    height: auto;
    display: block; /* Убирает нижний микро-зазор браузера */
    margin: 0;
}

/* Контейнер текстового блока */
#pre-quiz .content {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
}

.target {
    background-color: #535353;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    padding: 12px 10px;
    width: 100%;
    margin: 0 0 20px 0; /* Отступ только СНИЗУ от плашки до заголовка */
    border-radius: 0;   /* Прямые углы, приклеенные к краям */
    box-sizing: border-box;
}

/* Главный заголовок */
#pre-quiz h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 21px;
    line-height: 1.25;
    color: #ffffff;
    margin: 18px 0 14px 0;
    letter-spacing: -0.3px;
}

/* Главный абзац */
#pre-quiz .description {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.35;
    color: #ffffff;
    margin: 0 0 14px 0;
}

/* Золотой акцент */
#pre-quiz .gold-text {
    color: #f7be68; /* Мягкий янтарно-золотой цвет оригинала */
    font-weight: 700;
}

/* Зачеркнутая цена */
#pre-quiz del {
    text-decoration: line-through;
    color: #ffffff;
    opacity: 0.8;
}

/* Пояснительный текст */
#pre-quiz .sub-description {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 14px;
    line-height: 1.4;
    color: #b0b0b0;
    margin: 0 0 22px 0;
}

#start-quiz-btn {
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    animation: glow 1.5s infinite;
    transition: box-shadow 0.3s ease;
}

#start-quiz-btn:hover {
    box-shadow: 0 0 25px rgba(251, 189, 97, 1);
    animation: none;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(251, 189, 97, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(251, 189, 97, 0.8);
    }
    100% {
        box-shadow: 0 0 5px rgba(251, 189, 97, 0.4);
    }
}



.note {
    font-size: 12px;
    color: var(--light-grey);
    text-align: center;
    margin-top: 10px;
}

.bonus {
    margin-top: 40px;
}

.bonus p strong {
    color: var(--orange);
}

.bonus-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.bonus-item img {
    width: 40px;
}

.bonus-text p {
    margin: 0;
}

.bonus-text .price {
    font-weight: bold;
    color: var(--orange);
}

.bonus-text .name {
    margin-top: 5px;
}

/* Секция Квиз */
#quiz {
    background-color: var(--dark-grey);
    height: 100%;
}

.quiz-header {
    padding: 20px;
    position: relative;
    background-color: #3f3f3f;
    border-bottom: 1px solid #555555;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    cursor: pointer;
    color: var(--light-grey);
}

.progress-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-top: 15px;
}

.progress-text {
    font-size: 14px;
    color: #f3b052;
    font-weight: 600;
    margin: 0;
}

.progress-subtext {
    color: #ffffff;
    font-weight: 300;
    font-size: 13px;
    margin: 0;
}

.current-step {
    font-size: 14px;
    color: #ffffff;
    font-weight: 400;
    opacity: 0.9;
    margin: 0;
}

.progress-bar {
    width: 100%;
    height: 3px;
    background-color: var(--grey);
    margin-top: 15px;
}

.progress-fill {
    height: 100%;
    background-color: var(--orange);
    width: 0%;
    transition: width 0.3s ease;
}

.quiz-questions {
    padding: 0 20px;
    flex-grow: 1;
    overflow-y: auto;
}

.question {
    margin-bottom: 30px;
}

.question h2 {
    font-weight: 400;
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 20px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.option {
    background-color: var(--grey);
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
}

.option img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Гарантирует строго квадратную форму */
    object-fit: cover;   /* Картинка заполняет квадрат без искажения пропорций */
    border-radius: 8px;
    margin-bottom: 10px;
    display: block;
}

.option p {
    margin: 0;
    font-size: 14px;
}

.option.selected {
    border-color: var(--orange);
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--orange);
    border-radius: 50%;
    cursor: pointer;
}

.radio-option input[type="radio"]:checked {
    background-color: var(--orange);
}

.expert-notice {
    margin-bottom: 20px;
}

.expert-bubble {
    background-color: #e3e3e3;
    color: #111;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 15px;
    position: relative;
}

.expert-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    border-width: 10px 10px 0 0;
    border-style: solid;
    border-color: #e3e3e3 transparent transparent transparent;
}

.expert-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
}

.expert-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.expert-info div {
    display: flex;
    flex-direction: column;
}

.expert-info strong {
    font-size: 14px;
}

.expert-info span {
    font-size: 12px;
    color: var(--light-grey);
}

.quiz-footer {
    padding: 20px;
    display: flex;
    justify-content: space-between;
}

#prev-btn, #final-prev-btn {
    background: none;
    border: none;
    color: var(--light-grey);
    font-size: 16px;
    cursor: pointer;
}

#next-btn, #get-result-btn {
    padding: 10px 25px;
    background-color: var(--orange);
    color: var(--black);
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

/* Форма контактов внутри квиза */
.thanks {
    color: var(--orange);
    margin-top: 15px;
}

/* Экран успеха */
#success-screen {
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--dark-grey);
    text-align: center;
    padding: 20px;
}
.success-content h2 {
    color: var(--orange);
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
}
.success-content p {
    font-size: 16px;
    color: #fff;
    margin-bottom: 30px;
    line-height: 1.5;
}
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--orange);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#manual-redirect-btn {
    background-color: var(--orange);
    color: var(--black);
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: background-color 0.3s;
}
#manual-redirect-btn:hover {
    background-color: #fca734;
}

.form-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.form-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 22px;
    color: #ffffff;
    text-align: left;
    margin-bottom: 25px;
    width: 100%;
}

.phone-input {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #ffffff;
    color: var(--black);
    padding: 10px 15px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 40px;
}

.phone-input img {
    width: 25px;
}

.phone-input span {
    font-weight: bold;
}

.phone-input input {
    border: none;
    background: transparent;
    flex-grow: 1;
    font-size: 16px;
    outline: none;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px 0;
    box-sizing: border-box;
}

#get-result-btn {
    background-color: #f7be68;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    padding: 15px 30px;
    color: var(--black);
    border: none;
    cursor: pointer;
}
