/* Адаптивный режим - Стили для квиза (вопросов) */

/* Блокировка внешнего скролла при активном адаптивном режиме */
body.adaptive-active {
    overflow: hidden !important;
    height: 100vh !important;
}

body.adaptive-active .app-main {
    overflow: hidden !important;
}

/* Основной контейнер */
#adaptive-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0;
    display: none;
    flex-direction: column;
    background: var(--background-color);
    overflow: hidden;
    z-index: 200; /* Bump z-index to match onboarding */
}

#adaptive-view.active {
    display: flex;
}

/* Обертка для контента */
.adaptive-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 10px 120px 10px; /* Увеличил отступ */
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Хедер вьюхи */
#adaptive-view .view-header {
    padding: 20px 20px 0 20px;
    width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

#adaptive-view .view-header h2 {
    margin: 0;
    margin-left: 15px;
    font-size: 1.2rem;
}

/* Карточка вопроса */
.adaptive-card {
    background: var(--card-background); /* Fixed variable */
    border-radius: 16px;
    padding: 12px;
    width: 100%;
    max-width: 600px;
    margin-top: 10px;
    position: relative;
    border: 1px solid rgba(255, 59, 48, 0.3); 
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.15); 
    animation: redPulse 3s infinite ease-in-out;
    margin-bottom: 20px;
}

/* Светлая тема */
.light-theme .adaptive-card {
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.2);
}

@keyframes redPulse {
    0% {
        box-shadow: 0 0 15px rgba(255, 59, 48, 0.1);
        border-color: rgba(255, 59, 48, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 59, 48, 0.4);
        border-color: rgba(255, 59, 48, 0.6);
    }
    100% {
        box-shadow: 0 0 15px rgba(255, 59, 48, 0.1);
        border-color: rgba(255, 59, 48, 0.3);
    }
}

/* Элементы внутри карточки */
.adaptive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.adaptive-badge {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.adaptive-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 10px;
    max-height: 180px;
    object-fit: contain;
}

.adaptive-question-text {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
}

/* Варианты ответов */
.adaptive-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.adaptive-option {
    padding: 10px 14px;
    background: rgba(127, 127, 127, 0.05); /* Fixed variable: transparent grey for neutral background */
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.adaptive-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.adaptive-option.selected {
    border-color: #007aff;
    background: rgba(0, 122, 255, 0.1);
}

.adaptive-option.correct {
    background: rgba(52, 199, 89, 0.15);
    border-color: #32d74b;
    color: #32d74b;
}

.adaptive-option.incorrect {
    background: rgba(255, 69, 58, 0.15);
    border-color: #ff453a;
    color: #ff453a;
}

/* Кнопки и подсказки */
.adaptive-tip {
    margin-top: 15px;
    background: rgba(255, 204, 0, 0.1);
    border-left: 4px solid #ffcc00;
    padding: 12px;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.4;
    animation: fadeIn 0.3s;
    display: none;
}

.adaptive-confirm-btn {
    margin-top: 15px;
    width: 100%;
    background: #34c759;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: none;
    animation: fadeIn 0.2s ease-out;
}

.adaptive-next-btn {
    margin-top: 15px;
    margin-bottom: 10px;
    width: 100%;
    background: #007aff;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
