/* Онбординг */
.onboarding {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: var(--tg-theme-bg-color, #fff);
    display: flex;
    flex-direction: column;
    transition: opacity 0.4s ease;
}

.onboarding.hidden {
    opacity: 0;
    pointer-events: none;
}

.onboarding-screen {
    display: none;
    flex-direction: column;
    flex: 1;
    padding: 24px 20px;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.onboarding-screen.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Экран 1 — Приветствие */
.ob-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
}

.ob-emoji {
    font-size: 64px;
    line-height: 1;
}

.ob-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    max-width: 300px;
}

.ob-subtitle {
    font-size: 15px;
    color: var(--tg-theme-hint-color, #888);
    max-width: 280px;
    line-height: 1.5;
}

/* Кнопка */
.ob-btn {
    width: 100%;
    max-width: 340px;
    padding: 16px;
    border-radius: 14px;
    border: none;
    background: var(--tg-theme-button-color, #3390ec);
    color: var(--tg-theme-button-text-color, #fff);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    margin: 0 auto 32px;
    transition: transform 0.15s;
}

.ob-btn:active {
    transform: scale(0.97);
}

/* Экран 2, 3 — Вопросы */
.ob-question {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    margin-top: 40px;
}

.ob-hint {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #888);
    margin-bottom: 24px;
}

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

.ob-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 2px solid var(--tg-theme-secondary-bg-color, #eee);
    background: var(--tg-theme-bg-color, #fff);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
}

.ob-option:active {
    transform: scale(0.98);
}

.ob-option.selected {
    border-color: var(--tg-theme-button-color, #3390ec);
    background: rgba(51, 144, 236, 0.06);
}

.ob-option-icon {
    font-size: 24px;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}

.ob-option-text {
    font-weight: 500;
}

/* Экран 4 — Результат */
.ob-result {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
}

.ob-result-count {
    font-size: 56px;
    font-weight: 800;
    color: var(--tg-theme-button-color, #3390ec);
    line-height: 1;
}

.ob-result-label {
    font-size: 18px;
    font-weight: 600;
    max-width: 260px;
    line-height: 1.4;
}

.ob-result-sub {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #888);
}

/* Спиннер — прыгающие точки */
.ob-loading {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.ob-loading-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--tg-theme-button-color, #3390ec);
    animation: obBounce 0.6s infinite alternate;
}

.ob-loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ob-loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes obBounce {
    from { transform: translateY(0); opacity: 0.4; }
    to { transform: translateY(-12px); opacity: 1; }
}

/* Прогресс-бар */
.ob-progress {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 16px;
    padding-top: 16px;
}

.ob-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tg-theme-secondary-bg-color, #ddd);
    transition: all 0.3s;
}

.ob-dot.active {
    background: var(--tg-theme-button-color, #3390ec);
    width: 24px;
    border-radius: 4px;
}

.ob-dot.done {
    background: var(--tg-theme-button-color, #3390ec);
}

/* Кнопка «Пропустить» */
.ob-skip {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--tg-theme-hint-color, #aaa);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
}
