/* 1. СБРОС СТИЛЕЙ И ШРИФТЫ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* 2. ГЛАВНЫЙ КОНТЕЙНЕР (Под размер экрана телефона в Telegram) */
body {
    background-color: #0B0E14; /* Глубокий темный фон, как на макете */
    color: #FFFFFF;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.main-container {
    width: 100%;
    max-width: 420px; /* Ограничение под мобильный экран */
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px; /* Отступы между блоками */
}

/* 3. ВЕРХНЯЯ КАРТОЧКА (Свободные деньги) */
.balance-card {
    background: linear-gradient(135deg, #181C26 0%, #10131A 100%);
    border-radius: 28px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    /* Мягкое неоновое свечение вокруг карточки */
    box-shadow: 0px 12px 40px rgba(0, 102, 255, 0.15); 
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.username {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
}

.notification-icon {
    font-size: 20px;
    cursor: pointer;
}

.balance-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -1px;
}

/* Бабл статуса (В лимите / Перерасход) */
.status-bubble {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 16px;
}

.status-green {
    background-color: rgba(46, 204, 113, 0.12);
    color: #2ECC71;
    border: 1px solid rgba(46, 204, 113, 0.25);
}

/* 4. КНОПКА ГОЛОСОВОГО ВВОДА */
.action-zone {
    width: 100%;
}

.voice-btn {
    width: 100%;
    /* Красивый градиент: синий -> фиолетовый */
    background: linear-gradient(90deg, #2F80ED 0%, #7F00FF 100%);
    border: none;
    border-radius: 20px;
    padding: 18px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0px 6px 24px rgba(127, 0, 255, 0.3);
    transition: transform 0.1s ease;
}

/* Эффект нажатия на кнопку */
.voice-btn:active {
    transform: scale(0.98);
}

/* 5. НИЖНИЕ ВИДЖЕТЫ */
.widgets-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.widget-card {
    background-color: #131822;
    border-radius: 24px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.widget-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.9);
}

/* Прогресс-бар Копилки */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #1C2330;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    /* Неоновый градиент полосы загрузки */
    background: linear-gradient(90deg, #00FF87 0%, #60EFFF 100%);
    border-radius: 4px;
}

.goal-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* Список транзакций */
.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.transaction-item:last-child {
    border-bottom: none; /* Убираем нижнюю полоску у последнего пункта */
}

.price-minus {
    color: #FF4D4D; /* Красный цвет для расходов */
    font-weight: 600;
}

/* ========================================== */
/* 🎨 СТИЛИ ДЛЯ ИНТЕРАКТИВНОГО КВИЗА        */
/* ========================================== */

.quiz-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
    background-color: #0b0e14;
    color: #ffffff;
}

/* Полоса прогресса */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: #1e2530;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-bar-fill {
    width: 20%;
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #a855f7);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
    transition: width 0.3s ease;
}

/* Текст */
.quiz-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.quiz-subtitle {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 30px;
}

/* Инпут ввода имени */
.quiz-input {
    width: 100%;
    padding: 16px;
    background: #131922;
    border: 2px solid #1e2530;
    border-radius: 16px;
    color: #fff;
    font-size: 16px;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.quiz-input:focus {
    outline: none;
    border-color: #8b5cf6;
}

/* Карточки вариантов */
.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.quiz-card {
    background: #131922;
    border: 2px solid #1e2530;
    border-radius: 16px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Эффект при выборе */
.quiz-card.selected {
    border-color: #8b5cf6;
    background: linear-gradient(145deg, #131922, #1b1635);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.quiz-card-emoji {
    font-size: 22px;
}

.quiz-card-text {
    font-size: 15px;
    font-weight: 500;
}

/* Сетка для экрана интуиции (2х2) */
.quiz-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    flex-grow: 1;
}

.quiz-grid .quiz-card {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 25px 15px;
}

/* Экран ачивки */
.quiz-badge-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    text-align: center;
}

.quiz-badge-icon {
    font-size: 70px;
    margin-bottom: 20px;
}

/* Главная фиолетовая кнопка */
.quiz-next-btn {
    width: 100%;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 18px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(109, 40, 217, 0.4);
    margin-top: 20px;
}

.quiz-next-btn:active {
    transform: scale(0.98);
}

/* Класс для скрытия неактивных экранов */
.hidden-screen {
    display: none !important;
}

/* Контейнер для горизонтального скролла карточек */
.cards-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 15px;
    padding: 20px;
    scrollbar-width: none; /* Прячем полосу прокрутки в Firefox */
}

.cards-carousel::-webkit-scrollbar {
    display: none; /* Прячем полосу прокрутки в Chrome/Safari */
}

/* Стили карточек Монобанка */
.mono-card {
    min-width: 85%; /* Чтобы следующая карточка слегка выглядывала сбоку */
    height: 160px;
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    scroll-snap-align: center;
    color: white;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    box-sizing: border-box;
    text-align: left;
}

/* Градиенты для карт */
.purple-gradient { background: linear-gradient(135deg, #a855f7, #7e22ce); }
.black-gradient { background: linear-gradient(135deg, #374151, #111827); }
.blue-gradient { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }

.card-header { display: flex; justify-content: space-between; align-items: center; }
.card-name { font-size: 14px; opacity: 0.9; font-weight: 500; }
.card-emoji { font-size: 20px; }
.card-balance { font-size: 32px; font-weight: bold; margin: 10px 0; }
.card-footer { font-size: 12px; opacity: 0.8; }

/* Эффект нажатия для кнопок и карточек (обратная связь) */
.quiz-next-btn:active, .quiz-card:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
}
.quiz-next-btn, .quiz-card {
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.scroll-container {
    cursor: grab;
    user-select: none; /* Запрещает выделение текста при свайпе мышкой */
    overflow-x: auto;  /* Разрешает горизонтальную прокрутку */
    -webkit-overflow-scrolling: touch; /* Плавный скролл на телефонах */
}

.scroll-container:active {
    cursor: grabbing;
}