/* ===== Global Glassmorphism Style ===== */
/* Универсальный стиль темного стекла для всех карточек и попапов */
.glass-card {
    position: relative;
    background: rgba(20, 20, 25, 0.85);
    backdrop-filter: blur(80px) saturate(200%);
    -webkit-backdrop-filter: blur(80px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.5),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    color: var(--tg-theme-text-color, #fff);
    overflow: visible;
    z-index: 1;
}

/* Контент внутри glass-card должен быть выше орбитальных частиц */
.glass-card > * {
    position: relative;
    z-index: 2;
}

/* SVG контейнер для орбитальных частиц */
.glass-orbit-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: visible;
}

/* Орбитальные частицы вокруг glass-card */
.glass-orbit-particle {
    fill: #FFA500;
    filter: drop-shadow(0 0 2px rgba(255, 165, 0, 0.45));
    transform-origin: 50% 50%; /* Центр viewBox */
    will-change: transform, opacity;
    animation:
        glassOrbit var(--orbit-duration, 10s) linear infinite var(--orbit-delay, 0s),
        glassShimmer var(--shimmer-duration, 2s) ease-in-out infinite;
}

@keyframes glassOrbit {
    from {
        transform: rotate(var(--orbit-angle, 0deg)) translateX(var(--orbit-radius, 50%)) rotate(calc(-1 * var(--orbit-angle, 0deg)));
    }
    to {
        transform: rotate(calc(var(--orbit-angle, 0deg) + 360deg)) translateX(var(--orbit-radius, 50%)) rotate(calc(-1 * (var(--orbit-angle, 0deg) + 360deg)));
    }
}

@keyframes glassShimmer {
    0%, 100% {
        opacity: 0.08; /* Уменьшено с 0.15 для менее яркого старта */
        fill: rgba(255, 200, 100, 0.1); /* Уменьшено с 0.2 */
    }
    50% {
        opacity: 0.25; /* Уменьшено с 0.375 для менее яркого пика */
        fill: rgba(255, 165, 0, 0.25); /* Уменьшено с 0.375 */
    }
}

/* ===== Base Body Styles ===== */
body {
    position: relative;
    overflow-x: hidden;
    background-color: var(--tg-theme-bg-color, #ffffff);
}

/* Header with balance */
.header {
    position: relative;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    position: relative;
    z-index: 100;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Logo with circular progress ring - Coin style */
.logo-container {
    position: relative;
    width: 84px; /* Увеличено в 1.5 раза: 56px -> 84px */
    height: 84px; /* Увеличено в 1.5 раза: 56px -> 84px */
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 2px rgba(255, 166, 35, 0.15));
    transition: filter 0.3s ease;
    perspective: 1000px; /* Для 3D эффекта переворота */
    overflow: hidden; /* Скрываем блеск за пределами круглой монеты */
    border-radius: 50%; /* Монета круглая */
    z-index: 200; /* Поднимаем выше всех элементов */
}

/* Фон монеты - приглушённый золотой цвет для контраста с логотипом */
.logo-container::before {
    content: '';
    position: absolute;
    width: 68px; /* Чуть меньше контейнера */
    height: 68px;
    background: rgba(180, 120, 25, 0.75); /* Приглушённый золотой с непрозрачностью 75% */
    border-radius: 50%;
    z-index: 0;
    transition: opacity 0.4s ease;
    overflow: hidden;
}

/* Обратная сторона монеты (показывается при перевороте) */
.logo-container::after {
    content: '';
    position: absolute;
    width: 68px;
    height: 68px;
    background: rgba(200, 130, 30, 0.85); /* Чуть ярче для обратной стороны */
    border-radius: 50%;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.logo-container.glow-low {
    filter: drop-shadow(0 0 4px rgba(255, 166, 35, 0.2));
}

.logo-container.glow-medium {
    filter: drop-shadow(0 0 6px rgba(255, 166, 35, 0.3));
}

.logo-container.glow-high {
    filter: drop-shadow(0 0 8px rgba(255, 166, 35, 0.35)) drop-shadow(0 0 12px rgba(255, 166, 35, 0.15));
}

.logo-container.glow-complete {
    filter: drop-shadow(0 0 12px rgba(255, 166, 35, 0.4)) drop-shadow(0 0 20px rgba(255, 166, 35, 0.2));
    animation: coinPulse 2s ease-in-out infinite;
}

@keyframes coinPulse {
    0%, 100% {
        filter: drop-shadow(0 0 18px rgba(255, 166, 35, 0.8)) drop-shadow(0 0 30px rgba(255, 166, 35, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 24px rgba(255, 166, 35, 1)) drop-shadow(0 0 42px rgba(255, 166, 35, 0.6));
    }
}

.logo-progress-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.logo-progress-bg {
    fill: none;
    stroke: rgba(255, 166, 35, 0.2); /* #ffa623 с прозрачностью 20% */
    stroke-width: 7.5; /* Увеличено в 1.5 раза: 5 -> 7.5 */
}

.logo-progress-bar {
    fill: none;
    stroke: #ffa623; /* Золотой цвет логотипа */
    stroke-width: 7.5; /* Увеличено в 1.5 раза: 5 -> 7.5 */
    stroke-linecap: round;
    stroke-dasharray: 339.29; /* Увеличено в 1.5 раза: 2 * PI * 54 (radius 54 вместо 36) */
    stroke-dashoffset: 339.29; /* Увеличено в 1.5 раза */
    transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

.logo-image {
    width: 48px; /* Увеличено в 1.5 раза: 32px -> 48px */
    height: 48px; /* Увеличено в 1.5 раза: 32px -> 48px */
    object-fit: contain;
    position: relative;
    z-index: 1;
}

/* Искры для полного заполнения */
.logo-sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #FFD700;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}

.logo-container.glow-high .logo-sparkle,
.logo-container.glow-complete .logo-sparkle {
    animation: sparkleFloat 1.5s ease-in-out infinite;
}

@keyframes sparkleFloat {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    20% {
        opacity: 1;
        transform: translate(var(--sparkle-x), var(--sparkle-y)) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(calc(var(--sparkle-x) * 2), calc(var(--sparkle-y) * 2)) scale(0.5);
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--sparkle-x) * 3), calc(var(--sparkle-y) * 3)) scale(0);
    }
}

/* Анимация вращения логотипа как монетка при достижении 100% */
@keyframes coinFlip {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(180deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

/* Показываем обратную сторону монеты при перевороте */
.logo-container.flipping::before {
    opacity: 0;
}

.logo-container.flipping::after {
    opacity: 1;
}

/* Анимация свечения круга прогресса при 100% */
@keyframes progressGlow {
    0% {
        stroke: #ffa623;
        filter: drop-shadow(0 0 4px rgba(255, 166, 35, 0.6));
    }
    50% {
        stroke: #ffa623;
        filter: drop-shadow(0 0 12px rgba(255, 166, 35, 1)) drop-shadow(0 0 20px rgba(255, 166, 35, 0.8));
    }
    100% {
        stroke: #ffa623;
        filter: drop-shadow(0 0 4px rgba(255, 166, 35, 0.6));
    }
}

/* Классы для триггера анимаций */
.logo-container.coin-flip {
    animation: coinFlip 0.8s ease-in-out;
}

.logo-progress-bar.progress-glow {
    animation: progressGlow 1.2s ease-in-out;
}

/* Эффект блеска монеты */
.coin-glint {
    position: absolute;
    top: -10%;
    left: -30%;
    width: 40%;
    height: 120%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-20deg);
    z-index: 10;
    pointer-events: none;
    opacity: 0;
}

@keyframes coinShine {
    0% {
        left: -30%;
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        left: 130%;
        opacity: 0;
    }
}

.logo-container.shine .coin-glint {
    animation: coinShine 0.8s ease-in-out;
}

.profile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.1));
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 101;
}

.profile-icon:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

.profile-icon:active {
    transform: scale(0.95);
}

.kotiak-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.1));
    border-radius: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    z-index: 101;
}

/* Language switcher */
.language-switcher {
    display: flex;
    gap: 4px;
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.1));
    padding: 4px;
    border-radius: 12px;
    position: relative;
}

.lang-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    color: var(--tg-theme-text-color, #000);
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.5;
}

.lang-btn.active {
    background: var(--tg-theme-button-color, #007AFF);
    color: var(--tg-theme-button-text-color, #fff);
    opacity: 1;
}

.lang-btn:hover:not(.active) {
    opacity: 0.8;
}

/* В профиле переключатель занимает место value */
.profile-field .language-switcher {
    justify-self: flex-start;
}

.kotiak-icon {
    vertical-align: middle;
    display: inline-block;
}

.coin-inline {
    vertical-align: middle;
    display: inline-block;
    margin: 0 2px;
}

.kotiak-amount {
    font-size: 16px;
    color: var(--tg-theme-text-color, #000);
}

.kotiak-balance.earning {
    animation: balanceEarn 0.5s ease;
}

@keyframes balanceEarn {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Consent form styling */
.consent-card {
    max-width: 400px;
    margin: 0 auto;
}

.consent-title {
    margin: 0 0 12px 0;
    text-align: center;
    font-size: 26px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #000);
}

.consent-subtitle {
    margin: 0 0 20px 0;
    text-align: center;
    font-size: 15px;
    line-height: 1.4;
    color: var(--tg-theme-text-color, #000);
}

.consent-list {
    margin: 0 0 20px 0;
    padding: 0;
    list-style: none;
}

.consent-list li {
    margin-bottom: 12px;
    padding-left: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--tg-theme-text-color, #000);
}

.consent-list li strong {
    font-weight: 600;
}

.consent-note {
    margin: 0 0 16px 0;
    padding: 12px;
    background: var(--tg-theme-secondary-bg-color, rgba(0, 0, 0, 0.05));
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--tg-theme-hint-color, #666);
}

.consent-link {
    display: block;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--tg-theme-link-color, #007AFF);
    text-decoration: none;
}

.consent-link:hover {
    text-decoration: underline;
}

.consent-button {
    width: 100%;
}

/* Birthdate form styling */
.birthdate-card {
    max-width: 400px;
    margin: 0 auto;
}

.birthdate-title {
    margin: 0 0 8px 0;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #000);
}

.birthdate-subtitle {
    margin: 0 0 32px 0;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
    color: var(--tg-theme-hint-color, #999);
}

.birthdate-input-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.birthdate-input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    pointer-events: none;
    z-index: 1;
}

.birthdate-input {
    width: 100%;
    padding: 18px 18px 18px 56px;
    font-size: 16px;
    border: 2px solid var(--tg-theme-hint-color, rgba(0, 0, 0, 0.1));
    border-radius: 12px;
    background: var(--tg-theme-bg-color, #fff);
    color: var(--tg-theme-text-color, #000);
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-align: center;
}

.birthdate-input:focus {
    outline: none;
    border-color: var(--tg-theme-button-color, #007AFF);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.birthdate-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    width: 20px;
    height: 20px;
}

.birthdate-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.birthdate-submit {
    width: 100%;
    margin-top: 20px;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .birthdate-input {
        border-color: rgba(255, 255, 255, 0.2);
    }

    .birthdate-input:focus {
        border-color: var(--tg-theme-button-color, #0A84FF);
        box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.15);
    }
}

/* Rank Badge Styles */
.rank-badge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

/* Скрываем badge до загрузки данных */
.rank-badge-container.loading {
    opacity: 0;
    pointer-events: none;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--tg-theme-secondary-bg-color, rgba(0, 0, 0, 0.05));
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.rank-icon {
    font-size: 24px;
    line-height: 1;
}

.rank-name {
    font-size: 16px;
    color: var(--tg-theme-text-color, #000);
}

.level-progress-text {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #999);
    font-weight: 400;
}

/* Rank Badge Animation for Level Up */
@keyframes rankLevelUp {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.rank-badge.level-up {
    animation: rankLevelUp 0.6s ease;
}

/* Специфичные стили для страницы предсказания */
.prediction-result {
    position: relative;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-radius: 16px;
    color: white;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.6;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s, background 0.5s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    overflow: visible;
    z-index: 1;
}

/* Градиенты для каждого уровня (синхронизированы с бэкендом и JavaScript) */

/* Уровень 1 - 🪨 Новичок (серый) */
.prediction-result.level-1 {
    background: linear-gradient(135deg, rgba(107, 107, 107, 0.4) 0%, rgba(128, 128, 128, 0.5) 50%, rgba(153, 153, 153, 0.4) 100%);
}

/* Уровень 2 - 🥉 Бронза (бронзовый) */
.prediction-result.level-2 {
    background: linear-gradient(135deg, rgba(184, 115, 51, 0.8) 0%, rgba(205, 127, 50, 0.9) 50%, rgba(230, 164, 87, 0.8) 100%);
}

/* Уровень 3 - 🥈 Серебро (бирюзовый) */
.prediction-result.level-3 {
    background: linear-gradient(135deg, rgba(0, 181, 184, 0.8) 0%, rgba(0, 206, 209, 0.9) 50%, rgba(32, 233, 236, 0.8) 100%);
}

/* Уровень 4 - 🥇 Золото (золотой) */
.prediction-result.level-4 {
    background: linear-gradient(135deg, rgba(230, 194, 0, 0.85) 0%, rgba(255, 215, 0, 0.95) 50%, rgba(255, 237, 78, 0.85) 100%);
}

/* Уровень 5 - 💎 Алмаз (розовый) */
.prediction-result.level-5 {
    background: linear-gradient(135deg, rgba(230, 0, 122, 0.85) 0%, rgba(255, 20, 147, 0.95) 50%, rgba(255, 105, 180, 0.85) 100%);
}

/* Уровень 6+ - 👑 Легенда (пурпурный с эпическим эффектом и анимацией) */
.prediction-result.level-6,
.prediction-result.level-7,
.prediction-result.level-8,
.prediction-result.level-9,
.prediction-result.level-10 {
    background: linear-gradient(135deg,
        rgba(230, 0, 115, 0.9) 0%,
        rgba(255, 0, 128, 0.95) 25%,
        rgba(255, 20, 147, 0.9) 50%,
        rgba(255, 0, 128, 0.95) 75%,
        rgba(230, 0, 115, 0.9) 100%);
    background-size: 200% 200%;
    animation: legendGradient 3s ease infinite;
    box-shadow: 0 0 30px rgba(255, 0, 128, 0.6),
                0 0 60px rgba(255, 0, 128, 0.3),
                inset 0 0 20px rgba(255, 255, 255, 0.1);
}

@keyframes legendGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Анимация нажатия блока (имитация клика от пальца) */
.prediction-result.hint-tap-animation {
    animation: hintBlockTap 0.4s ease-out;
}

@keyframes hintBlockTap {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.98);
    }
    100% {
        transform: scale(1);
    }
}

.prediction-result-wrapper {
    position: relative;
    margin-bottom: 20px;
    z-index: 1;
    transition: z-index 0s;
}

/* Поднимаем z-index блока прогноза только когда активен overlay */
body.overlay-active .prediction-result-wrapper {
    z-index: 10000;
}

body.overlay-active .prediction-result {
    z-index: 10001;
    position: relative;
}

/* Gradient glowing border - shown when daily goal is reached */
.prediction-glow-border {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #667eea 100%);
    background-size: 200% 200%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    z-index: 0;
    padding: 3px;
}

.prediction-glow-border.active {
    opacity: 1;
    animation: gradientFlow 3s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Daily progress bar at bottom */
.prediction-daily-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 16px 16px;
    overflow: hidden;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.prediction-daily-progress.hidden {
    opacity: 0;
    pointer-events: none;
}

.prediction-daily-progress-bar {
    height: 100%;
    width: 0%;
    min-width: 0%;
    /* Background и box-shadow устанавливаются динамически через JavaScript в зависимости от уровня */
    background: linear-gradient(90deg, #8B9DC3 0%, #A8B7D1 50%, #C5D3E8 100%);
    box-shadow: 0 2px 8px rgba(139, 157, 195, 0.9);
    transition: width 0.5s ease, background 0.3s ease, box-shadow 0.3s ease;
    border-radius: 0 0 0 16px;
}

.prediction-progress-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 16px;
}

.prediction-progress-border svg {
    width: 100%;
    height: 100%;
}

.prediction-progress-border rect {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

/* Hue rotation + brightness animation for color shifts */
@keyframes hueShift {
    0%, 100% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(15deg) brightness(1.2); }
}

@keyframes hueShiftFast {
    0%, 100% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(20deg) brightness(1.3); }
}

@keyframes hueShiftLegend {
    0% { filter: hue-rotate(0deg) brightness(1); }
    25% { filter: hue-rotate(10deg) brightness(1.15); }
    50% { filter: hue-rotate(20deg) brightness(1.3); }
    75% { filter: hue-rotate(10deg) brightness(1.15); }
    100% { filter: hue-rotate(0deg) brightness(1); }
}

/* Apply hue animations to rect elements */
.prediction-progress-border.rank-1 #progressRect,
.prediction-progress-border.rank-2 #progressRect {
    animation: hueShift 3s ease-in-out infinite;
}

.prediction-progress-border.rank-3 #progressRect,
.prediction-progress-border.rank-4 #progressRect,
.prediction-progress-border.rank-5 #progressRect,
.prediction-progress-border.rank-6 #progressRect {
    animation: hueShift 2.5s ease-in-out infinite;
}

.prediction-progress-border.rank-7 #progressRect,
.prediction-progress-border.rank-8 #progressRect,
.prediction-progress-border.rank-9 #progressRect {
    animation: hueShiftFast 2s ease-in-out infinite;
}

.prediction-progress-border.rank-10 #progressRect {
    animation: hueShiftLegend 2s ease-in-out infinite;
}

/* Animated glow effects for each level */
@keyframes glowPulse-1 {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(96, 96, 96, 0.4)); }
    50% { filter: drop-shadow(0 0 10px rgba(160, 160, 160, 0.6)); }
}

@keyframes glowPulse-2 {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(160, 82, 45, 0.5)); }
    50% { filter: drop-shadow(0 0 12px rgba(210, 105, 30, 0.7)); }
}

@keyframes glowPulse-3 {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 69, 0, 0.6)); }
    50% { filter: drop-shadow(0 0 16px rgba(255, 140, 0, 0.8)); }
}

@keyframes glowPulse-4 {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(0, 139, 139, 0.6)); }
    50% { filter: drop-shadow(0 0 16px rgba(72, 209, 204, 0.8)); }
}

@keyframes glowPulse-5 {
    0%, 100% { filter: drop-shadow(0 0 12px rgba(0, 71, 171, 0.7)); }
    50% { filter: drop-shadow(0 0 18px rgba(135, 206, 235, 0.9)); }
}

@keyframes glowPulse-6 {
    0%, 100% { filter: drop-shadow(0 0 12px rgba(255, 140, 0, 0.7)); }
    50% { filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.9)); }
}

@keyframes glowPulse-7 {
    0%, 100% { filter: drop-shadow(0 0 14px rgba(218, 165, 32, 0.8)); }
    50% { filter: drop-shadow(0 0 20px rgba(255, 237, 78, 1)); }
}

@keyframes glowPulse-8 {
    0%, 100% { filter: drop-shadow(0 0 14px rgba(199, 21, 133, 0.8)); }
    50% { filter: drop-shadow(0 0 22px rgba(255, 105, 180, 1)); }
}

@keyframes glowPulse-9 {
    0%, 100% { filter: drop-shadow(0 0 16px rgba(75, 0, 130, 0.9)); }
    50% { filter: drop-shadow(0 0 24px rgba(216, 180, 254, 1)); }
}

@keyframes glowPulse-10 {
    0% { filter: drop-shadow(0 0 18px rgba(255, 0, 128, 1)); }
    25% { filter: drop-shadow(0 0 24px rgba(255, 20, 147, 1)); }
    50% { filter: drop-shadow(0 0 30px rgba(255, 0, 255, 1)); }
    75% { filter: drop-shadow(0 0 24px rgba(255, 20, 147, 1)); }
    100% { filter: drop-shadow(0 0 18px rgba(255, 0, 128, 1)); }
}

/* Apply glow animations to each rank container */
.prediction-progress-border.rank-1 {
    animation: glowPulse-1 3s ease-in-out infinite;
}

.prediction-progress-border.rank-2 {
    animation: glowPulse-2 3s ease-in-out infinite;
}

.prediction-progress-border.rank-3 {
    animation: glowPulse-3 2.5s ease-in-out infinite;
}

.prediction-progress-border.rank-4 {
    animation: glowPulse-4 2.5s ease-in-out infinite;
}

.prediction-progress-border.rank-5 {
    animation: glowPulse-5 2.5s ease-in-out infinite;
}

.prediction-progress-border.rank-6 {
    animation: glowPulse-6 2.5s ease-in-out infinite;
}

.prediction-progress-border.rank-7 {
    animation: glowPulse-7 2s ease-in-out infinite;
}

.prediction-progress-border.rank-8 {
    animation: glowPulse-8 2s ease-in-out infinite;
}

.prediction-progress-border.rank-9 {
    animation: glowPulse-9 2s ease-in-out infinite;
}

.prediction-progress-border.rank-10 {
    animation: glowPulse-10 2s ease-in-out infinite;
}

.prediction-result:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.prediction-actions {
    display: flex;
    gap: 12px;
    flex-direction: row;
}

.prediction-actions .btn {
    flex: 1;
}

.zodiac-info {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.85);
}

.zodiac-base {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.zodiac-sign {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.zodiac-meta {
    font-size: 13px;
    opacity: 0.8;
}

.prediction-heading {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.login-bonus-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-block;
    font-size: 24px;
    font-weight: 700;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 165, 0, 0.4));
    border: 2.5px solid rgba(255, 215, 0, 0.9);
    border-radius: 24px;
    animation: pulse-badge 2s ease-in-out infinite;
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 10;
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.5);
    backdrop-filter: blur(8px);
    letter-spacing: 1px;
}

.login-bonus-badge.hidden {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-10px) scale(0.8);
    pointer-events: none;
}

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    }
    50% {
        opacity: 0.95;
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    }
}

/* Комбо индикатор - в центре блока прогноза */
.combo-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 200;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 16px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.combo-indicator.hidden {
    display: none;
}

.combo-multiplier {
    font-size: 48px;
    font-weight: 900;
    color: #FFD700;
    text-shadow:
        0 0 20px rgba(255, 215, 0, 1),
        0 0 10px rgba(255, 165, 0, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.8);
    animation: comboPulse 0.3s ease-out;
    letter-spacing: 2px;
}

.combo-timer {
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.combo-timer::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FF8C00);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: comboTimerDrain 2s linear forwards;
}

@keyframes comboPulse {
    0% { transform: scale(0.7); opacity: 0; }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes comboTimerDrain {
    from { transform: scaleX(1); transform-origin: left; }
    to { transform: scaleX(0); transform-origin: left; }
}

/* Screen flash при level up */
.screen-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 300;
    opacity: 0;
    transition: opacity 0.1s;
}

.screen-flash.active {
    animation: flashAnimation 0.6s ease-out;
}

@keyframes flashAnimation {
    0% { opacity: 0; }
    10% { opacity: 0.8; }
    100% { opacity: 0; }
}

/* Shake/Bounce анимации для блока */
@keyframes shakeBlock {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes bounceBlock {
    0%, 100% { transform: scale(1); }
    10% { transform: scale(1.05); }
    20% { transform: scale(0.95); }
    30% { transform: scale(1.03); }
    40% { transform: scale(0.98); }
    50% { transform: scale(1); }
}

.prediction-result.shake {
    animation: shakeBlock 0.5s ease;
}

.prediction-result.bounce {
    animation: bounceBlock 0.6s ease;
}

/* Ripple Wave эффект - волны от касания */
.ripple-wave {
    position: absolute;
    border-radius: 50%;
    border: 2px solid;
    pointer-events: none;
    animation: rippleExpand 0.8s ease-out forwards;
}

@keyframes rippleExpand {
    0% {
        width: 20px;
        height: 20px;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* Particle Burst эффект - разлетающиеся частицы */
.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFly 0.8s ease-out forwards;
}

@keyframes particleFly {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Floating finger hint - анимация тапа */
.floating-finger-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 100;
    pointer-events: none;
    animation: fingerTap 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.floating-finger-hint.hidden {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

.finger-emoji {
    font-size: 32px;
    line-height: 1;
}

.finger-bonus {
    font-size: 14px;
    font-weight: 600;
    color: #FFD700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

@keyframes fingerTap {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    10% {
        transform: translateY(-8px) scale(0.95);
    }
    20% {
        transform: translateY(0) scale(1);
    }
    30% {
        transform: translateY(0) scale(1);
    }
}

/* Debug: кнопка сброса finger hint */
.reset-finger-hint-btn {
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 149;
    transition: all 0.3s ease;
    display: none; /* Скрыта по умолчанию, показывается только для админа через JS */
    align-items: center;
    justify-content: center;
}

.reset-finger-hint-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(180deg);
}

.reset-finger-hint-btn:active {
    transform: rotate(180deg) scale(0.9);
}

/* Debug: кнопка теста анимации монетки */
.test-coin-anim-btn {
    position: fixed;
    bottom: 10px;
    right: 60px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.5);
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 149;
    transition: all 0.3s ease;
    display: none; /* Скрыта по умолчанию, показывается только для админа через JS */
    align-items: center;
    justify-content: center;
}

.test-coin-anim-btn:hover {
    background: rgba(255, 215, 0, 0.5);
    transform: scale(1.1);
}

.test-coin-anim-btn:active {
    transform: scale(0.9);
}

/* Всплывающие надписи при клике */
.floating-text {
    position: absolute;
    font-weight: 600;
    pointer-events: none;
    z-index: 400;
    animation: float-up 1.5s ease-out forwards;
}

.floating-text.bonus {
    font-size: 20px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.floating-text.regular {
    font-size: 16px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.floating-text .motivation {
    display: block;
    font-size: 11px;
    font-weight: 400;
    margin-top: 2px;
    opacity: 0.9;
}

@keyframes float-up {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
    }
}

/* Стили для статистики за неделю */
.weekly-stats {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    z-index: 20; /* Поднимаем выше звёздной пыли */
}

.weekly-days {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.day-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s, opacity 0.2s;
    position: relative;
    padding: 8px 4px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

/* Когда какой-то день выбран - остальные затемняются */
.weekly-days.has-selected .day-item:not(.selected) {
    opacity: 0.5;
}

/* Выбранный день - увеличен */
.day-item.selected {
    transform: scale(1.15);
    z-index: 5;
}

/* Вертикальная батарейка с градиентом (фон прогресса) */
.day-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--day-progress, 0%);
    background: linear-gradient(
        to top,
        #667eea 0%,
        #764ba2 50%,
        #f093fb 100%
    );
    border-radius: 0 0 12px 12px;
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    opacity: 0.8;
}

/* Анимированный блик на заполненной батарейке */
.day-item.has-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 3s infinite;
    z-index: 1;
    border-radius: 12px;
    clip-path: inset(0 0 0 0 round 12px);
}

@keyframes shimmer {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.day-item.upgradeable {
    cursor: pointer;
}

.day-item.upgradeable:hover {
    transform: scale(1.1);
}

.day-item.upgradeable:active {
    transform: scale(0.95);
}

/* Завершённые дни - кликабельные */
.day-item.completed {
    cursor: pointer;
}

.day-emoji {
    font-size: 28px;
    line-height: 1;
    transition: opacity 0.3s;
    position: relative;
    z-index: 2;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.day-item.future .day-emoji {
    opacity: 0.6;
}

.day-item.future .day-date {
    opacity: 0.6;
}

.day-item.upgradeable .day-emoji {
    position: relative;
}

.day-item.upgradeable .day-emoji::after {
    content: '⭐';
    position: absolute;
    top: -2px;
    right: 0px;
    font-size: 12px;
    animation: pulse 1.5s infinite;
    z-index: 10;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.day-date {
    font-size: 11px;
    color: var(--tg-theme-hint-color, #999);
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
    pointer-events: all;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    border-radius: 20px 20px 0 0;
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 10000;
    /* Чёрное стекло (как glass-card) */
    background: rgba(20, 20, 25, 0.75);
    backdrop-filter: blur(70px) saturate(150%);
    -webkit-backdrop-filter: blur(70px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.5),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.modal.show .modal-content {
    transform: translateY(0);
}

/* Светлый текст для черного стекла */
.modal-content h2,
.modal-content h3,
.modal-content p,
.modal-content label,
.modal-content span {
    color: rgba(255, 255, 255, 0.95);
}

.modal-content .secondary-text {
    color: rgba(255, 255, 255, 0.7);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--tg-theme-text-color, #000);
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
    color: var(--tg-theme-text-color, #000);
}

.modal-subtitle {
    font-size: 14px;
    text-align: center;
    color: var(--tg-theme-hint-color, #999);
    margin-bottom: 24px;
    line-height: 1.5;
}

.full-width {
    width: 100%;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.1));
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.btn-icon:active {
    transform: scale(0.95);
}

/* Referral modal styles */
.referral-modal-content {
    max-height: 85vh;
}

.assigned-obereg-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(103, 126, 234, 0.15), rgba(138, 43, 226, 0.15));
    border: 2px solid rgba(103, 126, 234, 0.3);
    border-radius: 16px;
}

.assigned-obereg-icon {
    font-size: 48px;
    line-height: 1;
}

.assigned-obereg-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.assigned-obereg-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #000);
}

.assigned-obereg-desc {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #999);
}

.referral-rewards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.reward-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.1));
    border-radius: 12px;
}

.reward-icon {
    font-size: 24px;
    line-height: 1;
}

.reward-text {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
    font-size: 14px;
    color: var(--tg-theme-text-color, #000);
}

.reward-text strong {
    font-size: 16px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #000);
}

.reward-text span {
    font-size: 13px;
    color: var(--tg-theme-hint-color, #999);
}

.referral-link-section {
    margin-bottom: 24px;
}

.referral-link-section label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--tg-theme-text-color, #000);
}

.referral-link-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.referral-link-input {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--tg-theme-hint-color, rgba(0, 0, 0, 0.1));
    border-radius: 8px;
    font-size: 14px;
    background: var(--tg-theme-bg-color, #fff);
    color: var(--tg-theme-text-color, #000);
}

.btn-copy {
    padding: 12px 16px;
    min-width: auto;
}

.referral-stats {
    margin-bottom: 24px;
}

.referral-stats h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--tg-theme-text-color, #000);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.1));
    border-radius: 12px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #000);
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--tg-theme-hint-color, #999);
    text-align: center;
    margin-top: 4px;
}

.referral-list {
    margin-top: 24px;
}

.referral-list h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--tg-theme-text-color, #000);
}

#referralItems {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.referral-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.05));
    border-radius: 8px;
}

.referral-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.referral-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--tg-theme-text-color, #000);
}

.referral-item-date {
    font-size: 12px;
    color: var(--tg-theme-hint-color, #999);
}

.referral-item-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.referral-item-status.pending {
    background: rgba(255, 193, 7, 0.2);
    color: #f57c00;
}

.referral-item-status.active {
    background: rgba(76, 175, 80, 0.2);
    color: #388e3c;
}

.referral-item-status.completed {
    background: rgba(33, 150, 243, 0.2);
    color: #1976d2;
}

.referral-empty {
    padding: 24px;
    text-align: center;
    color: var(--tg-theme-hint-color, #999);
    font-size: 14px;
}

/* ================================================
   OBEREG COLLECTION STYLES
   ================================================ */

.obereg-collection {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(103, 126, 234, 0.08), rgba(138, 43, 226, 0.08));
    border-radius: 16px;
    border: 2px solid rgba(103, 126, 234, 0.2);
}

.obereg-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
    color: var(--tg-theme-text-color, #000);
}

.obereg-subtitle {
    font-size: 14px;
    text-align: center;
    color: var(--tg-theme-hint-color, #999);
    margin-bottom: 20px;
}

/* Контейнер для статистики и наград в одну строку */
.stats-rewards-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: stretch;
}

.obereg-stats-rings {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--tg-theme-bg-color, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.obereg-rewards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.rings-chart {
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
}

.rings-chart circle {
    transition: stroke-dashoffset 1s ease;
}

.rings-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ring-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ring-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.ring-color.received {
    background: #FF6B6B;
}

.ring-color.sent {
    background: #48DBFB;
}

.ring-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--tg-theme-text-color, #000);
}

/* Carousel Container */
.obereg-carousel-container {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
}

.obereg-carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 6px 4px;
}

.obereg-carousel::-webkit-scrollbar {
    display: none;
}

/* Carousel Navigation Buttons */
.carousel-nav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--tg-theme-button-color, #677EEA);
    color: var(--tg-theme-button-text-color, #fff);
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(103, 126, 234, 0.3);
}

.carousel-nav:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(103, 126, 234, 0.4);
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Obereg Card - компактный размер для отображения 4-5 карт */
.obereg-card {
    min-width: 85px;
    width: 85px;
    flex-shrink: 0;
    background: var(--tg-theme-bg-color, #fff);
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border: 2px solid transparent;
}

/* Адаптация под разные экраны - показываем 4.5 карты на экране */
@media (min-width: 400px) {
    .obereg-card {
        min-width: 90px;
        width: 90px;
    }
}

.obereg-card:active {
    transform: scale(0.95);
}

/* Статусы оберегов - яркие визуальные индикаторы */
.obereg-card.assigned {
    border-color: #FFD700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: assignedPulse 2s ease-in-out infinite;
    position: relative;
}

.obereg-card.assigned::after {
    content: '✨';
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 18px;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes assignedPulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(255, 215, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.7), 0 4px 12px rgba(0, 0, 0, 0.2);
    }
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.8; }
}

.obereg-card.purchased {
    border-color: #48DBFB;
    box-shadow: 0 0 8px rgba(72, 219, 251, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.obereg-card.activated {
    border-color: #4CAF50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(56, 142, 60, 0.1));
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    cursor: default;
    opacity: 0.8;
}

.obereg-card.activated::before {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 14px;
    color: #4CAF50;
    font-weight: bold;
}

.obereg-card.locked {
    opacity: 0.7;
    background: rgba(0, 0, 0, 0.03);
    position: relative;
}

.obereg-card.locked::before {
    content: '🔒';
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 14px;
    opacity: 0.6;
}

.obereg-card-icon {
    font-size: 32px;
    text-align: center;
    line-height: 1;
    transition: transform 0.3s ease;
}

.obereg-card:hover .obereg-card-icon {
    transform: scale(1.1);
}

.obereg-card.locked .obereg-card-icon {
    filter: grayscale(80%) brightness(0.9);
}

.obereg-card-name {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    color: var(--tg-theme-text-color, #000);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

.obereg-card.locked .obereg-card-name {
    color: var(--tg-theme-hint-color, #999);
}

.obereg-card-rarity {
    font-size: 11px;
    text-align: center;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.rarity-common { color: #95a5a6; }
.rarity-rare { color: #3498db; }
.rarity-epic { color: #9b59b6; }
.rarity-legendary { color: #f39c12; }

.obereg-card-price {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 9px;
    color: var(--tg-theme-hint-color, #999);
    text-align: center;
    margin-top: 2px;
}

.price-kotiak,
.price-stars {
    font-size: 9px;
    white-space: nowrap;
    line-height: 1.3;
}

.obereg-card-action {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-activate {
    background: #2ecc71;
    color: #fff;
}

.action-activate:hover {
    background: #27ae60;
}

.action-purchase {
    background: var(--tg-theme-button-color, #677EEA);
    color: var(--tg-theme-button-text-color, #fff);
}

.action-purchase:hover {
    opacity: 0.9;
}

.action-locked {
    background: rgba(0, 0, 0, 0.1);
    color: var(--tg-theme-hint-color, #999);
    cursor: not-allowed;
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.obereg-progress {
    text-align: center;
    padding: 12px;
    background: var(--tg-theme-bg-color, #fff);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #000);
}

/* ================================================
   TRANSACTION HISTORY STYLES
   ================================================ */

.transactions-modal-content {
    max-height: 85vh;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 60vh;
    overflow-y: auto;
}

.transactions-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 16px;
}

.transactions-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(103, 126, 234, 0.2);
    border-top-color: rgba(103, 126, 234, 1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.transactions-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--tg-theme-hint-color, #999);
    font-size: 14px;
}

.transactions-error {
    text-align: center;
    padding: 40px 20px;
    color: #E74C3C;
    font-size: 14px;
}

.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.05));
    border-radius: 8px;
    margin-bottom: 8px;
}

.transaction-item:last-child {
    margin-bottom: 0;
}

.transaction-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.transaction-description {
    font-size: 14px;
    font-weight: 400;
    color: var(--tg-theme-text-color, #000);
    line-height: 1.3;
}

.transaction-date {
    font-size: 12px;
    color: var(--tg-theme-hint-color, #999);
}

.transaction-amount {
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 12px;
}

.transaction-amount.earn {
    color: #2ECC71;
}

.transaction-amount.spend {
    color: #E74C3C;
}

#transactionsBalance strong {
    color: #F39C12;
}

/* ================================================
   PROFILE MODAL STYLES
   ================================================ */

.profile-modal-content {
    /* Убрано max-width для полной ширины как у других модалов */
}

/* Quick Kotiak Modal (клик по логотипу) */
.kotiak-quick-modal {
    max-width: 500px;
    margin: 0 auto;
    padding: 60px 24px 24px 24px;
    position: relative;
    overflow: visible;
}

.kotiak-avatar-container {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    width: 100px;
    height: 100px;
    background: var(--tg-theme-bg-color, #ffffff);
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.kotiak-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.kotiak-name {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #000);
    margin-bottom: 20px;
    margin-top: 8px;
}

.kotiak-quick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.05));
    border-radius: 10px;
    margin-bottom: 10px;
    transition: background 0.2s ease;
}

.kotiak-quick-item:last-child {
    margin-bottom: 0;
}

.kotiak-quick-item.clickable {
    cursor: pointer;
}

.kotiak-quick-item.clickable:active {
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.1));
}

.kotiak-quick-item.language-item {
    justify-content: center;
    background: transparent;
    padding: 14px 0;
}

.kotiak-quick-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    width: 28px;
}

.kotiak-quick-text {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: var(--tg-theme-text-color, #000);
}

.kotiak-quick-arrow {
    font-size: 18px;
    color: var(--tg-theme-hint-color, #999);
}

.language-switcher-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.lang-btn-inline {
    background: transparent;
    border: none;
    color: var(--tg-theme-hint-color, #999);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s ease;
}

.lang-btn-inline.active {
    color: var(--tg-theme-link-color, #2481cc);
    font-weight: 600;
}

.lang-separator {
    color: var(--tg-theme-hint-color, #999);
    font-size: 14px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.profile-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.05));
    border-radius: 8px;
    margin-bottom: 8px;
}

.profile-field:last-child {
    margin-bottom: 0;
}

/* Profile form fields */
.profile-form-fields {
    margin-bottom: 20px;
}

.profile-field-edit {
    margin-bottom: 16px;
}

.profile-field-edit:last-child {
    margin-bottom: 0;
}

.profile-input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid var(--tg-theme-hint-color, rgba(0, 0, 0, 0.1));
    border-radius: 8px;
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.05));
    color: var(--tg-theme-text-color, #000);
    box-sizing: border-box;
    margin-top: 6px;
}

.profile-input:focus {
    outline: none;
    border-color: var(--tg-theme-button-color, #667eea);
}

.form-footer-hint {
    text-align: center;
    font-size: 12px;
    color: var(--tg-theme-hint-color, #999);
    margin-top: 12px;
    margin-bottom: 0;
}

.profile-label {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #999);
    font-weight: 500;
}

.profile-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #000);
    text-align: right;
}

.profile-additional-fields {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--tg-theme-secondary-bg-color, rgba(0, 0, 0, 0.08));
}

.profile-policy-link {
    display: block;
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--tg-theme-hint-color, #999);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.profile-policy-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* App Version */
.app-version {
    margin-top: 12px;
    text-align: center;
    font-size: 12px;
    color: var(--tg-theme-hint-color, #999);
    opacity: 0.6;
    padding: 8px;
}

.app-version #versionNumber {
    font-weight: 500;
    color: var(--tg-theme-hint-color, #999);
}

/* ========== RECALCULATE PREDICTION MODAL ========== */
.recalculate-modal-content {
    text-align: center;
    padding: 32px 24px;
}

.recalculate-modal-content .modal-title {
    font-size: 22px;
    margin-bottom: 12px;
}

.recalculate-modal-content .modal-subtitle {
    font-size: 15px;
    line-height: 1.5;
    color: var(--tg-theme-hint-color, #999);
    margin-bottom: 24px;
}

.recalculate-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Weekly Survey Styles */
.compact-survey {
    /* Full width on mobile */
}

.survey-question {
    margin-bottom: 24px;
}

.question-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--tg-theme-text-color);
}

.radio-group {
    display: flex;
    gap: 8px;
}

.radio-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.05));
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-option input[type="radio"]:checked + span {
    font-weight: 600;
}

.radio-option:has(input:checked) {
    background: var(--tg-theme-button-color, #667eea);
    color: var(--tg-theme-button-text-color, #fff);
}

.obereg-ratings {
    margin-bottom: 24px;
}

.section-label {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #999);
    margin-bottom: 12px;
    text-align: center;
}

.obereg-rating-item {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.obereg-rating-item:last-child {
    margin-bottom: 0;
}

.obereg-name {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* Star Rating */
.star-rating {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.star {
    font-size: 26px;
    color: var(--tg-theme-hint-color, #ddd);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.star:hover {
    transform: scale(1.1);
}

.star.active {
    color: #FFD700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.survey-reward {
    text-align: center;
    font-size: 14px;
    color: var(--tg-theme-hint-color, #999);
    margin-bottom: 16px;
}

.survey-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.btn-text {
    background: none;
    border: none;
    color: var(--tg-theme-hint-color, #999);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 16px;
    width: 100%;
    text-align: center;
}

/* Survey Result */
.survey-result-content {
    text-align: center;
    margin-bottom: 24px;
}

.reward-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--tg-theme-button-color, #667eea);
    margin-bottom: 16px;
}

.stats-box {
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.05));
    border-radius: 12px;
    padding: 16px;
}

.stats-label {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #999);
    margin-bottom: 8px;
}

.stats-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--tg-theme-text-color);
}

/* ============================================
   OBEREG SYSTEM V2 - Тройной амулет
   ============================================ */

.obereg-weekly-v2 {
    margin: 20px 0;
    padding: 20px 16px;
    background: linear-gradient(135deg,
        rgba(155, 89, 182, 0.08) 0%,
        rgba(52, 152, 219, 0.08) 50%,
        rgba(243, 156, 18, 0.08) 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Контейнер с SVG и карточками */
.obereg-amulet-container {
    position: relative;
    padding-top: 30px;
}

/* SVG энергетическая нить */
.energy-flow-svg {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    width: 100%;
    height: 80px;
    pointer-events: none;
    z-index: 0;
}

/* Фоновая нить - всегда видна, пунктирная */
.energy-path-bg {
    fill: none;
    stroke: rgba(150, 150, 150, 0.2);
    stroke-width: 2;
    stroke-dasharray: 8 6;
}

/* Активная нить - появляется с оберегами */
.energy-path-active {
    fill: none;
    stroke: url(#energyGradient);
    stroke-width: 3;
    stroke-linecap: round;
    filter: url(#energyGlow);
    stroke-dasharray: 10 15;
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: spark-flow 2s linear infinite paused;
}

/* Верхняя дуга - появляется при 3 оберегах */
.energy-arc-top {
    fill: none;
    stroke: url(#energyGradient);
    stroke-width: 3;
    stroke-linecap: round;
    filter: url(#energyGlow);
    stroke-dasharray: 8 12;
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: spark-flow-reverse 3s linear infinite paused;
}

/* Анимация искр */
@keyframes spark-flow {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -50; }
}

@keyframes spark-flow-reverse {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 50; }
}

/* === Состояния по количеству активных оберегов === */

/* 1 оберег - нить частично светится */
.obereg-amulet-container.oberegs-1 .energy-path-active {
    opacity: 0.4;
    stroke-dasharray: 5 20;
    animation-play-state: running;
    animation-duration: 3s;
}

/* 2 оберега - нить ярче, искры быстрее */
.obereg-amulet-container.oberegs-2 .energy-path-active {
    opacity: 0.7;
    stroke-dasharray: 10 15;
    animation-play-state: running;
    animation-duration: 2s;
}

/* 3 оберега - ПОЛНАЯ ЗАЩИТА */
.obereg-amulet-container.oberegs-3 .energy-path-active {
    opacity: 1;
    stroke-dasharray: 12 8;
    animation-play-state: running;
    animation-duration: 1.5s;
}

.obereg-amulet-container.oberegs-3 .energy-arc-top {
    opacity: 1;
    animation-play-state: running;
}

.obereg-amulet-container.oberegs-3::before {
    content: '🛡️ Полная защита';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    color: #f39c12;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
    animation: pulse-text 2s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* === Карточки оберегов === */
.obereg-v2-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    position: relative;
    z-index: 1;
}

.obereg-v2-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    aspect-ratio: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

/* Цвета рамок по редкости */
.obereg-v2-card.rarity-common {
    border-color: #95a5a6;
}

.obereg-v2-card.rarity-rare {
    border-color: #3498db;
    box-shadow: 0 0 12px rgba(52, 152, 219, 0.3);
}

.obereg-v2-card.rarity-epic {
    border-color: #9b59b6;
    box-shadow: 0 0 15px rgba(155, 89, 182, 0.4);
}

.obereg-v2-card.rarity-legendary {
    border-color: #f39c12;
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.5);
    animation: legendary-glow 2s ease-in-out infinite;
}

@keyframes legendary-glow {
    0%, 100% { box-shadow: 0 0 15px rgba(243, 156, 18, 0.4); }
    50% { box-shadow: 0 0 25px rgba(243, 156, 18, 0.7); }
}

/* Пустой слот */
.obereg-v2-card.empty-slot {
    background: rgba(255, 255, 255, 0.3);
    border: 3px dashed rgba(150, 150, 150, 0.4);
    animation: empty-pulse 3s ease-in-out infinite;
}

@keyframes empty-pulse {
    0%, 100% { border-color: rgba(150, 150, 150, 0.3); }
    50% { border-color: rgba(150, 150, 150, 0.6); }
}

/* Активный оберег - пульсация */
.obereg-v2-card.activated {
    animation: amulet-pulse 2s ease-in-out infinite;
}

@keyframes amulet-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* Сдвиг фазы для 2-го и 3-го амулета */
.obereg-v2-card.activated:nth-child(2) {
    animation-delay: 0.3s;
}

.obereg-v2-card.activated:nth-child(3) {
    animation-delay: 0.6s;
}

.obereg-v2-card:hover {
    transform: translateY(-4px) scale(1.05);
}

.obereg-v2-card:active {
    transform: translateY(-2px) scale(1.02);
}

/* Бейдж недель */
.obereg-v2-weeks-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.4);
}

/* Circular progress container */
.obereg-v2-icon-container {
    position: relative;
    width: 50px;
    height: 50px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.obereg-v2-progress-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.obereg-v2-progress-bg {
    fill: none;
    stroke: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.1));
    stroke-width: 4;
}

.obereg-v2-progress-bar {
    fill: none;
    stroke: var(--tg-theme-button-color, #677eea);
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.obereg-v2-progress-bar.unlocked {
    stroke: #4ade80;
}

.obereg-v2-progress-bar.activated {
    stroke: #fbbf24;
}

.obereg-v2-icon {
    font-size: 28px;
    line-height: 1;
}

.obereg-v2-card.locked .obereg-v2-icon {
    filter: grayscale(100%) opacity(0.4);
}

.obereg-v2-card.empty-slot .obereg-v2-icon {
    font-size: 24px;
    opacity: 0.4;
}

.obereg-v2-name {
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    color: var(--tg-theme-text-color, #333);
    max-width: 70px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.obereg-v2-card.empty-slot .obereg-v2-name {
    color: var(--tg-theme-hint-color, #999);
    font-size: 9px;
}

.obereg-v2-card.locked .obereg-v2-name {
    color: var(--tg-theme-hint-color, #999);
}

.obereg-v2-progress-text {
    font-size: 11px;
    color: var(--tg-theme-hint-color, #999);
    text-align: center;
}

.obereg-v2-card.unlocked .obereg-v2-progress-text {
    color: #4ade80;
    font-weight: 600;
}

.obereg-v2-card.activated .obereg-v2-progress-text {
    color: #fbbf24;
    font-weight: 600;
}

/* Status badges */
.obereg-v2-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 16px;
    line-height: 1;
}

/* ============================================
   OBEREG ELECTRIC CHAIN - Электрическая цепь
   ============================================ */

/* Переменные для цветов энергии */
.obereg-chain {
    --energy-cyan: #00D4FF;
    --energy-purple: #7B2FFF;
    --energy-active: rgba(0, 212, 255, 0.6);
    --energy-inactive: rgba(255, 255, 255, 0.15);

    /* Цвета редкости */
    --rarity-common: #95a5a6;
    --rarity-rare: #3498db;
    --rarity-epic: #9b59b6;
    --rarity-legendary: #f39c12;
}

/* Основной контейнер цепи */
.obereg-chain {
    position: relative;
    padding: 12px 8px;
}

/* Контейнер для карточек и молний */
.obereg-chain-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
}

/* === Пульсирующая связь между карточками === */
.pulse-connection {
    width: 32px;
    height: 20px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Базовая линия связи */
.connection-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--energy-inactive);
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* Пульс который бежит по линии */
.connection-pulse {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--energy-cyan);
    border-radius: 50%;
    opacity: 0;
    filter: blur(2px);
    box-shadow: 0 0 6px var(--energy-cyan);
    transition: opacity 0.3s ease;
}

/* Точка в центре (статичная) */
.connection-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--energy-inactive);
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* === Состояния связей === */

/* Состояние 0: тусклые пунктирные линии */
.obereg-chain[data-active="0"] .connection-line {
    background: transparent;
    border-top: 2px dashed var(--energy-inactive);
}

.obereg-chain[data-active="0"] .connection-dot {
    opacity: 0.3;
}

/* Состояние 1: первая связь с пульсом */
.obereg-chain[data-active="1"] .pulse-connection:first-of-type .connection-line,
.obereg-chain[data-active="2"] .pulse-connection .connection-line,
.obereg-chain[data-active="3"] .pulse-connection .connection-line {
    background: linear-gradient(90deg,
        var(--energy-inactive) 0%,
        var(--energy-active) 50%,
        var(--energy-inactive) 100%);
    background-size: 200% 100%;
}

.obereg-chain[data-active="1"] .pulse-connection:first-of-type .connection-pulse,
.obereg-chain[data-active="2"] .pulse-connection .connection-pulse,
.obereg-chain[data-active="3"] .pulse-connection .connection-pulse {
    opacity: 1;
    animation: pulse-run 2s ease-in-out infinite;
}

.obereg-chain[data-active="1"] .pulse-connection:first-of-type .connection-dot,
.obereg-chain[data-active="2"] .pulse-connection .connection-dot,
.obereg-chain[data-active="3"] .pulse-connection .connection-dot {
    background: var(--energy-cyan);
    box-shadow: 0 0 4px var(--energy-cyan);
}

/* Вторая связь при 1 обереге остается тусклой */
.obereg-chain[data-active="1"] .pulse-connection:last-of-type .connection-line {
    background: transparent;
    border-top: 2px dashed var(--energy-inactive);
}

.obereg-chain[data-active="1"] .pulse-connection:last-of-type .connection-pulse {
    opacity: 0;
}

.obereg-chain[data-active="1"] .pulse-connection:last-of-type .connection-dot {
    background: var(--energy-inactive);
    box-shadow: none;
}

/* Состояние 3: более интенсивная анимация */
.obereg-chain[data-active="3"] .connection-pulse {
    animation: pulse-run 1.5s ease-in-out infinite;
}

.obereg-chain[data-active="3"] .connection-line {
    height: 3px;
}

/* Задержка для второй связи */
.pulse-connection:last-of-type .connection-pulse {
    animation-delay: 0.5s;
}

/* === Искры при касании === */
.obereg-chain.sparking .connection-line {
    background: linear-gradient(90deg,
        var(--energy-cyan) 0%,
        var(--energy-purple) 50%,
        var(--energy-cyan) 100%) !important;
    height: 3px !important;
    box-shadow: 0 0 8px var(--energy-cyan);
}

.obereg-chain.sparking .connection-pulse {
    opacity: 1 !important;
    animation: spark-burst 0.3s ease-out infinite !important;
    width: 12px !important;
    height: 12px !important;
}

.obereg-chain.sparking .connection-dot {
    background: #fff !important;
    box-shadow: 0 0 10px var(--energy-cyan), 0 0 20px var(--energy-purple) !important;
    transform: scale(1.5);
}

/* Скрываем старые элементы */
.energy-channel,
.obereg-shield {
    display: none;
}

/* === Карточки в цепи === */
.obereg-chain-card {
    position: relative;
    width: 80px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--energy-inactive);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Пустой слот */
.obereg-chain-card.empty {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.15);
}

.obereg-chain-card.empty .card-icon {
    font-size: 28px;
    opacity: 0.3;
    color: var(--tg-theme-hint-color, #888);
}

.obereg-chain-card.empty .card-name {
    font-size: 9px;
    color: var(--tg-theme-hint-color, #888);
    opacity: 0.6;
}

/* Анимация пустого слота */
.obereg-chain-card.empty {
    animation: empty-slot-pulse 3s ease-in-out infinite;
}

@keyframes empty-slot-pulse {
    0%, 100% {
        border-color: rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.03);
    }
    50% {
        border-color: rgba(255, 255, 255, 0.25);
        background: rgba(255, 255, 255, 0.06);
    }
}

/* Активная карточка */
.obereg-chain-card.active {
    background: rgba(255, 255, 255, 0.08);
    border-style: solid;
}

/* Цвета рамок по редкости */
.obereg-chain-card.active.rarity-common {
    border-color: var(--rarity-common);
    box-shadow: 0 0 10px rgba(149, 165, 166, 0.3);
}

.obereg-chain-card.active.rarity-rare {
    border-color: var(--rarity-rare);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
}

.obereg-chain-card.active.rarity-epic {
    border-color: var(--rarity-epic);
    box-shadow: 0 0 18px rgba(155, 89, 182, 0.5);
}

.obereg-chain-card.active.rarity-legendary {
    border-color: var(--rarity-legendary);
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.5);
    animation: legendary-card-glow 2s ease-in-out infinite;
}

@keyframes legendary-card-glow {
    0%, 100% { box-shadow: 0 0 15px rgba(243, 156, 18, 0.4); }
    50% { box-shadow: 0 0 30px rgba(243, 156, 18, 0.7); }
}

/* Свечение карточки */
.obereg-chain-card.active::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg,
        rgba(var(--card-glow-rgb, 0, 212, 255), 0.2) 0%,
        transparent 50%,
        rgba(var(--card-glow-rgb, 0, 212, 255), 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.obereg-chain-card.active:hover::before {
    opacity: 1;
}

/* Иконка оберега */
.obereg-chain-card .card-icon {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

/* Имя оберега */
.obereg-chain-card .card-name {
    font-size: 10px;
    font-weight: 500;
    color: var(--tg-theme-text-color, #fff);
    text-align: center;
    line-height: 1.3;
    word-wrap: break-word;
    hyphens: auto;
}

/* Бейдж недель */
.obereg-chain-card .weeks-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.5);
}

/* === Анимации связей === */

/* Пульс бегущий по линии */
@keyframes pulse-run {
    0% {
        left: 0%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Искра при касании */
@keyframes spark-burst {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.8;
    }
}

/* === Quick Actions Menu (Long Press) === */
.quick-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.quick-menu-backdrop.show {
    opacity: 1;
}

.obereg-quick-menu {
    position: fixed;
    z-index: 9999;
    background: rgba(30, 30, 40, 0.95);
    border-radius: 16px;
    padding: 8px;
    min-width: 180px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateX(-50%) scale(0.9);
    transition: all 0.2s ease;
}

.obereg-quick-menu.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.quick-menu-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 4px;
}

.quick-menu-icon {
    font-size: 24px;
}

.quick-menu-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.quick-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quick-menu-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
    width: 100%;
    text-align: left;
}

.quick-menu-action:hover,
.quick-menu-action:active {
    background: rgba(255, 255, 255, 0.1);
}

.quick-menu-action .action-icon {
    font-size: 18px;
}

.quick-menu-action .action-text {
    font-size: 14px;
    color: #fff;
}

.quick-menu-action.danger .action-text {
    color: #ff6b6b;
}

/* === Hover эффекты === */

.obereg-chain-card:hover {
    transform: translateY(-4px) scale(1.05);
}

.obereg-chain-card:hover .card-icon {
    transform: scale(1.1);
}

.obereg-chain-card:active {
    transform: translateY(-2px) scale(1.02);
}

/* === Адаптивность === */

@media (max-width: 360px) {
    .obereg-chain-card {
        width: 70px;
        height: 80px;
    }

    .obereg-chain-card .card-icon {
        font-size: 26px;
    }

    .obereg-chain-card .card-name {
        font-size: 9px;
    }

    .electric-arc {
        width: 16px;
    }
}

@media (min-width: 420px) {
    .obereg-chain-card {
        width: 90px;
        height: 100px;
    }

    .obereg-chain-card .card-icon {
        font-size: 36px;
    }

    .electric-arc {
        width: 28px;
    }
}

/* ============================================
   OBEREG DETAIL MODAL
   ============================================ */

.obereg-detail-modal {
    /* Переопределяем max-width для полной ширины как у попапа профиля */
    max-width: none !important;
    /* Убираем боковые отступы */
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Применяем padding только к элементам без фона */
.obereg-detail-modal > .obereg-detail-header,
.obereg-detail-modal > .obereg-helped-by,
.obereg-detail-modal > .obereg-detail-actions {
    padding-left: 24px;
    padding-right: 24px;
}

/* Элементы с фоном имеют свой внутренний padding, но добавляем margin для отступа от краёв */
.obereg-detail-modal > .obereg-detail-progress-info,
.obereg-detail-modal > .obereg-amplification-info {
    margin-left: 24px;
    margin-right: 24px;
}

.obereg-detail-header {
    text-align: center;
    margin-bottom: 24px;
}

.obereg-detail-icon-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
}

.obereg-detail-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.obereg-detail-progress .progress-bg {
    fill: none;
    stroke: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.1));
    stroke-width: 4;
}

.obereg-detail-progress .progress-bar {
    fill: none;
    stroke: var(--tg-theme-button-color, #677eea);
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.obereg-detail-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 56px;
    line-height: 1;
}

.obereg-detail-name {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--tg-theme-text-color);
}

.obereg-detail-desc {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #999);
    margin: 0;
}

.obereg-detail-progress-info {
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.05));
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
}

.progress-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.progress-label {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #999);
}

.progress-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--tg-theme-text-color);
}

.obereg-helped-by {
    margin-bottom: 20px;
}

.helped-by-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.helped-by-user {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.1));
    border-radius: 12px;
    font-size: 13px;
    color: var(--tg-theme-text-color);
}

.obereg-amplification-info {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(239, 68, 68, 0.1));
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    text-align: center;
}

.amplification-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.amplification-icon {
    font-size: 24px;
}

.amplification-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--tg-theme-text-color);
}

.amplification-hint {
    font-size: 12px;
    color: var(--tg-theme-hint-color, #999);
    margin: 0;
}

.obereg-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

/* ============================================
   OBEREG ACCEPT MODAL
   ============================================ */

.obereg-accept-modal {
    /* Переопределяем max-width для полной ширины как у попапа профиля */
    max-width: none !important;
    /* Убираем боковые отступы */
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Применяем padding только к элементам без фона */
.obereg-accept-modal > .obereg-accept-header,
.obereg-accept-modal > .obereg-accept-actions {
    padding-left: 24px;
    padding-right: 24px;
}

/* Элементы с фоном имеют свой внутренний padding, но добавляем margin для отступа от краёв */
.obereg-accept-modal > .obereg-accept-description,
.obereg-accept-modal > .obereg-accept-amplification,
.obereg-accept-modal > .obereg-accept-rewards {
    margin-left: 24px;
    margin-right: 24px;
}

.obereg-accept-header {
    text-align: center;
    margin-bottom: 20px;
}

.obereg-accept-icon {
    font-size: 72px;
    margin-bottom: 16px;
}

.obereg-accept-name {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--tg-theme-text-color);
}

.obereg-accept-from {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #999);
    margin: 0;
}

.obereg-accept-description {
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.05));
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 16px;
}

.obereg-accept-description p {
    margin: 0;
    font-size: 14px;
    color: var(--tg-theme-text-color);
    line-height: 1.5;
}

.obereg-accept-amplification {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(239, 68, 68, 0.1));
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 16px;
    text-align: center;
}

.amplification-count-text {
    font-size: 13px;
    color: var(--tg-theme-hint-color, #999);
    margin: 8px 0 0 0;
}

.obereg-accept-rewards {
    background: var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.05));
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
}

.rewards-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.rewards-list li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--tg-theme-text-color);
}

.rewards-list li:not(:last-child) {
    border-bottom: 1px solid var(--tg-theme-secondary-bg-color, rgba(103, 126, 234, 0.1));
}

.obereg-accept-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--tg-theme-hint-color, #999);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   SKELETON SCREENS (Loading States)
   ============================================ */

/* Базовый скелетон элемент */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

/* Shimmer анимация */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Контейнер скелетонов */
.skeleton-container {
    width: 100%;
}

/* Скелетон блока прогноза */
.skeleton-prediction {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    min-height: 200px;
}

.skeleton-prediction-title {
    height: 24px;
    width: 60%;
    margin-bottom: 16px;
}

.skeleton-prediction-text {
    height: 16px;
    width: 100%;
    margin-bottom: 12px;
}

.skeleton-prediction-text.short {
    width: 80%;
}

.skeleton-prediction-text.medium {
    width: 90%;
}

/* Скелетон бейджа уровня */
.skeleton-level-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 20px;
}

.skeleton-level-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.skeleton-level-text {
    flex: 1;
    height: 20px;
}

/* Скелетон карточек оберегов */
.skeleton-obereg-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.skeleton-obereg-card {
    aspect-ratio: 1;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-obereg-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin: 0 auto;
}

.skeleton-obereg-title {
    height: 14px;
    width: 80%;
    margin: 8px auto 0;
}

.skeleton-obereg-subtitle {
    height: 12px;
    width: 60%;
    margin: 0 auto;
}

/* Скелетон недельной статистики */
.skeleton-weekly-stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}

.skeleton-stats-header {
    height: 20px;
    width: 50%;
    margin-bottom: 12px;
}

.skeleton-stats-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.skeleton-stats-day {
    flex: 1;
    height: 40px;
    border-radius: 8px;
}

/* Utility класс для скрытия */
.skeleton-hidden {
    display: none !important;
}

/* Адаптивность для мобильных */
@media (max-width: 400px) {
    .skeleton-obereg-cards {
        gap: 8px;
    }

    .skeleton-prediction {
        padding: 16px;
        min-height: 160px;
    }
}

/* ============================================
   RATE LIMIT ERROR STATE
   ============================================ */

/* Overlay на весь экран */
.rate-limit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(4px);
}

/* Карточка с сообщением */
.rate-limit-card {
    padding: 32px 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

/* Иконка состояния */
.rate-limit-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Заголовок */
.rate-limit-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #fff);
    margin-bottom: 12px;
}

/* Описание */
.rate-limit-message {
    font-size: 15px;
    color: var(--tg-theme-hint-color, #aaa);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Таймер обратного отсчёта */
.rate-limit-timer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 32px;
    font-weight: 700;
    color: var(--tg-theme-button-color, #8774e1);
    margin-bottom: 24px;
    font-variant-numeric: tabular-nums;
}

.rate-limit-timer-icon {
    font-size: 28px;
}

/* Utility класс для скрытия */
.rate-limit-hidden {
    display: none !important;
}

/* ============================================================ */
/* PREMIUM EFFECTS INDICATOR */
/* ============================================================ */

.premium-effect-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    animation: premium-pulse 2s ease-in-out infinite;
}

@keyframes premium-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.6);
    }
}

/* ============================================================ */
/* STARRY SKY CONSTELLATION - Звёздное небо собирается ⭐ */
/* ============================================================ */

.starry-container {
    /* Блок внутри weeklyStats - под батарейками недели */
    position: relative;
    margin: 4px auto 4px auto; /* Минимальные отступы для компактности */
    width: calc(100% - 40px);
    max-width: 280px;
    min-height: 60px;
    z-index: 10;
    pointer-events: none;
    padding: 8px;
    overflow: visible; /* Позволяем летящим звёздам вылетать за границы */
}

.starry-container.hidden {
    opacity: 0;
    visibility: hidden;
    /* НЕ используем display: none - чтобы сохранить занимаемое место */
}

.starry-container:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

/* SVG контейнер для звёзд */
.starry-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    overflow: visible; /* Позволяем звёздам вылетать за границы */
    transition: opacity 1s ease, height 1s ease;
}

/* Когда созвездие завершено, SVG остаётся для частиц */
.starry-container.complete .starry-svg {
    /* Не скрываем SVG, чтобы частицы были видны */
}

/* Скрываем линии созвездия при завершении */
.starry-container.complete #linesGroup line {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Стили для звёзд (применяются к SVG circle) */
.star {
    /* Более золотистый яркий цвет вместо жёлтого */
    fill: #FFA500;
    /* ОПТИМИЗАЦИЯ: Один слой drop-shadow вместо трёх (меньше лагов) */
    /* Уменьшена яркость: blur 4px -> 3px, opacity 0.5 -> 0.3 */
    filter: drop-shadow(0 0 3px rgba(255, 165, 0, 0.3));
    animation: twinkle 2s ease-in-out infinite;
    /* GPU ускорение */
    will-change: opacity, transform;
    /* Плавный переход позиции для анимации прилёта снизу */
    transition: cx 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                cy 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Разные задержки для разных звёзд */
.star:nth-child(2n) {
    animation-delay: 0.3s;
}

.star:nth-child(3n) {
    animation-delay: 0.6s;
}

.star:nth-child(5n) {
    animation-delay: 0.9s;
}

/* Мерцание звёзд */
@keyframes twinkle {
    0%, 100% {
        opacity: 0.7; /* Уменьшено с 1 для менее яркого старта */
        transform: scale(1);
    }
    50% {
        opacity: 0.4; /* Уменьшено с 0.6 для менее яркого минимума */
        transform: scale(0.9);
    }
}

/* Линии между звёздами (созвездие) */
.constellation-line {
    stroke: rgba(255, 165, 0, 0.8); /* Более золотистый цвет */
    stroke-width: 2; /* Чуть толще */
    fill: none;
    opacity: 0;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: opacity 0.3s ease;
    /* ОПТИМИЗАЦИЯ: Убрали filter для уменьшения лагов */
}

/* Анимация рисования линий */
.constellation-line.active {
    opacity: 1;
    animation: draw-line 1.5s ease-out forwards;
}

@keyframes draw-line {
    to {
        stroke-dashoffset: 0;
    }
}

/* Текст созвездия */
.starry-text {
    /* Текст поверх SVG - всегда в центре */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: calc(100% - 32px); /* Полная ширина контейнера минус padding */
    font-size: 14px;
    font-weight: 400;
    color: #FFFFFF;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    z-index: 10;
    padding: 8px 12px;

    /* Едва заметная стеклянная подложка */
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.2);

    /* Без свечения текста */
    text-shadow: none;

    opacity: 0;
    transition: opacity 0.6s ease 1s;
}

.starry-text:not(.hidden) {
    opacity: 1;
}

/* Skeleton для загрузки совета дня */
.starry-text.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
    height: 40px;
    width: calc(100% - 32px);
    opacity: 1;
    text-shadow: none;
}

/* При завершении оставляем только частицы и текст без фона */
.starry-container.complete {
    /* Без фона - только частицы и текст */
    transition: all 1s ease;
}

/* Статичное свечение текста без пульсации */
.starry-container.complete .starry-text {
    /* animation: pulseGlow 3s ease-in-out infinite; */ /* Отключено */
}

@keyframes pulseGlow {
    0%, 100% {
        text-shadow:
            0 0 5px rgba(255, 255, 255, 1),
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 15px rgba(255, 200, 100, 0.6),
            0 0 20px rgba(255, 165, 0, 0.4),
            0 2px 4px rgba(0, 0, 0, 0.3);
    }
    50% {
        text-shadow:
            0 0 8px rgba(255, 255, 255, 1),
            0 0 15px rgba(255, 255, 255, 0.9),
            0 0 25px rgba(255, 200, 100, 0.8),
            0 0 35px rgba(255, 165, 0, 0.6),
            0 0 45px rgba(255, 140, 0, 0.4),
            0 2px 6px rgba(0, 0, 0, 0.3);
    }
}

/* Анимация частиц - орбитальное вращение вокруг центра */
.starry-container.complete circle.particle {
    animation:
        orbit var(--orbit-duration, 10s) linear infinite var(--orbit-delay, 0s),
        shimmer var(--shimmer-duration, 2s) ease-in-out infinite;
    transform-origin: 140px 30px; /* Центр контейнера (280x60) */
    will-change: transform, opacity; /* GPU ускорение */
}

@keyframes orbit {
    from {
        transform: rotate(var(--orbit-angle, 0deg)) translateX(var(--orbit-radius, 50px)) rotate(calc(-1 * var(--orbit-angle, 0deg)));
    }
    to {
        transform: rotate(calc(var(--orbit-angle, 0deg) + 360deg)) translateX(var(--orbit-radius, 50px)) rotate(calc(-1 * (var(--orbit-angle, 0deg) + 360deg)));
    }
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0.3;
        fill: rgba(255, 200, 100, 0.4);
    }
    50% {
        opacity: 0.75;
        fill: rgba(255, 165, 0, 0.75);
    }
}

/* Падающая звёздная пыль */
.stardust {
    position: absolute;
    top: -5px;
    width: 1.3px;
    height: 1.3px;
    background: radial-gradient(circle, rgba(255, 200, 100, 1) 0%, rgba(255, 165, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: fall linear forwards;
    box-shadow: 0 0 1.7px rgba(255, 200, 100, 0.6);
    z-index: 5;
    will-change: transform, opacity; /* GPU ускорение */
}

@keyframes fall {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(45px) translateX(10px);
        opacity: 0;
    }
}

/* Заблокированный совет дня - кликабельная область */
.starry-locked {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 32px);
    height: 50px;
    text-align: center;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.4s ease;
    cursor: pointer;
    pointer-events: auto;
}

.starry-locked:not(.hidden) {
    opacity: 1;
}

.starry-locked:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.locked-star-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 8px;
    display: block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Daily Advice Overlay */
.advice-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    padding-top: 60px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

.advice-overlay-text-wrapper {
    position: relative;
    width: calc(100% - 40px);
    max-width: 600px;
    overflow: hidden;
    border-radius: 14px;
}

.advice-overlay-text {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    line-height: 1.5;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.advice-overlay-text strong {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    display: block;
    margin-bottom: 4px;
    line-height: 1;
}

/* Эффект блеска на подсказке */
.advice-glint {
    position: absolute;
    top: -10%;
    left: -30%;
    width: 40%;
    height: 120%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-20deg);
    z-index: 10;
    pointer-events: none;
    animation: adviceGlintAnimation 3s ease-in-out 0.5s infinite;
}

@keyframes adviceGlintAnimation {
    0% {
        left: -30%;
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    40% {
        opacity: 1;
    }
    60% {
        left: 130%;
        opacity: 0;
    }
    100% {
        left: 130%;
        opacity: 0;
    }
}

/* Анимация пальцев, указывающих на блок прогноза */
.tap-finger {
    position: fixed;
    font-size: 48px;
    z-index: 10002;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    line-height: 1;
    opacity: 1;
}

/* Левый палец - кликает первым */
#tapFingerLeft {
    animation: fingerTap 1.2s ease-in-out infinite;
}

/* Правый палец - кликает со смещением в 0.6 секунды */
#tapFingerRight {
    animation: fingerTap 1.2s ease-in-out infinite;
    animation-delay: 0.6s;
}

/* Анимация нажатия блока прогноза при показе overlay - синхронизировано с пальцем */
.prediction-result.overlay-tap-hint {
    animation: overlayBlockTap 1.2s ease-out infinite;
}

@keyframes overlayBlockTap {
    0%, 100% {
        transform: scale(1);
    }
    /* Первое нажатие (левый палец) */
    10% {
        transform: scale(1);
    }
    15% {
        transform: scale(0.98);
    }
    20% {
        transform: scale(1);
    }
    /* Пауза */
    45% {
        transform: scale(1);
    }
    /* Второе нажатие (правый палец) */
    60% {
        transform: scale(1);
    }
    65% {
        transform: scale(0.98);
    }
    70% {
        transform: scale(1);
    }
}

/* Контейнер для эффектов overlay (ripple, частицы) - над всем */
.overlay-effects-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10003;
    pointer-events: none;
}

/* Maintenance страница */
.maintenance-card {
    text-align: center;
    padding: 40px 24px !important;
    background: linear-gradient(135deg, rgba(88, 66, 255, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.maintenance-icon {
    font-size: 64px;
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.maintenance-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--tg-theme-text-color, #000);
    margin-bottom: 16px;
}

.maintenance-text {
    font-size: 16px;
    color: var(--tg-theme-text-color, #000);
    margin-bottom: 12px;
    line-height: 1.5;
}

.maintenance-text-small {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #999);
    margin-bottom: 24px;
    line-height: 1.4;
}

.maintenance-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.maintenance-footer p {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #999);
    margin: 0;
}

/* ===== Consent Form Container ===== */
#consentForm {
    text-align: center;
}

/* ===== Language Switcher ===== */
.language-switcher {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    margin: 20px 0 0 0;
    padding: 0;
    background: none;
}

.lang-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    color: var(--tg-theme-hint-color, #999);
    font-weight: 400;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: var(--tg-theme-text-color, #666);
    border-color: var(--tg-theme-hint-color, rgba(0, 0, 0, 0.05));
}

.lang-btn.active {
    color: var(--tg-theme-text-color, #000);
    font-weight: 500;
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
}

.lang-divider {
    color: var(--tg-theme-hint-color, #ddd);
    opacity: 0.5;
}

/* ===== Updated Consent Card ===== */
.consent-card {
    position: relative;
}

.consent-title {
    font-size: 20px !important;
    font-weight: 500 !important;
    margin-bottom: 16px !important;
    line-height: 1.3;
}

.consent-intro {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--tg-theme-text-color, #000);
    text-align: center; /* По центру */
}

/* Слайдер-табло для поинтов регистрации */
.registration-slider {
    height: 28px;
    overflow: hidden;
    margin: 16px 0 32px 0;
    text-align: center;
    position: relative;
}

.registration-slider-track {
    position: relative;
    height: 28px;
}

.registration-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    line-height: 28px;
    font-size: 13px;
    color: #2d8a4e;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.registration-slide.active {
    opacity: 1;
    transform: translateY(0);
}

/* Подпись над полем даты (когда дата из Telegram) */
.birthdate-source-label {
    margin: 0 0 8px 0;
    font-size: 13px;
    line-height: 1.4;
    color: #fff;
    text-align: center;
}

.consent-disclaimer {
    margin: 12px 0 0 0; /* Теперь под кнопкой, отступ сверху */
    font-size: 10px;
    line-height: 1.4;
    color: var(--tg-theme-hint-color, #666);
    text-align: center; /* По центру */
}

.privacy-link {
    color: var(--tg-theme-link-color, #5842F6);
    text-decoration: underline;
}

.privacy-link:hover {
    text-decoration: none;
}

/* ===== Consent Buttons ===== */
/* Wrapper для анимации пальца */
.button-animation-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
}

/* Палец над кнопкой */
.button-animation-wrapper::before {
    content: '👆';
    position: absolute;
    top: -50px;
    left: 70%;
    transform: translateX(-50%);
    font-size: 36px;
    opacity: 0;
    animation: finger-tap 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
}

.consent-accept {
    width: 100%;
    position: relative;
    overflow: hidden;
    animation: button-press 8s ease-in-out infinite;
}

/* Блик */
.consent-accept::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    bottom: -50%;
    left: -50%;
    background: linear-gradient(
        110deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(-100%);
    animation: shine 3s ease-in-out infinite;
    animation-delay: 1s;
    pointer-events: none;
}

/* Анимация блика */
@keyframes shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Анимация нажатия кнопки */
@keyframes button-press {
    0%, 100% {
        transform: scale(1);
        box-shadow: none;
    }
    60% {
        transform: scale(1);
        box-shadow: none;
    }
    62.5% {
        transform: scale(0.97);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    65% {
        transform: scale(0.97);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.3),
                    0 0 0 20px rgba(255, 255, 255, 0.1);
    }
    67.5% {
        transform: scale(1);
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0.1),
                    0 0 0 40px rgba(255, 255, 255, 0);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 30px rgba(255, 255, 255, 0),
                    0 0 0 50px rgba(255, 255, 255, 0);
    }
}

/* Анимация пальца */
@keyframes finger-tap {
    0%, 100% {
        opacity: 0;
        top: -50px;
        transform: translateX(-50%) scale(1);
    }
    55% {
        opacity: 0;
        top: -50px;
        transform: translateX(-50%) scale(1);
    }
    58% {
        opacity: 1;
        top: -50px;
        transform: translateX(-50%) scale(1);
    }
    62.5% {
        opacity: 1;
        top: 5px;
        transform: translateX(-50%) scale(0.85);
    }
    65% {
        opacity: 1;
        top: -5px;
        transform: translateX(-50%) scale(0.95);
    }
    68% {
        opacity: 1;
        top: -35px;
        transform: translateX(-50%) scale(1);
    }
    72% {
        opacity: 0;
        top: -50px;
        transform: translateX(-50%) scale(1);
    }
}


.consent-decline {
    width: 100%;
}

/* ===== Outline Button Style ===== */
.btn-outline {
    background: transparent;
    color: var(--tg-theme-button-color, #5842F6);
    border: 1.5px solid var(--tg-theme-button-color, #5842F6);
}

.btn-outline:hover {
    background: var(--tg-theme-button-color, #5842F6);
    color: var(--tg-theme-button-text-color, #fff);
}

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

/* ===== Birthdate Source Hint ===== */
.birthdate-source {
    margin: 4px 0 16px 0;
    font-size: 11px;
    font-style: italic;
    font-weight: 400; /* Увеличен вес шрифта с 300 до 400 */
    color: #3a8050; /* Осветлён с #2d5f3d для лучшей читаемости */
    text-align: left;
}

/* ===== Birthdate Error ===== */
.birthdate-error {
    margin: 8px 0 0 0;
    padding: 8px 12px;
    background: rgba(255, 59, 48, 0.1);
    border-left: 3px solid #ff3b30;
    border-radius: 6px;
    font-size: 13px;
    color: #ff3b30;
}

/* ===== Модалка отказа от согласия ===== */
.consent-rejection-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.consent-rejection-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.consent-rejection-card {
    position: relative;
    padding: 32px 24px;
    max-width: 400px;
    width: 100%;
    animation: rejectionModalAppear 300ms ease-out;
}

@keyframes rejectionModalAppear {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.consent-rejection-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 16px;
    animation: rejectionIconBounce 500ms ease-out;
}

@keyframes rejectionIconBounce {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.consent-rejection-title {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 12px 0;
    color: var(--tg-theme-text-color, #1a1a1a);
}

.consent-rejection-text {
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    margin: 0 0 24px 0;
    color: var(--tg-theme-hint-color, #666);
    white-space: pre-line;
}

/* Список подарков */
.rejection-gift-list {
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.rejection-gift-item {
    font-size: 14px;
    line-height: 1.6;
    color: var(--tg-theme-text-color, #333);
    padding: 8px 0;
    border-bottom: 1px solid var(--tg-theme-section-separator-color, #e9ecef);
}

.rejection-gift-item:last-child {
    border-bottom: none;
}

/* Кнопки */
.rejection-btn-accept {
    width: 100%;
    margin-bottom: 12px;
}

.rejection-btn-decline {
    width: 100%;
}

/* Красная кнопка для финального отказа */
.rejection-btn-decline.danger {
    color: #dc3545;
    border-color: #dc3545;
}

.rejection-btn-decline.danger:hover,
.rejection-btn-decline.danger:active {
    background: #dc3545;
    color: white;
}


/* Кнопка витрины оберегов */
.btn-showcase {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--tg-theme-hint-color, #999);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-showcase:hover,
.btn-showcase:active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--tg-theme-text-color, #fff);
}

/* ============================================
   LOGO LOADER - Заполняющийся контур
   ============================================ */

.logo-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 20, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.logo-loader-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.logo-loader-svg {
    width: 80px;
    height: 80px;
}

.logo-loader-svg .logo-path {
    stroke: var(--energy-cyan, #00d4ff);
    stroke-width: 5;
    fill: none;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: logo-draw 2s ease-in-out infinite;
    filter: drop-shadow(0 0 8px var(--energy-cyan, #00d4ff));
}

@keyframes logo-draw {
    0% {
        stroke-dashoffset: 1200;
        opacity: 0.5;
    }
    50% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    50.1% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    100% {
        stroke-dashoffset: -1200;
        opacity: 0.5;
    }
}

/* Мягкое свечение вокруг логотипа */
.logo-loader-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.2) 0%, transparent 70%);
    animation: loader-glow-pulse 2s ease-in-out infinite;
}

@keyframes loader-glow-pulse {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

/* Текст загрузки */
.logo-loader-text {
    margin-top: 24px;
    font-size: 14px;
    color: var(--tg-theme-hint-color, #888);
    letter-spacing: 0.5px;
}

.logo-loader-text::after {
    content: '';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* ============================================
   WEEKLY SURVEY V2 - Современный слайдовый опрос
   ============================================ */

.survey-v2-modal {
    max-width: 100%;
    width: 100%;
    padding: 0 0 24px;
    overflow: hidden;
    background: rgba(20, 20, 30, 0.98);
    border-radius: 24px 24px 0 0;
    margin: 0;
}

/* Хедер опроса */
.survey-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
}

.survey-header-spacer {
    flex: 1;
}

/* Круглая кнопка назад (как кнопка закрытия) */
.survey-back-btn-circle {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.survey-back-btn-circle .back-chevron {
    width: 10px;
    height: 10px;
    border-left: 2.5px solid var(--tg-theme-hint-color, #999);
    border-bottom: 2.5px solid var(--tg-theme-hint-color, #999);
    transform: rotate(45deg);
    margin-left: 3px;
    transition: border-color 0.2s;
}

.survey-back-btn-circle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.survey-back-btn-circle:hover .back-chevron {
    border-color: #fff;
}

.survey-back-btn-circle.disabled {
    opacity: 0.3;
    pointer-events: none;
    cursor: default;
}

/* Сегментированный прогресс-бар */
.survey-progress-bar.segmented {
    display: flex;
    gap: 4px;
    height: 4px;
    margin: 8px 20px 20px;
    background: transparent;
}

.survey-progress-segment {
    flex: 1;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.survey-progress-segment.completed {
    background: linear-gradient(90deg, var(--energy-cyan, #00d4ff), var(--energy-purple, #a855f7));
}

.survey-progress-segment.current {
    background: var(--energy-cyan, #00d4ff);
    box-shadow: 0 0 6px var(--energy-cyan, #00d4ff);
}

/* Контейнер слайдов */
.survey-slides-container {
    position: relative;
    overflow: hidden;
}

.survey-slide {
    display: none;
    padding: 0 24px 24px;
    animation: slideIn 0.3s ease;
}

.survey-slide.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

.survey-slide.sliding-out {
    animation: slideOut 0.3s ease forwards;
}

/* Контент слайда */
.survey-slide-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.survey-question-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
}

.survey-week-info {
    font-size: 13px;
    color: #888 !important;
    margin: 0 0 12px;
}

.survey-question-hint {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #888);
    margin: 0 0 20px;
}

/* Эмодзи кнопки (оценка недели) - вертикальный список */
.survey-emoji-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
}

.survey-emoji-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.survey-emoji-btn .emoji {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.survey-emoji-btn .label {
    font-size: 15px;
    font-weight: 500;
    color: #fff;
}

.survey-emoji-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.survey-emoji-btn.selected {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--energy-cyan, #00d4ff);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.survey-emoji-btn.selected .label {
    color: var(--energy-cyan, #00d4ff);
}

/* Горизонтальные карточки (короткие ответы) */
.survey-card-options {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 24px;
}

.survey-card-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.survey-card-btn .card-text {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    text-align: center;
}

.survey-card-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.survey-card-btn.selected {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--energy-cyan, #00d4ff);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.survey-card-btn.selected .card-text {
    color: var(--energy-cyan, #00d4ff);
}

/* Вертикальный список кнопок (длинные ответы с подзаголовками) */
.survey-list-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 20px;
}

.survey-list-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.survey-list-btn .option-text {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
}

.survey-list-btn .option-icon {
    font-size: 24px;
}

.survey-list-btn .option-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.survey-list-btn .option-hint {
    font-size: 13px;
    color: var(--tg-theme-hint-color, #888);
}

.survey-list-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.survey-list-btn.selected {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--energy-cyan, #00d4ff);
}

.survey-list-btn.wide {
    justify-content: flex-start;
}

/* Сетка кнопок (эмоции) */
.survey-grid-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    margin: 16px 0 20px;
}

.survey-grid-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.survey-grid-btn .emoji {
    font-size: 24px;
}

.survey-grid-btn .label {
    font-size: 10px;
    color: var(--tg-theme-hint-color, #888);
    text-align: center;
}

.survey-grid-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.survey-grid-btn.selected {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--energy-cyan, #00d4ff);
}

.survey-grid-btn.selected .label {
    color: var(--energy-cyan, #00d4ff);
}

/* Экран завершения */
.survey-finish-slide {
    padding-top: 40px;
}

.survey-finish-title {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 40px;
}

.survey-finish-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* Уведомление о недоступности расширенного опроса */
.survey-extended-notice {
    font-size: 12px;
    color: #888 !important;
    text-align: center;
    margin: 8px 0 0;
    padding: 0;
    line-height: 1.4;
    opacity: 0.7;
}

/* Кнопка "Рассказать подробнее" - стилизованная */
.survey-extend-btn-styled {
    width: 100%;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(168, 85, 247, 0.15));
    border: 2px solid rgba(0, 212, 255, 0.4);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.survey-extend-btn-styled:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.25), rgba(168, 85, 247, 0.25));
    border-color: var(--energy-cyan, #00d4ff);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.extend-btn-text {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.extend-btn-reward {
    font-size: 16px;
    font-weight: 700;
    color: var(--energy-cyan, #00d4ff);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Кнопка "Сохранить" - с обводкой, приглушённая */
.survey-submit-btn-styled {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.survey-submit-btn-styled:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.submit-btn-text {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
}

.submit-btn-reward {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 4px;
}

.survey-submit-btn-styled:hover .submit-btn-text,
.survey-submit-btn-styled:hover .submit-btn-reward {
    color: rgba(255, 255, 255, 0.8);
}

/* Старые стили кнопок (для других слайдов) */
.survey-submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
}

.survey-next-btn {
    width: 100%;
    margin-top: 16px;
}

.survey-next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Рейтинг оберегов */
/* Слайд с оберегами - специальная структура */
.survey-slide-oberegs .survey-slide-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 60vh;
}

.survey-obereg-scroll {
    flex: 1;
    overflow-y: auto;
    margin: 12px 0 16px;
    padding-right: 4px;
}

.survey-obereg-scroll::-webkit-scrollbar {
    width: 4px;
}

.survey-obereg-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.survey-obereg-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.survey-next-btn-fixed {
    flex-shrink: 0;
    margin-top: auto;
}

.survey-obereg-ratings {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.survey-obereg-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.survey-obereg-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.survey-obereg-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.survey-obereg-name {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.survey-obereg-stars {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.survey-star-btn {
    font-size: 20px;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, color 0.15s;
    color: #444;
    padding: 2px;
}

.survey-star-btn:hover {
    transform: scale(1.2);
    color: #888;
}

.survey-star-btn.active {
    color: #FFD700;
}

.survey-no-oberegs {
    text-align: center;
    color: var(--tg-theme-hint-color, #888);
    padding: 20px;
}

/* Поле комментария */
.survey-comment-input {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    margin: 16px 0 20px;
}

.survey-comment-input:focus {
    outline: none;
    border-color: var(--energy-cyan, #00d4ff);
}

.survey-comment-input::placeholder {
    color: var(--tg-theme-hint-color, #888);
}

/* Адаптивность */
@media (max-width: 360px) {
    .survey-emoji-options {
        gap: 8px;
    }

    .survey-emoji-btn {
        padding: 12px 8px;
        min-width: 60px;
    }

    .survey-emoji-btn .emoji {
        font-size: 26px;
    }

    .survey-grid-options {
        gap: 8px;
    }

    .survey-grid-btn {
        padding: 10px 6px;
    }

    .survey-grid-btn .emoji {
        font-size: 20px;
    }
}

/* ========== ОНБОРДИНГ-ОПРОС (после регистрации) ========== */
#onboardingSurvey {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--tg-theme-bg-color, #1a1a2e);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 40px 20px 20px;
}

.onboarding-survey-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.onboarding-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    text-align: center;
}

.onboarding-subtitle {
    font-size: 15px;
    color: var(--tg-theme-hint-color, #888);
    margin: 0 0 24px;
    text-align: center;
}

/* Шапка онбординга */
.onboarding-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.onboarding-back-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.onboarding-back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.onboarding-back-btn:active {
    transform: scale(0.95);
}

.onboarding-back-btn.hidden {
    display: none;
}

/* Прогресс-бар сегментированный */
.onboarding-progress-bar {
    display: flex;
    gap: 4px;
    flex: 1;
    height: 4px;
}

.onboarding-progress-segment {
    flex: 1;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    transition: background 0.3s ease;
}

.onboarding-progress-segment.current {
    background: var(--energy-cyan, #00d4ff);
    box-shadow: 0 0 6px rgba(0, 212, 255, 0.4);
}

.onboarding-progress-segment.completed {
    background: var(--energy-cyan, #00d4ff);
}

/* Вопросы */
.onboarding-question {
    display: none;
    width: 100%;
    animation: slideIn 0.3s ease;
}

.onboarding-question.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

.onboarding-question.sliding-out {
    animation: slideOut 0.2s ease forwards;
}

.onboarding-question.sliding-out-right {
    animation: slideOutRight 0.2s ease forwards;
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.onboarding-question-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 16px;
    text-align: center;
}

/* Варианты ответов */
.onboarding-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.onboarding-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.onboarding-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.onboarding-option.selected {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--energy-cyan, #00d4ff);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.25);
}

.onboarding-option-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.onboarding-option-text {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.onboarding-option.selected .onboarding-option-text {
    color: var(--energy-cyan, #00d4ff);
}

/* Адаптивность для маленьких экранов */
@media (max-width: 360px) {
    .onboarding-title {
        font-size: 18px;
    }

    .onboarding-question-title {
        font-size: 16px;
    }

    .onboarding-option {
        padding: 10px 12px;
        gap: 8px;
    }

    .onboarding-option-icon {
        font-size: 18px;
    }

    .onboarding-option-text {
        font-size: 13px;
    }
}

/* ========== GUIDED TOUR (Обучающий тур) ========== */
#guidedTour {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    pointer-events: none;
}

#guidedTour:not(.hidden) {
    pointer-events: auto;
}

.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10001;
}

.tour-spotlight {
    position: fixed;
    z-index: 10002;
    border-radius: 16px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Класс для поднятия целевого элемента над overlay */
.tour-target-highlight {
    position: relative !important;
    z-index: 10002 !important;
    pointer-events: auto !important;
}

.tour-spotlight::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid var(--energy-cyan, #00d4ff);
    border-radius: 20px;
    animation: tourPulse 2s ease-in-out infinite;
}

@keyframes tourPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

.tour-tooltip {
    position: fixed;
    z-index: 10003;
    background: linear-gradient(135deg, #1a1a2e 0%, #16162a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    max-width: 300px;
    width: calc(100% - 40px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-tooltip-arrow {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    z-index: -1;
}

.tour-tooltip-arrow.top {
    bottom: -9px;
    left: 50%;
    margin-left: -8px;
    border-top: none;
    border-left: none;
}

.tour-tooltip-arrow.bottom {
    top: -9px;
    left: 50%;
    margin-left: -8px;
    border-bottom: none;
    border-right: none;
}

.tour-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.tour-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 16px;
    line-height: 1.5;
}

.tour-interaction-hint {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 16px;
    text-align: center;
}

.tour-tap-counter {
    font-size: 14px;
    font-weight: 600;
    color: var(--energy-cyan, #00d4ff);
}

.tour-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tour-progress {
    display: flex;
    gap: 6px;
}

.tour-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.tour-dot.active {
    background: var(--energy-cyan, #00d4ff);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.tour-dot.completed {
    background: var(--energy-cyan, #00d4ff);
}

.tour-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.tour-skip {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    cursor: pointer;
    padding: 8px 12px;
    transition: color 0.2s ease;
}

.tour-skip:hover {
    color: rgba(255, 255, 255, 0.8);
}

.tour-next {
    background: var(--energy-cyan, #00d4ff);
    border: none;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tour-next:hover {
    background: #00b8e6;
    transform: translateY(-1px);
}

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

.tour-next:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
}

/* Экран награды */
.tour-reward {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10004;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.9);
}

.tour-reward.hidden {
    display: none;
}

.tour-reward-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16162a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    max-width: 320px;
    width: 100%;
    animation: tourRewardAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tourRewardAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.tour-reward-icon {
    margin-bottom: 16px;
    animation: tourRewardBounce 1s ease infinite;
}

.tour-reward-zc-icon {
    width: 80px;
    height: 80px;
}

@keyframes tourRewardBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.tour-reward-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.tour-reward-description {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 24px;
    line-height: 1.5;
}

.tour-reward-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.tour-reward-coins {
    font-size: 36px;
    font-weight: 700;
    color: var(--energy-cyan, #00d4ff);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.tour-reward-coin-icon {
    width: 40px;
    height: 40px;
    animation: tourCoinSpin 2s linear infinite;
}

@keyframes tourCoinSpin {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

.tour-finish {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
}
