/* =========================================
   CORE.CSS - Liquid Glass Design System
   ========================================= */

:root {
    --gold: #c0a050;
    --gold-light: #e8dcc0;
    --chrome: #c0c6d0;
    --chrome-light: #e0e8f0;
    --chrome-dark: #8a92a0;
    --blue: #2f80ed;
    --neon-blue: #00e5ff;
    --green: #34c759;
    --red: #ff3b30;

    --font-head: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", Roboto, sans-serif;
    --font-num: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", Roboto, sans-serif;

    --rad-sm: 12px;
    --rad-md: 16px;
    --rad-lg: 22px;
    --rad-xl: 28px;
    --rad-full: 9999px;

    --pad-sm: 8px;
    --pad-md: 12px;
    --pad-lg: 20px;

    --shadow-glow-gold: 0 0 15px rgba(192, 198, 208, 0.3);
    --shadow-glow-blue: 0 0 15px rgba(47, 128, 237, 0.3);
    --shadow-glow-chrome: 0 0 15px rgba(192, 198, 208, 0.4);

    --btn-h: 52px;
    --btn-font: 14px;
    --btn-weight: 800;
    --btn-radius: var(--rad-md);
    --btn-letter: 1px;
    --btn-transition: transform 0.15s cubic-bezier(0.25, 1, 0.5, 1), background 0.3s, filter 0.3s, box-shadow 0.3s;

    --glass-blur: 25px;
    --glass-border-top: 1px solid rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] {
    --bg-main: #080c24;
    --bg-surface: rgba(20, 30, 70, 0.35);
    --bg-surface-solid: rgba(15, 22, 55, 0.85);
    --bg-glass: rgba(20, 30, 70, 0.3);
    --bg-inset: rgba(0, 5, 25, 0.4);
    --bg-elevated: rgba(255, 255, 255, 0.07);
    --text-main: #ffffff;
    --text-primary: #ffffff;
    --text-muted: #7a8bbf;
    --text-secondary: #b0bce0;
    --border-glass: 1px solid rgba(255, 255, 255, 0.1);
    --border-light: 1px solid rgba(100, 140, 255, 0.08);
    --border-med: 1px solid rgba(100, 140, 255, 0.15);
    --border-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --shadow-base: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --overlay-bg: rgba(0, 0, 10, 0.6);
    --orb-color: rgba(47, 100, 237, 0.35);
    --orb-size: 340px;
    --tg-header: #080c24;
    --bg-nav: rgba(10, 15, 40, 0.75);
    --input-bg: rgba(0, 8, 30, 0.5);
    --tab-bg: rgba(0, 8, 30, 0.4);
    --tab-active-bg: rgba(255, 255, 255, 0.12);
    --sheet-close-bg: rgba(255, 255, 255, 0.1);
    --toast-color: #ffffff;
    --card-bg: rgba(20, 30, 70, 0.4);
}

[data-theme="light"] {
    --bg-main: #eef1f8;
    --bg-surface: rgba(255, 255, 255, 0.45);
    --bg-surface-solid: rgba(240, 243, 250, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.35);
    --bg-inset: rgba(0, 20, 80, 0.05);
    --bg-elevated: rgba(255, 255, 255, 0.6);
    --text-main: #1a1e36;
    --text-primary: #1a1e36;
    --text-muted: #6b7394;
    --text-secondary: #4a5280;
    --border-glass: 1px solid rgba(255, 255, 255, 0.5);
    --border-light: 1px solid rgba(0, 20, 80, 0.06);
    --border-med: 1px solid rgba(0, 20, 80, 0.1);
    --border-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    --shadow-base: 0 8px 32px rgba(0, 0, 40, 0.1);
    --shadow-glass: 0 8px 32px rgba(0, 0, 40, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    --overlay-bg: rgba(0, 0, 20, 0.4);
    --orb-color: rgba(47, 100, 237, 0.18);
    --orb-size: 380px;
    --tg-header: #eef1f8;
    --bg-nav: rgba(240, 243, 250, 0.7);
    --input-bg: rgba(255, 255, 255, 0.5);
    --tab-bg: rgba(0, 20, 80, 0.04);
    --tab-active-bg: rgba(255, 255, 255, 0.8);
    --sheet-close-bg: rgba(0, 20, 80, 0.06);
    --toast-color: var(--text-main);
    --card-bg: rgba(255, 255, 255, 0.35);
    /* Chrome и Gold — инвертированы для читаемости на светлом фоне */
    --chrome: #4e5e82;
    --chrome-light: #2c3a62;
    --chrome-dark: #8090b4;
    --gold: #8a6c14;
    --gold-light: #6a5010;
    --shadow-glow-chrome: 0 0 8px rgba(44, 58, 98, 0.18);
    --shadow-glow-gold: 0 0 8px rgba(138, 108, 20, 0.2);
}

.bg-orb {
    position: fixed;
    width: var(--orb-size);
    height: var(--orb-size);
    border-radius: 50%;
    background: var(--orb-color);
    filter: blur(80px);
    -webkit-filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: orbFloat 20s ease-in-out infinite;
    will-change: transform;
}

@keyframes orbFloat {
    0%   { transform: translate(10vw, 15vh); }
    25%  { transform: translate(55vw, 60vh); }
    50%  { transform: translate(30vw, 80vh); }
    75%  { transform: translate(60vw, 20vh); }
    100% { transform: translate(10vw, 15vh); }
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; scrollbar-width: none !important; }
::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }

html, body {
    width: 100vw !important;
    min-height: 100vh !important;
    background-color: var(--bg-main) !important;
    background-image: none !important;
    color: var(--text-main);
    font-family: var(--font-head);
    font-size: 14px;
    line-height: 1.4;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
    margin: 0 !important;
    padding: 0 !important;
}

.view {
    display: none; padding: var(--pad-lg); padding-bottom: 90px;
    position: relative; z-index: 1; min-height: 100vh;
}
.view.active { display: block; animation: fadeIn 0.3s ease; }
.view.slide-right { animation: slideRight 0.3s cubic-bezier(0.25, 1, 0.5, 1); }
.view.slide-left { animation: slideLeft 0.3s cubic-bezier(0.25, 1, 0.5, 1); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideRight { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideLeft { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: translateX(0); } }

/* ======= LIQUID GLASS MIXIN ======= */
.lg-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: var(--border-glass);
    box-shadow: var(--shadow-glass);
    border-radius: var(--rad-xl);
}

/* ======= КНОПКИ ======= */
.act-btn {
    width: 100%; height: var(--btn-h); background: var(--blue); color: #fff; border: none;
    border-radius: var(--btn-radius); font-size: var(--btn-font); font-weight: var(--btn-weight);
    font-family: var(--font-head); text-transform: uppercase; letter-spacing: var(--btn-letter);
    cursor: pointer; transition: var(--btn-transition);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 15px rgba(47, 128, 237, 0.3);
}
.act-btn:active { transform: scale(0.95); filter: brightness(0.85); }
.act-btn:disabled { background: var(--bg-surface-solid) !important; color: var(--text-muted) !important; border: var(--border-light) !important; transform: none; cursor: not-allowed; box-shadow: none !important; }

.earn-card .act-btn, .ref-box .act-btn { margin-top: 18px; }

.btn-mini {
    padding: 8px 14px; border-radius: var(--rad-sm); font-size: 11px;
    font-weight: var(--btn-weight); font-family: var(--font-head);
    border: none; cursor: pointer; transition: var(--btn-transition);
    background: var(--blue); color: #fff; text-transform: uppercase; letter-spacing: 0.5px;
}
.btn-mini:active { transform: scale(0.92); filter: brightness(0.85); }

.btn-ghost {
    background: var(--bg-glass); color: var(--text-secondary); border: var(--border-glass);
    height: var(--btn-h); border-radius: var(--btn-radius); font-size: var(--btn-font);
    font-weight: var(--btn-weight); font-family: var(--font-head); text-transform: uppercase;
    letter-spacing: var(--btn-letter); cursor: pointer; transition: var(--btn-transition);
    display: flex; align-items: center; justify-content: center; width: 100%;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-glass);
}
.btn-ghost:active { transform: scale(0.95); }

/* ======= ИНПУТЫ ======= */
.inp, .pass-inp, .bet-inp {
    width: 100%; height: var(--btn-h); background: var(--input-bg); border: var(--border-glass);
    border-radius: var(--btn-radius); color: var(--text-main); padding: 0 15px;
    font-size: 16px; font-weight: 700; font-family: var(--font-num);
    text-align: center; margin-bottom: var(--pad-lg); transition: border-color 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--border-highlight);
}
.inp:focus, .pass-inp:focus, .bet-inp:focus { border-color: var(--chrome); box-shadow: 0 0 20px rgba(192, 198, 208, 0.15); }
.inp::placeholder, .pass-inp::placeholder, .bet-inp::placeholder { color: var(--text-muted); }

/* ======= ОВЕРЛЕЙ И МОДАЛКА ======= */
.overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: var(--overlay-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    z-index: 1000; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: 0.3s ease;
}
.overlay.active { opacity: 1; visibility: visible; pointer-events: all; touch-action: none; }

.modal {
    background: var(--bg-surface-solid);
    backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
    border: var(--border-glass); box-shadow: var(--shadow-glass);
    border-radius: var(--rad-xl); padding: 25px 20px; width: 92%; max-width: 400px; margin: 0 auto;
    transform: scale(0.9) translateY(20px); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative;
}
.overlay.active .modal { transform: scale(1) translateY(0); }

.modal-title {
    text-align: center; font-weight: 900; font-size: 20px;
    margin-bottom: var(--pad-lg); font-family: var(--font-head); color: var(--text-main);
}
.modal-subtitle {
    text-align: center; font-size: 12px; color: var(--text-muted);
    margin-bottom: var(--pad-lg); font-weight: 600;
}

/* ======= ШИТ-МОДАЛКА ======= */
.sheet-modal {
    position: absolute; bottom: 0; left: 0; width: 100%; border-radius: var(--rad-xl) var(--rad-xl) 0 0;
    margin: 0; max-width: 100%; height: 85vh; display: flex; flex-direction: column; padding: 0; transform: translateY(100%);
}
.overlay.active .sheet-modal { transform: translateY(0); }
.sheet-head { padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: var(--border-light); }
.sheet-title { font-size: 20px; font-weight: 800; font-family: var(--font-head); color: var(--text-main); }
.sheet-close {
    background: var(--sheet-close-bg); border: none; color: var(--text-muted);
    width: 32px; height: 32px; border-radius: var(--rad-full);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; cursor: pointer; transition: 0.2s; font-weight: 800;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.sheet-close:active { transform: scale(0.8); background: var(--red); color: #fff; }

/* ======= ТАБЫ ======= */
.tabs {
    display: flex; background: var(--tab-bg); padding: 6px;
    border-radius: var(--btn-radius); border: var(--border-glass); margin-bottom: var(--pad-lg);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--border-highlight);
}
.tab {
    flex: 1; text-align: center; padding: 12px; font-size: 12px;
    font-weight: var(--btn-weight); font-family: var(--font-head);
    color: var(--text-muted); cursor: pointer; border-radius: var(--rad-sm);
    transition: 0.2s; text-transform: uppercase; letter-spacing: 0.5px;
}
.tab.active { background: var(--tab-active-bg); color: var(--text-main); box-shadow: 0 2px 10px rgba(0,0,0,0.1); }

/* ======= ТЕМА ======= */
.theme-btn.active { border-color: var(--blue) !important; box-shadow: 0 0 12px rgba(47, 128, 237, 0.4); }

/* ======= НАВБАР (LIQUID GLASS) ======= */
.nav {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: var(--bg-nav);
    backdrop-filter: blur(30px) saturate(1.5); -webkit-backdrop-filter: blur(30px) saturate(1.5);
    border-top: var(--border-glass); display: flex; justify-content: space-around;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); z-index: 500;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1);
}
.nav-item { display: flex; flex-direction: column; align-items: center; color: var(--text-muted); transition: 0.3s; cursor: pointer; }
.nav-item span, .nav-item div { font-size: 10px; margin-top: 2px; font-weight: 700; font-family: var(--font-head); }
.nav-svg { width: 24px; height: 24px; fill: currentColor; margin-bottom: 4px; transition: 0.3s; }
.nav-item.active { color: var(--chrome-light); }
.nav-item.active .nav-svg { transform: translateY(-3px); filter: drop-shadow(0 2px 5px rgba(192,198,208,0.6)); }
.nav-item.active.nav-bounce .nav-svg { animation: navBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes navBounce {
    0%   { transform: translateY(0) scale(1); }
    30%  { transform: translateY(-8px) scale(1.25); }
    50%  { transform: translateY(-3px) scale(0.92); }
    70%  { transform: translateY(-5px) scale(1.05); }
    100% { transform: translateY(-3px) scale(1); }
}

/* ======= ТОСТЫ ======= */
#toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 99999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
    background: var(--bg-surface-solid);
    backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
    border: var(--border-glass); padding: 12px 20px;
    border-radius: var(--btn-radius); font-size: 13px; font-weight: var(--btn-weight);
    font-family: var(--font-head); color: var(--toast-color); box-shadow: var(--shadow-glass);
    opacity: 0; transform: translateY(-20px); transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-color: var(--green); box-shadow: 0 5px 15px rgba(52,199,89,0.2); }
.toast.error { border-color: var(--red); box-shadow: 0 5px 15px rgba(255,59,48,0.2); }

/* ======= LIGHT THEME CARD FIXES ======= */
[data-theme="light"] .card-number { color: var(--text-muted); text-shadow: none; }
[data-theme="light"] .system-logo { color: rgba(26, 30, 54, 0.5); }
[data-theme="light"] .card-lbl { color: var(--text-muted); }
[data-theme="light"] .card-name { color: var(--text-main); }

/* ======= LIGHT THEME CHROME/GOLD ELEMENT FIXES ======= */
/* Значок Основатель: фон теперь тёмный (chrome переопределён) → белый текст */
[data-theme="light"] .p-status.founder { color: #fff; }
[data-theme="light"] .status-badge.founder { color: #fff; }
/* Активный пункт навигации — читаемый тёмно-синий */
[data-theme="light"] .nav-item.active { color: var(--chrome-light); }
/* KRS-тег — тёмный текст на светлом фоне */
[data-theme="light"] .tag.krs {
    background: rgba(78,94,130,0.12);
    color: var(--chrome-light);
    border-color: rgba(78,94,130,0.25);
}
/* Задания: награда */
[data-theme="light"] .task-reward { color: var(--chrome-light); }
/* Ежедневный бонус: награда под днём */
[data-theme="light"] .day-rew { color: var(--chrome); }
/* Цена карточки */
[data-theme="light"] .c-price { color: var(--chrome-light); }
/* Таблица лидеров */
[data-theme="light"] .lb-score { color: var(--chrome-light); }
[data-theme="light"] .lb-row:nth-child(1) .lb-rank { color: var(--gold); text-shadow: none; }
/* Earn-карточки: текст кнопок и подписи */
[data-theme="light"] .earn-card .card-lbl { color: var(--text-muted); }
/* Кнопка act-btn на тёмных задниках — текст должен оставаться читаемым */
[data-theme="light"] .act-btn:not(.cashout):not(.close-btn) { color: #fff; }
/* Пины рулетки — chrome теперь тёмный, пины станут тёмными, это ок для игр */
/* Инвентарь modal — делаем фон тёмным */
[data-theme="light"] #m-inventory .modal,
[data-theme="light"] [id^="m-"] .modal { background: #fff; border-color: rgba(0,20,80,0.1); }
[data-theme="light"] [id^="m-"] .modal h3,
[data-theme="light"] [id^="m-"] .modal > div:first-child { color: var(--text-main); }
/* Общие overlay-модалки */
[data-theme="light"] .overlay .modal { background: #fff; border-color: rgba(0,20,80,0.1); }
[data-theme="light"] .overlay .modal .modal-title,
[data-theme="light"] .overlay .modal > h3 { color: var(--text-main); }

/* ======= SKELETON LOADING ======= */
.skeleton {
    background: var(--bg-glass);
    border-radius: var(--rad-sm);
    overflow: hidden;
    position: relative;
    color: transparent !important;
}
.skeleton::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08) 40%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.08) 60%, transparent);
    animation: shimmer 1.5s infinite;
}
[data-theme="light"] .skeleton::after {
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.04) 40%, rgba(0,0,0,0.07) 50%, rgba(0,0,0,0.04) 60%, transparent);
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.skeleton-line { display: inline-block; min-width: 60px; min-height: 1em; }
.skeleton-line.w-sm { min-width: 40px; }
.skeleton-line.w-lg { min-width: 120px; }
.skeleton-line.h-lg { min-height: 42px; }

/* ======= PULL TO REFRESH ======= */
.ptr-indicator {
    position: fixed; top: -60px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 40px; z-index: 600;
    display: flex; align-items: center; justify-content: center;
    transition: top 0.25s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.25s;
    opacity: 0; pointer-events: none;
}
.ptr-indicator.visible { opacity: 1; }
.ptr-indicator.refreshing { top: 15px; opacity: 1; }
.ptr-spinner {
    width: 28px; height: 28px;
    border: 3px solid var(--bg-glass);
    border-top-color: var(--chrome);
    border-radius: 50%;
    transition: transform 0.2s;
}
.ptr-indicator.refreshing .ptr-spinner { animation: ptrSpin 0.8s linear infinite; }
@keyframes ptrSpin { to { transform: rotate(360deg); } }

/* ======================================================
   АДАПТИВ: Маленькие телефоны (≤ 375px)
   ====================================================== */
@media screen and (max-width: 375px) {
    :root {
        --pad-lg: 14px;
        --pad-md: 10px;
    }

    /* Балансовый блок */
    .bal-val { font-size: 34px !important; }
    .bal-currency { font-size: 17px !important; }
    .home-balance { margin-bottom: 10px; }

    /* XP / прогресс */
    .xp-container { margin-bottom: 16px; }

    /* Карточка */
    .card-wrap { margin-bottom: 14px; }

    /* Заголовки секций */
    .section-title { font-size: 15px; margin: 18px 0 10px; }

    /* Сейф */
    .safe-val { font-size: 20px !important; }
    .safe-widget { padding: 12px 14px; }

    /* Профиль */
    .header { margin-bottom: 14px; }
    .p-name { font-size: 20px; }
    .p-avatar { font-size: 28px !important; width: 54px !important; height: 54px !important; }
    .profile-head { gap: 12px; margin-bottom: 18px; }
    .stats-row { gap: 6px; margin-bottom: 18px; }
    .stat-box { padding: 12px 8px; }
    .stat-val { font-size: 14px; }
    .stat-lbl { font-size: 9px; }

    /* Навигация */
    .nav-item { padding: 8px 0; }
    .nav-item span, .nav-item div { font-size: 9px; }
    .nav-svg { width: 20px; height: 20px; }

    /* Игровой грид */
    .games-grid { gap: 10px; margin-top: 8px; }
    .game-card { padding: 14px 10px 12px; }
    .ico-svg { width: 42px !important; height: 42px !important; }
    .game-title { font-size: 11px; }
    .game-badge { font-size: 8px; padding: 2px 6px; }

    /* Широкая кнопка маркета */
    .market-wide-btn { padding: 12px 14px; margin-top: 8px; }
    .market-wide-icon { width: 42px; height: 42px; }
    .market-wide-title { font-size: 13px; }
    .market-wide-sub { font-size: 10px; }

    /* Модальные окна */
    .modal { padding: 20px 15px !important; }
    .sheet-title { font-size: 17px; }
    .sheet-head { padding: 16px; }

    /* Задания и earn */
    .earn-card { padding: 14px 12px; margin-bottom: 18px; }
    .task-row { padding: 10px 12px; }
    .task-info { font-size: 13px; }
    .task-ico { font-size: 18px; width: 36px; height: 36px; }

    /* Теги и кнопки */
    .tag { font-size: 9px; padding: 3px 7px; }
    .act-btn { font-size: 12px; padding: 11px 16px; }

    /* Таблица лидеров */
    .lb-row { padding: 10px 12px; }
    .lb-rank { font-size: 12px; width: 24px; }
    .lb-name { font-size: 13px; }
    .lb-score { font-size: 12px; }

    /* Exchange / Биржа */
    .exchange-modal-header { padding: 12px 14px; }
    .portfolio-val { font-size: 26px; }
}

/* ======================================================
   NOTIFICATION BELL & PANEL
   ====================================================== */
.notif-bell {
    background: var(--bg-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: var(--border-glass);
    border-radius: var(--rad-full);
    padding: 8px 12px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--chrome);
    transition: color 0.2s, background 0.2s;
    z-index: 10;
}
.notif-bell:hover, .notif-bell:active { color: var(--chrome-light); }
.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--red);
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    min-width: 17px;
    height: 17px;
    border-radius: var(--rad-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-family: var(--font-head);
    pointer-events: none;
}
.notif-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    background: var(--bg-surface-solid);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: var(--border-glass);
    border-radius: var(--rad-lg);
    box-shadow: var(--shadow-glass);
    max-height: 280px;
    overflow-y: auto;
    z-index: 500;
}
.notif-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    background: var(--bg-surface-solid);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1;
}
.notif-item {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.notif-item.unread {
    background: rgba(0,229,255,0.04);
    border-left: 2px solid var(--neon-blue);
}
.notif-text {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.4;
    font-family: var(--font-head);
}
.notif-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
    font-family: var(--font-head);
}
.notif-empty {
    padding: 22px 14px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    font-family: var(--font-head);
    font-weight: 600;
}

/* ======================================================
   АДАПТИВ: Очень маленькие телефоны (≤ 320px)
   ====================================================== */
@media screen and (max-width: 320px) {
    :root {
        --pad-lg: 12px;
    }

    .bal-val { font-size: 28px !important; }
    .bal-currency { font-size: 15px !important; }
    .p-name { font-size: 18px; }
    .p-avatar { font-size: 24px !important; width: 48px !important; height: 48px !important; }
    .ico-svg { width: 36px !important; height: 36px !important; }
    .game-title { font-size: 10px; letter-spacing: 0.3px; }
    .nav-item span, .nav-item div { font-size: 8px; }
    .section-title { font-size: 14px; }
    .stat-val { font-size: 13px; }
    .safe-val { font-size: 18px !important; }
    .market-wide-icon { width: 36px; height: 36px; }
    .market-wide-title { font-size: 12px; }
    .market-wide-btn { gap: 8px; }
}

/* ======================================================
   FOMO TOAST (T005)
   ====================================================== */
.fomo-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(20, 20, 30, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(192, 198, 208, 0.2);
    border-radius: 24px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    font-family: var(--font-head);
    white-space: nowrap;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    max-width: calc(100vw - 40px);
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.fomo-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ======================================================
   HOME AMBIENT PARTICLES (T015)
   ====================================================== */
#home-particles {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 260px;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--chrome);
    opacity: 0;
    animation: floatParticle var(--dur, 8s) var(--delay, 0s) infinite ease-in-out;
}
@keyframes floatParticle {
    0%   { opacity: 0; transform: translateY(0) scale(0.5); }
    15%  { opacity: 0.35; }
    85%  { opacity: 0.2; }
    100% { opacity: 0; transform: translateY(-220px) scale(1.2); }
}

/* ======================================================
   XP BAR — всегда видим
   ====================================================== */
#home-xp { display: flex !important; }

/* Flash Deal Daily Counter */
.flash-deal-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.flash-deal-counter {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    font-weight: 600;
    white-space: nowrap;
}
