
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            -webkit-tap-highlight-color: transparent;
        }

        :root {
            --primary-bg: #f8f9fa;
            --card-bg: #ffffff;
            --accent-blue: #4361ee;
            --accent-pink: #f72585;
            --accent-gradient: linear-gradient(135deg, var(--accent-blue), var(--accent-pink));
            --text-dark: #2d3748;
            --text-light: #4a5568;
            --text-white: #ffffff;
            --success: #38b000;
            --danger: #ef476f;
            --warning: #ff9e00;
            --gold: #ffd700;
            --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.12);
            --border-radius: 16px;
            --transition: all 0.3s ease;
        }

        body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    padding: 12px;
    padding-bottom: 80px;
    /* Убираем padding-top, так как header теперь фиксированный */
}

        .wrap {
    max-width: 540px;
    margin: 0 auto;
    padding-top: 90px; /* Высота header + отступы */
}

        /* Header - ИЗМЕНЕНО: баланс и аватарка рядом справа */
        .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    animation: slideDown 0.5s ease;
    
    /* ФИКСИРУЕМ ПОЗИЦИЮ */
    position: fixed;
    top: 12px; /* отступ от верха экрана */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px); /* учитываем отступы body */
    max-width: 540px; /* совпадает с .wrap */
    z-index: 1000; /* чтобы была поверх остального контента */
}

        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .logo i {
            font-size: 28px;
            background: var(--accent-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }

        .logo h1 {
            font-size: 18px;
            font-weight: 800;
            background: var(--accent-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        /* ПРАВЫЙ БЛОК: баланс + аватарка */
        .header-right {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .balance-container {
            display: flex;
            align-items: center;
            gap: 8px;
            background: linear-gradient(135deg, #fff9db, #ffe066);
            padding: 8px 12px;
            border-radius: 25px;
            box-shadow: 0 3px 10px rgba(255, 215, 0, 0.2);
            transition: var(--transition);
            order: 1; /* Баланс слева в блоке */
        }

        .balance-container:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
        }

        .balance-container i {
            color: var(--gold);
            font-size: 16px;
        }

        #balance {
            font-size: 18px;
            font-weight: 800;
            color: #e6b800;
        }

        /* Аватарка в хедере */
        .header-avatar {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: 2px solid var(--accent-blue);
            cursor: pointer;
            transition: var(--transition);
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: var(--shadow);
            order: 2; /* Аватарка справа в блоке */
        }

        .header-avatar:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
        }

        .header-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .header-avatar i {
            font-size: 20px;
            color: white;
        }

        /* Navigation Tabs - делаем адаптивными */
.tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 20px;
    margin-top: 20px; /* Добавляем отступ сверху из-за фиксированного header */
    background: var(--card-bg);
    padding: 6px;
    border-radius: 25px;
    box-shadow: var(--shadow);
    flex-wrap: wrap; /* Разрешаем перенос на маленьких экранах */
}

.tab-btn {
    flex: 1;
    min-width: 60px; /* Минимальная ширина для читаемости */
    padding: 10px 8px; /* Немного уменьшаем padding */
    border: none;
    background: transparent;
    color: var(--text-light);
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px; /* Чуть уменьшаем шрифт для телефонов */
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap; /* Не переносим слова */
}

/* Убираем иконки на очень узких экранах */
@media (max-width: 380px) {
    .tab-btn i {
        display: none; /* Скрываем иконки на самых узких экранах */
    }
    
    .tab-btn {
        font-size: 12px; /* Еще немного уменьшаем шрифт */
        padding: 10px 6px;
        gap: 0;
    }
}

/* Адаптация для средних экранов */
@media (min-width: 381px) and (max-width: 420px) {
    .tab-btn {
        font-size: 13px;
        gap: 4px;
    }
}

/* Полноценное отображение на планшетах и ПК */
@media (min-width: 421px) {
    .tab-btn {
        font-size: 14px;
        padding: 12px 10px;
        gap: 6px;
    }
}

/* Уменьшаем header на узких экранах для экономии места */
@media (max-width: 380px) {
    .header {
        padding: 10px 12px;
    }
    
    .logo h1 {
        font-size: 16px;
    }
    
    .balance-container {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    #balance {
        font-size: 15px;
    }
    
    .header-avatar {
        width: 36px;
        height: 36px;
    }
    
    .header i.fa-gift {
        font-size: 22px;
    }
    
    /* Уменьшаем отступ для wrap */
    .wrap {
        padding-top: 70px;
    }
}

/* Еще один вариант — можно сделать табы горизонтально прокручиваемыми */
@media (max-width: 340px) {
    .tabs {
        flex-wrap: nowrap; /* Запрещаем перенос */
        overflow-x: auto; /* Добавляем горизонтальную прокрутку */
        justify-content: flex-start;
        scrollbar-width: none; /* Скрываем скроллбар в Firefox */
        -ms-overflow-style: none; /* Скрываем скроллбар в IE/Edge */
    }
    
    .tabs::-webkit-scrollbar {
        display: none; /* Скрываем скроллбар в Chrome/Safari */
    }
    
    .tab-btn {
        flex: 0 0 auto; /* Не растягиваем, фиксированная ширина */
        min-width: 75px;
    }
}

        .tab-btn:hover {
            transform: translateY(-2px);
        }

        .tab-btn.active {
            background: var(--accent-gradient);
            color: white;
            box-shadow: 0 3px 12px rgba(67, 97, 238, 0.3);
        }

        /* Screens */
        .screen {
            display: none;
        }

        .screen.active {
            display: block;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Bet Selection */
        .bets {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .bet {
            width: 65px;
            height: 65px;
            border-radius: 50%;
            border: 2px solid rgba(255, 255, 255, 0.8);
            background: white;
            color: var(--text-dark);
            font-size: 14px;
            font-weight: 800;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            box-shadow: var(--shadow);
        }

        .bet:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
        }

        .bet.active {
            background: var(--accent-gradient);
            color: white;
            transform: scale(1.05);
            box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
            border-color: white;
        }

        .bet i {
            font-size: 18px;
            margin-bottom: 4px;
            color: var(--gold);
        }

        .bet.active i {
            color: white;
        }

        /* Roulette Container */
        .roulette-card {
            background: var(--card-bg);
            border-radius: var(--border-radius);
            padding: 14px;
            box-shadow: var(--shadow);
            text-align: center;
            margin-bottom: 20px;
            position: relative;
            border: 2px solid transparent;
            background-clip: padding-box;
        }

        .roulette-card::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            background: linear-gradient(45deg, 
                var(--accent-blue), 
                var(--accent-pink), 
                #9d4edd, 
                var(--accent-blue));
            border-radius: calc(var(--border-radius) + 4px);
            z-index: -1;
            animation: rotateGradient 3s linear infinite;
            opacity: 0.7;
        }

        @keyframes rotateGradient {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .view-port {
            position: relative;
            overflow: hidden;
            height: 140px;
            margin: 12px auto;
            width: 100%;
            max-width: 500px;
            border-radius: 12px;
            background: linear-gradient(145deg, #ffffff, #f7f9ff);
            box-shadow: 
                inset 0 0 20px rgba(67, 97, 238, 0.1),
                0 4px 15px rgba(0, 0, 0, 0.08);
            border: 1px solid rgba(67, 97, 238, 0.15);
        }

        .track {
            display: flex;
            align-items: center;
            will-change: transform;
            transform: translateX(0);
        }

        .slot {
            width: 100px;
            min-width: 100px;
            height: 140px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border-right: 1px solid rgba(0, 0, 0, 0.04);
            background: linear-gradient(145deg, #ffffff, #f7f9ff);
            padding: 6px;
            position: relative;
        }

        /* Стиль для webp картинок в слотах */
        .slot-image {
            width: 60px;
            height: 60px;
            object-fit: contain;
            margin-bottom: 6px;
            animation: pulse 2s infinite;
        }

        .slot .name {
            font-size: 11px;
            font-weight: 700;
            text-align: center;
            margin-bottom: 6px;
            color: var(--text-dark);
            line-height: 1.2;
            min-height: 26px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .slot .val {
            font-weight: 900;
            color: var(--gold);
            font-size: 13px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 2px;
            background: rgba(255, 215, 0, 0.1);
            padding: 3px 8px;
            border-radius: 12px;
            border: 1px solid rgba(255, 215, 0, 0.3);
        }

        .star-icon {
            width: 14px;
            height: 14px;
            object-fit: contain;
        }

        /* Center line - ТОЛЬКО ПАЛКА */
        .center-line {
            position: absolute;
            left: 50%;
            top: 0;
            transform: translateX(-50%);
            width: 4px;
            height: 100%;
            background: var(--accent-pink);
            z-index: 10;
            pointer-events: none;
            border-radius: 4px;
            box-shadow: 
                0 0 15px rgba(247, 37, 133, 0.8),
                inset 0 0 10px rgba(255, 255, 255, 0.5);
        }

        /* Controls */
        .controls {
            display: flex;
            gap: 10px;
            align-items: center;
            justify-content: center;
            margin-top: 22px;
            margin-bottom: 22px
        }

        button {
            cursor: pointer;
        }

        @keyframes buttonPulse {
            0% { 
                box-shadow: 0 0 30px rgba(247, 37, 133, 0.9), 0 10px 25px rgba(67, 97, 238, 0.7);
                transform: translateY(-5px) scale(1.05);
            }
            100% { 
                box-shadow: 0 0 40px rgba(247, 37, 133, 1), 0 12px 30px rgba(67, 97, 238, 0.9);
                transform: translateY(-5px) scale(1.08);
            }
        }

        /* ИЗМЕНЕНО: SPIN → КРУТИТЬ */
        #spinBtn {
            background: var(--accent-gradient);
            color: white;
            border: none;
            padding: 16px 40px;
            font-size: 18px;
            font-weight: 800;
            border-radius: 30px;
            cursor: pointer;
            transition: var(--transition);
            box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
            width: 90%;
            max-width: 300px;
            position: relative;
            overflow: hidden;
        }

        #spinBtn:hover:not(:disabled) {
            transform: translateY(-3px);
            box-shadow: 0 10px 25px rgba(67, 97, 238, 0.5);
        }

        #spinBtn:active:not(:disabled) {
            transform: scale(0.98);
        }

        #spinBtn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* Upgraded Spin Styles */
        .upgraded-spin-container {
            background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 87, 34, 0.1));
            border-radius: 12px;
            padding: 12px;
            margin: 15px 0;
            border: 1px solid rgba(255, 152, 0, 0.3);
            animation: upgradedPulse 2s infinite;
        }

        @keyframes upgradedPulse {
            0%, 100% { 
                box-shadow: 0 0 10px rgba(255, 152, 0, 0.2); 
            }
            50% { 
                box-shadow: 0 0 20px rgba(255, 152, 0, 0.4); 
            }
        }

        .upgraded-info {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 13px;
            font-weight: 700;
            color: #FF9800;
            margin-bottom: 10px;
        }

        .upgraded-info i {
            color: #FF9800;
            animation: boltBlink 1.5s infinite;
        }

        @keyframes boltBlink {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.7; transform: scale(1.1); }
        }

        .upgraded-checkbox {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            cursor: pointer;
            font-weight: 700;
            color: var(--text-dark);
            transition: var(--transition);
        }

        .upgraded-checkbox:hover {
            transform: translateY(-2px);
        }

        .upgraded-checkbox input[type="checkbox"] {
            display: none;
        }

        .checkbox-custom {
            width: 22px;
            height: 22px;
            border-radius: 6px;
            background: white;
            border: 2px solid #FF9800;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition);
            position: relative;
        }

        .checkbox-custom i {
            color: white;
            font-size: 12px;
            opacity: 0;
            transform: scale(0);
            transition: var(--transition);
        }

        .upgraded-checkbox input:checked + .checkbox-custom {
            background: linear-gradient(135deg, #FF9800, #FF5722);
            border-color: #FF5722;
        }

        .upgraded-checkbox input:checked + .checkbox-custom i {
            opacity: 1;
            transform: scale(1);
        }

        /* Стили для кнопки КРУТИТЬ при активном улучшении */
        #spinBtn.upgraded {
            background: linear-gradient(135deg, #FF9800, #FF5722, #FF9800);
            background-size: 200% 100%;
            animation: upgradedGradient 2s linear infinite;
            box-shadow: 0 6px 20px rgba(255, 87, 34, 0.4);
        }

        @keyframes upgradedGradient {
            0% { background-position: 0% 50%; }
            100% { background-position: 200% 50%; }
        }

        #spinBtn.upgraded:hover:not(:disabled) {
            box-shadow: 0 10px 25px rgba(255, 87, 34, 0.5);
        }

        /* Стоимость при улучшении */
        .upgraded-cost {
            font-size: 12px;
            color: var(--danger);
            font-weight: 800;
            margin-top: 5px;
            text-align: center;
            display: none;
        }

        .upgraded-cost.show {
            display: block;
        }

        /* Rewards preview */
        .rewards {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            margin-top: 12px;
        }

        @media (min-width: 768px){
        .rewards {
        grid-template-columns: repeat(3, 1fr);
        } 
    }  

        .reward {
            background: white;
            padding: 10px;
            border-radius: 10px;
            text-align: center;
            font-weight: 800;
            font-size: 12px;
            border: 1px solid rgba(0, 0, 0, 0.04);
            transition: var(--transition);
            display: flex;
            flex-direction: column;
            align-items: center;
            cursor: pointer;
            position: relative;
        }

        .reward:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .reward-image {
            width: 50px;
            height: 50px;
            object-fit: contain;
            margin-bottom: 8px;
            animation: pulse 3s infinite;
        }

        .reward-value {
            font-size: 12px;
            font-weight: 900;
            color: var(--gold);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 3px;
            background: rgba(255, 215, 0, 0.1);
            padding: 4px 10px;
            border-radius: 15px;
            border: 1px solid rgba(255, 215, 0, 0.3);
        }

        /*.reward-chance {
            font-size: 10px;
            color: var(--text-light);
            margin-top: 4px;
        }*/

        /* Win modal */
        .win-modal {
            position: fixed;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.9);
            z-index: 1000;
            visibility: hidden;
            opacity: 0;
            transition: all 0.3s ease;
        }

        .win-modal.show {
            visibility: visible;
            opacity: 1;
        }

        .win-box {
            background: white;
            padding: 30px;
            border-radius: var(--border-radius);
            text-align: center;
            width: 100%;
            max-width: 320px;
            border: 3px solid var(--accent-blue);
            box-shadow: 0 10px 30px rgba(67, 97, 238, 0.4);
            animation: winScale 0.5s ease;
        }

        @keyframes winScale {
            from { transform: scale(0.5); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }

        .win-animation-container {
            width: 150px;
            height: 150px;
            margin: 0 auto 15px;
        }

        .win-box .big {
            font-size: 28px;
            font-weight: 900;
            color: var(--gold);
            margin: 15px 0;
            animation: goldPulse 1s infinite;
        }

        @keyframes goldPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }

        .win-name {
            font-size: 22px;
            font-weight: 800;
            color: var(--accent-blue);
            margin: 10px 0;
        }

        .win-congrats {
            font-size: 16px;
            color: var(--text-light);
            margin-bottom: 15px;
            font-weight: 600;
        }

        .win-value {
            font-size: 24px;
            font-weight: 900;
            color: var(--gold);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            background: rgba(255, 215, 0, 0.1);
            padding: 10px 20px;
            border-radius: 20px;
            border: 2px solid var(--gold);
            margin: 15px auto;
            width: fit-content;
        }

        .win-value .star-icon {
            width: 24px;
            height: 24px;
        }

        .close-btn {
            margin-top: 12px;
            background: var(--accent-gradient);
            color: #fff;
            border: none;
            padding: 12px 24px;
            border-radius: 25px;
            font-weight: 800;
            cursor: pointer;
            transition: var(--transition);
            width: 100%;
        }

        .close-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
        }

        /* Inventory Screen */
        .inventory-container {
            background: var(--card-bg);
            border-radius: var(--border-radius);
            padding: 15px;
            box-shadow: var(--shadow);
            margin-top: 12px;
        }

        .inventory-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }

        .inventory-header > div {
    display: flex;
    gap: 10px;
    align-items: center;
}

.selection-info {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 600;
    margin-right: auto;
    padding: 5px 10px;
    background: rgba(67, 97, 238, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(67, 97, 238, 0.1);
    transition: all 0.3s ease;
    min-width: 85px;
}

.selection-info.show {
    background: rgba(67, 97, 238, 0.1);
    border-color: rgba(67, 97, 238, 0.2);
    color: var(--accent-blue);
    font-weight: 700;
}

/* Для мобильных */
@media (max-width: 420px) {
    .selection-info {
        font-size: 12px;
        min-width: 120px;
        padding: 4px 8px;
    }
    
    .inventory-header > div {
        gap: 6px;
    }
}

        .clear-selection-btn {
    background: linear-gradient(135deg, #ef476f, #d90429);
    color: white;
    border: none;
    padding: 6px 12px; /* Меньше padding */
    border-radius: 20px;
    font-size: 11px; /* Меньше шрифт */
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(239, 71, 111, 0.25);
    min-width: 40px;
}

.clear-selection-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 71, 111, 0.4);
}

.clear-selection-btn:active {
    transform: translateY(0);
}

/* Только иконка на очень маленьких экранах */
@media (max-width: 380px) {
    .clear-selection-btn span {
        display: none;
    }
    
    .clear-selection-btn {
        padding: 6px 10px;
        min-width: 36px;
        justify-content: center;
    }
    
    .clear-selection-btn i {
        margin: 0;
    }
}

@keyframes shineEffect {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes shopButtonGlow {
    0% {
        box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3),
                   0 0 10px rgba(156, 39, 176, 0.1);
    }
    100% {
        box-shadow: 0 4px 20px rgba(156, 39, 176, 0.5),
                   0 0 15px rgba(156, 39, 176, 0.3);
    }
}

@keyframes cartBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-2px) rotate(10deg); }
}

/* Для мобильных устройств */
@media (max-width: 420px) {
    .inventory-header > div {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
    }
    
    .clear-selection-btn,
    .refresh-inventory-btn,
    .buy-items-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .buy-items-btn {
        padding: 8px 16px;
    }
}

        .refresh-inventory-btn {
    background: linear-gradient(135deg, #2196F3, #0D47A1);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.25);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.refresh-inventory-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.refresh-inventory-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.refresh-inventory-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: shineEffect 3s infinite linear;
    z-index: -1;
}

        .inventory-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            margin-top: 15px;
        }

        @media (min-width: 768px) {
            .inventory-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        .inventory-item {
            background: white;
            border-radius: var(--border-radius);
            padding: 12px;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            border: 2px solid transparent;
            box-shadow: var(--shadow);
            position: relative;
            transition: var(--transition);
            animation: itemAppear 0.5s ease backwards;
            cursor: pointer;
        }

        @keyframes itemAppear {
            from { 
                opacity: 0; 
                transform: scale(0.8) translateY(20px); 
            }
            to { 
                opacity: 1; 
                transform: scale(1) translateY(0); 
            }
        }

        .inventory-item:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-hover);
        }

        .inventory-item.selected {
            border-color: var(--accent-blue);
            background: linear-gradient(145deg, #ffffff, #f0f5ff);
            animation: pulseSelect 1.5s infinite;
        }

        @keyframes pulseSelect {
            0%, 100% { box-shadow: 0 5px 15px rgba(67, 97, 238, 0.2); }
            50% { box-shadow: 0 5px 20px rgba(67, 97, 238, 0.4); }
        }

        .item-checkbox {
            position: absolute;
            top: 8px;
            left: 8px;
            width: 16px;
            height: 16px;
            border-radius: 4px;
            background: var(--card-bg);
            border: 2px solid var(--accent-blue);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            color: white;
            z-index: 2;
            transition: var(--transition);
        }

        .inventory-item.selected .item-checkbox {
            background: var(--accent-blue);
        }

        .item-checkbox i {
            display: none;
            font-size: 8px;
        }

        .inventory-item.selected .item-checkbox i {
            display: block;
        }

        .item-count {
            position: absolute;
            top: 8px;
            right: 8px;
            background: var(--accent-pink);
            color: white;
            min-width: 20px;
            height: 20px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 800;
            padding: 0 6px;
            animation: countBounce 0.5s ease;
        }

        @keyframes countBounce {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.2); }
        }

        .inventory-item-image {
            width: 50px;
            height: 50px;
            object-fit: contain;
            margin-bottom: 8px;
        }

        .item-name {
            font-size: 12px;
            font-weight: 700;
            margin-bottom: 6px;
            color: var(--text-dark);
            line-height: 1.2;
            min-height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .item-value {
            font-size: 13px;
            font-weight: 800;
            color: var(--gold);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 3px;
            background: rgba(255, 215, 0, 0.1);
            padding: 4px 10px;
            border-radius: 15px;
            border: 1px solid rgba(255, 215, 0, 0.3);
        }

        .inventory-actions {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-top: 20px;
            animation: slideUp 0.3s ease;
            display: none;
        }

        @keyframes slideUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .inventory-actions.show {
            display: flex;
        }

        .action-btn {
            padding: 14px;
            border-radius: 25px;
            border: none;
            font-weight: 700;
            font-size: 14px;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: var(--shadow);
        }

        .action-btn:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-hover);
        }

        .withdraw-btn {
            background: linear-gradient(135deg, #4CAF50, #2E7D32);
            color: white;
        }

        .sell-btn {
            background: linear-gradient(135deg, #2196F3, #0D47A1);
            color: white;
        }

        .craft-btn {
            background: linear-gradient(135deg, #FF9800, #EF6C00);
            color: white;
        }

        /* Craft Screen */

        /* ========== БЫСТРЫЕ СПИНЫ ========== */
/* ========== БЫСТРЫЕ СПИНЫ ========== */
.quick-spin-section {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 87, 34, 0.1));
    border-radius: var(--border-radius);
    margin: 20px 0;
    overflow: hidden;
    border: 2px solid rgba(255, 152, 0, 0.2);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.15);
    animation: quickSpinPulse 3s infinite alternate;
}

@keyframes quickSpinPulse {
    0% { box-shadow: 0 4px 15px rgba(255, 152, 0, 0.15); }
    100% { box-shadow: 0 4px 25px rgba(255, 152, 0, 0.25); }
}

.quick-spin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #FF9800, #FF5722);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.quick-spin-header:hover {
    background: linear-gradient(135deg, #FF5722, #FF9800);
    padding-right: 18px;
}

.quick-spin-header .fa-chevron-down {
    transition: transform 0.3s ease;
}

.quick-spin-header.expanded .fa-chevron-down {
    transform: rotate(180deg);
}

.quick-spin-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 16px;
}

.quick-spin-badge i {
    font-size: 20px;
    animation: boltBlink 2s infinite;
}

.discount-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #FF5722;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 900;
    margin-left: 10px;
    animation: discountPulse 1.5s infinite;
}

@keyframes discountPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.quick-spin-content {
    padding: 20px;
    background: white;
}

.quick-spin-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(67, 97, 238, 0.08);
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--text-dark);
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.quick-spin-info i {
    color: var(--accent-blue);
}

/* КРАСИВЫЕ КНОПКИ 1,3,5,10 */
.quick-spin-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.quick-spin-option {
    background: linear-gradient(145deg, #ffffff, #f7f9ff);
    border: 2px solid rgba(67, 97, 238, 0.2);
    border-radius: 15px;
    padding: 15px 5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-weight: 900;
    color: var(--text-dark);
    position: relative;
    overflow: hidden;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    min-height: 70px;
    justify-content: center;
}

.quick-spin-option:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--accent-blue);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.15);
}

.quick-spin-option.active {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-pink));
    border-color: var(--accent-pink);
    color: white;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(247, 37, 133, 0.25);
    animation: optionPulse 2s infinite alternate;
}

@keyframes optionPulse {
    0% { box-shadow: 0 10px 30px rgba(247, 37, 133, 0.25); }
    100% { box-shadow: 0 10px 40px rgba(247, 37, 133, 0.4), 0 0 20px rgba(247, 37, 133, 0.2); }
}

.quick-spin-option.active span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
}

.quick-spin-option span {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    margin-top: 5px;
}

.quick-spin-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: optionShine 3s infinite linear;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-spin-option.active::before {
    opacity: 1;
}

.quick-spin-option:hover::before {
    opacity: 1;
}

@keyframes optionShine {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.quick-spin-stats {
    background: linear-gradient(145deg, #f8f9ff, #ffffff);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid rgba(67, 97, 238, 0.1);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-row.highlight {
    font-weight: 800;
    color: var(--accent-blue);
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ИСПРАВЛЕННЫЙ ПРОГРЕСС-БАР */
.quick-spin-progress-container {
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease;
}

.quick-spin-progress-bar {
    height: 30px;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    border: 2px solid rgba(67, 97, 238, 0.2);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

.quick-spin-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4361ee, #3a0ca3, #4361ee);
    background-size: 200% 100%;
    border-radius: 15px;
    width: 0%;
    transition: width 0.5s ease;
    animation: gradientShift 2s linear infinite;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.quick-spin-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s infinite linear;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.quick-spin-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    font-weight: 900;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    z-index: 2;
    animation: spinProgress 0.5s ease; /* ← ДОБАВИТЬ ЭТУ СТРОКУ */
}
/* Добавьте этот новый блок keyframes */
@keyframes spinProgress {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}
/* УЛУЧШЕННЫЙ КОНТЕЙНЕР ДЛЯ ПОДАРКОВ */
.quick-spin-gifts {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 60px;
    padding: 10px;
    margin-bottom: 15px;
    background: rgba(67, 97, 238, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.gift-badge {
    width: 65px;
    height: 65px;
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--accent-blue);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.15);
    animation: giftPop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

@keyframes giftPop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.gift-badge img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    padding: 3px;
}

.gift-badge.win {
    border-color: var(--success);
    animation: giftWin 0.5s ease, giftFloat 3s infinite ease-in-out;
}

@keyframes giftWin {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes giftFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.gift-badge .value {
    position: absolute;
    bottom: -8px;              /* Ниже для лучшей видимости */
    right: -8px;               /* Правее для лучшей видимости */
    background: linear-gradient(135deg, #ffd700, #ffcc00); /* Золотой градиент */
    color: #000000;            /* ЧЕРНЫЙ текст для контраста! */
    font-size: 12px;           /* БОЛЬШЕ на 2px */
    font-weight: 900;
    padding: 4px 8px;          /* БОЛЬШЕ отступы */
    border-radius: 10px;       /* БОЛЬШЕ скругление */
    border: 3px solid white;   /* ТОЛЩЕ рамка */
    min-width: 24px;           /* ШИРЕ минимум */
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* ЯРЧЕ тень */
    z-index: 10;               /* ВЫШЕ слой */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5); /* Контур текста */
    font-family: 'Segoe UI', Tahoma, sans-serif; /* Читаемый шрифт */
}

.quick-spin-start-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #38b000, #2b9348);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(56, 176, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.quick-spin-start-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(56, 176, 0, 0.5);
}

.quick-spin-start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quick-spin-stop-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #ef476f, #d90429);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(239, 71, 111, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    animation: pulseStop 1s infinite alternate;
}

@keyframes pulseStop {
    0% { box-shadow: 0 6px 20px rgba(239, 71, 111, 0.4); }
    100% { box-shadow: 0 6px 25px rgba(239, 71, 111, 0.6), 0 0 15px rgba(239, 71, 111, 0.4); }
}

.quick-spin-stop-btn:hover {
    transform: translateY(-3px);
}

/* МЕНЬШАЯ МОДАЛКА ДЛЯ ТЕЛЕФОНОВ */
.quick-spin-result-modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 20px;
}

.quick-spin-result-modal.show {
    visibility: visible;
    opacity: 1;
}

.quick-spin-result-box {
    background: linear-gradient(135deg, #ffffff, #f8f9ff);
    border-radius: var(--border-radius);
    padding: 25px;
    width: 100%;
    max-width: 380px;
    border: 4px solid var(--accent-blue);
    box-shadow: 0 20px 60px rgba(67, 97, 238, 0.5);
    animation: resultPopup 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

@keyframes resultPopup {
    0% { transform: scale(0.8) rotate(-5deg); opacity: 0; }
    70% { transform: scale(1.05) rotate(0); opacity: 1; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.quick-spin-result-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.quick-spin-result-header h3 {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(135deg, #FF9800, #FF5722, #FF9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    animation: gradientText 2s linear infinite;
    margin-bottom: 8px;
}

@keyframes gradientText {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.quick-spin-result-header p {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
}

.quick-spin-result-stats {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid rgba(67, 97, 238, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.result-stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 14px;
}

.result-stat-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.result-stat-label {
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-stat-value {
    font-weight: 800;
}

.result-stat-value.positive {
    color: var(--success);
}

.result-stat-value.negative {
    color: var(--danger);
}

.result-stat-value.neutral {
    color: var(--accent-blue);
}

.quick-spin-gifts-results {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 15px 0;
    max-height: 150px;
    overflow-y: auto;
    padding: 8px;
    background: rgba(67, 97, 238, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.gift-result-item {
    background: white;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    border: 2px solid transparent;
    transition: var(--transition);
    position: relative;
}

.gift-result-item.win {
    border-color: var(--success);
    animation: resultWin 1s infinite alternate;
}

@keyframes resultWin {
    0% { transform: translateY(0); }
    100% { transform: translateY(-3px); }
}

.gift-result-item img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    margin-bottom: 5px;
}

.gift-result-name {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3px;
    line-height: 1.2;
}

.gift-result-value {
    font-size: 10px;
    font-weight: 800;
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.quick-spin-motivation {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, rgba(56, 176, 0, 0.1), rgba(43, 147, 50, 0.05));
    border-radius: 12px;
    margin: 15px 0;
    border: 2px solid rgba(56, 176, 0, 0.2);
    animation: motivationPulse 2s infinite alternate;
}

@keyframes motivationPulse {
    0% { border-color: rgba(56, 176, 0, 0.2); box-shadow: 0 0 10px rgba(56, 176, 0, 0.1); }
    100% { border-color: rgba(56, 176, 0, 0.4); box-shadow: 0 0 15px rgba(56, 176, 0, 0.2); }
}

.quick-spin-motivation-text {
    font-size: 16px;
    font-weight: 800;
    color: var(--success);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.quick-spin-motivation-subtext {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 600;
}

.quick-spin-result-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.quick-spin-again-btn {
    flex: 1;
    padding: 14px;
    background: linear-gradient(135deg, #FF9800, #FF5722);
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.quick-spin-again-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 87, 34, 0.3);
}

.close-result-btn {
    flex: 1;
    padding: 14px;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.close-result-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
}

/* АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ */
@media (max-width: 420px) {
    .quick-spin-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-spin-badge {
        font-size: 14px;
    }
    
    .discount-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .quick-spin-option {
        min-height: 65px;
        padding: 12px 4px;
        font-size: 16px;
    }
    
    .quick-spin-option span {
        font-size: 10px;
    }
    
    .gift-badge {
        width: 50px;
        height: 50px;
    }
    
    .gift-badge img {
        width: 35px;
        height: 35px;
    }
    
    .quick-spin-gifts {
        gap: 6px;
        padding: 8px;
    }
    
    .quick-spin-result-box {
        padding: 20px 15px;
        max-width: 340px;
        margin: 10px;
    }
    
    .quick-spin-result-header h3 {
        font-size: 20px;
    }
    
    .quick-spin-result-stats {
        padding: 12px 10px;
    }
    
    .result-stat-label {
        font-size: 12px;
    }
    
    .result-stat-value {
        font-size: 13px;
    }
    
    .quick-spin-gifts-results {
        grid-template-columns: repeat(3, 1fr);
        max-height: 120px;
    }
    
    .gift-result-item img {
        width: 30px;
        height: 30px;
    }
    
    .gift-result-name {
        font-size: 8px;
    }
    
    .quick-spin-motivation {
        padding: 12px;
    }
    
    .quick-spin-motivation-text {
        font-size: 14px;
    }
    
    .quick-spin-motivation-subtext {
        font-size: 12px;
    }
    
    .quick-spin-again-btn,
    .close-result-btn {
        padding: 12px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .gift-badge {
        width: 45px;
        height: 45px;
    }
    
    .gift-badge img {
        width: 30px;
        height: 30px;
    }
    
    .quick-spin-result-box {
        padding: 15px 12px;
        max-width: 320px;
    }
    
    .quick-spin-result-header h3 {
        font-size: 18px;
    }
}

/* Специальная анимация для последнего подарка */
.gift-badge.last-gift {
    animation: lastGiftAppear 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes lastGiftAppear {
    0% { 
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    70% { 
        transform: scale(1.2) rotate(10deg);
        opacity: 1;
    }
    100% { 
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* Анимация завершения прогресс-бара */
@keyframes completeProgress {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.quick-spin-progress-fill.complete {
    animation: completeProgress 0.5s ease 2;
}

        .craft-container {
            background: var(--card-bg);
            border-radius: var(--border-radius);
            padding: 15px;
            box-shadow: var(--shadow);
            margin-top: 12px;
        }

        .craft-area {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        @media (min-width: 768px) {
            .craft-area {
                flex-direction: row;
            }
        }

        .craft-slots {
            background: white;
            border-radius: var(--border-radius);
            padding: 20px;
            border: 2px dashed rgba(67, 97, 238, 0.2);
            box-shadow: var(--shadow);
            min-height: 250px;
            flex: 1;
            transition: var(--transition);
        }

        .craft-slots:hover {
            border-color: rgba(67, 97, 238, 0.4);
        }

        .craft-slots h3 {
            text-align: center;
            margin-bottom: 15px;
            color: var(--accent-blue);
            font-size: 16px;
            font-weight: 800;
        }

        .selected-items {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
            min-height: 150px;
            align-items: center;
        }

        .selected-item {
            background: linear-gradient(145deg, #f0f5ff, #ffffff);
            border-radius: 12px;
            padding: 12px;
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 85px;
            border: 2px solid var(--accent-blue);
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
            position: relative;
            animation: itemAdd 0.5s ease;
        }

        @keyframes itemAdd {
            from { 
                opacity: 0; 
                transform: scale(0.5) rotate(-10deg); 
            }
            to { 
                opacity: 1; 
                transform: scale(1) rotate(0); 
            }
        }

        .selected-item-image {
            width: 40px;
            height: 40px;
            object-fit: contain;
            margin-bottom: 6px;
        }

        .selected-item-name {
            font-size: 11px;
            font-weight: 700;
            color: var(--text-dark);
            text-align: center;
            margin-bottom: 4px;
            line-height: 1.2;
        }

        .craft-controls {
            background: white;
            border-radius: var(--border-radius);
            padding: 20px;
            border: 2px solid rgba(67, 97, 238, 0.1);
            box-shadow: var(--shadow);
            flex: 1;
        }

        .chance-control {
            margin-bottom: 20px;
        }

        .chance-control label {
            display: block;
            margin-bottom: 10px;
            font-weight: 700;
            color: var(--text-dark);
            font-size: 16px;
        }

        .chance-slider {
            width: 100%;
            height: 10px;
            -webkit-appearance: none;
            background: linear-gradient(to right, var(--danger), var(--warning), var(--success));
            border-radius: 8px;
            outline: none;
        }

        .chance-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: white;
            border: 2px solid var(--accent-blue);
            cursor: pointer;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
            transition: var(--transition);
        }

        .chance-slider::-webkit-slider-thumb:hover {
            transform: scale(1.1);
        }

        .chance-value {
            text-align: center;
            font-size: 32px;
            font-weight: 800;
            margin: 15px 0;
            color: var(--accent-blue);
            text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
        }

        .craft-info {
            background: linear-gradient(145deg, #f8f9ff, #ffffff);
            border-radius: 12px;
            padding: 15px;
            margin: 15px 0;
            border: 2px solid rgba(67, 97, 238, 0.1);
            animation: infoPulse 2s infinite;
        }

        @keyframes infoPulse {
            0%, 100% { border-color: rgba(67, 97, 238, 0.1); }
            50% { border-color: rgba(67, 97, 238, 0.3); }
        }

        .info-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            font-size: 14px;
            font-weight: 600;
        }

        .info-row span:last-child {
            font-weight: 800;
            color: var(--accent-blue);
        }

        .craft-result {
            font-size: 16px;
            font-weight: 800;
            color: var(--accent-blue);
            text-align: center;
            margin-top: 10px;
            min-height: 30px;
            padding: 8px;
            border-radius: 12px;
            background: rgba(67, 97, 238, 0.05);
        }

        /* ИЗМЕНЕНО: Пульсация для премиум-нотиса (всегда активна) */
        .premium-notice {
            background: linear-gradient(135deg, #FF9800, #FF5722);
            color: white;
            padding: 12px;
            border-radius: 12px;
            text-align: center;
            margin-top: 15px;
            font-weight: 800;
            font-size: 14px;
            display: block !important; /* Всегда показываем */
            box-shadow: 0 3px 10px rgba(255, 152, 0, 0.3);
            animation: premiumGlow 1.5s infinite alternate;
            position: relative;
            overflow: hidden;
        }

        @keyframes premiumGlow {
            0% { 
                box-shadow: 0 3px 10px rgba(255, 152, 0, 0.3);
                transform: scale(1);
            }
            50% {
                box-shadow: 0 3px 20px rgba(255, 152, 0, 0.6), 0 0 30px rgba(255, 152, 0, 0.4);
                transform: scale(1.02);
            }
            100% { 
                box-shadow: 0 3px 15px rgba(255, 152, 0, 0.5);
                transform: scale(1);
            }
        }

        #craftBtn {
            width: 100%;
            padding: 18px;
            background: var(--accent-gradient);
            color: white;
            border: none;
            border-radius: 25px;
            font-size: 18px;
            font-weight: 800;
            cursor: pointer;
            transition: var(--transition);
            margin-top: 20px;
            box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
            position: relative;
            overflow: hidden;
        }

        #craftBtn:hover:not(:disabled) {
            transform: translateY(-3px);
            box-shadow: 0 10px 25px rgba(67, 97, 238, 0.5);
        }

        #craftBtn:active:not(:disabled) {
            transform: scale(0.98);
        }

        #craftBtn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* Craft Animation */
        .craft-animation {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1001;
            padding: 20px;
        }

        .craft-animation.show {
            display: flex;
            animation: fadeInCraft 0.3s ease;
        }

        @keyframes fadeInCraft {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .craft-animation-content {
            background: white;
            padding: 30px;
            border-radius: var(--border-radius);
            text-align: center;
            width: 100%;
            max-width: 300px;
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
            animation: scaleIn 0.5s ease;
        }

        @keyframes scaleIn {
            from { transform: scale(0.8); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }

        .craft-animation-content i {
            font-size: 60px;
            margin-bottom: 20px;
            animation: spinCraft 2s linear infinite;
        }

        @keyframes spinCraft {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .craft-animation-text {
            font-size: 18px;
            font-weight: 700;
            color: var(--accent-blue);
            margin-bottom: 20px;
        }

        /* Win Animation */
        .win-animation {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.95);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            padding: 20px;
        }

        .win-animation.show {
            display: flex;
            animation: winFadeIn 0.3s ease;
        }

        @keyframes winFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        /* Empty states */
        .empty-state {
            text-align: center;
            padding: 40px 20px;
            color: var(--text-light);
        }

        .empty-state i {
            font-size: 50px;
            margin-bottom: 15px;
            opacity: 0.3;
            animation: bounce 2s infinite;
        }

        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }

        /* Notifications */
        .notification {
            position: fixed;
            top: 20px;
            right: 20px;
            left: 20px;
            padding: 15px;
            border-radius: 12px;
            font-weight: 700;
            font-size: 14px;
            z-index: 1000;
            animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.5s forwards;
            box-shadow: var(--shadow-hover);
            text-align: center;
        }

        @keyframes slideIn {
            from { transform: translateY(-100%); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        @keyframes fadeOut {
            from { opacity: 1; }
            to { opacity: 0; }
        }

        .notification.success {
            background: linear-gradient(135deg, #38b000, #2b9348);
            color: white;
        }

        .notification.error {
            background: linear-gradient(135deg, #ef476f, #d90429);
            color: white;
        }

        .notification.info {
            background: linear-gradient(135deg, #4361ee, #3a0ca3);
            color: white;
        }

        /* History Screen */
        .history-container {
            padding: 10px;
        }

        .history-list {
            max-height: 400px;
            overflow-y: auto;
        }

        .history-item {
            background: white;
            border-radius: 12px;
            padding: 12px;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 12px;
            box-shadow: var(--shadow);
            animation: slideInRight 0.3s ease;
        }

        @keyframes slideInRight {
            from { opacity: 0; transform: translateX(-20px); }
            to { opacity: 1; transform: translateX(0); }
        }

        @keyframes pulseLine {
    0% { 
        background: var(--accent-pink);
        box-shadow: 0 0 15px rgba(247, 37, 133, 0.8),
                    inset 0 0 10px rgba(255, 255, 255, 0.5);
    }
    100% { 
        background: #ff3d9e;
        box-shadow: 0 0 25px rgba(247, 37, 133, 1),
                    0 0 40px rgba(247, 37, 133, 0.6),
                    inset 0 0 15px rgba(255, 255, 255, 0.8);
    }
}

        .history-item.win {
            border-left: 4px solid var(--success);
        }

        .history-item.loss {
            border-left: 4px solid var(--danger);
        }

        .history-item-image {
            width: 40px;
            height: 40px;
            object-fit: contain;
        }

        .history-details {
            flex: 1;
        }

        .history-type {
            font-weight: 700;
            font-size: 14px;
            margin-bottom: 2px;
        }

        .history-value {
            font-weight: 800;
            color: var(--gold);
            font-size: 13px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 3px;
        }

        .history-time {
            font-size: 11px;
            color: var(--text-light);
        }

        .clear-history-btn {
            width: 100%;
            padding: 12px;
            background: var(--danger);
            color: white;
            border: none;
            border-radius: 25px;
            font-weight: 700;
            font-size: 14px;
            cursor: pointer;
            margin-top: 15px;
            transition: var(--transition);
        }

        .clear-history-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(239, 71, 111, 0.3);
        }

        /* Sound Controls */
        .sound-controls {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 100;
            display: flex;
            gap: 10px;
        }

        .sound-btn {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: white;
            border: none;
            box-shadow: var(--shadow);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            color: var(--accent-blue);
            cursor: pointer;
            transition: var(--transition);
        }

        .sound-btn:hover {
            transform: scale(1.1);
            box-shadow: var(--shadow-hover);
        }

        .sound-btn.active {
            background: var(--accent-gradient);
            color: white;
        }

        /* Item Preview Modal */
        .item-preview-modal {
            position: fixed;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.9);
            z-index: 1002;
            visibility: hidden;
            opacity: 0;
            transition: all 0.3s ease;
        }

        .item-preview-modal.show {
            visibility: visible;
            opacity: 1;
        }

        .item-preview-box {
            background: white;
            padding: 30px;
            border-radius: var(--border-radius);
            text-align: center;
            width: 100%;
            max-width: 300px;
            border: 3px solid var(--accent-blue);
            box-shadow: 0 10px 30px rgba(67, 97, 238, 0.4);
            animation: winScale 0.5s ease;
        }

        .item-preview-animation {
            width: 150px;
            height: 150px;
            margin: 0 auto 15px;
        }

        .item-preview-name {
            font-size: 22px;
            font-weight: 800;
            color: var(--accent-blue);
            margin: 10px 0;
        }

        .item-preview-value {
            font-size: 20px;
            font-weight: 900;
            color: var(--gold);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            margin: 15px 0;
        }

        .item-preview-motivation {
            font-size: 16px;
            color: var(--text-light);
            margin-bottom: 20px;
            font-style: italic;
        }

        /* ========== ПРОФИЛЬ В МОДАЛКЕ ========== */
        .profile-modal {
            position: fixed;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.9);
            z-index: 1003;
            visibility: hidden;
            opacity: 0;
            transition: all 0.3s ease;
        }

        .profile-modal.show {
            visibility: visible;
            opacity: 1;
        }

        .profile-box {
            background: white;
            padding: 25px;
            border-radius: var(--border-radius);
            width: 100%;
            max-width: 400px;
            border: 3px solid var(--accent-blue);
            box-shadow: 0 10px 30px rgba(67, 97, 238, 0.4);
            animation: winScale 0.5s ease;
            max-height: 85vh;
            overflow-y: auto;
        }

        .profile-header {
            display: flex;
            align-items: center;
            gap: 20px;
            margin-bottom: 25px;
            padding-bottom: 20px;
            border-bottom: 2px solid rgba(67, 97, 238, 0.1);
        }

        .avatar-container {
            position: relative;
            width: 100px;
            height: 100px;
        }

        .avatar-image {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            object-fit: cover;
            border: 4px solid var(--accent-blue);
            box-shadow: 0 6px 20px rgba(67, 97, 238, 0.3);
            background: linear-gradient(145deg, #ffffff, #f0f5ff);
            cursor: pointer;
            transition: var(--transition);
        }

        .avatar-image:hover {
            transform: scale(1.05);
            box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
        }

        .avatar-change-btn {
            position: absolute;
            bottom: 0;
            right: 0;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--accent-gradient);
            color: white;
            border: 2px solid white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 12px;
            box-shadow: var(--shadow);
            transition: var(--transition);
        }

        .avatar-change-btn:hover {
            transform: scale(1.1) rotate(90deg);
        }

        .profile-info {
            flex: 1;
        }

        /* ИЗМЕНЕНО: ID пользователя над аватаркой */
        .user-id-container {
            position: absolute;
            top: -25px;
            left: 0;
            right: 0;
            text-align: center;
            z-index: 5;
        }

        .user-id-badge {
            background: linear-gradient(135deg, #4361ee, #3a0ca3);
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 700;
            display: inline-block;
            box-shadow: 0 3px 10px rgba(67, 97, 238, 0.3);
            border: 2px solid white;
        }

        /* ИЗМЕНЕНО: Улучшенный дизайн для редактирования ника */
        .profile-name-container {
            position: relative;
            margin-bottom: 10px;
            margin-top: 10px;
        }

        .profile-name-display {
            font-size: 22px;
            font-weight: 800;
            color: var(--accent-blue);
            padding: 8px 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(67, 97, 238, 0.05);
            border: 2px solid transparent;
        }

        .profile-name-display:hover {
            background: rgba(67, 97, 238, 0.1);
            border-color: rgba(67, 97, 238, 0.2);
        }

        .profile-name-display .edit-icon {
            font-size: 14px;
            opacity: 0.7;
            transition: var(--transition);
        }

        .profile-name-display:hover .edit-icon {
            opacity: 1;
            transform: rotate(15deg);
        }

        .profile-name-input {
            font-size: 22px;
            font-weight: 800;
            color: var(--accent-blue);
            background: rgba(67, 97, 238, 0.05);
            border: 2px solid var(--accent-blue);
            padding: 8px 12px;
            border-radius: 8px;
            width: 100%;
            transition: var(--transition);
            outline: none;
        }

        .profile-name-input:focus {
            background: rgba(67, 97, 238, 0.1);
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
        }

        .profile-level-container {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: var(--transition);
            padding: 8px 12px;
            border-radius: 12px;
        }

        .profile-level-container:hover {
            background: rgba(255, 215, 0, 0.1);
        }

        .profile-level {
            display: inline-block;
            background: var(--accent-gradient);
            color: white;
            padding: 4px 12px;
            border-radius: 15px;
            font-size: 12px;
            font-weight: 700;
            box-shadow: 0 3px 10px rgba(67, 97, 238, 0.3);
        }

        .level-progress {
            flex: 1;
            height: 8px;
            background: rgba(0, 0, 0, 0.1);
            border-radius: 4px;
            overflow: hidden;
            position: relative;
        }

        .level-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--accent-blue), var(--accent-pink));
            border-radius: 4px;
            transition: width 0.5s ease;
        }

        /* ИЗМЕНЕНО: Красивый дизайн для текста прогресса уровня */
        .level-progress-text {
            font-size: 14px;
            color: var(--text-dark);
            margin-top: 8px;
            text-align: center;
            font-weight: 700;
            background: linear-gradient(135deg, #fff9db, #ffe066);
            padding: 10px 15px;
            border-radius: 12px;
            border: 2px solid var(--gold);
            box-shadow: 0 3px 10px rgba(255, 215, 0, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }

        .level-progress-text img {
            width: 20px;
            height: 20px;
            animation: starTwinkle 2s infinite;
        }

        @keyframes starTwinkle {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.2); opacity: 0.8; }
        }

        .profile-stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-bottom: 25px;
        }

        @media (min-width: 768px) {
            .profile-stats-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        .stat-card {
            background: white;
            border-radius: 12px;
            padding: 15px;
            text-align: center;
            box-shadow: var(--shadow);
            transition: var(--transition);
            border: 1px solid rgba(0, 0, 0, 0.03);
        }

        .stat-card:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-hover);
        }

        .stat-card.highlight {
            background: linear-gradient(145deg, #fff9db, #ffe066);
            border-color: var(--gold);
        }

        .stat-value {
            font-size: 24px;
            font-weight: 900;
            color: var(--accent-blue);
            margin-bottom: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }

        .stat-value img {
            width: 20px;
            height: 20px;
        }

        .stat-label {
            font-size: 12px;
            color: var(--text-light);
            font-weight: 600;
        }

        .stat-subtext {
            font-size: 10px;
            color: var(--text-light);
            margin-top: 4px;
            opacity: 0.8;
        }

        .favorite-gift {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-top: 8px;
        }

        .favorite-gift-image {
            width: 30px;
            height: 30px;
            object-fit: contain;
        }

        .clicker-section {
            background: linear-gradient(135deg, #f0f5ff, #ffffff);
            border-radius: var(--border-radius);
            padding: 20px;
            text-align: center;
            margin-top: 20px;
            border: 2px solid rgba(67, 97, 238, 0.1);
            position: relative;
            overflow: hidden;
        }

        .clicker-section::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(
                45deg,
                transparent 30%,
                rgba(255, 215, 0, 0.1) 50%,
                transparent 70%
            );
            animation: shine 3s infinite linear;
            z-index: 1;
        }

        @keyframes shine {
            0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
            100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
        }

        .clicker-timer {
            font-size: 14px;
            color: var(--text-light);
            margin-bottom: 15px;
            font-weight: 600;
            background: white;
            padding: 8px 16px;
            border-radius: 20px;
            display: inline-block;
            box-shadow: var(--shadow);
        }

        .clicker-btn {
            background: linear-gradient(135deg, #38b000, #2b9348);
            color: white;
            border: none;
            padding: 18px 40px;
            font-size: 18px;
            font-weight: 800;
            border-radius: 30px;
            cursor: pointer;
            transition: var(--transition);
            box-shadow: 0 6px 20px rgba(56, 176, 0, 0.4);
            position: relative;
            z-index: 2;
            width: 100%;
            max-width: 250px;
        }

        .clicker-btn:hover:not(:disabled) {
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 10px 25px rgba(56, 176, 0, 0.5);
        }

        .clicker-btn:active:not(:disabled) {
            transform: scale(0.98);
        }

        .clicker-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            background: linear-gradient(135deg, #cccccc, #999999);
        }

        .clicker-reward {
            font-size: 14px;
            color: var(--gold);
            font-weight: 700;
            margin-top: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }

        /* Кнопка "В РУЛЕТКУ" для мотивации */
        .motivation-btn {
            background: linear-gradient(135deg, #f72585, #4361ee);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 25px;
            font-weight: 800;
            font-size: 14px;
            cursor: pointer;
            transition: var(--transition);
            box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin: 10px auto;
            width: fit-content;
        }

        .motivation-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
        }

        .avatar-select-modal {
            position: fixed;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.9);
            z-index: 1004;
            visibility: hidden;
            opacity: 0;
            transition: all 0.3s ease;
        }

        .avatar-select-modal.show {
            visibility: visible;
            opacity: 1;
        }

        .avatar-select-box {
            background: white;
            padding: 25px;
            border-radius: var(--border-radius);
            width: 100%;
            max-width: 400px;
            border: 3px solid var(--accent-blue);
            box-shadow: 0 10px 30px rgba(67, 97, 238, 0.4);
            animation: winScale 0.5s ease;
        }

        .avatar-tabs {
            display: flex;
            gap: 5px;
            margin-bottom: 20px;
            background: var(--card-bg);
            padding: 6px;
            border-radius: 25px;
        }

        .avatar-tab-btn {
            flex: 1;
            padding: 10px;
            border: none;
            background: transparent;
            color: var(--text-light);
            border-radius: 20px;
            font-weight: 700;
            font-size: 13px;
            cursor: pointer;
            transition: var(--transition);
        }

        .avatar-tab-btn.active {
            background: var(--accent-gradient);
            color: white;
        }

        .avatar-options {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            max-height: 300px;
            overflow-y: auto;
            padding: 10px;
        }

        .avatar-option {
            background: white;
            border-radius: 12px;
            padding: 15px;
            text-align: center;
            cursor: pointer;
            transition: var(--transition);
            border: 2px solid transparent;
        }

        .avatar-option:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow);
        }

        .avatar-option.selected {
            border-color: var(--accent-blue);
            background: linear-gradient(145deg, #ffffff, #f0f5ff);
        }

        .avatar-option.locked {
            opacity: 0.5;
            filter: grayscale(1);
            cursor: not-allowed;
            position: relative;
        }

        .avatar-option.locked::after {
            content: 'Выбей в рулетке!';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 5px 10px;
            border-radius: 10px;
            font-size: 10px;
            font-weight: 700;
            width: 90%;
        }

        .avatar-option-image {
            width: 50px;
            height: 50px;
            object-fit: contain;
            margin-bottom: 8px;
            border-radius: 50%;
        }

        .custom-avatar-upload {
            text-align: center;
            padding: 20px;
            border: 2px dashed rgba(67, 97, 238, 0.3);
            border-radius: 12px;
            cursor: pointer;
            transition: var(--transition);
        }

        .custom-avatar-upload:hover {
            border-color: var(--accent-blue);
            background: rgba(67, 97, 238, 0.05);
        }

        .custom-avatar-upload i {
            font-size: 40px;
            color: var(--accent-blue);
            margin-bottom: 10px;
        }

        /* Levels Modal - УЛУЧШЕННЫЙ ДИЗАЙН */
        .levels-modal {
            position: fixed;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.95);
            z-index: 1005;
            visibility: hidden;
            opacity: 0;
            transition: all 0.3s ease;
        }

        .levels-modal.show {
            visibility: visible;
            opacity: 1;
        }

        .levels-box {
            background: white;
            padding: 25px;
            border-radius: var(--border-radius);
            width: 100%;
            max-width: 420px;
            border: 3px solid var(--accent-blue);
            box-shadow: 0 15px 40px rgba(67, 97, 238, 0.5);
            animation: winScale 0.5s ease;
            max-height: 85vh;
            overflow-y: auto;
        }

        .levels-header {
            text-align: center;
            margin-bottom: 25px;
            position: relative;
        }

        .levels-header h3 {
            font-size: 24px;
            font-weight: 900;
            color: var(--accent-blue);
            margin-bottom: 8px;
            background: var(--accent-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .levels-header p {
            color: var(--text-light);
            font-size: 14px;
            font-weight: 600;
        }

        .levels-progress-bar {
            height: 6px;
            background: rgba(0, 0, 0, 0.1);
            border-radius: 3px;
            margin: 20px 0;
            position: relative;
            overflow: hidden;
        }

        .levels-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--accent-blue), var(--accent-pink));
            border-radius: 3px;
            transition: width 1s ease;
        }

        .levels-current {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            color: var(--text-light);
            font-weight: 600;
            margin-bottom: 20px;
        }

        .levels-list {
            margin-top: 10px;
        }

        .level-item {
            background: white;
            border-radius: 12px;
            padding: 18px;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 15px;
            box-shadow: var(--shadow);
            border: 2px solid transparent;
            transition: var(--transition);
            position: relative;
            overflow: hidden;
        }

        .level-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: var(--accent-blue);
            opacity: 0.3;
        }

        .level-item.current {
            border-color: var(--accent-blue);
            background: linear-gradient(145deg, #ffffff, #f0f5ff);
            box-shadow: 0 5px 20px rgba(67, 97, 238, 0.15);
        }

        .level-item.completed {
            border-color: var(--success);
            background: linear-gradient(145deg, #f0fff4, #ffffff);
        }

        .level-item.locked {
            opacity: 0.7;
            filter: grayscale(0.3);
        }

        .level-icon {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            font-weight: 900;
            color: white;
            background: var(--accent-gradient);
            flex-shrink: 0;
            position: relative;
            box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
        }

        .level-item.completed .level-icon {
            background: linear-gradient(135deg, #38b000, #2b9348);
        }

        .level-item.locked .level-icon {
            background: linear-gradient(135deg, #cccccc, #999999);
        }

        .level-icon::after {
            content: '';
            position: absolute;
            top: -3px;
            left: -3px;
            right: -3px;
            bottom: -3px;
            border-radius: 50%;
            background: var(--accent-gradient);
            z-index: -1;
            opacity: 0.3;
            animation: levelGlow 2s infinite alternate;
        }

        @keyframes levelGlow {
            0% { opacity: 0.3; }
            100% { opacity: 0.6; }
        }

        .level-info {
            flex: 1;
        }

        .level-name {
            font-size: 16px;
            font-weight: 800;
            color: var(--text-dark);
            margin-bottom: 5px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .level-requirement {
            font-size: 13px;
            color: var(--text-light);
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .level-reward {
            font-size: 14px;
            font-weight: 700;
            color: var(--gold);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .level-reward img {
            width: 18px;
            height: 18px;
            animation: starTwinkle 2s infinite;
        }

        .claim-level-btn {
            background: var(--accent-gradient);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: var(--transition);
            flex-shrink: 0;
            min-width: 80px;
            box-shadow: 0 3px 10px rgba(67, 97, 238, 0.3);
        }

        .claim-level-btn:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
        }

        .claim-level-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            background: linear-gradient(135deg, #cccccc, #999999);
        }

        /* Анимация для новых уровней */
        @keyframes levelUnlock {
            0% { transform: scale(0.8); opacity: 0; }
            70% { transform: scale(1.05); opacity: 1; }
            100% { transform: scale(1); opacity: 1; }
        }

        .level-item.new {
            animation: levelUnlock 0.5s ease;
        }
        
        /* Shop Modal */
.shop-modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1006;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.shop-modal.show {
    visibility: visible;
    opacity: 1;
}

/* Анимации для покупки (ПОВЕРХ ВСЕГО) */
@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes purchasePopup {
    0% { 
        transform: scale(0.3) rotate(-15deg); 
        opacity: 0; 
    }
    70% { 
        transform: scale(1.05) rotate(5deg); 
        opacity: 1; 
    }
    100% { 
        transform: scale(1) rotate(0); 
        opacity: 1; 
    }
}

@keyframes starSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes itemFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(-2deg); }
    75% { transform: translateY(-5px) rotate(2deg); }
}

@keyframes starTwinkle {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.8; }
}

@keyframes statusPulse {
    0%, 100% { 
        box-shadow: 0 0 0 rgba(56, 176, 0, 0.2);
        border-color: rgba(56, 176, 0, 0.3);
    }
    50% { 
        box-shadow: 0 0 20px rgba(56, 176, 0, 0.4);
        border-color: rgba(56, 176, 0, 0.6);
    }
}

@keyframes buttonPulse {
    0% { 
        transform: translateY(0);
        box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
    }
    100% { 
        transform: translateY(-3px);
        box-shadow: 0 12px 35px rgba(67, 97, 238, 0.6), 
                    0 0 30px rgba(67, 97, 238, 0.3);
    }
}

/* z-index для всех модалок */
.profile-modal { z-index: 1003; }
.avatar-select-modal { z-index: 1004; }
.levels-modal { z-index: 1005; }
.shop-modal { z-index: 1006; } /* Магазин */
.item-preview-modal { z-index: 9999; } /* Превью предмета - САМЫЙ ВЫСОКИЙ */
.win-modal { z-index: 1000; }

/* Важно: при открытии превью поверх магазина */
.shop-modal.show ~ .item-preview-modal.show {
    z-index: 9999 !important;
}

.item-preview-modal.show {
    z-index: 9999 !important;
}

.shop-box {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 500px;
    border: 3px solid var(--accent-blue);
    box-shadow: 0 15px 40px rgba(67, 97, 238, 0.5);
    animation: winScale 0.5s ease;
    max-height: 85vh;
    overflow-y: auto;
}

.shop-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(67, 97, 238, 0.1);
}

.shop-header h3 {
    font-size: 24px;
    font-weight: 900;
    color: var(--accent-blue);
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.shop-header p {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.shop-balance {
    background: linear-gradient(135deg, #fff9db, #ffe066);
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 16px;
    color: #e6b800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid var(--gold);
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.2);
}

.shop-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    background: var(--card-bg);
    padding: 6px;
    border-radius: 25px;
    flex-wrap: wrap; /* Разрешаем перенос на маленьких экранах */
}

.shop-tab-btn {
    flex: 1;
    min-width: 90px; /* Минимальная ширина для читаемости */
    padding: 10px 8px;
    border: none;
    background: transparent;
    color: var(--text-light);
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap; /* Не переносим текст */
    text-align: center;
}

@media (max-width: 360px) {
    .shop-tab-btn {
        min-width: 60px;
        padding: 10px 5px;
        font-size: 0; /* Скрываем текст */
    }
    
    .shop-tab-btn i {
        font-size: 14px; /* Увеличиваем иконки */
        margin: 0;
    }
    
    .shop-tab-btn span {
        display: none; /* Полностью скрываем текст */
    }
}

/* Для средних телефонов */
@media (min-width: 361px) and (max-width: 420px) {
    .shop-tab-btn {
        min-width: 80px;
        font-size: 12px;
        gap: 4px;
        padding: 10px 6px;
    }
    
    .shop-tab-btn i {
        font-size: 12px;
    }
}

/* Для планшетов и ПК */
@media (min-width: 421px) {
    .shop-tab-btn {
        font-size: 13px;
        padding: 10px 10px;
        gap: 6px;
    }
}

/* Активная кнопка */
.shop-tab-btn.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 3px 12px rgba(67, 97, 238, 0.3);
}

/* Ховер эффект */
.shop-tab-btn:hover:not(.active) {
    background: rgba(67, 97, 238, 0.1);
    transform: translateY(-2px);
}

/* Альтернативный вариант - горизонтальная прокрутка вместо переноса */
@media (max-width: 360px) {
    .shop-tabs {
        flex-wrap: nowrap; /* Запрещаем перенос */
        overflow-x: auto; /* Горизонтальная прокрутка */
        justify-content: flex-start;
        scrollbar-width: none; /* Скрываем скроллбар */
        -ms-overflow-style: none;
        padding: 8px;
    }
    
    .shop-tabs::-webkit-scrollbar {
        display: none; /* Скрываем скроллбар в Chrome/Safari */
    }
    
    .shop-tab-btn {
        flex: 0 0 auto; /* Не растягиваем */
        min-width: 100px;
        font-size: 12px;
    }
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

@media (max-width: 480px) {
    .shop-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

.shop-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.shop-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.shop-item.unlocked {
    border-color: rgba(67, 97, 238, 0.3);
}

.shop-item.locked {
    border-color: rgba(0, 0, 0, 0.1);
    position: relative;
}

.shop-item.locked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

.shop-item.locked::after {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    z-index: 2;
    opacity: 0.7;
}

.shop-item-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
    position: relative;
    z-index: 3;
}

.shop-item-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.2;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
}

.shop-item-price {
    font-size: 14px;
    font-weight: 900;
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: rgba(255, 215, 0, 0.1);
    padding: 8px 12px;
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    position: relative;
    z-index: 3;
}

.shop-item-price img {
    width: 16px;
    height: 16px;
}

.shop-item-discount {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent-pink);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    z-index: 4;
    transform: rotate(10deg);
    animation: discountPulse 2s infinite;
}

@keyframes discountPulse {
    0%, 100% { transform: rotate(10deg) scale(1); }
    50% { transform: rotate(10deg) scale(1.1); }
}

/* Анимация для оверлея покупки */
.purchase-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: var(--border-radius);
    animation: fadeInOverlay 0.3s ease;
    backdrop-filter: blur(5px);
}

@keyframes fadeInOverlay {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.purchase-content {
    text-align: center;
    padding: 30px;
    max-width: 280px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 3px solid var(--accent-blue);
    animation: purchasePopup 0.5s ease;
}

@keyframes purchasePopup {
    0% { transform: scale(0.5) rotate(-5deg); opacity: 0; }
    70% { transform: scale(1.05) rotate(0deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Мотивационный баннер для пустого инвентаря */
.inventory-motivation-banner {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    animation: slideDown 0.5s ease;
}

.inventory-motivation-banner h4 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.inventory-motivation-banner p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.inventory-motivation-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.motivation-shop-btn {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.motivation-shop-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Кнопка в инвентаре */
.buy-items-btn {
    background: linear-gradient(135deg, #9C27B0, #673AB7, #9C27B0);
    background-size: 200% 100%;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
    animation: shopButtonGlow 2s infinite alternate;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.buy-items-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(156, 39, 176, 0.5);
    background-position: 100% 50%;
}

.buy-items-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.buy-items-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
    z-index: -1;
}

.buy-items-btn:hover::before {
    left: 100%;
}

.buy-items-btn i {
    animation: cartBounce 2s infinite;
}

/* ========== АНИМАЦИЯ ПОБЕДЫ В КРАФТЕ ========== */

/* Контейнер для конфетти */
.confetti-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

/* Конфетти */
.confetti-piece {
    position: absolute;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg) translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg) translateX(100px);
        opacity: 0;
    }
}

/* Основной контейнер победы */
.craft-win-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 30px;
    border-radius: 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 5px solid var(--gold);
    box-shadow: 0 30px 70px rgba(0,0,0,0.4);
    position: relative;
    z-index: 2;
    animation: craftWinPopup 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes craftWinPopup {
    0% { transform: scale(0.3) rotate(-15deg); opacity: 0; }
    70% { transform: scale(1.05) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* Коронка */
.craft-crown {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 60px;
    color: var(--gold);
    text-shadow: 0 5px 20px rgba(255, 215, 0, 0.5);
    animation: crownFloat 2s infinite ease-in-out;
}

@keyframes crownFloat {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
    50% { transform: translateX(-50%) translateY(-10px) rotate(5deg); }
}

/* Заголовок */
.craft-win-title {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: titleGlow 2s infinite alternate;
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 10px rgba(67, 97, 238, 0.5); }
    100% { text-shadow: 0 0 20px rgba(67, 97, 238, 0.8), 0 0 30px rgba(247, 37, 133, 0.6); }
}

/* Иконка */
.craft-win-icon {
    font-size: 80px;
    margin: 20px 0;
    animation: iconBounce 1s infinite alternate;
}

@keyframes iconBounce {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

/* Сообщение */
.craft-win-message {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 600;
}

/* Награда */
.craft-win-reward {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    border-radius: 20px;
    padding: 25px;
    margin: 25px 0;
    border: 3px solid var(--gold);
    position: relative;
    overflow: hidden;
}

.reward-label {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.reward-amount {
    font-size: 42px;
    font-weight: 900;
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.reward-star {
    width: 40px;
    height: 40px;
    animation: starSpin 3s linear infinite;
}

@keyframes starSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.reward-status {
    font-size: 18px;
    color: var(--success);
    margin-top: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Плавающие звёзды */
.floating-star {
    position: absolute;
    font-size: 30px;
    animation: floatStar 3s infinite;
}

@keyframes floatStar {
    0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
    50% { transform: translateY(-20px) scale(1.3); opacity: 0.8; }
}

/* Кнопка */
.craft-win-button {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-pink));
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(67, 97, 238, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    animation: buttonPulse 2s infinite alternate;
}

.craft-win-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(67, 97, 238, 0.6);
}

@keyframes buttonPulse {
    0% { transform: scale(1); box-shadow: 0 10px 30px rgba(67, 97, 238, 0.4); }
    100% { transform: scale(1.05); box-shadow: 0 15px 40px rgba(67, 97, 238, 0.6); }
}

/* Фоновая анимация */
@keyframes winFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Контейнер для кнопок в инвентаре */
.inventory-buttons-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Обновленная кнопка обновления инвентаря */
.refresh-inventory-btn {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    order: 1; /* Обновление слева */
}

.refresh-inventory-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

/* Кнопка магазина в инвентаре */
.buy-items-btn {
    background: linear-gradient(135deg, #9C27B0, #673AB7);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    order: 2; /* Магазин справа */
}

.buy-items-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(156, 39, 176, 0.3);
}

/* Информация о выборе */
.selection-info {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 600;
    margin-right: auto;
}

/* Для мобильных устройств */
@media (max-width: 420px) {
    .inventory-buttons-container {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .refresh-inventory-btn,
    .buy-items-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
}

/* Кнопка в превью предмета */
.preview-buy-btn {
    background: linear-gradient(135deg, #FF9800, #FF5722);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
}

.preview-buy-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.preview-buy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

        /* Mobile optimization */
        @media (max-width: 420px) {
            .slot {
                width: 82px;
                min-width: 82px;
            }
            
            .rewards {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .slot-image {
                width: 50px;
                height: 50px;
            }
            
            .reward-image {
                width: 40px;
                height: 40px;
            }
            
            .profile-header {
                flex-direction: column;
                text-align: center;
                gap: 15px;
            }
            
            .profile-stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .avatar-options {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .header-avatar {
                width: 40px;
                height: 40px;
            }
            
            .balance-container {
                padding: 6px 10px;
                font-size: 14px;
            }
            
            #balance {
                font-size: 16px;
            }
            
            .level-item {
                flex-direction: column;
                text-align: center;
                gap: 12px;
            }
            
            .level-info {
                width: 100%;
            }
            
            .levels-box {
                padding: 20px;
                margin: 10px;
            }
        }
        
        @media (max-width: 420px) {
    .header {
        width: calc(100% - 24px);
        padding: 12px;
    }
    
    .wrap {
        padding-top: 80px; /* Меньший отступ для мобильных */
    }
}
        @media (min-width: 768px) {
            body {
                max-width: 500px;
                margin: 0 auto;
                padding-top: 20px;
            }
            
            .view-port {
                height: 140px;
            }
            
            .slot {
                width: 100px;
                min-width: 100px;
            }
        }

        /* Дополнительные анимации для ежедневных наград */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(-2deg); }
    66% { transform: translateY(-5px) rotate(2deg); }
}

@keyframes popIn {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    70% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ========== ЕЖЕДНЕВНЫЕ НАГРАДЫ ========== */

/* Кнопка в хедере */
.daily-rewards-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF9800, #FF5722);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  order: 0; /* Слева от баланса */
  flex-shrink: 0;
  z-index: 5;
}

.daily-rewards-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
  animation: dailyPulse 1s infinite alternate;
}

.daily-rewards-btn i {
  font-size: 18px;
}

.daily-streak {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #f72585, #9d4edd);
  color: white;
  font-size: 10px;
  font-weight: 900;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  animation: streakGlow 2s infinite alternate;
}

@keyframes dailyPulse {
  0% { transform: scale(1); box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3); }
  100% { transform: scale(1.05); box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5); }
}

@keyframes streakGlow {
  0% { box-shadow: 0 2px 5px rgba(247, 37, 133, 0.3); }
  100% { box-shadow: 0 2px 10px rgba(247, 37, 133, 0.6); }
}

/* Баннер-напоминание */
.daily-rewards-reminder {
  background: linear-gradient(135deg, #4361ee, #3a0ca3);
  color: white;
  border-radius: 12px;
  margin: 10px 0 15px 0;
  padding: 12px 15px;
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
  animation: slideDownReminder 0.5s ease;
  display: none; /* По умолчанию скрыт */
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

@keyframes slideDownReminder {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.daily-rewards-reminder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    transparent 30%, 
    rgba(255, 255, 255, 0.1) 50%, 
    transparent 70%);
  background-size: 200% 100%;
  animation: reminderShine 3s infinite linear;
}

@keyframes reminderShine {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.reminder-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  position: relative;
  z-index: 2;
}

.reminder-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.reminder-left i {
  font-size: 28px;
  color: #FF9800;
  animation: giftBounce 2s infinite;
}

@keyframes giftBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-5px) rotate(-5deg); }
  75% { transform: translateY(-3px) rotate(5deg); }
}

.reminder-text {
  flex: 1;
}

.reminder-title {
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 3px;
}

.reminder-subtitle {
  font-size: 11px;
  opacity: 0.9;
}

.reminder-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.claim-reminder-btn {
  background: linear-gradient(135deg, #FF9800, #FF5722);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(255, 152, 0, 0.3);
  white-space: nowrap;
}

.claim-reminder-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

.close-reminder {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.close-reminder:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* ========== ИСПРАВЛЕННАЯ МОДАЛКА ЕЖЕДНЕВНЫХ НАГРАД ========== */

.daily-rewards-modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 15px;
}

.daily-rewards-modal.show {
    visibility: visible;
    opacity: 1;
}

.daily-rewards-box {
    background: linear-gradient(165deg, #0f1b33 0%, #1a2b4d 50%, #0f1b33 100%);
    border-radius: 28px;
    padding: 25px 20px;
    width: 100%;
    max-width: 440px;
    border: 3px solid;
    border-image: linear-gradient(135deg, #4361ee, #9d4edd, #f72585) 1;
    box-shadow: 
        0 25px 70px rgba(67, 97, 238, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 0 60px rgba(157, 78, 221, 0.2);
    animation: dailyGlowIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

.daily-rewards-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, 
        rgba(67, 97, 238, 0.08) 0%, 
        transparent 70%);
    animation: rotateBg 20s linear infinite;
    z-index: 1;
}

@keyframes dailyGlowIn {
    0% { 
        transform: scale(0.85) translateY(20px); 
        opacity: 0; 
        filter: blur(10px);
    }
    100% { 
        transform: scale(1) translateY(0); 
        opacity: 1; 
        filter: blur(0);
    }
}

@keyframes rotateBg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Заголовок */
.daily-header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.daily-header h3 {
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700, #ffcc00, #ff9900);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: 1px;
}

.daily-header h3 i {
    font-size: 28px;
    background: linear-gradient(135deg, #ffd700, #ff9900);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: crownSpin 3s infinite linear;
}

@keyframes crownSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.streak-info {
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.15), rgba(255, 152, 0, 0.15));
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 800;
    color: #ffcc00;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid rgba(255, 152, 0, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.streak-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    animation: streakShine 3s infinite;
}

@keyframes streakShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.streak-info i {
    font-size: 18px;
    animation: firePulse 1.5s infinite alternate;
}

@keyframes firePulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

/* КАЛЕНДАРЬ - ГОРИЗОНТАЛЬНЫЙ С ПРОКРУТКОЙ */
.calendar-container {
    position: relative;
    margin: 25px 0;
    padding: 0 10px;
}

.calendar-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 15px 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.calendar-grid::-webkit-scrollbar {
    display: none;
}

.calendar-day {
    background: linear-gradient(145deg, rgba(30, 41, 69, 0.8), rgba(20, 30, 55, 0.8));
    border-radius: 18px;
    padding: 20px 15px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-width: 100px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.calendar-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.05) 0%, 
        transparent 50%, 
        rgba(67, 97, 238, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.calendar-day:hover::before {
    opacity: 1;
}

.calendar-day.past {
    border-color: rgba(67, 97, 238, 0.4);
    background: linear-gradient(145deg, rgba(30, 41, 69, 0.9), rgba(20, 30, 55, 0.9));
}

.calendar-day.past .day-number {
    color: #a0a0a0;
}

.calendar-day.today {
    border-color: #ffd700;
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.15), rgba(255, 204, 0, 0.1));
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 15px 35px rgba(255, 215, 0, 0.25),
        0 0 30px rgba(255, 215, 0, 0.15);
    animation: todayGlitter 2s infinite alternate;
}

@keyframes todayGlitter {
    0% { 
        box-shadow: 0 15px 35px rgba(255, 215, 0, 0.25),
                   0 0 30px rgba(255, 215, 0, 0.15);
        border-color: #ffd700;
    }
    100% { 
        box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4),
                   0 0 40px rgba(255, 215, 0, 0.25),
                   0 0 60px rgba(255, 215, 0, 0.1);
        border-color: #ff9900;
    }
}

.calendar-day.future {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(20, 30, 55, 0.6);
    opacity: 0.7;
    filter: grayscale(0.5);
}

.calendar-day.claimed {
    border-color: #38b000;
    background: linear-gradient(145deg, rgba(56, 176, 0, 0.15), rgba(43, 147, 50, 0.1));
}

.calendar-day.claimed .day-status {
    background: linear-gradient(135deg, #38b000, #2b9348);
}

.day-number {
    font-size: 20px;
    font-weight: 900;
    color: white;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.day-reward {
    font-size: 14px;
    font-weight: 800;
    color: #ffd700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
    min-height: 40px;
}

.day-reward img {
    width: 22px;
    height: 22px;
    animation: starTwinkle 2s infinite alternate;
}

@keyframes starTwinkle {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.2) rotate(10deg); }
}

.day-status {
    font-size: 11px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 15px;
    margin-top: 8px;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.day-status.claimed {
    background: linear-gradient(135deg, #38b000, #2b9348);
    color: white;
}

.day-status.today {
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: white;
    animation: statusPulse 1.5s infinite alternate;
}

@keyframes statusPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.day-status.future {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Сегодняшняя награда - КРУГЛЫЙ КРАСИВЫЙ БЛОК */
.daily-today-reward {
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.1) 0%, 
        rgba(67, 97, 238, 0.1) 50%, 
        rgba(157, 78, 221, 0.1) 100%);
    border-radius: 22px;
    padding: 25px;
    margin: 25px 0;
    text-align: center;
    border: 2px solid rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.daily-today-reward::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('assets/stars/star.webp') center/100px no-repeat;
    opacity: 0.05;
    animation: bgStarsRotate 20s linear infinite;
}

@keyframes bgStarsRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.today-reward-title {
    font-size: 20px;
    font-weight: 900;
    color: #ffd700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.today-reward-title i {
    font-size: 24px;
    animation: titleStar 3s infinite ease-in-out;
}

@keyframes titleStar {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(15deg) scale(1.1); }
    75% { transform: rotate(-15deg) scale(1.1); }
}

.today-reward-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    position: relative;
    z-index: 2;
}

.reward-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.reward-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 0.4));
    animation: rewardFloat 3s infinite ease-in-out;
}

@keyframes rewardFloat {
    0%, 100% { 
        transform: translateY(0) rotate(0deg);
        filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 0.4));
    }
    50% { 
        transform: translateY(-10px) rotate(5deg);
        filter: drop-shadow(0 10px 25px rgba(255, 215, 0, 0.6));
    }
}

.reward-details {
    text-align: center;
}

.reward-name {
    font-size: 24px;
    font-weight: 900;
    color: white;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ffd700, #ff9900);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.reward-value {
    font-size: 18px;
    font-weight: 800;
    color: #ffd700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.reward-value img {
    width: 24px;
    height: 24px;
    animation: valueStarSpin 2s linear infinite;
}

@keyframes valueStarSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.reward-bonus {
    font-size: 14px;
    color: #4caf50;
    font-weight: 700;
    padding: 10px 15px;
    background: rgba(76, 175, 80, 0.15);
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(76, 175, 80, 0.3);
    animation: bonusGlow 2s infinite alternate;
}

@keyframes bonusGlow {
    0% { 
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.2);
        border-color: rgba(76, 175, 80, 0.3);
    }
    100% { 
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.4);
        border-color: rgba(76, 175, 80, 0.6);
    }
}

/* Кнопка забрать - ИСПРАВЛЕНА */
.daily-claim-btn {
    width: 100%;
    padding: 22px;
    background: linear-gradient(135deg, #ffd700, #ff9900, #ffd700);
    background-size: 200% 100%;
    color: #000;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 10px 30px rgba(255, 215, 0, 0.4),
        0 0 0 3px rgba(255, 215, 0, 0.2) inset;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.daily-claim-btn:not(:disabled) {
    animation: claimGradient 2s linear infinite, claimPulse 1.5s infinite alternate;
}

@keyframes claimGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes claimPulse {
    0% { 
        transform: scale(1); 
        box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4),
                    0 0 0 3px rgba(255, 215, 0, 0.2) inset;
    }
    100% { 
        transform: scale(1.03); 
        box-shadow: 0 15px 40px rgba(255, 215, 0, 0.6),
                    0 0 0 3px rgba(255, 215, 0, 0.3) inset;
    }
}

.daily-claim-btn:disabled {
    background: linear-gradient(135deg, #444, #666);
    color: #888;
    cursor: not-allowed;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.daily-claim-btn:not(:disabled):hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 20px 50px rgba(255, 215, 0, 0.6),
        0 0 0 3px rgba(255, 255, 255, 0.3) inset;
}

.daily-claim-btn:not(:disabled)::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.4) 50%, 
        transparent 70%);
    animation: claimShine 3s infinite linear;
    pointer-events: none;
}

@keyframes claimShine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Таймер - ИСПРАВЛЕН И АКТИВЕН */
.daily-timer {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.15), rgba(157, 78, 221, 0.1));
    border-radius: 18px;
    padding: 16px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #a0c1ff;
    margin: 20px 0;
    border: 2px solid rgba(67, 97, 238, 0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.daily-timer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('assets/stars/star.webp') center/60px no-repeat;
    opacity: 0.05;
}

.daily-timer i {
    color: #4cc9f0;
    margin-right: 10px;
    font-size: 18px;
    animation: clockTick 1s infinite;
}

@keyframes clockTick {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(10deg); }
}

.daily-timer span {
    font-weight: 900;
    color: #4cc9f0;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(76, 201, 240, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(76, 201, 240, 0.3);
}

/* Кнопка закрыть */
.close-daily-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.2), rgba(157, 78, 221, 0.2));
    color: #a0c1ff;
    border: 2px solid rgba(67, 97, 238, 0.4);
    border-radius: 25px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.close-daily-btn:hover {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.3), rgba(157, 78, 221, 0.3));
    border-color: rgba(67, 97, 238, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
    color: white;
}

/* Адаптация для мобильных */
@media (max-width: 480px) {
    .daily-rewards-box {
        padding: 20px 15px;
        margin: 10px;
        max-height: 85vh;
    }
    
    .daily-header h3 {
        font-size: 22px;
        gap: 10px;
    }
    
    .calendar-day {
        min-width: 90px;
        padding: 18px 12px;
    }
    
    .day-number {
        font-size: 18px;
    }
    
    .day-reward {
        font-size: 13px;
        min-height: 36px;
    }
    
    .day-reward img {
        width: 18px;
        height: 18px;
    }
    
    .daily-today-reward {
        padding: 20px;
    }
    
    .reward-icon {
        width: 80px;
        height: 80px;
    }
    
    .reward-icon img {
        width: 65px;
        height: 65px;
    }
    
    .reward-name {
        font-size: 20px;
    }
    
    .daily-claim-btn {
        padding: 20px;
        font-size: 16px;
    }
    
    .daily-timer {
        padding: 14px;
        font-size: 14px;
    }
    
    .daily-timer span {
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .calendar-day {
        min-width: 85px;
        padding: 16px 10px;
    }
    
    .day-number {
        font-size: 16px;
    }
    
    .day-reward {
        font-size: 12px;
    }
}

/* Новые анимации */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Эффект парящих звезд на фоне */
.floating-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-star {
    position: absolute;
    width: 20px;
    height: 20px;
    background: url('assets/stars/star.webp') center/contain no-repeat;
    opacity: 0.3;
    animation: floatStar 15s infinite linear;
}

@keyframes floatStar {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Создаем много парящих звезд */
.floating-star:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 20s; }
.floating-star:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 18s; }
.floating-star:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 22s; }
.floating-star:nth-child(4) { left: 40%; animation-delay: 6s; animation-duration: 17s; }
.floating-star:nth-child(5) { left: 50%; animation-delay: 8s; animation-duration: 19s; }
.floating-star:nth-child(6) { left: 60%; animation-delay: 10s; animation-duration: 21s; }
.floating-star:nth-child(7) { left: 70%; animation-delay: 12s; animation-duration: 16s; }
.floating-star:nth-child(8) { left: 80%; animation-delay: 14s; animation-duration: 23s; }
.floating-star:nth-child(9) { left: 90%; animation-delay: 16s; animation-duration: 18s; }

/* Адаптация для маленьких экранов */
@media (max-width: 480px) {
    .floating-star {
        width: 15px;
        height: 15px;
    }
}

/* ========== КРАСИВЫЙ МОТИВАЦИОННЫЙ БЛОК ========== */

.daily-motivation {
    background: linear-gradient(135deg, 
        rgba(67, 97, 238, 0.1) 0%, 
        rgba(157, 78, 221, 0.08) 30%,
        rgba(255, 152, 0, 0.06) 70%,
        rgba(67, 97, 238, 0.1) 100%);
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 18px;
    border: 2px solid transparent;
    border-image: linear-gradient(135deg, #4361ee, #9d4edd, #ff9800) 1;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 10px 30px rgba(67, 97, 238, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.daily-motivation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 152, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(67, 97, 238, 0.05) 0%, transparent 50%);
    animation: motivationBg 8s ease-in-out infinite alternate;
}

@keyframes motivationBg {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

.motivation-icon-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ff9900);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    box-shadow: 
        0 8px 25px rgba(255, 152, 0, 0.4),
        0 0 0 3px rgba(255, 255, 255, 0.1) inset;
    animation: iconContainerFloat 3s ease-in-out infinite;
}

@keyframes iconContainerFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-5px) rotate(-3deg); }
    66% { transform: translateY(-3px) rotate(3deg); }
}

.motivation-icon-container::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ff9900, #ffd700);
    background-size: 200% 100%;
    animation: iconBorderRotate 4s linear infinite;
    z-index: -1;
    opacity: 0.7;
}

@keyframes iconBorderRotate {
    0% { transform: rotate(0deg); background-position: 0% 50%; }
    100% { transform: rotate(360deg); background-position: 200% 50%; }
}

.motivation-icon {
    font-size: 26px;
    color: white;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: iconPulse 2s infinite alternate;
}

@keyframes iconPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.motivation-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.motivation-main-text {
    font-size: 16px;
    font-weight: 800;
    color: white;
    margin-bottom: 6px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.motivation-main-text::before {
    content: '✨';
    font-size: 18px;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(10deg); }
}

.motivation-subtext {
    font-size: 13px;
    font-weight: 600;
    color: #a0c1ff;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 8px;
}

.motivation-subtext::before {
    content: '→';
    color: #ff9800;
    font-weight: 900;
    animation: arrowBounce 1.5s infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(3px); }
}

.motivation-stars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 5px;
    animation: starsTwinkle 3s infinite;
}

@keyframes starsTwinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.motivation-stars img {
    width: 16px;
    height: 16px;
}

.motivation-stars img:nth-child(1) { animation-delay: 0s; }
.motivation-stars img:nth-child(2) { animation-delay: 0.2s; }
.motivation-stars img:nth-child(3) { animation-delay: 0.4s; }

/* Адаптация для мобильных */
@media (max-width: 480px) {
    .daily-motivation {
        padding: 16px;
        gap: 15px;
        flex-direction: column;
        text-align: center;
    }
    
    .motivation-icon-container {
        width: 50px;
        height: 50px;
    }
    
    .motivation-icon {
        font-size: 22px;
    }
    
    .motivation-main-text {
        font-size: 14px;
        flex-direction: column;
        gap: 5px;
    }
    
    .motivation-subtext {
        font-size: 12px;
        justify-content: center;
        padding-left: 0;
    }
    
    .motivation-stars img {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 360px) {
    .daily-motivation {
        padding: 14px;
    }
    
    .motivation-main-text {
        font-size: 13px;
    }
    
    .motivation-subtext {
        font-size: 11px;
    }
}

/* ========== СИСТЕМА ДОСТИЖЕНИЙ ========== */

/* Кнопка в профиле */
.profile-achievements-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #FF9800, #FF5722);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
  margin-top: 10px;
  width: 100%;
  justify-content: center;
}

.profile-achievements-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.profile-achievements-btn i {
  font-size: 16px;
  animation: trophyBounce 2s infinite;
}

@keyframes trophyBounce {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

/* Модальное окно достижений */
.achievements-modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1007;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  padding: 15px;
}

.achievements-modal.show {
  visibility: visible;
  opacity: 1;
}

.achievements-box {
  background: white;
  padding: 25px;
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 500px;
  border: 3px solid var(--accent-blue);
  box-shadow: 0 15px 40px rgba(67, 97, 238, 0.5);
  animation: winScale 0.5s ease;
  max-height: 85vh;
  overflow-y: auto;
}

.achievements-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(67, 97, 238, 0.1);
}

.achievements-header h3 {
  font-size: 24px;
  font-weight: 900;
  color: var(--accent-blue);
  margin-bottom: 8px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.achievements-header p {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
}

/* Обзор статистики */
.achievements-stats {
  margin: 15px 0;
}

.achievement-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 15px;
}

.overview-item {
  background: white;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 2px solid transparent;
}

.overview-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.overview-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 18px;
  color: white;
}

.overview-icon.easy {
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.overview-icon.medium {
  background: linear-gradient(135deg, #2196F3, #0D47A1);
}

.overview-icon.hard {
  background: linear-gradient(135deg, #FF9800, #FF5722);
}

.overview-icon.extreme {
  background: linear-gradient(135deg, #9C27B0, #673AB7);
}

.overview-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.overview-count {
  font-size: 14px;
  font-weight: 900;
  color: var(--text-dark);
}

.overview-label {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
}

/* Вкладки достижений */
.achievements-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  background: var(--card-bg);
  padding: 6px;
  border-radius: 25px;
  flex-wrap: wrap;
}

.achievement-tab-btn {
  flex: 1;
  min-width: 60px;
  padding: 10px 8px;
  border: none;
  background: transparent;
  color: var(--text-light);
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.achievement-tab-btn.active {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 3px 12px rgba(67, 97, 238, 0.3);
}

.achievement-tab-btn:hover:not(.active) {
  background: rgba(67, 97, 238, 0.1);
  transform: translateY(-2px);
}

/* Сетка достижений */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-height: 350px;
  overflow-y: auto;
  padding: 10px;
}

@media (min-width: 768px) {
  .achievements-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Карточка достижения */
.achievement-card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 3px solid transparent;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.achievement-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* Цвета рамок по сложности */
.achievement-card.easy {
  border-color: #4CAF50;
}

.achievement-card.medium {
  border-color: #2196F3;
}

.achievement-card.hard {
  border-color: #FF9800;
}

.achievement-card.extreme {
  border-color: #9C27B0;
}

.achievement-card.locked {
  opacity: 0.7;
  filter: grayscale(0.5);
}

.achievement-card.secret {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-style: dashed;
}

.achievement-card.unlocked {
  animation: achievementUnlock 0.5s ease;
}

@keyframes achievementUnlock {
  0% { transform: scale(0.8) rotate(-5deg); }
  70% { transform: scale(1.05) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Иконка достижения */
.achievement-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 22px;
  color: white;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.achievement-icon.easy {
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.achievement-icon.medium {
  background: linear-gradient(135deg, #2196F3, #0D47A1);
}

.achievement-icon.hard {
  background: linear-gradient(135deg, #FF9800, #FF5722);
}

.achievement-icon.extreme {
  background: linear-gradient(135deg, #9C27B0, #673AB7);
}

.achievement-icon.secret {
  background: linear-gradient(135deg, #6c757d, #495057);
}

.achievement-icon.unlocked::after {
  content: '✓';
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: var(--success);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  border: 2px solid white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Информация о достижении */
.achievement-info {
  margin-bottom: 10px;
}

.achievement-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 5px;
  line-height: 1.2;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.achievement-desc {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 8px;
  line-height: 1.2;
  min-height: 26px;
}

/* Прогресс-бар */
.achievement-progress {
  margin: 10px 0;
}

.progress-bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 5px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-pink));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 10px;
  color: var(--text-light);
  font-weight: 600;
  text-align: center;
}

/* Награда */
.achievement-reward {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(255, 215, 0, 0.1);
  padding: 6px 10px;
  border-radius: 15px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Уведомление о достижении */
.achievement-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(135deg, #FF9800, #FF5722);
  color: white;
  border-radius: 12px;
  padding: 15px 20px;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(255, 152, 0, 0.4);
  animation: achievementNotifSlideIn 0.5s ease forwards,
             achievementNotifPulse 2s infinite 0.5s;
  max-width: 350px;
  width: 90%;
  cursor: pointer;
  display: none;
}

@keyframes achievementNotifSlideIn {
  0% { transform: translateX(-50%) translateY(-100px); opacity: 0; }
  100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@keyframes achievementNotifPulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(255, 152, 0, 0.4); }
  50% { box-shadow: 0 10px 40px rgba(255, 152, 0, 0.6), 0 0 30px rgba(255, 152, 0, 0.3); }
}

.achievement-notification.show {
  display: block;
}

.achievement-notification-content {
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
}

.achievement-notification-icon {
  font-size: 28px;
  animation: trophySpin 1s ease;
}

@keyframes trophySpin {
  0% { transform: rotateY(0deg) scale(0.5); }
  100% { transform: rotateY(360deg) scale(1); }
}

.achievement-notification-text {
  flex: 1;
}

.achievement-notification-title {
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 3px;
  opacity: 0.9;
}

.achievement-notification-name {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 5px;
}

.achievement-notification-reward {
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 8px;
  border-radius: 10px;
  width: fit-content;
}

.achievement-notification-close {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.achievement-notification-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Звёзды на аватарке */
.avatar-star-overlay {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--gold);
  color: #000;
  font-size: 10px;
  font-weight: 900;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

/* Адаптация для мобильных */
@media (max-width: 480px) {
  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .achievement-overview {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .achievement-card {
    padding: 12px;
  }
  
  .achievement-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .achievement-title {
    font-size: 12px;
    min-height: 28px;
  }
  
  .achievement-desc {
    font-size: 10px;
    min-height: 24px;
  }
  
  .achievement-notification {
    padding: 12px 15px;
    max-width: 300px;
  }
  
  .achievement-notification-name {
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  .achievements-grid {
    grid-template-columns: 1fr;
  }
  
  .achievement-overview {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .achievement-tab-btn {
    font-size: 0;
    padding: 10px 5px;
  }
  
  .achievement-tab-btn i {
    font-size: 14px;
    margin: 0;
  }
}
    
/* ========== РЕФЕРАЛЬНОЕ УВЕДОМЛЕНИЕ ========== */
.referral-notification {
    position: fixed;
    bottom: -500px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, 
        rgba(67, 97, 238, 0.95), 
        rgba(247, 37, 133, 0.95),
        rgba(156, 39, 176, 0.95));
    backdrop-filter: blur(10px);
    z-index: 9999;
    padding: 20px;
    border-radius: 25px 25px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
    transition: bottom 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 500px;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
    visibility: hidden;
}

.referral-notification.show {
    bottom: 0;
    visibility: visible;
}

.referral-content {
    position: relative;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.referral-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 16px;
}

.referral-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

/* Анимация звёзд */
.referral-animation {
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    height: 40px;
    overflow: hidden;
}

.stars-animation {
    position: relative;
    height: 100%;
}

.star {
    position: absolute;
    font-size: 20px;
    animation: starFall 3s infinite;
    opacity: 0;
}

.star:nth-child(1) { left: 10%; animation-delay: 0s; }
.star:nth-child(2) { left: 25%; animation-delay: 0.5s; }
.star:nth-child(3) { left: 50%; animation-delay: 1s; }
.star:nth-child(4) { left: 75%; animation-delay: 1.5s; }
.star:nth-child(5) { left: 90%; animation-delay: 2s; }

@keyframes starFall {
    0% {
        transform: translateY(-30px) rotate(0deg) scale(0.5);
        opacity: 0;
    }
    20% {
        opacity: 1;
        transform: translateY(0) rotate(180deg) scale(1.2);
    }
    40% {
        opacity: 1;
        transform: translateY(10px) rotate(360deg) scale(1);
    }
    60% {
        opacity: 1;
        transform: translateY(20px) rotate(540deg) scale(0.8);
    }
    100% {
        transform: translateY(40px) rotate(720deg) scale(0);
        opacity: 0;
    }
}

.referral-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-pink));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.4);
    animation: iconPulse 2s infinite;
    border: 4px solid white;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(67, 97, 238, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 15px 35px rgba(67, 97, 238, 0.6),
                    0 0 30px rgba(67, 97, 238, 0.3);
    }
}

.referral-title {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.referral-title .highlight {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.referral-text {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 600;
    line-height: 1.4;
}

.referral-bonus {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border-radius: 15px;
    padding: 15px;
    margin: 20px 0;
    border: 2px solid rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.referral-bonus::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    animation: bonusShine 3s infinite;
}

@keyframes bonusShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.bonus-amount {
    font-size: 36px;
    font-weight: 900;
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
}

.bonus-text {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.referral-link-container {
    background: rgba(67, 97, 238, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin: 20px 0;
    border: 1px solid rgba(67, 97, 238, 0.1);
    text-align: left;
}

.referral-link-label {
    font-size: 14px;
    color: var(--accent-blue);
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.referral-link {
    background: white;
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    word-break: break-all;
    user-select: all;
    cursor: pointer;
    transition: all 0.3s ease;
}

.referral-link:hover {
    background: rgba(67, 97, 238, 0.05);
    border-color: var(--accent-blue);
}

.copy-link-btn {
    width: 100%;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.copy-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.copy-link-btn:active {
    transform: translateY(0);
}

.referral-action-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-pink));
    color: white;
    border: none;
    padding: 18px;
    border-radius: 15px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
    position: relative;
    overflow: hidden;
}

.referral-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.7s ease;
}

.referral-action-btn:hover::before {
    left: 100%;
}

.referral-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(67, 97, 238, 0.6);
}

.referral-extra {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Адаптивность */
@media (max-width: 500px) {
    .referral-notification {
        border-radius: 20px 20px 0 0;
        padding: 15px;
    }
    
    .referral-content {
        padding: 12px;
    }
    
    .referral-icon {
        width: 70px;
        height: 70px;
        font-size: 35px;
    }
    
    .referral-title {
        font-size: 20px;
    }
    
    .bonus-amount {
        font-size: 32px;
    }
}

/* Эффект успешного копирования */
.copy-success {
    background: linear-gradient(135deg, #4CAF50, #2E7D32) !important;
    color: white !important;
}

/* ========== КНОПКИ ДОСТИЖЕНИЙ ========== */
/* ========== МАЛЕНЬКИЕ ГОРИЗОНТАЛЬНЫЕ КНОПКИ ========== */
.small-horizontal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.small-horizontal-btn {
    flex: 1;
    background: white;
    border: none;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    min-height: 60px;
}

.small-horizontal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.small-horizontal-btn:active {
    transform: translateY(0);
}

.small-horizontal-btn.invite-small-btn:hover {
    border-color: rgba(67, 97, 238, 0.3);
    background: linear-gradient(145deg, #ffffff, #f0f5ff);
}

.small-horizontal-btn.channel-small-btn:hover {
    border-color: rgba(0, 136, 204, 0.3);
    background: linear-gradient(145deg, #ffffff, #f0f8ff);
}

.small-btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.small-horizontal-btn.invite-small-btn .small-btn-icon {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.25);
}

.small-horizontal-btn.channel-small-btn .small-btn-icon {
    background: linear-gradient(135deg, #0088cc, #005d8c);
    box-shadow: 0 4px 10px rgba(0, 136, 204, 0.25);
}

.small-horizontal-btn:hover .small-btn-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.small-btn-text {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.small-btn-text div:first-child {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 2px;
}

.small-btn-text div:last-child {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 600;
    line-height: 1.2;
}

.small-horizontal-btn.invite-small-btn .small-btn-text div:last-child {
    color: var(--gold);
    font-weight: 700;
}

/* Бейдж на кнопке приглашения */
.invite-small-btn::after {
    content: '🎁';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    background: rgba(255, 215, 0, 0.9);
    color: #996600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    animation: smallBadgeFloat 2s infinite ease-in-out;
}

@keyframes smallBadgeFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-3px) rotate(10deg); }
}

/* Бейдж на кнопке канала */
.channel-small-btn::after {
    content: '✨';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    background: rgba(247, 37, 133, 0.9);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Эффект при наведении */
.small-horizontal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.7s ease;
}

.small-horizontal-btn:hover::before {
    left: 100%;
}

/* Для очень маленьких экранов */
@media (max-width: 380px) {
    .small-horizontal-buttons {
        gap: 8px;
    }
    
    .small-horizontal-btn {
        padding: 8px;
        gap: 8px;
        min-height: 55px;
    }
    
    .small-btn-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .small-btn-text div:first-child {
        font-size: 12px;
    }
    
    .small-btn-text div:last-child {
        font-size: 10px;
    }
}

/* ========== ИСПРАВЛЕННАЯ ЗАГРУЗКА ========== */
.fast-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fast-loading-content {
    max-width: 400px;
    width: 90%;
    text-align: center;
}

/* РУЛЕТКА */
.loading-roulette-wrapper {
    width: 100%;
    height: 140px;
    margin: 0 auto 30px;
    position: relative;
}

.loading-viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(67, 97, 238, 0.3);
    position: relative;
}

/* ТРАК С ПОДАРКАМИ - ТЕПЕРЬ ВИДЕН */
.loading-track-moving {
    display: flex;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    animation: trackMove 20s linear infinite;
}

/* КЛЮЧЕВАЯ АНИМАЦИЯ - ПОДАРКИ ЕДУТ */
@keyframes trackMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* КАЖДЫЙ СЛОТ С ПОДАРКОМ */
.loading-slot-moving {
    width: 100px;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* КАРТИНКА ПОДАРКА */
.loading-gift-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 8px;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
}

/* Центральная линия */
.loading-center-mark {
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 100%;
    background: #f72585;
    transform: translateX(-50%);
    box-shadow: 
        0 0 20px #f72585,
        0 0 40px rgba(67, 97, 238, 0.7);
    z-index: 10;
}

/* Остальные стили остаются как были... */
.game-title-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.game-title-loading i {
    font-size: 36px;
    color: #f72585;
    animation: giftSpin 2s infinite linear;
}

@keyframes giftSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.game-title-loading h1 {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, #f72585, #4361ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.quick-progress {
    margin: 25px 0;
}

.quick-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.quick-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f72585, #4361ee);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-sparkle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    font-size: 20px;
}

.quick-percent {
    font-size: 16px;
    font-weight: 800;
    color: #4cc9f0;
}

.quick-status {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.fast-loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* ===== LIVE MINI-ROULETTE - КОМПАКТНЫЙ С ОБВОДКОЙ ===== */
.live-mini-section {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 8px 10px;
    margin: 4px 12px 6px 12px; /* Минимальные отступы */
    box-shadow: 
      0 2px 8px rgba(0, 0, 0, 0.05),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(67, 97, 238, 0.12);
    animation: fadeIn 0.5s ease;
    position: relative;
    overflow: hidden;
  }
  
  /* Тонкая акцентная линия сверху */
  .live-mini-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
      transparent, 
      rgba(67, 97, 238, 0.3), 
      transparent);
  }
  
  .live-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 6px; /* Маленький отступ */
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  }
  
  /* Онлайн блок - компактный */
  .live-online {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  .live-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #ff4757, #ff6b6b);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 800;
    color: white;
    box-shadow: 0 1px 3px rgba(255, 71, 87, 0.25);
  }
  
  .live-dot {
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
  }
  
  @keyframes livePulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
  }
  
  .online-count {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-dark);
    font-weight: 700;
  }
  
  .online-count i {
    color: var(--accent-blue);
    font-size: 13px;
  }
  
  #liveOnlineCount {
    font-weight: 800;
    font-size: 16px;
    color: var(--accent-blue);
  }
  
  /* Мини-рулетка - КОМПАКТНАЯ */
  .mini-roulette-viewport {
    height: 62px; /* Еще меньше высота */
    background: linear-gradient(135deg, #ffffff, #fafbfd);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(67, 97, 238, 0.1);
    position: relative;
    box-shadow: 
      inset 0 0 10px rgba(0, 0, 0, 0.02),
      0 1px 3px rgba(0, 0, 0, 0.04);
  }
  
  /* Аккуратная обводка для рулетки */
  .mini-roulette-viewport::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    pointer-events: none;
    z-index: 1;
  }
  
  .mini-track {
    display: flex;
    gap: 8px;
    height: 100%;
    padding: 0 12px;
    align-items: center;
    flex-direction: row-reverse;
    justify-content: flex-end;
  }
  
  /* Элемент подарка - КОМПАКТНЫЙ */
  .mini-gift-item {
    flex-shrink: 0;
    width: 56px; /* Меньше */
    height: 52px; /* Меньше */
    background: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    animation: giftSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
      0 2px 4px rgba(0, 0, 0, 0.05),
      0 0 0 1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1.5px solid;
  }
  
  @keyframes giftSlideIn {
    0% {
      opacity: 0;
      transform: translateX(-15px) scale(0.92);
    }
    100% {
      opacity: 1;
      transform: translateX(0) scale(1);
    }
  }
  
  /* Тонкие аккуратные рамки */
  .mini-gift-item.value-common {
    border-color: rgba(76, 201, 240, 0.5);
    background: linear-gradient(135deg, #ffffff, #f8fcff);
  }
  
  .mini-gift-item.value-rare {
    border-color: rgba(67, 97, 238, 0.5);
    background: linear-gradient(135deg, #ffffff, #f6f8ff);
  }
  
  .mini-gift-item.value-epic {
    border-color: rgba(157, 78, 221, 0.5);
    background: linear-gradient(135deg, #ffffff, #f9f6fc);
  }
  
  .mini-gift-item.value-legendary {
    border-color: rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, #ffffff, #fffdf2);
    box-shadow: 
      0 2px 6px rgba(255, 215, 0, 0.15),
      0 0 0 1px rgba(255, 215, 0, 0.1);
  }
  
  .mini-gift-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    margin-bottom: 3px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
  }
  
  .mini-gift-name {
    font-size: 8px;
    font-weight: 800;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-bottom: 2px;
  }
  
  .mini-gift-value {
    font-size: 9px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    padding: 1px 6px;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(255, 170, 0, 0.25);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    min-width: 30px;
    text-align: center;
  }
  
  /* Для очень узких экранов */
  @media (max-width: 380px) {
    .live-mini-section {
      margin: 4px 8px 6px 8px;
      padding: 6px 8px;
    }
    
    .mini-roulette-viewport {
      height: 58px;
    }
    
    .mini-gift-item {
      width: 52px;
      height: 48px;
    }
    
    .mini-gift-icon {
      width: 20px;
      height: 20px;
    }
  }


/* ===================== DAILY MODAL V2 (COMPACT, FITS SCREEN) ===================== */
#dailyRewardsModal[data-v2="1"]{
  display:none;
  align-items:center;
  justify-content:center;
  padding:14px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
}
#dailyRewardsModal[data-v2="1"].show,
#dailyRewardsModal[data-v2="1"].active,
#dailyRewardsModal[data-v2="1"].daily2-open{
  display:flex !important;
}
#dailyRewardsModal[data-v2="1"] .daily-rewards-box{
  width: min(92vw, 360px);
  max-height: 86vh;
  padding: 0 !important;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f6f8ff 100%);
  box-shadow: 0 18px 50px rgba(0,0,0,0.25);
}

#dailyRewardsModal[data-v2="1"] .dailyv2-card{
  display:flex;
  flex-direction:column;
  gap: 12px;
  padding: 14px;
}

#dailyRewardsModal[data-v2="1"] .dailyv2-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-title{
  font-weight: 800;
  font-size: 16px;
  color: #3a3a3a;
  display:flex;
  align-items:center;
  gap: 10px;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-title i{
  color: #ff8a00;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-close{
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 12px;
  background: rgba(0,0,0,0.06);
  color: #222;
  font-size: 16px;
  cursor:pointer;
}

#dailyRewardsModal[data-v2="1"] .dailyv2-streakRow{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(102,126,234,0.10);
  border: 1px solid rgba(118,75,162,0.12);
}
#dailyRewardsModal[data-v2="1"] .dailyv2-streakLabel{
  font-weight: 700;
  color:#4c4c4c;
  opacity: .85;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-streakValue{
  font-weight: 900;
  font-size: 26px;
  line-height: 1;
  background: linear-gradient(135deg, #667eea 0%, #ef476f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#dailyRewardsModal[data-v2="1"] .dailyv2-days{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-day{
  height: 34px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 800;
  background: rgba(0,0,0,0.05);
  color:#444;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-day--active{
  background: linear-gradient(135deg, #667eea 0%, #ef476f 100%);
  color:#fff;
  box-shadow: 0 8px 18px rgba(102,126,234,0.25);
}

#dailyRewardsModal[data-v2="1"] .dailyv2-rewardRow{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,152,0,0.10);
  border: 1px solid rgba(255,87,34,0.10);
}
#dailyRewardsModal[data-v2="1"] .dailyv2-rewardIcon{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
  overflow:hidden;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-rewardIcon img{
  width: 30px;
  height: 30px;
  object-fit: contain;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-rewardIcon.dailyv2-star{
  font-size: 22px;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-rewardTitle{
  font-weight: 900;
  color:#2b2b2b;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-rewardSub{
  font-size: 12px;
  color:#555;
  opacity: .85;
}

#dailyRewardsModal[data-v2="1"] .dailyv2-actions{
  display:flex;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-claimBtn{
  width: 100%;
  border: none;
  border-radius: 18px;
  padding: 12px 14px;
  font-weight: 900;
  color:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  background: linear-gradient(135deg, #667eea 0%, #ef476f 100%);
  box-shadow: 0 12px 24px rgba(239,71,111,0.22);
}
#dailyRewardsModal[data-v2="1"] .dailyv2-claimBtn--disabled{
  background: rgba(0,0,0,0.10);
  color:#444;
  box-shadow:none;
}

#dailyRewardsModal[data-v2="1"] .dailyv2-hint{
  font-size: 12px;
  color:#4e4e4e;
  opacity: .9;
  text-align:center;
}

#dailyRewardsBtn.dailyv2-hasClaim{
  animation: dailyv2Pulse 1.3s ease-in-out infinite alternate;
}
@keyframes dailyv2Pulse{
  from { transform: translateY(0); box-shadow: 0 10px 24px rgba(255,152,0,0.25); }
  to   { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(239,71,111,0.28); }
}

#dailyRewardsModal[data-v2="1"] .dailyv2-congrats{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,0.20);
  opacity: 0;
  transition: opacity .15s ease;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-congrats.show{ opacity: 1; }
#dailyRewardsModal[data-v2="1"] .dailyv2-congratsBox{
  width: min(80vw, 320px);
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0,0,0,0.25);
  text-align:center;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-congratsTitle{
  font-weight: 900;
  font-size: 16px;
  margin-bottom: 6px;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-congratsSub{
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #ef476f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* =================== END DAILY MODAL V2 =================== */



/* ===== DAILY MODAL V2 (patched: clickable days + proper sizing) ===== */
#dailyRewardsModal[data-v2="1"]{display:flex;align-items:center;justify-content:center;padding:12px;box-sizing:border-box;}
#dailyRewardsModal[data-v2="1"] .daily-rewards-box{width:min(92vw,360px);max-height:86vh;overflow:auto;pointer-events:auto;}
#dailyRewardsModal[data-v2="1"] .dailyv2-card{width:100%;border-radius:22px;box-shadow:0 16px 40px rgba(0,0,0,.22);background:linear-gradient(135deg,#6b5bff 0%,#ff4fc8 100%);padding:14px;position:relative;}
#dailyRewardsModal[data-v2="1"] .dailyv2-header{display:flex;align-items:center;justify-content:space-between;color:#fff;margin-bottom:10px;}
#dailyRewardsModal[data-v2="1"] .dailyv2-title{font-weight:800;font-size:16px;display:flex;gap:8px;align-items:center;}
#dailyRewardsModal[data-v2="1"] .dailyv2-close{width:36px;height:36px;border-radius:14px;border:0;background:rgba(255,255,255,.18);color:#fff;font-size:18px;cursor:pointer;}
#dailyRewardsModal[data-v2="1"] .dailyv2-close:active{transform:scale(.96);}
#dailyRewardsModal[data-v2="1"] .dailyv2-streakRow{background:#fff;border-radius:18px;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;}
#dailyRewardsModal[data-v2="1"] .dailyv2-streakLabel{color:#666;font-weight:700;}
#dailyRewardsModal[data-v2="1"] .dailyv2-streakValue{color:#222;font-weight:900;font-size:22px;}
#dailyRewardsModal[data-v2="1"] .dailyv2-days{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin:8px 0 12px;}
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn{border:0;cursor:pointer;border-radius:14px;padding:8px 0;background:rgba(255,255,255,.18);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;transition:transform .08s ease, background .12s ease;min-height:46px;}
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn .d-num{font-weight:900;font-size:13px;line-height:1;}
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn .d-badge{font-weight:800;font-size:11px;opacity:.95;line-height:1;}
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn:hover{background:rgba(255,255,255,.26);}
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn:active{transform:scale(.96);}
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn.is-active{background:#fff;color:#222;box-shadow:0 10px 22px rgba(0,0,0,.18);}
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn.is-current{outline:2px solid rgba(255,255,255,.9);outline-offset:2px;}
#dailyRewardsModal[data-v2="1"] .dailyv2-rewardRow{background:#fff;border-radius:18px;padding:10px 12px;display:flex;align-items:center;gap:10px;margin-bottom:12px;}
#dailyRewardsModal[data-v2="1"] .dailyv2-rewardIcon{width:44px;height:44px;border-radius:14px;background:linear-gradient(135deg,#ffd86a 0%,#ff8a00 100%);display:flex;align-items:center;justify-content:center;overflow:hidden;flex:0 0 auto;}
#dailyRewardsModal[data-v2="1"] .dailyv2-rewardIcon img{width:100%;height:100%;object-fit:contain;}
#dailyRewardsModal[data-v2="1"] .dailyv2-rewardIcon.dailyv2-star{font-size:22px;}
#dailyRewardsModal[data-v2="1"] .dailyv2-rewardTitle{font-weight:900;color:#222;font-size:15px;}
#dailyRewardsModal[data-v2="1"] .dailyv2-rewardSub{font-weight:700;color:#777;font-size:12px;margin-top:2px;}
#dailyRewardsModal[data-v2="1"] .dailyv2-actions{display:flex;gap:10px;}
#dailyRewardsModal[data-v2="1"] .dailyv2-claimBtn{flex:1;border:0;border-radius:18px;padding:12px 14px;font-weight:900;font-size:14px;cursor:pointer;color:#fff;background:linear-gradient(135deg,#ffb100 0%,#ff6a00 100%);box-shadow:0 12px 26px rgba(0,0,0,.18);display:flex;align-items:center;justify-content:center;gap:8px;}
#dailyRewardsModal[data-v2="1"] .dailyv2-claimBtn:active{transform:scale(.98);}
#dailyRewardsModal[data-v2="1"] .dailyv2-claimBtn--disabled{cursor:not-allowed;opacity:.72;filter:saturate(.7);}
#dailyRewardsModal[data-v2="1"] .dailyv2-hint{margin-top:10px;color:rgba(255,255,255,.92);font-weight:700;font-size:12px;text-align:center;}


/* ===== DAILY MODAL V2 HOTFIX (clicks + no-drag) ===== */
html.dailyv2-scrolllock,
body.dailyv2-scrolllock{
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
}

/* Force overlay to be visible/clickable when opened */
#dailyRewardsModal[data-v2="1"].show,
#dailyRewardsModal[data-v2="1"].active,
#dailyRewardsModal[data-v2="1"].daily2-open{
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Prevent background "dragging" / horizontal shifts */
#dailyRewardsModal[data-v2="1"]{
  position: fixed !important;
  inset: 0 !important;
  overflow: hidden !important;
  overscroll-behavior: contain;
  background: rgba(0,0,0,0.55);
  z-index: 99999 !important;
  box-sizing: border-box;
  /* IMPORTANT: do not block taps */
  touch-action: auto;
}

/* Make sure inner card receives clicks and can scroll */
#dailyRewardsModal[data-v2="1"] .daily-rewards-box{
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  pointer-events: auto;
  background: transparent !important; /* remove any white blocks */
}

#dailyRewardsModal[data-v2="1"] .dailyv2-card{
  max-width: 380px;
  width: 100%;
  max-height: 86vh;
  overflow: hidden; /* no scrollbars on desktop */
  pointer-events: auto;
  outline: none !important;
  border: none !important;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  background-clip: padding-box;
}

/* Claimed days: visually marked */
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn.is-claimed{
  background: rgba(255,255,255,.28);
}
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn.is-claimed .d-badge{
  opacity: .85;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn.is-claimed::after{
  content: "✓";
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(255,255,255,.95);
}

/* Make day buttons positionable for ::after */
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn{ position: relative; }

/* Remove legacy rectangular outline/border if any */
#dailyRewardsModal[data-v2="1"] .daily-rewards-box,
#dailyRewardsModal[data-v2="1"] .daily-rewards-modal-content,
#dailyRewardsModal[data-v2="1"] .daily-rewards-content{
  outline: none !important;
  border: none !important;
}

/* Ensure buttons are clickable */
#dailyRewardsModal[data-v2="1"] button,
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn,
#dailyRewardsModal[data-v2="1"] .dailyv2-claimBtn,
#dailyRewardsModal[data-v2="1"] .dailyv2-close{
  pointer-events: auto !important;
  touch-action: manipulation;
}

/* ===== DAILY MODAL V2 - CLICK FIX + SIMPLE LOOK (v5) ===== */
#dailyRewardsModal[data-v2="1"]{
  background: rgba(0,0,0,0.65) !important;
}

/* kill legacy decorative overlay that blocks clicks */
#dailyRewardsModal[data-v2="1"] .daily-rewards-box::before{
  pointer-events: none !important;
  z-index: 0 !important;
}

/* simplify card frame (remove gradient border / rectangle frame) */
#dailyRewardsModal[data-v2="1"] .daily-rewards-box{
  border: none !important;
  border-image: none !important;
  box-shadow: 0 18px 60px rgba(0,0,0,0.35) !important;
  overflow: visible !important;
  background: transparent !important;
  padding: 0 !important;
}

/* actual visible card */
#dailyRewardsModal[data-v2="1"] .dailyv2-card{
  position: relative;
  z-index: 2;
  width: min(92vw, 340px);
  max-height: 86vh;
  overflow: auto;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}

/* ensure buttons are always clickable */
#dailyRewardsModal[data-v2="1"] button,
#dailyRewardsModal[data-v2="1"] .dailyv2-close,
#dailyRewardsModal[data-v2="1"] .dailyv2-claimBtn,
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn{
  pointer-events: auto !important;
}

/* remove any outlines/borders that look like a frame */
#dailyRewardsModal[data-v2="1"] .dailyv2-card,
#dailyRewardsModal[data-v2="1"] .dailyv2-header{
  border: none !important;
  outline: none !important;
}

/* prevent tiny white frame gaps around overlay (TG webview sometimes shows body) */
html.dailyv2-scrolllock,
body.dailyv2-scrolllock{
  background: transparent !important;
}

/* claimed day marker */
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn.is-claimed{
  opacity: 0.75;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn.is-claimed::after{
  content: "✓";
  position: absolute;
  top: 6px;
  right: 8px;
  font-weight: 800;
  font-size: 12px;
  opacity: 0.9;
}

/* ===========================
   DAILY MODAL V2 — FINAL FIX
   - убираем рамку/пленку
   - делаем кликабельной
   - показываем все 7 дней
   =========================== */

#dailyRewardsModal[data-v2="1"]{
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  background: rgba(0,0,0,.65) !important;
  z-index: 999999 !important;
  overflow: hidden !important;
}

#dailyRewardsModal[data-v2="1"].show,
#dailyRewardsModal[data-v2="1"].active,
#dailyRewardsModal[data-v2="1"].daily2-open{
  display: flex !important;
}

/* контейнер вокруг карточки — делаем прозрачным и НЕ мешающим кликам */
#dailyRewardsModal[data-v2="1"] .daily-rewards-box{
  width: min(340px, 92vw) !important;
  max-width: 340px !important;
  background: transparent !important;
  border: none !important;
  border-image: none !important;
  outline: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
}

/* ВОТ ЭТО КЛЮЧ: убиваем “плёнку”/рамку, которая перекрывает кнопки */
#dailyRewardsModal[data-v2="1"] .daily-rewards-box::before,
#dailyRewardsModal[data-v2="1"] .daily-rewards-box::after{
  pointer-events: none !important;
  content: none !important;
}

/* сама карточка */
#dailyRewardsModal[data-v2="1"] .dailyv2-card{
  pointer-events: auto !important;
  width: 100% !important;
  background: #fff !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  box-shadow: 0 18px 60px rgba(0,0,0,.28) !important;
}

/* крестик — видимый */
#dailyRewardsModal[data-v2="1"] .dailyv2-close{
  width: 38px !important;
  height: 38px !important;
  border-radius: 14px !important;
  border: none !important;
  background: rgba(0,0,0,.08) !important;
  color: #111 !important;
  font-size: 22px !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
}

/* 7 дней всегда видно */
#dailyRewardsModal[data-v2="1"] .dailyv2-days{
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 8px !important;
  padding: 10px 16px 8px !important;
}

/* кнопки дней */
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn{
  height: 46px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(67,97,238,.18) !important;
  background: #f4f6ff !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  cursor: pointer !important;
  user-select: none !important;
}

#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn.is-active{
  background: linear-gradient(135deg, #4361ee, #f72585) !important;
  border-color: transparent !important;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn.is-active .d-num,
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn.is-active .d-badge{
  color: #fff !important;
}

/* забранные дни — галочка */
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn.is-claimed{
  position: relative !important;
  background: #ecfff1 !important;
  border-color: rgba(56,176,0,.35) !important;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn.is-claimed::after{
  content: "✓" !important;
  position: absolute !important;
  top: -6px !important;
  right: -6px !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 9px !important;
  background: #38b000 !important;
  color: #fff !important;
  font-size: 12px !important;
  display: grid !important;
  place-items: center !important;
}

/* кнопка “Забрать” — нормальная и кликабельная */
#dailyRewardsModal[data-v2="1"] .dailyv2-claimBtn{
  width: 100% !important;
  height: 52px !important;
  border-radius: 18px !important;
  border: none !important;
  cursor: pointer !important;
  font-weight: 900 !important;
  color: #fff !important;
  background: linear-gradient(135deg, #ff9e00, #ff6a00) !important;
  box-shadow: 0 14px 30px rgba(255,106,0,.25) !important;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-claimBtn:active{
  transform: scale(.985) !important;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-claimBtn--disabled{
  background: rgba(0,0,0,.08) !important;
  color: rgba(0,0,0,.45) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

/* scroll lock */
html.dailyv2-scrolllock, body.dailyv2-scrolllock{
  overflow: hidden !important;
  height: 100% !important;
}
body.dailyv2-scrolllock{
  position: fixed !important;
  width: 100% !important;
}

/* ===== DAILY V2 UX FIXES ===== */

/* подсказка под календарём (чтобы было видно) */
#dailyRewardsModal[data-v2="1"] .dailyv2-hint{
  color: rgba(0,0,0,.65) !important;
  font-weight: 700 !important;
}

/* день: делаем цифру/звезду/сумму читаемыми */
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn .d-num{
  color: rgba(0,0,0,.88) !important;
  font-weight: 900 !important;
  font-size: 12px !important;
  line-height: 1 !important;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn .d-badge{
  color: rgba(0,0,0,.78) !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

/* активный день: белый текст */
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn.is-active .d-num,
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn.is-active .d-badge{
  color: #fff !important;
}

/* забранный день: зелёный текст */
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn.is-claimed .d-num{
  color: rgba(0,0,0,.85) !important;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-dayBtn.is-claimed .d-badge{
  color: rgba(0,0,0,.72) !important;
}

/* ПУЛЬС кнопки "Забрать" только когда можно забирать */
@keyframes dailyPulse {
  0%   { transform: scale(1);   box-shadow: 0 14px 30px rgba(255,106,0,.22); }
  50%  { transform: scale(1.02);box-shadow: 0 18px 40px rgba(255,106,0,.30); }
  100% { transform: scale(1);   box-shadow: 0 14px 30px rgba(255,106,0,.22); }
}
#dailyRewardsModal[data-v2="1"] .dailyv2-claimBtn.is-available{
  animation: dailyPulse 1.3s ease-in-out infinite;
}

/* поздравление (оверлей) — чтобы не было "прозрачного" */
#dailyRewardsModal[data-v2="1"] .dailyv2-congrats{
  position: absolute !important;
  inset: 0 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0,0,0,.45) !important;
  z-index: 10 !important;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-congrats.show{
  display: flex !important;
}
#dailyRewardsModal[data-v2="1"] .dailyv2-congratsCard{
  width: min(300px, 86vw) !important;
  background: #fff !important;
  border-radius: 18px !important;
  padding: 18px !important;
  text-align: center !important;
  box-shadow: 0 18px 60px rgba(0,0,0,.28) !important;
}


