:root {
    --bg-black: #050505;
    --accent: #8b5cf6;
    --text: #ffffff;
    --text-dim: #9ca3af;
    --role-color: #fbbf24; /* Фолбэк цвет, если бэкенд ничего не передаст */
}

body.dashboard-page {
    background-color: #000000 !important;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    /* ФИКС: Сначала стандарт, затем динамическая высота, затем фикс для iOS */
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    overflow: hidden !important; 
    margin: 0;
}

/* Восстанавливаем оригинальную сетку-картинку из style.css */
.perspective-grid {
    position: fixed !important; 
    left: 0 !important; 
    bottom: 0 !important;
    width: 100vw !important; 
    height: 65vh !important;
    background-image: url('/static/img/grid-texture.png') !important;
    background-size: 100% 100% !important; 
    background-position: bottom center !important;
    background-repeat: no-repeat !important;
    transform: none !important;
    z-index: -1 !important; 
    pointer-events: none !important; 
    opacity: 0.5 !important;
}

/* Убавляем интенсивность цветных пятен, чтобы они не перебивали темный фон */
.blob { 
    opacity: 0.55 !important; 
    filter: blur(120px) !important; 
    /* Привязываем к экрану, чтобы они не растягивали страницу вниз */
    position: fixed !important; 
    pointer-events: none;
    z-index: -2 !important;
}

/* Переносим размеры и позиции из style.css */
.blob-1 { 
    top: -15vh !important; 
    left: -10vw !important; 
    width: 60vw !important; 
    height: 60vw !important; 
}

.blob-2 { 
    bottom: -10vh !important; 
    right: -10vw !important; 
    width: 60vw !important; 
    height: 60vw !important; 
}

.blob-3 {
    position: absolute;
    width: 55vw; height: 55vw;
    background: #9333ea; 
    top: 35vh; left: 20vw;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.45;
    animation: moveBlob 22s infinite alternate ease-in-out;
}

body.dashboard-page input, 
body.dashboard-page textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.dash-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 30px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 10, 10, 0.7); 
    backdrop-filter: blur(20px);
    height: 70px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.dash-left, .dash-right { display: flex; align-items: center; gap: 15px; }

.dash-user-info { 
    display: flex; align-items: center; gap: 10px; 
    background: rgba(255,255,255,0.03); padding: 5px 15px 5px 5px; 
    border-radius: 50px; border: 1px solid rgba(255,255,255,0.05); 
}
.dash-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.dash-nick { font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; font-weight: 600; }
/* Базовый стиль бейджа роли */
.dash-role { 
    font-size: 0.75rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    padding: 4px 10px; 
    border-radius: 8px; 
    display: inline-flex; 
    align-items: center; 
    gap: 6px;
    color: var(--role-color);
    /* Генерируем прозрачный бордер на основе переданного цвета */
    border: 1px solid color-mix(in srgb, var(--role-color) 40%, transparent);
}

.dash-role i { color: var(--role-color); }

/* 1. Возвращаем фиолетово-красный градиент для платных тарифов */
.dash-role:not([data-role="Free"]),
.current-plan-title:not([data-role="Free"]) {
    background: linear-gradient(135deg, #a855f7 0%, #ef4444 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

/* 2. Делаем корону градиентной вместе с текстом (убираем желтый фолбэк) */
.dash-role:not([data-role="Free"]) i.fa-crown,
.current-plan-title:not([data-role="Free"]) i.fa-crown {
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

/* ЖЕСТКИЙ ФИКС ДЛЯ FREE: Убиваем цветную обводку и красим в серый */
.dash-role[data-role="Free"] {
    color: #9ca3af !important;
    background: rgba(255, 255, 255, 0.1) !important;
    -webkit-text-fill-color: #9ca3af; /* Отменяет прозрачность текста */
    border: 1px solid transparent !important;
}

.dash-logout {
    color: rgba(255,255,255,0.6); display: flex; align-items: center; cursor: pointer; 
    transition: all 0.2s ease; text-decoration: none; margin-left: 10px;
}
.dash-logout:hover { color: #ef4444; transform: translateX(3px); }

/* РАСТЯГИВАЕМ МАКЕТ */
.dash-layout {
    display: flex; 
    gap: 20px; 
    padding: 20px; 
    width: 100%; 
    /* ФИКС: Динамическая высота минус шапка */
    height: calc(100vh - 70px);
    height: calc(100dvh - 70px);
    box-sizing: border-box;
    min-height: 0;
}

.dash-sidebar {
    width: 280px; 
    min-width: 280px;
    background: rgba(15, 15, 15, 0.6); 
    border: 1px solid rgba(255, 255, 255, 0.08); 
    border-radius: 24px; 
    padding: 20px;
    backdrop-filter: blur(10px);
    display: flex; flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header { margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
.sidebar-title {
    font-size: 0.85rem; font-weight: 800; text-transform: uppercase;
    color: rgba(255,255,255,0.6); letter-spacing: 1px; display: flex; align-items: center;
}

.dash-tabs { display: flex; flex-direction: column; gap: 8px; }
.tab-btn {
    background: transparent; border: none; color: #9ca3af;
    text-align: left; padding: 14px 15px; border-radius: 12px;
    font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s ease;
    display: flex; align-items: center; gap: 12px;
}
.tab-btn i { font-size: 1.1rem; width: 20px; text-align: center; }
.tab-btn:hover { background: rgba(255,255,255,0.05); color: #fff; }
.tab-btn.active {
    background: rgba(139, 92, 246, 0.15); color: #fff;
    border: 1px solid rgba(139, 92, 246, 0.3);
}
.tab-btn.active i { color: #b366ff; }
.tab-divider { height: 1px; background: rgba(255,255,255,0.05); margin: 10px 0; }

.dash-main {
    flex: 1; 
    background: rgba(15, 15, 15, 0.6); 
    border: 1px solid rgba(255, 255, 255, 0.08); 
    border-radius: 24px; 
    padding: 30px 30px 20px 30px; 
    backdrop-filter: blur(10px);
    display: flex; 
    flex-direction: column;
    overflow: hidden !important; /* ЗАПРЕЩАЕМ скролл всей панели */
}
.main-content-wrapper { 
    flex: 1; min-height: 0;
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}
.main-content-wrapper h2 { font-family: 'Inter', sans-serif; font-size: 2rem; font-weight: 700; margin: 0; }

.dash-content-area {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* Обязательно для правильной работы flex внутри overflow */
    padding-right: 15px;
    margin-bottom: 20px;
}

/* 4. Заставляем активную вкладку занимать всё свободное место */
.tab-content {
    /* Убираем жесткие height: 100% и разрешаем растягиваться */
    min-height: 100%;
    flex: 1 0 auto;
    display: none;
}
.tab-content.active {
    display: flex;
    flex-direction: column;
    animation: fadeSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 5. Растягиваем макет подписок, чтобы он упирался в футер */
.subscription-layout {
    /* Меняем flex: 1 на flex: 1 0 auto, чтобы блок не сжимался меньше своего контента */
    flex: 1 0 auto;
    display: flex;
    gap: 30px;
    align-items: stretch;
    width: 100%;
    min-height: 0;
}

/* Правая колонка тоже должна тянуться до конца */
.sub-right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* Твои текущие фоны и бордеры остаются здесь */
    background: rgba(20, 20, 25, 0.4);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.05);
}

.dash-content-area::-webkit-scrollbar { width: 6px; }
.dash-content-area::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); border-radius: 10px; }
.dash-content-area::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.3); border-radius: 10px; }
.dash-content-area::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.6); }

/* 4. Прибиваем футер к низу */
.dash-footer {
    flex-shrink: 0; /* Запрещаем футеру сжиматься или исчезать */
    padding-top: 20px; 
    border-top: 1px solid rgba(255,255,255,0.05); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-top: 0 !important; /* Убираем margin-top: auto */
}

/* =======================================
   АНИМАЦИИ КНОПОК ВКЛАДОК (СЛЕВА НАПРАВО)
======================================== */
.dash-tabs { display: flex; flex-direction: column; gap: 8px; position: relative; }

.tab-btn {
    background: transparent; border: none; color: #9ca3af;
    text-align: left; padding: 14px 15px; border-radius: 12px;
    font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 600;
    cursor: pointer; transition: color 0.3s ease;
    display: flex; align-items: center; gap: 12px;
    position: relative; /* Для ::before и ::after */
    overflow: hidden;
    z-index: 1;
}

/* Первое выделение (Базовый фон) */
.tab-btn::before {
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 0%;
    background: rgba(139, 92, 246, 0.15); /* Фиолетовый фон */
    border-left: 4px solid #8b5cf6;
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: -1;
    border-radius: 12px;
}

/* Второе выделение (Градиентное свечение) */
.tab-btn::after {
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.5) 0%, transparent 100%);
    transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: -2;
    opacity: 0;
}

.tab-btn:hover { color: #fff; }

.tab-btn.active { color: #fff; border: 1px solid rgba(139, 92, 246, 0.3); }
.tab-btn.active i { color: #b366ff; }

/* При активации разворачиваем фоны на 100% */
.tab-btn.active::before { width: 100%; box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.1); }
.tab-btn.active::after { width: 100%; opacity: 1; }


/* =======================================
   АНИМАЦИЯ ПОЯВЛЕНИЯ САМОГО КОНТЕНТА
======================================== */

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}


/* =======================================
   РАСШИРЕННЫЙ МАКЕТ SUBSCRIPTION (MAX WIDTH)
======================================== */

.sub-left-column {
    display: flex;
    flex-direction: column;
    flex: 0 0 420px;
    max-width: 100%;
    background: rgba(20, 20, 25, 0.6);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-height: 0; /* Обязательно, чтобы работал внутренний скролл */
}

.sub-right-column {
    flex: 1; /* РАСТЯГИВАЕМ ПРАВУЮ ЧАСТЬ НА ВСЁ ОСТАВШЕЕСЯ МЕСТО */
    background: rgba(20, 20, 25, 0.4);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.05);
    display: flex;
    flex-direction: column;
}

.pricing-title {
    color: #fff; margin: 0 0 25px 0; font-size: 1.3rem; font-family: 'Inter', sans-serif;
    display: flex; align-items: center; gap: 8px;
}
.pricing-title i { color: #f59e0b; font-size: 1.5rem; }

/* 1. КОНТЕЙНЕР ТАРИФОВ: сюда мы поместим общие шары */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 20px;
    flex: 1;
    position: relative; /* Обязательно для привязки шаров */
    z-index: 1;
}

/* 2. ГЛОБАЛЬНЫЕ ШАРЫ (ИСПРАВЛЕННЫЕ - Эффект Aurora) */
.pricing-cards::before,
.pricing-cards::after {
    content: "";
    position: absolute;
    border-radius: 50%; /* Делаем шары круглыми, чтобы убить любые углы */
    filter: blur(80px); /* Сильное размытие краев для мягкого свечения */
    z-index: -1; 
    pointer-events: none;
}

/* Первый шар (Светло-фиолетовый) */
.pricing-cards::before {
    width: 350px;
    height: 350px;
    background: rgba(139, 92, 246, 0.35);
    top: 0; left: 0;
    /* Используем alternate, чтобы шар плавно летал туда-сюда */
    animation: floatAuroraOne 15s ease-in-out infinite alternate;
}

/* Второй шар (Темно-пурпурный) */
.pricing-cards::after {
    width: 300px;
    height: 300px;
    background: rgba(67, 20, 103, 0.45);
    bottom: 0; right: 0;
    animation: floatAuroraTwo 18s ease-in-out infinite alternate;
}

.pricing-card {
    background: rgba(0, 0, 0, 0.5) !important; /* Возвращаем оригинальный фон */
    border: 1px solid rgba(255, 255, 255, 0.08) !important; /* Мягкая базовая обводка */
    border-radius: 12px !important;
    padding: 25px 20px;
    position: relative;
    /* Та самая оригинальная плавная анимация в 0.3s */
    transition: transform 0.3s ease, border-color 0.3s ease !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: visible !important; 
    z-index: 2 !important; /* Вытаскиваем поверх всего, чтобы transform работал 100% */
}

/* Мягкое наведение без ядерных свечений */
.pricing-card:hover { 
    transform: translateY(-5px) !important; /* Принудительно поднимаем вверх */
    border-color: rgba(139, 92, 246, 0.5) !important; /* Оригинальный спокойный фиолетовый */
    box-shadow: none !important; /* Выпиливаем грязные тени */
}

/* Состояние Best Value в покое */
.pricing-card.best-value {
    border-color: rgba(139, 92, 246, 0.5) !important;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.1) 0%, rgba(0, 0, 0, 0.6) 100%) !important;
    box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.05) !important;
}

/* Наведение на Best Value */
.pricing-card.best-value:hover {
    transform: translateY(-5px) !important; 
    border-color: rgba(139, 92, 246, 0.7) !important; /* Лишь чуть-чуть ярче, сохраняя плавность */
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.15) 0%, rgba(0, 0, 0, 0.6) 100%) !important;
}

/* 4. ТРАЕКТОРИИ (Двигаем шары физически, а не через фон) */
@keyframes floatAuroraOne {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40%, 30px) scale(1.2); }
    100% { transform: translate(80%, -10px) scale(1); }
}

@keyframes floatAuroraTwo {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-40%, -30px) scale(1.2); }
    100% { transform: translate(-80%, 10px) scale(1); }
}

/* БЕЙДЖИ (остается как было) */
.pricing-card .badge {
    position: absolute; top: -12px; right: 20px;
    background: #8b5cf6; color: #fff; font-size: 0.75rem;
    font-weight: 800; text-transform: uppercase; padding: 4px 10px;
    border-radius: 6px; letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.pricing-header { display: flex; flex-direction: column; gap: 5px; margin-bottom: 15px; }
.plan-name { color: #e5e7eb; font-size: 1.2rem; font-weight: 700; }
.plan-price { color: #fff; font-size: 2rem; font-weight: 800; font-family: 'JetBrains Mono', monospace; }

.plan-desc { 
    color: #9ca3af; font-size: 0.9rem; margin: 0 0 15px 0; 
    line-height: 1.5; 
    flex: none; /* Убрали flex: 1, чтобы описание не растягивалось */
}

.buy-btn {
    margin-top: auto; /* Жестко отталкивает кнопку в самый низ карточки */
    width: 100%; background: rgba(255, 255, 255, 0.05); color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1); padding: 12px 0; border-radius: 8px;
    font-family: 'Inter', sans-serif; font-weight: 700; font-size: 1rem;
    cursor: pointer; transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.buy-btn i { color: #f59e0b; }
.buy-btn:hover { 
    background: rgba(255, 255, 255, 0.12); /* Просто нейтральное осветление кнопки */
    border-color: rgba(255, 255, 255, 0.25); /* Белая обводка вместо фиолетовой */
    transform: translateY(-2px); /* Легкое поднятие вверх */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4); /* Строгая черная тень без свечения */
}

@media (max-width: 1440px) {
    .subscription-layout { flex-direction: column; }
    .sub-left-column { flex: auto; width: 100%; box-sizing: border-box; }
}

#toggleShopModeBtn, 
#redeemBtn,
.copy-script-btn {
    background: rgba(139, 92, 246, 0.15) !important;
    background-image: none !important;
    border: 1px solid rgba(139, 92, 246, 0.4) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.05) !important;
    padding: 12px 22px !important;
    border-radius: 10px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Эффект при наведении для всех кнопок */
#toggleShopModeBtn:hover, 
#redeemBtn:hover,
.copy-script-btn:hover {
    background: rgba(139, 92, 246, 0.25) !important; 
    border-color: rgba(139, 92, 246, 0.7) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.15) !important;
}

/* Эффект при клике */
#toggleShopModeBtn:active, 
#redeemBtn:active,
.copy-script-btn:active {
    transform: translateY(0) !important;
}

/* Центральное уведомление (Modal Toast) */
.center-toast {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 35px 50px; border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    display: flex; flex-direction: column; align-items: center; gap: 15px;
    opacity: 0; visibility: hidden; z-index: 9999;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.center-toast.show {
    opacity: 1; visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}
.toast-icon { font-size: 3.5rem; }
.toast-title { color: #fff; font-family: 'Inter', sans-serif; font-size: 1.6rem; font-weight: 800; margin: 0; }
.toast-msg { color: #9ca3af; font-family: 'JetBrains Mono', monospace; font-size: 1rem; text-align: center; margin: 0; }

.center-toast.error { border-color: rgba(239, 68, 68, 0.4); box-shadow: 0 20px 50px rgba(239, 68, 68, 0.15); }
.center-toast.error .toast-icon { color: #ef4444; }
.center-toast.success { border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 20px 50px rgba(16, 185, 129, 0.15); }
.center-toast.success .toast-icon { color: #10b981; }

/* Строгие галочки для тарифов */
.plan-features {
    list-style: none; padding: 0; margin: 0 0 20px 0;
    display: flex; flex-direction: column; gap: 10px; 
    flex: 1; /* Теперь пустое место забирает контейнер с фичами */
    justify-content: flex-start; /* Прижимает фичи строго к верху */
}

.plan-features li {
    color: #d1d5db; font-size: 0.85rem; font-family: 'Inter', sans-serif;
    display: flex; align-items: center; gap: 10px;
}
.plan-features li i { 
    color: #8b5cf6; /* Фирменный фиолетовый цвет вместо ебаных эмодзи */
    font-size: 0.8rem; 
}

/* Фон с блюром для уведомлений */
.toast-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px); /* Тот самый дорогой эффект блюра */
    z-index: 9998; /* Должен быть прямо под уведомлением */
    opacity: 0; visibility: hidden;
    transition: all 0.4s ease;
}
.toast-overlay.show {
    opacity: 1; visibility: visible;
}

.supported-games-block {
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    flex: 1; /* Занимает все свободное место в левой колонке */
    min-height: 0; 
}
.games-title { 
    color: #e5e7eb; 
    margin: 0 0 15px 0; 
    font-size: 1.1rem; 
    flex-shrink: 0; 
}
.games-list { 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    flex: 1;
    overflow-y: auto; /* Включаем аккуратный скролл */
    padding-right: 5px; /* Место под скроллбар */
    padding-bottom: 10px;
}

/* Кастомный мини-скроллбар для списка игр */
.games-list::-webkit-scrollbar { width: 4px; }
.games-list::-webkit-scrollbar-track { background: transparent; }
.games-list::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.3); border-radius: 10px; }
.games-list::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.6); }

.game-item {
    position: relative; 
    display: flex; 
    align-items: center; 
    gap: 15px;
    background: rgba(15, 15, 18, 0.8); /* Более темный фон, как на скриншоте */
    padding: 15px; 
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease, border-color 0.2s ease;
    min-height: 85px;
    flex-shrink: 0; /* Запрещаем карточкам сплющиваться */
    z-index: 2; /* Держим карточки поверх фоновой волны колонки */
}

.game-item:hover { 
    background: rgba(25, 25, 30, 0.9);
    border-color: rgba(139, 92, 246, 0.2);
}
.game-info { 
    position: static; /* Сбрасываем абсолют */
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px; 
}
.game-info span {
    position: static; /* Жестко убиваем глобальные стили, которые ломали текст */
    transform: none;
    line-height: 1.2;
}

.game-icon { 
    width: 42px; height: 42px; border-radius: 10px; 
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}
.game-title { color: #e5e7eb; font-weight: 700; font-size: 0.95rem; font-family: 'Inter', sans-serif; }

.game-status { 
    font-size: 0.7rem; font-weight: 800; text-transform: uppercase; 
    padding: 3px 8px; border-radius: 6px; display: inline-block; width: max-content; 
    letter-spacing: 0.5px;
}
.game-status.live { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.game-status.dev { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.sub-left-column, .pricing-card {
    position: relative;
    overflow: hidden; /* Чтобы волны не вылезали за края */
    z-index: 1;
}

/* Отрисовка SVG-волны */
.sub-left-column::before, .pricing-card::before {
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0; 
    height: 150px; /* Высота волны */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%238b5cf6' fill-opacity='0.08' d='M0,160L48,144C96,128,192,96,288,106.7C384,117,480,171,576,165.3C672,160,768,96,864,96C960,96,1056,160,1152,176C1248,192,1344,160,1392,144L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    background-position: bottom center;
    background-repeat: no-repeat;
    z-index: -1; /* Кладем под текст */
    pointer-events: none; /* Чтобы не мешало кликать по кнопкам */
}

/* Базовая высота волны для левой колонки (поднимаем почти до середины) */
.sub-left-column::before {
    height: 45%; 
}

/* 7 Days: Самая маленькая волна (подняли) */
.pricing-cards .pricing-card:nth-child(1)::before {
    height: 180px; 
}

/* 30 Days (Best Value): Волна поднимается выше (подняли) */
.pricing-cards .pricing-card:nth-child(2)::before {
    height: 280px;
}

/* Lifetime: Самая высокая волна, заливает почти весь фон */
.pricing-cards .pricing-card:nth-child(3)::before {
    height: 400px;
}

/* Для карточки Best Value делаем волну чуть ярче */
.pricing-card.best-value::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%238b5cf6' fill-opacity='0.15' d='M0,160L48,144C96,128,192,96,288,106.7C384,117,480,171,576,165.3C672,160,768,96,864,96C960,96,1056,160,1152,176C1248,192,1344,160,1392,144L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
}

.dash-home-link {
    display: flex; align-items: center; gap: 12px; 
    text-decoration: none; color: white; cursor: pointer;
}
.dash-home-icon {
    display: flex; align-items: center; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.dash-title {
    font-family: 'Inter', sans-serif; font-weight: 700; font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
/* При наведении крутим и красим весь блок целиком */
.dash-home-link:hover .dash-home-icon {
    transform: rotate(-12deg) scale(1.15); color: #b366ff;
}
.dash-home-link:hover .dash-title {
    color: #b366ff;
    text-shadow: 0 0 10px rgba(179, 102, 255, 0.4);
}

/* === ОНЛАЙН СТАТУС В ХЕДЕРЕ === */
.dash-online-status {
    display: flex; align-items: center; gap: 8px; margin-left: 20px;
    padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.dash-online-status .status-dot {
    width: 8px; height: 8px; border-radius: 50%; background-color: #10b981;
    box-shadow: 0 0 8px #10b981; animation: pulse 2s infinite;
}
#dash-online-count {
    color: rgba(255,255,255,0.7); font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem; font-weight: 600;
}

.pricing-card.best-value .badge {
    z-index: 10;
}

/* === СТИЛИ ДЛЯ КНОПКИ СБРОСА HWID === */
.reset-hwid-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed rgba(239, 68, 68, 0.2); /* Тонкая пунктирная линия сверху */
    text-align: left;
}

.reset-hwid-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 10px 16px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Делаем приписку (Once a week) чуть тусклее */
.reset-hwid-btn span {
    color: rgba(239, 68, 68, 0.6);
    font-size: 0.75rem;
    font-weight: 400;
}

.reset-hwid-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.game-status.offline { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.reset-hwid-btn:active {
    transform: translateY(0);
}

@media (max-width: 1024px) {
    body.dashboard-page {
        overflow-y: hidden !important; 
    }
    
    .dash-layout {
        flex-direction: column !important; 
        height: calc(100dvh - 70px) !important;
        min-height: 0 !important;
    }
    
    .dash-main {
        overflow: hidden !important; /* Скролл остается только внутри .dash-content-area */
    }
    
    .dash-sidebar {
        width: 100%; 
        min-width: 100%;
        flex-direction: row; 
        padding: 10px;
        align-items: center;
        border-radius: 16px;
    }

    .sidebar-header { display: none; } /* Прячем слово TABS */
    
    .dash-tabs {
        flex-direction: row; 
        width: 100%; 
        overflow-x: auto; /* Включаем горизонтальный скролл */
        gap: 10px; 
        padding-bottom: 5px;
    }
    
    /* Прячем уродливый ползунок скролла для красоты */
    .dash-tabs::-webkit-scrollbar { display: none; }
    .tab-divider { display: none; }
    
    .tab-btn {
        flex: 0 0 auto; /* Запрещаем кнопкам сжиматься */
        padding: 10px 15px;
        border: 1px solid transparent;
        margin: 0;
    }
    
    /* Убираем десктопные боковые линии на мобилках */
    .tab-btn::before, .tab-btn::after { display: none; }
    
    .tab-btn.active {
        background: rgba(139, 92, 246, 0.15);
        border: 1px solid rgba(139, 92, 246, 0.3);
        border-radius: 12px;
    }
}

/* 2. ТЕЛЕФОНЫ (до 768px) - Сжимаем шапку и выстраиваем контент в столбик */
@media (max-width: 768px) {
    .dash-header {
        padding: 10px 15px;
        gap: 10px;
    }
    
    /* Прячем длинный текст в шапке, оставляем только аватар, иконки и бейджи */
    .dash-title { display: none; }
    .dash-nick { display: none; }
    
    .dash-user-info { padding: 4px 10px 4px 4px; }
    
    /* Убираем бордюр у онлайна, чтобы сэкономить место */
    .dash-online-status { border-left: none; margin-left: 0; padding-left: 0; }
    
    .dash-layout {
        padding: 10px; 
        gap: 10px;
    }
    
    .dash-main {
        padding: 20px 15px;
    }
    
    .main-content-wrapper h2 { font-size: 1.5rem; }
    
    .sub-left-column {
        flex: auto;
        width: 100%;
        padding: 20px 15px;
    }
    
    .sub-right-column {
        padding: 20px 15px;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr; /* Тарифы выстраиваются строго друг под другом */
    }
    
    /* Адаптив для карточек скриптов во вкладке Scripts */
    .game-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .game-info {
        align-items: center;
    }
    
    .copy-script-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 3. УЗКИЕ ЭКРАНЫ (до 480px) - Мелкие шрифты для компактности */
@media (max-width: 480px) {
    .dash-avatar { width: 28px; height: 28px; }
    #dash-online-count { font-size: 0.75rem; }
    .dash-tabs { gap: 5px; }
    .tab-btn { padding: 8px 12px; font-size: 0.85rem; }
}

/* Стили блока текущего плана */
.current-plan-box {
    border-bottom: 1px solid rgba(255,255,255,0.05); 
    padding-bottom: 20px;
}
.current-plan-label {
    color: #9ca3af; 
    font-size: 0.9rem; 
    margin-bottom: 5px;
}
.current-plan-title {
    font-size: 1.6rem; 
    margin: 0; 
    display: flex; 
    align-items: center; 
    gap: 8px;
    color: var(--role-color);
}

/* Градиент для заголовка (для платных) */
.current-plan-title:not([data-role="Free"]) {
    background: linear-gradient(135deg, var(--role-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Сброс цвета для Current Plan, если Free */
.current-plan-title[data-role="Free"] {
    color: #9ca3af !important;
    background: none !important;
    -webkit-text-fill-color: #9ca3af !important;
}

/* Стили ввода ключа */
.redeem-title {
    color: #e5e7eb; 
    margin-bottom: 12px; 
    font-size: 1.1rem;
}
.redeem-input-group {
    display: flex; 
    gap: 10px;
}
.redeem-input {
    flex: 1; 
    background: rgba(0,0,0,0.5); 
    border: 1px solid rgba(255,255,255,0.1); 
    padding: 14px 18px; 
    border-radius: 10px; 
    color: #fff; 
    font-family: 'JetBrains Mono', monospace; 
    outline: none; 
    transition: border 0.3s ease, box-shadow 0.3s ease;
}
.redeem-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}
.redeem-status-hidden {
    margin-top: 10px; 
    font-size: 0.85rem; 
    display: none;
}

/* Карточки на главной (Overview) */
.overview-cards-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px;
}
.overview-card {
    background: rgba(20, 20, 25, 0.6); 
    padding: 25px; 
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
    position: relative; 
    overflow: hidden;
}
.overview-card.primary-card { border: 1px solid rgba(139, 92, 246, 0.2); }
.overview-card.secondary-card { border: 1px solid rgba(255, 255, 255, 0.05); }

.overview-icon {
    position: absolute; 
    top: -20px; 
    right: -20px; 
    font-size: 6rem; 
}
.primary-card .overview-icon { color: rgba(139, 92, 246, 0.05); }
.secondary-card .overview-icon { color: rgba(255, 255, 255, 0.02); }

.overview-label {
    color: #9ca3af; 
    margin: 0 0 10px 0; 
    font-size: 0.9rem; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 1px;
}
.overview-value {
    font-family: 'JetBrains Mono', monospace; 
    font-size: 1.8rem; 
    font-weight: 800; 
    color: #fff;
}
.overview-value-muted { color: #6b7280; font-size: 1.2rem; }
.overview-subtext { margin-top: 8px; font-size: 0.8rem; }
.overview-subtext.text-green { color: #10b981; }
.overview-subtext.text-purple { color: #a855f7; }

/* =======================================
   МОДАЛЬНЫЕ ОКНА (Оплата и Выход)
======================================== */
#duskPayModal, #logoutModal { 
    position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 99999; 
    display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); 
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; 
}
#duskPayModal.show, #logoutModal.show { opacity: 1; visibility: visible; }

#duskPayModal.show .d-modal-box, #logoutModal.show .d-modal-box { 
    transform: translateY(0) scale(1); opacity: 1; 
}

.d-modal-buttons { display: flex; gap: 10px; justify-content: center; margin-top: 25px; }
.d-btn { padding: 12px 20px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; font-family: 'Inter', sans-serif; transition: 0.2s; font-size: 14px;}
.d-cancel { background: #27272a; color: white; }
.d-cancel:hover { background: #3f3f46; }
.d-accept { background: #8b5cf6; color: white; }
.d-accept:hover { background: #7c3aed; }

/* Свитч */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #27272a; border: 1px solid rgba(255,255,255,0.1); border-radius: 34px; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; border-radius: 50%; transition: .4s; }
.switch input:checked + .slider { background-color: #8b5cf6; border-color: #8b5cf6; }
.switch input:checked + .slider:before { transform: translateX(20px); }

.region-btn:hover, .pay-method-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    transform: translateY(-2px);
}
#duskCancelBtn:hover {
    color: #fff !important;
}

@supports (-webkit-touch-callout: none) {
    .dash-layout {
        height: calc(-webkit-fill-available - 70px) !important;
    }
}