/* 🔥 ФУНДАМЕНТАЛЬНОЕ ИСПРАВЛЕНИЕ */
.aspat-container,
.aspat-card-content,
#cardImageWrapper,
.aspat-buttons,
.aspat-button {
    box-sizing: border-box;
}

/* =========================================================
   БАЗОВЫЕ СТИЛИ
   ========================================================= */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column; 
    align-items: center;
    min-height: 100vh;
    color: #333;
}

.page-header, .page-footer, header, footer {
    width: 100%; 
    text-align: center; 
    padding: 10px 0;
}

.page-footer, footer {
    margin-top: auto; 
}

/* =========================================================
   КОНТЕЙНЕР ASPAT
   ========================================================= */
.aspat-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 95%;
    max-width: 600px;
    text-align: center;
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
}

.session-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #777;
}

/* =========================================================
   СТИЛИ КАРТОЧЕК: АДАПТИВНОСТЬ ДЛЯ ТЕКСТА
   ========================================================= */
.aspat-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative; 
    background-color: #f9f9f9;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* 🔥 ИСПРАВЛЕНО: Контент теперь гибкий и центрирует текст */
.aspat-card-content {
    position: relative;
    z-index: 2; 
    padding: 40px 20px;
    width: 100%;
    min-height: 300px; /* Минимальная высота, чтобы не было слишком мелко */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Центрируем вопрос по вертикали */
    align-items: center;
}

#cardImageWrapper {
    position: relative; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%; 
}

/* 🔥 ИСПРАВЛЕНО: Текст вопроса стал крупнее и заметнее */
.aspat-question-text {
    font-size: 1.5em;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1.4;
    width: 100%;
    margin: 0;
}

/* СЛОЙ 1: Изображение (скрыто, если его нет, но стили сохраняем) */
#questionImage {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain; 
    margin-bottom: 15px;
    border-radius: 4px;
    display: block;
}

/* =========================================================
   КНОПКИ: ТЕПЕРЬ ОНИ ВСЕГДА ПОД ТЕКСТОМ
   ========================================================= */
.aspat-buttons {
    /* 🔥 КРИТИЧНО: Убрали absolute, чтобы кнопки не перекрывали текст */
    position: relative; 
    width: 100%; 
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background-color: #f1f1f1;
    border-top: 1px solid #eee;
}

.aspat-button {
    padding: 18px 20px;
    border: none; 
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-grow: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.aspat-button-yes {
    background-color: #2ecc71;
    color: white;
}

.aspat-button-no {
    background-color: #e74c3c;
    color: white;
}

.aspat-button-idk {
    background-color: #95a5a6;
    color: white;
}

.aspat-button:active {
    transform: translateY(2px);
    box-shadow: none;
}

.aspat-card-id {
    font-size: 0.8em;
    color: #aaa;
    margin-top: 10px;
    padding-bottom: 5px;
}