/* Основные стили для всего приложения */
        :root {
            --content-offset: 0px;
            /* Контролируем верхний отступ фона игр */
            --roulette-top-gap: 25px;  /* по умолчанию как top шапки */
            --blackjack-top-gap: 25px; /* по умолчанию как top шапки */
            /* Вертикальный сдвиг PNG-фона в блэкджеке */
            --blackjack-bg-offset-y: 12px; /* слегка опущен фон по умолчанию */
            /* Отступ фона слотов от верха (под шапку) */
            --slots-top-gap: 25px;
        }
        
        html {
            scrollbar-gutter: stable;
        }
        
        /* Переопределяем отступ фона на iOS/Android под реальные top шапки */
        html[data-platform="ios"] {
            --roulette-top-gap: 90px;
            --blackjack-top-gap: 90px;
            --blackjack-bg-offset-y: 0px; /* опускаем PNG на iOS */
            --slots-top-gap: 35px;
        }
        html[data-platform="android"] {
            --roulette-top-gap: 70px;
            --blackjack-top-gap: 70px;
            --blackjack-bg-offset-y: 0px; /* опускаем PNG на Android */
            --slots-top-gap: 35px;
        }
        
        /* Скрываем внутренние кнопки "Назад" — используем только Telegram BackButton */
        #back-to-arena-btn,
        #back-from-inventory-btn,
        #back-to-profile-from-settings-btn,
        #back-to-profile-from-referral-btn,
        #back-to-admin-from-settings-btn,
        #back-to-arena-from-season-btn {
            display: none !important;
        }
        
        body {
            font-family: 'Poppins', sans-serif;
            background: #0d0d0d; color: #f0f0f0;
            overflow-x: hidden; /* Запрещаем горизонтальную прокрутку на уровне body */
            min-height: 100vh; /* Use min-height instead of height */
            width: 100vw;
            -webkit-touch-callout: none; /* iOS Safari */
            -webkit-user-select: none;   /* Safari */
            -moz-user-select: none;      /* Firefox */
            -ms-user-select: none;       /* Internet Explorer/Edge */
            user-select: none;           /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
            /* Убираем центрирование, чтобы контейнер мог занять все пространство */
                    overscroll-behavior-y: none; /* блокируем оверсролл вниз */
                    overscroll-behavior: contain;
                    -webkit-overflow-scrolling: touch;
                    touch-action: manipulation;
        }
        #app-container {
            overscroll-behavior: contain; /* не отдаём свайпы вверх/вниз родителю */
        }
        
        /* Анимация загрузки - прыгающие кости */
        .dice-loader {
            display: flex;
            gap: 12px;
        }
        .dice {
            font-size: 2.5rem;
            animation: dice-bounce 0.6s ease-in-out infinite;
        }
        .dice-1 { animation-delay: 0s; }
        .dice-2 { animation-delay: 0.15s; }
        .dice-3 { animation-delay: 0.3s; }
        @keyframes dice-bounce {
            0%, 100% { 
                transform: translateY(0) rotate(0deg); 
            }
            50% { 
                transform: translateY(-20px) rotate(180deg); 
            }
        }
        
        /* Скрываем скроллбары для Webkit (Chrome, Safari) и Firefox */
        ::-webkit-scrollbar {
            display: none;
        }
        * {
            scrollbar-width: none; /* Firefox */
            -webkit-touch-callout: none; /* iOS Safari */
            -webkit-user-select: none;   /* Safari */
            -moz-user-select: none;      /* Firefox */
            -ms-user-select: none;       /* Internet Explorer/Edge */
            -ms-overflow-style: none;  /* IE and Edge */
        }
        /* Tailwind fallbacks for critical layout helpers */
        .hidden { display: none !important; }
        .grid { display: grid; }
        .grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
        /* ВАЖНО: Разрешаем редактирование и выделение текста в формах.
           Глобальный user-select: none выше мешал ставить каретку/редактировать. */
        input, textarea, select, [contenteditable="true"] {
            -webkit-user-select: text;
            -moz-user-select: text;
            -ms-user-select: text;
            user-select: text;
            pointer-events: auto;
        }

        /* Стили для экранов */
        .screen {
            display: none;
            width: 100%;
            /* min-height: 100%; */ /* Удалено, чтобы избежать конфликтов */
            flex-direction: column;
            align-items: center; /* Этот стиль может быть переопределен для конкретных экранов, если нужно выравнивание по левому краю */
            padding: 1rem;
            padding-top: calc(1rem + 25px);
            padding-bottom: 80px; /* Добавляем отступ снизу, чтобы контент не перекрывался навигацией */
            box-sizing: border-box; overflow-y: auto; overflow-x: hidden; /* Включаем верт. прокрутку, отключаем гориз. */
            position: relative;
            min-height: calc(100vh - 80px); /* Ensure content fills the screen, minus nav height */
            justify-content: flex-start; /* Выравниваем контент по верху для корректной прокрутки */
        }
        
        /* Android fix: гарантируем что активный экран виден даже при проблемах с CSS */
        html[data-platform="android"] .screen.active {
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
        }
        
        /* Оптимизации только для iOS (на Android вызывают чёрный экран при первом рендере) */
        html:not([data-platform="android"]) .screen {
            contain: content; /* ограничиваем влияние внутреннего layout/paint */
            content-visibility: auto; /* пропускаем отрисовку вне экрана */
            contain-intrinsic-size: 800px 1200px; /* резерв для раскладки при пропуске отрисовки */
        }

        .screen.active {
            display: flex;
        }
        
        /* Опустить все заголовки (топ бары) вместе с контентом */
        .screen header {
            top: 35px !important;
        }

        /* Дополнительный фон для header вверх, не меняя его позицию и ширину */
        .screen header::before {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            top: -100px;        /* насколько вверх вытянуть фон */
            height: 100px;       /* высота продолжения */
            background: inherit;/* тот же фон, что у header */
            z-index: -1;        /* под контентом шапки */
        }
        
        /* Арена экран - опускаем бар еще ниже (по умолчанию) */
        #arena-screen header {
            top: 45px !important;
        }
        
        /* Арена - фон */
        #arena-screen {
            min-height: 100vh;
            background: url('assets/bg-arena.svg') center top / cover no-repeat fixed,
                linear-gradient(135deg, #0f0a1a 0%, #1a1025 30%, #151020 60%, #0a0812 100%) !important;
        }
        
        /* Android: убираем fixed attachment - тяжелый для WebView */
        html[data-platform="android"] #arena-screen {
            background: url('assets/bg-arena.svg') center top / cover no-repeat fixed,
                linear-gradient(135deg, #0f0a1a 0%, #1a1025 30%, #151020 60%, #0a0812 100%) !important;
            background-attachment: scroll !important;
        }
        
        /* iOS: более высокая позиция (меньше отступ) */
        html[data-platform="ios"] #arena-screen header {
            top: 75px !important;
        }
        
        /* Android: еще ниже (больше отступ) */
        html[data-platform="android"] #arena-screen header {
            top: 60px !important;
        }
        
        /* Экраны без смещения (рейтинги, магазин, задания, админка) */
        #leaderboard-screen header,
        #shop-screen header,
        #quests-screen header,
        #admin-screen header {
            top: 0 !important;
        }

        /* ========== ЛОББИ КОНТЕНТ - ПРЯМЫЕ CSS СЕЛЕКТОРЫ ДЛЯ ПЛАТФОРМ ========== */
        
        /* По умолчанию (Default) */
        #open-season-pass-btn {
            margin-top: 0 !important;
            position: relative;
            border: none !important;
            isolation: isolate;
        }
        /* Анимированная градиентная рамка с встроенным glow */
        #open-season-pass-btn::before {
            content: '';
            position: absolute;
            inset: -3px;
            border-radius: 1rem;
            background: linear-gradient(90deg, #9333ea, #fbbf24, #ea580c, #fbbf24, #9333ea);
            background-size: 300% 100%;
            animation: gradient-border-flow 4s linear infinite;
            z-index: -1;
            filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6)) drop-shadow(0 0 12px rgba(147, 51, 234, 0.4));
        }
        /* Пульсация свечения */
        #open-season-pass-btn::after {
            content: '';
            position: absolute;
            inset: -3px;
            border-radius: 1rem;
            background: linear-gradient(90deg, #9333ea, #fbbf24, #ea580c, #fbbf24, #9333ea);
            background-size: 300% 100%;
            animation: gradient-border-flow 4s linear infinite, season-glow-pulse 2s ease-in-out infinite alternate;
            z-index: -2;
            filter: blur(8px);
            opacity: 0.5;
        }
        @keyframes season-glow-pulse {
            from { opacity: 0.3; filter: blur(6px); }
            to { opacity: 0.6; filter: blur(10px); }
        }
        /* Внутреннее свечение */
        #open-season-pass-btn > div {
            box-shadow: inset 0 0 20px rgba(251, 191, 36, 0.25);
        }
        
        
        /* Неоновый эффект для сообщения о выигрыше */
        #win-message:not(:empty) {
            text-shadow: 
                0 0 5px #facc15,
                0 0 10px #facc15,
                0 0 20px #fbbf24,
                0 0 30px #f59e0b;
            animation: win-message-glow 0.5s ease-in-out;
        }
        @keyframes win-message-glow {
            0% { opacity: 0; transform: scale(0.8); }
            50% { transform: scale(1.1); }
            100% { opacity: 1; transform: scale(1); }
        }
        
        /* ========== ДЕЛЬТА БАЛАНСА (+/-) ========== */
        .balance-delta {
            position: absolute;
            top: 100%;
            right: 0;
            font-size: 12px;
            font-weight: bold;
            white-space: nowrap;
            pointer-events: none;
            opacity: 0;
            transform: translateY(-5px);
            transition: none;
            z-index: 100;
        }
        .balance-delta.positive {
            color: #22c55e;
            text-shadow: 0 0 8px #22c55e, 0 0 16px rgba(34, 197, 94, 0.5);
            animation: balance-delta-show 2s ease forwards;
        }
        .balance-delta.negative {
            color: #ef4444;
            text-shadow: 0 0 8px #ef4444, 0 0 16px rgba(239, 68, 68, 0.5);
            animation: balance-delta-show 2s ease forwards;
        }
        @keyframes balance-delta-show {
            0% { 
                opacity: 0; 
                transform: translateY(-5px) scale(0.8); 
            }
            15% { 
                opacity: 1; 
                transform: translateY(0) scale(1.1); 
            }
            25% { 
                transform: translateY(0) scale(1); 
            }
            75% { 
                opacity: 1; 
            }
            100% { 
                opacity: 0; 
                transform: translateY(5px); 
            }
        }

        /* Стили профиля вынесены в css/profile.css */

        /* ========== SVG ФОНЫ ДЛЯ ЭКРАНОВ ========== */
        
        /* Сезонный пропуск - космическая тема */
        #season-screen {
            min-height: 100vh;
            background: 
                url('assets/bg-season.svg') center top / cover no-repeat fixed,
                linear-gradient(180deg, #0a0a1f 0%, #1a1035 50%, #0a0a1a 100%) !important;
        }
        
        /* Квесты - стили вынесены в css/quests.css */
        
        /* Лидерборд - стили вынесены в css/leaderboard.css */
        
        /* Магазин - стили вынесены в css/shop.css */

        /* Стили настроек пользователя, инвентаря и реферальной программы вынесены в css/profile.css */

        /* ========== СЕЗОННЫЙ ПРОПУСК - ПЛАТФОРМО-ЗАВИСИМЫЕ ПОЗИЦИИ (как у реферальной) ========== */
        /* По умолчанию */
        #season-screen {
            padding-top: calc(1rem + 25px) !important;
        }

        #back-to-arena-from-season-btn {
            top: 16px !important;
            left: 16px !important;
        }

        /* iOS: как у реферальной программы */
        html[data-platform="ios"] #season-screen {
            padding-top: calc(1rem + 80px) !important;
        }

        html[data-platform="ios"] #back-to-arena-from-season-btn {
            top: 24px !important;
            left: 16px !important;
        }

        /* Android: как у реферальной программы */
        html[data-platform="android"] #season-screen {
            padding-top: calc(1rem + 60px) !important;
        }

        html[data-platform="android"] #back-to-arena-from-season-btn {
            top: 20px !important;
            left: 16px !important;
        }

        /* Стили для кнопок */
        .btn-golden {
            background: linear-gradient(145deg, #ffd700, #f0c000);
            color: #1a1a1a;
            font-weight: bold;
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: 0.5rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
            transition: all 0.3s ease;
            cursor: pointer;
        }
        
        /* Кнопка SPIN с анимированной градиентной рамкой */
        #spin-btn {
            position: relative;
            background: linear-gradient(145deg, #ffd700, #f0c000);
            border-radius: 0.75rem;
        }
        #spin-btn::before {
            content: '';
            position: absolute;
            inset: -3px;
            border-radius: 0.875rem;
            background: linear-gradient(90deg, #ffd700, #ff8c00, #ff4500, #ff8c00, #ffd700);
            background-size: 300% 100%;
            animation: gradient-border-flow 3s linear infinite;
            z-index: -1;
            opacity: 0.8;
        }
        #spin-btn::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 0.75rem;
            background: linear-gradient(145deg, #ffd700, #f0c000);
            z-index: -1;
        }
        @keyframes gradient-border-flow {
            0% { background-position: 0% 50%; }
            100% { background-position: 300% 50%; }
        }
        #spin-btn:disabled::before {
            animation: none;
            background: #555;
            opacity: 0.3;
        }

        .btn-golden:hover, .btn-golden:focus {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
        }
        
        .btn-golden:disabled,
        .btn-danger:disabled {
            background: #555;
            color: #888;
            box-shadow: none;
            cursor: not-allowed;
            transform: none;
        }

        .btn-danger {
            background: linear-gradient(145deg, #ff4141, #e02020);
            color: #fff;
            font-weight: bold;
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: 0.5rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            box-shadow: 0 4px 15px rgba(255, 65, 65, 0.3);
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .btn-danger:hover, .btn-danger:focus {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 65, 65, 0.5);
        }

        /* Отменяем эффекты наведения для заблокированных кнопок */
        .btn-golden:disabled:hover,
        .btn-danger:disabled:hover {
            transform: none;
            box-shadow: none;
        }
        /* Стили для полей ввода */
        .input-field {
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid #ffd700;
            color: #fff;
            border-radius: 0.5rem;
            padding: 0.75rem;
            transition: all 0.3s ease;
            appearance: textfield; /* стандартное свойство */
            -moz-appearance: textfield; /* Firefox */
        }
        .input-field::-webkit-outer-spin-button,
        .input-field::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        .input-field:focus {
            outline: none;
            box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
        }
        
        /* Стили для логотипа */
        .logo-font {
            font-family: 'Bebas Neue', cursive;
            font-size: 3rem;
            color: #ffd700;
            text-shadow: 0 0 10px #ffd700, 0 0 20px #ffae00;
        }

        /* Стили слотов перенесены в css/slots.css */

        /* Модальное окно */
        .modal { 
            display: none; 
            position: fixed; 
            z-index: 1000; 
            left: 0; 
            top: 0; 
            width: 100%; 
            height: 100%; 
            /* Glassmorphism для оверлея */
            background-color: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            align-items: center; 
            justify-content: center; 
        }
        .modal-content { 
            background: rgba(26, 26, 26, 0.95); 
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            padding: 2rem; 
            border-radius: 1rem; 
            border: 2px solid #ffd700; 
            text-align: center; 
            box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), 0 8px 32px rgba(0, 0, 0, 0.4); 
            animation: fadeIn 0.3s ease; 
            max-width: 90%; 
            max-height: 80vh; 
            overflow-y: auto;
        }
        @keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
        
        /* Дополнительные анимации для улучшенного UI */
        @keyframes animate-pulse-subtle {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.95; transform: scale(1.02); }
        }
        .animate-pulse-subtle {
            animation: animate-pulse-subtle 3s ease-in-out infinite;
        }
        
        /* Эффект свечения активной кнопки */
        .btn-golden:not(:disabled) {
            animation: btn-ready-glow 2s ease-in-out infinite;
        }
        @keyframes btn-ready-glow {
            0%, 100% { box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3); }
            50% { box-shadow: 0 6px 25px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.3); }
        }
        
        /* Анимация монет */
        #coin-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; z-index: 999; }
        .coin { position: absolute; width: 20px; height: 20px; background-color: gold; border-radius: 50%; animation: fall linear; opacity: 0; }
        @keyframes fall { 0% { transform: translateY(-100px) rotate(0deg); opacity: 1; } 100% { transform: translateY(100vh) rotate(720deg); opacity: 0; } }
        /* Хинты для производительности эффектов */
        .coin, .jackpot-content, .jackpot-title, .reel, .reels-container {
            will-change: transform, opacity;
            backface-visibility: hidden;
            /* не задаём transform тут, чтобы не перетирать существующие translate() */
        }
        
        /* Джекпот стили перенесены в css/slots.css */
        
        /* Стили профиля перенесены в css/profile.css */
        
        /* Кнопки быстрых ставок */
        .quick-bet-btn, .line-btn {
            background: rgba(255, 215, 0, 0.2);
            border: 1px solid #ffd700;
            color: #ffd700;
            transition: all 0.3s ease;
        }
        .quick-bet-btn.active, .line-btn.active {
            background: #ffd700;
            color: #1a1a1a;
            font-weight: bold;
        }

        /* Общие стили для карточек выбора игры в лобби */
        .game-card {
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: flex-end; /* Прижимаем текст к низу */
            height: 180px; /* Фиксированная высота для карточек */
            padding: 1rem;
            border-radius: 0.5rem;
            overflow: hidden;
            background-size: cover;
            background-position: center;
            color: white;
            text-shadow: 0 1px 3px rgba(0,0,0,0.8);
            text-align: center;
            -webkit-tap-highlight-color: transparent;
        }
        .game-card:not(.disabled):hover {
            box-shadow: 0 0 0 2px #facc15; /* yellow-400 */
        }
        .game-card:not(.disabled):active {
            box-shadow: 0 0 0 3px #facc15;
            transform: scale(0.98);
        }
        /* Большая карточка (главная игра) */
        .game-card-large {
            height: 140px;
        }
        /* Маленькая карточка (сетка 2x3) */
        .game-card-small {
            height: 100px;
            padding: 0.75rem;
            background-size: calc(100% + 50px) auto;
            background-position: center;
        }
        .game-card-small h3 {
            font-size: 1rem;
            line-height: 1.2;
        }
        .game-card-small p {
            font-size: 0.7rem;
        }
        /* Затемняющий оверлей для читаемости текста */
        .game-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: -1px;
            background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 60%);
            border-radius: inherit;
            pointer-events: none;
        }
        .game-card > * {
            position: relative; /* Чтобы текст был над оверлеем */
        }
        #play-slots-btn.game-card {
            background-image: url('content/slots.png');
            background-image: image-set(
                url('content/slots.avif') type('image/avif'),
                url('content/slots.webp') type('image/webp'),
                url('content/slots.png') type('image/png')
            );
            background-position: center calc(50% + 9px);
        }
        #play-roulette-btn.game-card {
            background-image: url('content/roulete.png');
            background-image: image-set(
                url('content/roulete.avif') type('image/avif'),
                url('content/roulete.webp') type('image/webp'),
                url('content/roulete.png') type('image/png')
            );
        }
        #coming-soon-card.game-card {
            background-image: url('content/soon.png');
            background-image: image-set(
                url('content/soon.avif') type('image/avif'),
                url('content/soon.webp') type('image/webp'),
                url('content/soon.png') type('image/png')
            );
        }
        #play-hilo-btn.game-card {
            background-image: url('content/hight-low.png');
            background-image: image-set(
                url('content/hight-low.avif') type('image/avif'),
                url('content/hight-low.webp') type('image/webp'),
                url('content/hight-low.png') type('image/png')
            );
        }
        #play-scratch-cards-btn.game-card {
            background-image: url('content/scratch-cards.png');
            background-image: image-set(
                url('content/scratch-cards.avif') type('image/avif'),
                url('content/scratch-cards.webp') type('image/webp'),
                url('content/scratch-cards.png') type('image/png')
            );
        }
        #play-blackjack-btn.game-card {
            background-image: url('content/blackjack.png');
            background-image: image-set(
                url('content/blackjack.avif') type('image/avif'),
                url('content/blackjack.webp') type('image/webp'),
                url('content/blackjack.png') type('image/png')
            );
        }
        /* Plinko стили вынесены в css/plinko.css */
        #play-crash-btn.game-card {
            background-image: url('content/crash.png');
            background-image: image-set(
                url('content/crash.avif') type('image/avif'),
                url('content/crash.webp') type('image/webp'),
                url('content/crash.png') type('image/png')
            );
            background-size: 100%;
            background-position: center 34%;
            background-repeat: no-repeat;
            background-color: #1a1a2e;
        }
        #play-mines-btn.game-card {
            background-image: url('content/mines.png');
            background-image: image-set(
                url('content/mines.avif') type('image/avif'),
                url('content/mines.webp') type('image/webp'),
                url('content/mines.png') type('image/png')
            );
            background-size: 100%;
            background-position: center 34%;
            background-repeat: no-repeat;
            background-color: #1a1a2e;
        }
        #play-chip-climber-btn.game-card {
            background-image: url('content/chip_climper.png');
            background-image: image-set(
                url('content/chip_climper.avif') type('image/avif'),
                url('content/chip_climper.webp') type('image/webp'),
                url('content/chip_climper.png') type('image/png')
            );
            background-size: 100%;
            background-position: center 34%;
            background-repeat: no-repeat;
            background-color: #1a1a2e;
        }
        #play-tower-bet-btn.game-card {
            background-image: url('content/tower_bet.png');
            background-image: image-set(
                url('content/tower_bet.avif') type('image/avif'),
                url('content/tower_bet.webp') type('image/webp'),
                url('content/tower_bet.png') type('image/png')
            );
            background-size: 100%;
            background-position: center 34%;
            background-repeat: no-repeat;
            background-color: #1a1a2e;
        }
        #play-dice-duel-btn.game-card {
            background-image: url('content/dice_duel.png');
            background-image: image-set(
                url('content/dice_duel.avif') type('image/avif'),
                url('content/dice_duel.webp') type('image/webp'),
                url('content/dice_duel.png') type('image/png')
            );
            background-size: 100%;
            background-position: center 34%;
            background-repeat: no-repeat;
            background-color: #1a1a2e;
        }
        #play-flip-coin-btn.game-card {
            background-image: url('content/flip_coin_streak.png');
            background-image: image-set(
                url('content/flip_coin_streak.avif') type('image/avif'),
                url('content/flip_coin_streak.webp') type('image/webp'),
                url('content/flip_coin_streak.png') type('image/png')
            );
            background-size: 100%;
            background-position: center 34%;
            background-repeat: no-repeat;
            background-color: #1a1a2e;
        }
        #play-dragon-forge-btn.game-card {
            background-image: url('content/dragon_token_forge.png');
            background-image: image-set(
                url('content/dragon_token_forge.avif') type('image/avif'),
                url('content/dragon_token_forge.webp') type('image/webp'),
                url('content/dragon_token_forge.png') type('image/png')
            );
            background-size: 100%;
            background-position: center 34%;
            background-repeat: no-repeat;
            background-color: #1a1a2e;
        }
        /* Бейдж NEW для игровых карточек */
        .game-new-badge {
            position: absolute;
            top: 8px;
            right: 8px;
            padding: 3px 8px;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.5px;
            color: #fff;
            background: linear-gradient(135deg, #22c55e, #16a34a);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 9999px;
            text-shadow: 0 1px 0 rgba(0,0,0,0.4);
            box-shadow: 0 0 0 2px rgba(0,0,0,0.3), 0 4px 10px rgba(34, 197, 94, 0.35);
            pointer-events: none;
            z-index: 10;
            will-change: transform, box-shadow;
        }
        /* Бейдж TEST для тестовых игр (фиолетовый) */
        .game-test-badge {
            position: absolute;
            top: 8px;
            right: 8px;
            padding: 3px 8px;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.5px;
            color: #fff;
            background: linear-gradient(135deg, #8b5cf6, #7c3aed);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 9999px;
            text-shadow: 0 1px 0 rgba(0,0,0,0.4);
            box-shadow: 0 0 0 2px rgba(0,0,0,0.3), 0 4px 10px rgba(139, 92, 246, 0.35);
            pointer-events: none;
            z-index: 10;
        }
        /* Бейдж SOON для игровых карточек (оранжевый) */
        .game-soon-badge {
            position: absolute;
            top: 8px;
            right: 8px;
            padding: 3px 8px;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.5px;
            color: #fff;
            background: linear-gradient(135deg, #f97316, #ea580c);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 9999px;
            text-shadow: 0 1px 0 rgba(0,0,0,0.4);
            box-shadow: 0 0 0 2px rgba(0,0,0,0.3), 0 4px 10px rgba(249, 115, 22, 0.35);
            pointer-events: none;
            z-index: 10;
            will-change: transform, box-shadow;
            animation: game-badge-pulse 1.8s ease-in-out infinite;
        }
        @keyframes game-badge-pulse {
            0% {
                transform: scale(1) rotate(0deg);
                box-shadow: 0 0 0 2px rgba(0,0,0,0.3), 0 4px 10px rgba(249, 115, 22, 0.35);
            }
            50% {
                transform: scale(1.1) rotate(-1deg);
                box-shadow: 0 0 0 2px rgba(0,0,0,0.3), 0 8px 20px rgba(249, 115, 22, 0.55);
            }
            100% {
                transform: scale(1) rotate(0deg);
                box-shadow: 0 0 0 2px rgba(0,0,0,0.3), 0 4px 10px rgba(249, 115, 22, 0.35);
            }
        }
        /* Android: упрощённая анимация для SOON бейджа */
        html[data-platform="android"] .game-soon-badge {
            animation: game-badge-pulse-simple 2.5s ease-in-out infinite;
        }
        @keyframes game-badge-pulse-simple {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.05); opacity: 0.9; }
        }
        /* Бейдж HOT (🔥) для популярных игр */
        .game-hot-badge {
            position: absolute;
            top: 8px;
            left: 8px;
            padding: 2px 6px;
            font-size: 14px;
            background: linear-gradient(135deg, #ef4444, #dc2626);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 6px;
            box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
            pointer-events: none;
            z-index: 10;
            animation: hot-glow 1.5s ease-in-out infinite;
            /* GPU optimization */
            transform: translateZ(0);
        }
        @keyframes hot-glow {
            0%, 100% { box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5); }
            50% { box-shadow: 0 2px 16px rgba(239, 68, 68, 0.8), 0 0 20px rgba(239, 68, 68, 0.4); }
        }
        /* Android: упрощённая анимация для бейджа HOT */
        html[data-platform="android"] .game-hot-badge {
            animation: hot-glow-simple 2s ease-in-out infinite;
        }
        @keyframes hot-glow-simple {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.8; }
        }
        /* Staggered fade-in анимация для карточек */
        .game-card {
            opacity: 0;
            transform: translateY(30px);
            animation: card-fade-in 0.6s ease-out forwards;
            /* GPU acceleration hint */
            will-change: opacity, transform;
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
        }
        .game-card-large { animation-delay: 0.1s; }
        .game-card-small:nth-child(1) { animation-delay: 0.15s; }
        .game-card-small:nth-child(2) { animation-delay: 0.2s; }
        .game-card-small:nth-child(3) { animation-delay: 0.25s; }
        .game-card-small:nth-child(4) { animation-delay: 0.3s; }
        .game-card-small:nth-child(5) { animation-delay: 0.35s; }
        .game-card-small:nth-child(6) { animation-delay: 0.4s; }
        .game-card-small:nth-child(7) { animation-delay: 0.45s; }
        .game-card-small:nth-child(8) { animation-delay: 0.5s; }
        .game-card-small:nth-child(9) { animation-delay: 0.55s; }
        .game-card-small:nth-child(10) { animation-delay: 0.6s; }
        .game-card-small:nth-child(11) { animation-delay: 0.65s; }
        .game-card-small:nth-child(12) { animation-delay: 0.7s; }
        .game-card-small:nth-child(13) { animation-delay: 0.75s; }
        .game-card-small:nth-child(14) { animation-delay: 0.8s; }
        @keyframes card-fade-in {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        /* Android: ускоренная анимация карточек и сброс will-change после анимации */
        html[data-platform="android"] .game-card {
            animation-duration: 0.35s;
        }
        html[data-platform="android"] .game-card-small:nth-child(1) { animation-delay: 0.08s; }
        html[data-platform="android"] .game-card-small:nth-child(2) { animation-delay: 0.1s; }
        html[data-platform="android"] .game-card-small:nth-child(3) { animation-delay: 0.12s; }
        html[data-platform="android"] .game-card-small:nth-child(4) { animation-delay: 0.14s; }
        html[data-platform="android"] .game-card-small:nth-child(5) { animation-delay: 0.16s; }
        html[data-platform="android"] .game-card-small:nth-child(6) { animation-delay: 0.18s; }
        html[data-platform="android"] .game-card-small:nth-child(7) { animation-delay: 0.2s; }
        html[data-platform="android"] .game-card-small:nth-child(8) { animation-delay: 0.22s; }
        html[data-platform="android"] .game-card-small:nth-child(9) { animation-delay: 0.24s; }
        html[data-platform="android"] .game-card-small:nth-child(10) { animation-delay: 0.26s; }
        html[data-platform="android"] .game-card-small:nth-child(11) { animation-delay: 0.28s; }
        html[data-platform="android"] .game-card-small:nth-child(12) { animation-delay: 0.3s; }
        html[data-platform="android"] .game-card-small:nth-child(13) { animation-delay: 0.32s; }
        html[data-platform="android"] .game-card-small:nth-child(14) { animation-delay: 0.34s; }
        /* Skeleton loading для карточек */
        .game-card.skeleton {
            opacity: 1 !important;
            transform: translateY(0) !important;
            background: linear-gradient(90deg, #2a2a3a 25%, #3a3a4a 50%, #2a2a3a 75%) !important;
            background-size: 200% 100% !important;
            animation: skeleton-shimmer 1.5s infinite !important;
        }
        .game-card.skeleton::before {
            display: none !important;
        }
        .game-card.skeleton > * {
            visibility: hidden !important;
        }
        @keyframes skeleton-shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
        /* Стили для заблокированных игровых карточек */
        .game-card.disabled {
            pointer-events: none; /* Отключаем все события мыши */
        }
        .game-card.disabled > *:not(.game-soon-badge):not(.game-new-badge) {
            opacity: 0.7;
            filter: grayscale(100%);
        }
        .game-card.disabled::after {
            content: '🔒'; /* Иконка замка */
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 3rem;
            color: #fff;
            text-shadow: 0 0 10px rgba(0,0,0,0.8);
            z-index: 2; /* Поверх оверлея */
        }
        .game-card-small.disabled::after {
            font-size: 2rem; /* Меньший замок для маленьких карточек */
        }
        .game-card.disabled::before {
            background: rgba(0,0,0,0.7); /* Более темный оверлей */
            filter: grayscale(100%);
        }
        /* Бейджи остаются цветными на заблокированных карточках */
        .game-card.disabled .game-soon-badge,
        .game-card.disabled .game-new-badge {
            filter: none !important;
            opacity: 1 !important;
        }

        /* Стили рулетки перенесены в css/roulette.css */

        /* Стили для лайв-ленты */
        .feed-item {
            position: absolute;
            width: 100%;
            text-align: center;
            font-size: 0.75rem; /* 12px */
            color: #a0aec0; /* gray-500 */
            transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
            white-space: nowrap; /* Prevent text from wrapping */
            transform: translateY(100%); /* Начинает за пределами видимости снизу */
            opacity: 0;
            /* GPU acceleration для плавности */
            will-change: transform, opacity;
            backface-visibility: hidden;
        }
        /* Android: ускоренная анимация ленты */
        html[data-platform="android"] .feed-item {
            transition: transform 0.3s ease-out, opacity 0.3s ease-out;
        }
        .feed-item .username { color: #fff; font-weight: 600; }
        .feed-item .amount { color: #f6e05e; /* yellow-400 */ font-weight: 600; }

        .feed-item.visible {
            transform: translateY(0); /* Появляется в контейнере */
            opacity: 1;
        }

        /* Стили нижней навигации вынесены в css/bottom-nav.css */

        /* Стили лидерборда вынесены в css/leaderboard.css */

        /* Стили для индикатора онлайна */
        .online-indicator {
            width: 10px;
            height: 10px;
            background-color: #48bb78; /* green-500 */
            border-radius: 50%;
            animation: pulse-green 2s infinite;
        }

        @keyframes pulse-green {
            0% {
                transform: scale(0.95);
                box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.7);
            }
            100% {
                transform: scale(1);
                box-shadow: 0 0 0 10px rgba(72, 187, 120, 0);
            }
        }

        /* Анимация для предпросмотра косметики в магазине */
        @keyframes pulse-slow {
            0%, 100% {
                opacity: 1;
                transform: scale(1);
            }
            50% {
                opacity: 0.8;
                transform: scale(1.05);
            }
        }

        .animate-pulse-slow {
            animation: pulse-slow 3s ease-in-out infinite;
        }

        /* Стили cosmetic-preview вынесены в css/shop.css */

        /* Стили hilo перенесены в css/hilo.css */

        /* Затемнение фона изображения стола Блэкджека через overlay */
        .blackjack-table { position: relative; overflow: hidden; }
        .blackjack-table::before {
            content: '';
            position: absolute;
            inset: 0;
            background: rgba(0,0,0,0.55); /* затемняем фон для читаемости текста */
            pointer-events: none;
        }

        /* Стили scratch перенесены в css/scratch.css */

        /* Стили для вкладок заданий/достижений */
        .tabs {
            display: flex;
            gap: 4px;
        }

        .tab-btn, .admin-tab-btn {
            background: transparent;
            color: #888;
            font-weight: 600;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
        }

        .tab-btn.active, .admin-tab-btn.active {
            background: linear-gradient(145deg, #ffd700, #f0c000);
            color: #1a1a1a;
        }

        .tab-content, .admin-tab-content {
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        /* Стили редкости, shop-tabs и cosmetic-item вынесены в css/shop.css */

        /* Стили для Блэкджека */
        .blackjack-card {
            width: 90px;
            height: 128px;
            transition: all 0.3s ease;
        }

        .blackjack-card img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .blackjack-table {
            background-size: cover;
            /* управляем вертикальным положением PNG-фона стола */
            background-position: center calc(var(--blackjack-bg-offset-y, 0px)) !important;
            /* дополнительный трекер Y-позиции для совместимости */
            background-position-y: calc(var(--blackjack-bg-offset-y, 0px)) !important;
        }

        .dealer-area, .player-area {
            position: relative;
        }

        @media (max-width: 640px) {
            .blackjack-card {
                width: 75px;
                height: 107px;
            }
            
            /* Улучшение читаемости на малых экранах */
            .blackjack-controls {
                padding: 0.5rem;
            }
            
            .blackjack-controls button {
                padding: 0.5rem 1rem;
                font-size: 0.875rem;
            }
        }

        /* Дополнительные проверки для очень малых экранов */
        @media (max-width: 375px) {
            .blackjack-card {
                width: 65px;
                height: 93px;
            }
            
            #blackjack-result-message {
                font-size: 1.5rem !important;
            }
        }

        /* Toggle Switch стили для настроек */
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 24px;
        }

        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #4a4a4a;
            transition: 0.3s;
            border-radius: 24px;
            border: 2px solid #666;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 2px;
            bottom: 2px;
            background-color: white;
            transition: 0.3s;
            border-radius: 50%;
        }

        input:checked + .toggle-slider {
            background: linear-gradient(145deg, #ffd700, #f0c000);
            border-color: #ffd700;
        }

        input:checked + .toggle-slider:before {
            transform: translateX(26px);
            background-color: #1a1a1a;
        }

        .toggle-slider:hover {
            opacity: 0.9;
        }

        /* Классы для управления анимациями через настройки */
        .no-transitions * {
            transition: none !important;
        }

        .reduce-animations * {
            animation-duration: 0.1s !important;
            transition-duration: 0.1s !important;
        }

        /* Режим экономии эффектов (в настройках можно включить класс .lite-mode на body) */
        .lite-mode *, .lite-mode .game-card, .lite-mode .wheel-container, .lite-mode .modal-content {
            box-shadow: none !important;
            filter: none !important;
            text-shadow: none !important;
        }
        .lite-mode .jackpot-title, .lite-mode .wheel-sector.glow .sector-content::after, .lite-mode .btn-golden {
            animation: none !important;
        }
        /* Лобби: отключаем анимации карточек и бейджей в lite-mode */
        .lite-mode .game-card {
            animation: none !important;
            opacity: 1 !important;
            transform: none !important;
            will-change: auto !important;
        }
        .lite-mode .game-hot-badge,
        .lite-mode .game-soon-badge,
        .lite-mode .game-new-badge {
            animation: none !important;
        }
        .lite-mode .online-indicator {
            animation: none !important;
        }
        .lite-mode .feed-item {
            transition: none !important;
        }
        /* lite-mode: упрощённый фон арены */
        .lite-mode #arena-screen {
            background: linear-gradient(135deg, #0f0a1a 0%, #1a1025 50%, #0a0812 100%) !important;
            background-attachment: scroll !important;
        }
        /* В lite-mode оставляем фоновые изображения, но убираем дорогие оверлеи */
        .lite-mode #scratch-screen::after,
        .lite-mode .scratch-foil-overlay,
        .lite-mode .blackjack-table::before {
            display: none !important; /* убираем полупрозрачные/блюр-оверлеи */
        }
        /* В lite-mode отключаем лишь параллакс и вторичные эффекты, не убирая основной фон */
        .lite-mode .reel-parallax-back { display: none !important; }
        .lite-mode .coin { animation: none !important; }
        .lite-mode .wheel-container { animation: none !important; }

        /* Уважение системной настройки снижения движения */
        @media (prefers-reduced-motion: reduce) {
            * {
                animation: none !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
        }

        /* Стили для range-слайдеров (громкость) с поддержкой iOS */
        input[type="range"] {
            -webkit-appearance: none;
            appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: linear-gradient(to right, #ffd700 0%, #ffd700 60%, #4a4a4a 60%, #4a4a4a 100%);
            outline: none;
            cursor: pointer;
            /* iOS specific */
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            pointer-events: auto;
            user-select: none;
            -webkit-user-select: none;
        }

        /* Thumb стили для Webkit (Chrome, Safari, iOS) */
        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: linear-gradient(145deg, #ffd700, #f0c000);
            cursor: pointer;
            border: 2px solid #1a1a1a;
            box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
            /* iOS specific */
            -webkit-tap-highlight-color: transparent;
        }

        /* Thumb стили для Firefox */
        input[type="range"]::-moz-range-thumb {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: linear-gradient(145deg, #ffd700, #f0c000);
            cursor: pointer;
            border: 2px solid #1a1a1a;
            box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
        }

        /* Track стили для Webkit */
        input[type="range"]::-webkit-slider-runnable-track {
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: transparent;
        }

        /* Track стили для Firefox */
        input[type="range"]::-moz-range-track {
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: #4a4a4a;
        }

        /* Активное состояние для iOS */
        input[type="range"]:active::-webkit-slider-thumb {
            transform: scale(1.2);
            box-shadow: 0 4px 12px rgba(255, 215, 0, 0.7);
        }

/* ===================================
   ОБЩИЕ КНОПКИ (btn-success, btn-primary, btn-secondary)
   =================================== */

.btn-success {
    background: linear-gradient(145deg, #10b981, #059669);
    color: white;
    font-weight: bold;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(145deg, #059669, #047857);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    color: white;
    font-weight: bold;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(145deg, #2563eb, #1d4ed8);
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.btn-primary.copied {
    background: linear-gradient(145deg, #10b981, #059669);
}

.btn-secondary {
    background: rgba(75, 85, 99, 0.8);
    color: white;
    font-weight: bold;
    padding: 12px 24px;
    border: 1px solid #4b5563;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(107, 114, 128, 0.9);
    transform: translateY(-2px);
}

.btn-back {
    background: rgba(30, 30, 30, 0.8);
    color: #ffd700;
    border: 1px solid #ffd700;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(50, 50, 50, 0.9);
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

/* Стили реферальной системы вынесены в css/profile.css */

/* Анимация для shimmer эффекта */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.animate-shimmer {
    animation: shimmer 3s infinite;
}

/* Анимация для бирки первой покупки */
@keyframes pulse-slow {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 2s ease-in-out infinite;
}

.first-purchase-badge {
    transition: transform 0.3s ease;
}

.first-purchase-badge:hover {
    transform: scale(1.1);
}

/* Стили для модального окна призов рулетки */
#roulette-info-modal .prize-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#roulette-info-modal .prize-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* VIP: бейдж SOON на вкладке, как у бандлов (красный, пульсация) */
.vip-soon-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    text-shadow: 0 1px 0 rgba(0,0,0,0.5);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.35), 0 6px 14px rgba(239, 68, 68, 0.25);
    pointer-events: none;
    will-change: transform, box-shadow;
    animation: vip-badge-pulse 1.8s ease-in-out infinite;
}

@keyframes vip-badge-pulse {
    0% {
        transform: scale(1) rotate(0deg);
        box-shadow: 0 0 0 2px rgba(0,0,0,0.35), 0 6px 14px rgba(239,68,68,0.25);
    }
    50% {
        transform: scale(1.1) rotate(-1deg);
        box-shadow: 0 0 0 2px rgba(0,0,0,0.35), 0 10px 24px rgba(239,68,68,0.45);
    }
    100% {
        transform: scale(1) rotate(0deg);
        box-shadow: 0 0 0 2px rgba(0,0,0,0.35), 0 6px 14px rgba(239,68,68,0.25);
    }
}

/* VIP карточки (минимальный акцент) */
.vip-card {
    /* backdrop-filter убран для производительности на Android */
    will-change: transform;
}

/* VIP tier enhanced visuals */
.vip-card.bronze {
    background: linear-gradient(135deg,#3a2a1a,#5c3b1d 40%,#7a5023 80%) !important;
    border: 2px solid #c2925a !important;
    box-shadow: 0 0 8px rgba(194,146,90,0.35);
}
.vip-card.silver {
    background: linear-gradient(135deg,#2d2f36,#444a55 45%,#5e6672 85%) !important;
    border: 2px solid #bfc7d4 !important;
    box-shadow: 0 0 10px rgba(191,199,212,0.3);
    position: relative;
}
.vip-card.silver::after {
    content:"";
    position:absolute; inset:0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.15), rgba(255,255,255,0));
    pointer-events:none;
}
.vip-card.gold {
    background: linear-gradient(135deg,#3b2e00,#7a5400 40%,#c9a400 70%,#ffdc5e) !important;
    border: 2px solid #ffd84d !important;
    box-shadow: 0 0 12px rgba(255,215,0,0.45);
    position: relative; overflow:hidden;
}
/* goldShine анимация только для iOS (тяжёлая для Android) */
html:not([data-platform="android"]) .vip-card.gold::after {
    content:""; position:absolute; inset:0;
    background: linear-gradient(120deg, rgba(255,255,255,0) 35%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0) 65%);
    animation: goldShine 5s linear infinite; pointer-events:none;
    will-change: transform;
}
@keyframes goldShine { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.vip-card.gold h3 { text-shadow: 0 0 8px rgba(255,215,0,0.6); }
.vip-ribbon {
    position:absolute; top:0; right:0;
    background: linear-gradient(180deg,#ffed9a,#e8b000);
    color:#3b2e00; font-size:10px; font-weight:700; padding:4px 8px;
    border-bottom-left-radius:6px; letter-spacing:0.5px;
    box-shadow:0 2px 6px rgba(0,0,0,0.4);
}
/* goldPulse только для iOS */
@keyframes goldPulse { 0% { box-shadow: 0 0 10px rgba(255,215,0,0.35); } 50% { box-shadow: 0 0 18px rgba(255,215,0,0.75); } 100% { box-shadow: 0 0 10px rgba(255,215,0,0.35); } }
html:not([data-platform="android"]) .vip-card.gold { animation: goldPulse 6s ease-in-out infinite; }

/* Price badge */
.vip-price {
    background:linear-gradient(135deg,rgba(0,0,0,0.55),rgba(0,0,0,0.25));
    border:1px solid rgba(255,255,255,0.15);
    padding:3px 9px; border-radius:12px;
    font-size:11px; font-weight:600; letter-spacing:0.5px;
    color:#e2e8f0;
    /* backdrop-filter убран для производительности */
    box-shadow:0 1px 4px rgba(0,0,0,0.4);
    display:inline-block; white-space:nowrap;
}
.vip-card.bronze .vip-price { border-color: rgba(194,146,90,0.5); color:#f5d2a1; }
.vip-card.silver .vip-price { border-color: rgba(191,199,212,0.5); color:#dbe5f0; }
.vip-card.gold .vip-price { border-color: rgba(255,215,0,0.6); color:#ffe89a; }

/* ==========================================
   RECONNECT OVERLAY
   ========================================== */
#reconnect-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#reconnect-overlay.visible {
    opacity: 1;
    visibility: visible;
}
.reconnect-content {
    text-align: center;
    padding: 30px;
}
.reconnect-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top-color: #ffd700;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: reconnectSpin 1s linear infinite;
}
@keyframes reconnectSpin {
    to { transform: rotate(360deg); }
}
.reconnect-content h2 {
    font-size: 22px;
    color: #ffd700;
    margin-bottom: 10px;
    font-weight: 600;
}
.reconnect-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}
.reconnect-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
}
.reconnect-dots span {
    font-size: 24px;
    color: #ffd700;
    animation: reconnectDot 1.4s infinite;
}
.reconnect-dots span:nth-child(2) { animation-delay: 0.2s; }
.reconnect-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes reconnectDot {
    0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-5px); }
}

/* ==========================================
   ARENA стили перенесены в css/arena.css
   ========================================== */

/* Marketplace buttons and icons */
#marketplace-panel .market-btn {
    position: relative;
    background: linear-gradient(135deg, #111827, #0b1220);
    border: 1px solid #1f2937;
    color: #e5e7eb;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    padding: 10px 14px;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease, border-color 0.2s ease;
}

#marketplace-panel .market-btn--accent {
    background: linear-gradient(135deg, #1d4ed8, #9333ea);
    border-color: #3b82f6;
    color: #f8fafc;
    box-shadow: 0 10px 22px rgba(59, 130, 246, 0.25), 0 0 0 1px rgba(147, 51, 234, 0.25);
}

#marketplace-panel .market-btn--ghost {
    background: linear-gradient(135deg, #0f172a, #0b1220);
    border-color: #1f2937;
    color: #e5e7eb;
}

#marketplace-panel .market-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
}

#marketplace-panel .market-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

#marketplace-panel .market-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}