/* =====================================================================
   AURA 2049 (v1.2) — Футуристический слой платформы «Ясновидение»
   ---------------------------------------------------------------------
   Концепция: «Кибер-мистицизм» — глубокий космос, живые северные
   сияния (aurora), глассморфизм, неоновые контуры и голографические
   акценты. Слой подключается ПОСЛЕДНИМ и переопределяет только
   визуал: классы, токены и логика предыдущих версий не тронуты.

   Принципы:
     • Fluid-типографика clamp() — идеальна на любом экране
     • Глассморфизм с @supports-фолбэком для старых браузеров
     • Тач-цели ≥ 44px, safe-area iOS/Android, no tap-highlight
     • Анимации только на transform/opacity (GPU, 60fps)
     • Полное уважение prefers-reduced-motion
   ===================================================================== */

/* ========================================================
   1. Токены — перезаписываем палитру в неоновую гамму.
      Имена сохранены: inline-стили PHP (var(--accent-cyan)
      и т.д.) автоматически получают новый облик.
   ======================================================== */
:root {
    color-scheme: dark;

    /* Космическая глубина */
    --bg-primary:   #04050e;
    --bg-secondary: #0a0c1d;
    --bg-card:      rgba(13, 16, 38, 0.66);
    --bg-hover:     rgba(35, 40, 80, 0.55);
    --border:       rgba(108, 122, 224, 0.16);
    --border-hover: rgba(122, 162, 255, 0.42);

    /* Неоновая палитра AURA */
    --neon-cyan:    #22d3ee;
    --neon-violet:  #a78bfa;
    --neon-magenta: #f472b6;
    --neon-blue:    #60a5fa;

    /* Маппинг старых токенов → новый неон (везде, включая inline-стили) */
    --accent-gold:   #ffd166;
    --accent-cyan:   #22d3ee;
    --accent-purple: #a78bfa;
    --accent-indigo: #6366f1;
    --text-primary:  #eef1ff;
    --text-secondary:#b9c1e8;
    --text-muted:    #8a91b8;
    --danger:        #fb7185;
    --success:       #34d399;
    --warning:       #fbbf24;

    /* AURA-специфика */
    --fut-glow-cyan:   0 0 22px rgba(34, 211, 238, 0.28), 0 0 64px rgba(34, 211, 238, 0.12);
    --fut-glow-violet: 0 0 22px rgba(167, 139, 250, 0.30), 0 0 64px rgba(139, 92, 246, 0.14);
    --fut-border-glow: linear-gradient(135deg, rgba(34,211,238,.55), rgba(167,139,250,.55) 55%, rgba(244,114,182,.45));
    --fut-glass:       rgba(12, 15, 36, 0.60);
    --fut-glass-strong: rgba(10, 12, 30, 0.78);
    --fut-radius:      18px;
    --fut-radius-sm:   12px;

    /* Fluid-ритм */
    --fut-h1: clamp(30px, 4.6vw, 52px);
    --fut-h2: clamp(23px, 3.1vw, 34px);
    --fut-h3: clamp(18px, 2.2vw, 24px);

    --shadow: 0 8px 40px rgba(2, 4, 18, 0.65);
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================================
   2. Живой космический фон: aurora + голо-сетка
   ======================================================== */
body {
    background:
        radial-gradient(1100px 700px at 85% -10%, rgba(76, 29, 149, 0.22), transparent 60%),
        radial-gradient(900px 620px at -10% 25%, rgba(8, 95, 125, 0.20), transparent 60%),
        radial-gradient(1000px 800px at 50% 115%, rgba(157, 23, 77, 0.12), transparent 60%),
        #04050e;
    background-attachment: fixed;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* Контейнер слоёв (добавляется в header.php) */
.fut-bg { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }

.fut-aurora {
    position: absolute;
    width: 60vmax; height: 60vmax;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.16;
    will-change: transform;
}
.fut-aurora--1 { background: radial-gradient(circle, #7c3aed 0%, transparent 62%); top: -22vmax; left: -14vmax;  animation: futDrift1 46s ease-in-out infinite alternate; }
.fut-aurora--2 { background: radial-gradient(circle, #0891b2 0%, transparent 62%); top: 24vmax; right: -20vmax; animation: futDrift2 58s ease-in-out infinite alternate; }
.fut-aurora--3 { background: radial-gradient(circle, #db2777 0%, transparent 60%); bottom: -24vmax; left: 28vw; animation: futDrift3 52s ease-in-out infinite alternate; }

@keyframes futDrift1 { to { transform: translate(16vw, 12vh) rotate(40deg) scale(1.18); } }
@keyframes futDrift2 { to { transform: translate(-14vw, -10vh) rotate(-30deg) scale(1.12); } }
@keyframes futDrift3 { to { transform: translate(10vw, -14vh) scale(1.22); } }

/* Голографическая сетка-перспектива */
.fut-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(122, 142, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(122, 142, 255, 0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 0%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 0%, transparent 78%);
}

/* ========================================================
   3. Типографика и селекция
   ======================================================== */
h1 { font-size: var(--fut-h1); letter-spacing: -0.5px; }
h2 { font-size: var(--fut-h2); letter-spacing: -0.3px; }
h3 { font-size: var(--fut-h3); }

.section h2, .page-title h1, .hero h1, .hero-block h1 {
    background: linear-gradient(100deg, #eef1ff 0%, #a5f3fc 38%, #c4b5fd 72%, #f9a8d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }

/* Неоновый кастомный скроллбар */
* { scrollbar-width: thin; scrollbar-color: rgba(139, 92, 246, 0.5) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.55), rgba(167, 139, 250, 0.6));
    border-radius: 8px;
}
*::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #22d3ee, #a78bfa); }

/* Доступность: явный неоновый фокус */
:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
    border-radius: 6px;
    box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.18);
}

/* ========================================================
   4. Шапка — стеклянный козырёк с неоновой линией
   ======================================================== */
.site-header {
    background: rgba(6, 8, 22, 0.72);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    border-bottom: 1px solid rgba(108, 122, 224, 0.18);
    box-shadow: 0 10px 40px rgba(2, 4, 18, 0.5);
    transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.site-header.fut-scrolled {
    background: rgba(5, 6, 18, 0.88);
    border-bottom-color: rgba(34, 211, 238, 0.28);
    box-shadow: 0 10px 46px rgba(34, 211, 238, 0.08), 0 8px 30px rgba(2, 4, 18, 0.6);
}
.site-header .logo {
    font-weight: 700;
    letter-spacing: 0.4px;
    background: linear-gradient(95deg, #eef1ff, #a5f3fc 55%, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.site-header .logo .accent { color: unset; }

.nav-link {
    border-radius: 10px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.nav-link:hover {
    background: rgba(99, 102, 241, 0.14);
    box-shadow: inset 0 0 0 1px rgba(122, 162, 255, 0.25);
    transform: translateY(-1px);
}
.nav-link.active {
    color: #a5f3fc;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(139, 92, 246, 0.16));
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.35), 0 0 18px rgba(34, 211, 238, 0.12);
}

.nav-dropdown-menu {
    background: var(--fut-glass-strong);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    border: 1px solid rgba(122, 162, 255, 0.2);
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(2, 4, 18, 0.75), var(--fut-glow-violet);
    overflow: hidden;
}
.nav-dropdown-item:hover { background: rgba(99, 102, 241, 0.16); }

.nav-mobile-overlay {
    background: rgba(4, 5, 14, 0.82);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
}

/* Неоновая переокраска SVG-иконок ( вместо золотых фильтров v5 ) */
.nav-icon {
    filter: brightness(0) saturate(100%) invert(84%) sepia(12%) saturate(420%) hue-rotate(195deg) brightness(101%) contrast(94%);
}
.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
    filter: brightness(0) saturate(100%) invert(84%) sepia(60%) saturate(1800%) hue-rotate(155deg) brightness(104%) contrast(95%);
    opacity: 1;
}
.logo-icon {
    filter: brightness(0) saturate(100%) invert(72%) sepia(85%) saturate(1400%) hue-rotate(220deg) brightness(102%) contrast(96%);
}

/* Бейдж уровня в шапке */
.nav-level-badge {
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
    border: 1px solid rgba(34, 211, 238, 0.6);
}

/* ========================================================
   5. Кнопки — неоновые капсулы со свечением и шиммером
   ======================================================== */
.btn {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    border: 1px solid rgba(122, 162, 255, 0.22);
    background: rgba(30, 35, 72, 0.5);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s, background 0.25s, border-color 0.25s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 6px 26px rgba(34, 211, 238, 0.18);
}
.btn:active { transform: translateY(0) scale(0.97); }

/* Скан-линия шиммера */
.btn::after {
    content: '';
    position: absolute;
    top: 0; left: -80%;
    width: 55%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transform: skewX(-22deg);
    transition: left 0.55s ease;
    pointer-events: none;
}
.btn:hover::after { left: 130%; }

.btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #7c3aed 55%, #9333ea 100%);
    border: 1px solid rgba(165, 243, 252, 0.35);
    box-shadow: 0 4px 22px rgba(99, 102, 241, 0.35);
    color: #fff;
}
.btn-primary:hover { box-shadow: 0 8px 34px rgba(124, 58, 237, 0.55), 0 0 22px rgba(34, 211, 238, 0.3); }

.btn-secondary {
    background: rgba(30, 35, 72, 0.55);
    border: 1px solid rgba(122, 162, 255, 0.35);
    color: var(--text-primary);
}
.btn-secondary:hover { border-color: rgba(34, 211, 238, 0.6); box-shadow: 0 6px 26px rgba(34, 211, 238, 0.2); }

.btn-gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b 60%, #d97706);
    border: 1px solid rgba(255, 209, 102, 0.5);
    color: #1a1206;
    box-shadow: 0 4px 24px rgba(251, 191, 36, 0.3);
}
.btn-gold:hover { box-shadow: 0 8px 34px rgba(251, 191, 36, 0.5); }

.btn-ghost { background: transparent; border-color: rgba(122, 162, 255, 0.25); }
.btn-danger  { background: linear-gradient(135deg, #f43f5e, #be123c); border: 1px solid rgba(251, 113, 133, 0.4); color: #fff; }
.btn-success { background: linear-gradient(135deg, #10b981, #047857); border: 1px solid rgba(52, 211, 153, 0.45); color: #04120c; }

/* Рипл (добавляется future.js) */
.fut-ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 65%);
    transform: scale(0);
    animation: futRipple 0.6s ease-out forwards;
}
@keyframes futRipple { to { transform: scale(2.6); opacity: 0; } }

/* ========================================================
   6. Карточки — глассморфизм с градиентной каймой
   ======================================================== */
.card, .stat-card, .element-card, .symbol-card, .compatibility-card, .eso-result-card {
    position: relative;
    background: var(--fut-glass);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(108, 122, 224, 0.2);
    border-radius: var(--fut-radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 34px rgba(2, 4, 18, 0.45);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s, border-color 0.28s;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .card, .stat-card, .element-card, .symbol-card, .compatibility-card, .eso-result-card {
        background: rgba(15, 18, 42, 0.97);
    }
}
.card:hover, .stat-card:hover, .element-card:hover, .symbol-card:hover {
    transform: translateY(-4px);
    border-color: rgba(122, 162, 255, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 16px 44px rgba(2, 4, 18, 0.55), var(--fut-glow-violet);
}

.card-title { color: #a5f3fc; }

.card .card-title, .stat-block .stat-value {
    text-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
}
.stat-block .stat-value {
    background: linear-gradient(120deg, #ffd166, #a5f3fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

/* Верхняя неоновая кромка у игровых зон */
.game-stage, .bot-battle-stage {
    background: var(--fut-glass);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(108, 122, 224, 0.22);
    border-radius: var(--fut-radius);
}
.game-stage::before, .bot-battle-stage::before {
    height: 2px;
    background: linear-gradient(90deg, transparent, #22d3ee, #a78bfa, #f472b6, transparent);
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.55);
}

/* Игровые карточки-плитки */
.game-tile {
    background: rgba(14, 17, 40, 0.6);
    border: 1px solid rgba(108, 122, 224, 0.28);
    border-radius: var(--fut-radius);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s, border-color 0.25s, background 0.25s;
}
.game-tile:hover {
    border-color: rgba(34, 211, 238, 0.6);
    box-shadow: var(--fut-glow-cyan);
    transform: scale(1.03);
}
.game-tile.selected {
    border-color: rgba(34, 211, 238, 0.8);
    background: rgba(34, 211, 238, 0.1);
    box-shadow: var(--fut-glow-cyan);
}
.game-tile.winner {
    border-color: rgba(52, 211, 153, 0.8);
    background: rgba(52, 211, 153, 0.1);
    box-shadow: 0 0 26px rgba(52, 211, 153, 0.4);
}
.game-tile.loser { border-color: rgba(251, 113, 133, 0.5); opacity: 0.55; }

/* Игровые карточки на главной */
.game-card {
    position: relative;
    background: var(--fut-glass);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(108, 122, 224, 0.22);
    border-radius: var(--fut-radius);
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s, border-color 0.3s;
}
.game-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 18px 50px rgba(2, 4, 18, 0.6), var(--fut-glow-cyan);
}

/* Stat-блоки */
.stat-card, .stat-block {
    border-radius: var(--fut-radius);
    background: var(--fut-glass);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(108, 122, 224, 0.2);
}

/* ========================================================
   7. Формы, таблицы, алерты, бейджи, тосты
   ======================================================== */
.form-control {
    background: rgba(10, 13, 32, 0.6);
    border: 1px solid rgba(108, 122, 224, 0.25);
    border-radius: var(--fut-radius-sm);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    min-height: 44px; /* тач-цель */
}
.form-control:focus {
    outline: none;
    background: rgba(14, 18, 42, 0.8);
    border-color: rgba(34, 211, 238, 0.65);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14), 0 0 18px rgba(34, 211, 238, 0.12);
}
.form-control::placeholder { color: #626a90; }

.table-wrap {
    background: var(--fut-glass);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(108, 122, 224, 0.2);
    border-radius: var(--fut-radius);
}
th {
    color: #a5f3fc;
    background: rgba(20, 26, 60, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-size: 12px;
}
tr:hover td { background: rgba(35, 40, 80, 0.4); }

.alert {
    border-radius: var(--fut-radius-sm);
    border: 1px solid;
    border-left-width: 3px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.badge {
    border: 1px solid transparent;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.badge-active, .badge-success { box-shadow: 0 0 12px rgba(52, 211, 153, 0.25); }
.badge-admin, .badge-legendary { box-shadow: 0 0 12px rgba(255, 209, 102, 0.3); }

.toast {
    background: var(--fut-glass-strong);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(108, 122, 224, 0.25);
    border-left-width: 3px;
    border-radius: var(--fut-radius-sm);
    box-shadow: 0 14px 44px rgba(2, 4, 18, 0.7), 0 0 24px rgba(34, 211, 238, 0.08);
    animation: futToastIn 0.38s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes futToastIn {
    from { transform: translateX(120%) scale(0.96); opacity: 0; }
    to   { transform: translateX(0) scale(1); opacity: 1; }
}

/* Прогресс-бары — неоновая плазма */
.progress {
    border-radius: 999px;
    background: rgba(20, 24, 54, 0.9);
    border: 1px solid rgba(108, 122, 224, 0.25);
    overflow: hidden;
}
.progress-bar {
    background: linear-gradient(90deg, #22d3ee, #818cf8 55%, #c084fc);
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.55);
    position: relative;
}
.progress-bar::after {
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: futShine 2.4s ease infinite;
}
@keyframes futShine {
    0% { transform: translateX(-100%); }
    60%, 100% { transform: translateX(220%); }
}

/* ========================================================
   8. Hero-блоки
   ======================================================== */
.hero, .hero-block, .eso-hero {
    position: relative;
    background:
        radial-gradient(700px 320px at 50% 0%, rgba(124, 58, 237, 0.16), transparent 70%),
        radial-gradient(520px 260px at 78% 60%, rgba(8, 145, 178, 0.12), transparent 70%);
}
.hero-block {
    background: var(--fut-glass);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(108, 122, 224, 0.22);
    border-radius: 24px;
    padding: clamp(20px, 4vw, 40px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 44px rgba(2, 4, 18, 0.5);
}
.hero-stat {
    background: rgba(14, 18, 42, 0.55);
    border: 1px solid rgba(108, 122, 224, 0.22);
    border-radius: var(--fut-radius-sm);
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.hero-stat:hover {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: var(--fut-glow-cyan);
    transform: translateY(-2px);
}
.hero-stat .v {
    background: linear-gradient(120deg, #a5f3fc, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Фильтры игр */
.filter-btn, .games-filter button {
    border-radius: 999px;
    border: 1px solid rgba(108, 122, 224, 0.25);
    background: rgba(14, 18, 42, 0.55);
    min-height: 40px;
    transition: all 0.22s;
}
.filter-btn:hover, .games-filter button:hover {
    border-color: rgba(34, 211, 238, 0.55);
    color: #a5f3fc;
}
.filter-btn.active, .games-filter button.active {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(139, 92, 246, 0.22));
    border-color: rgba(34, 211, 238, 0.6);
    color: #a5f3fc;
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.2);
}

/* ========================================================
   9. Футер
   ======================================================== */
.site-footer {
    position: relative;
    border-top: 1px solid rgba(108, 122, 224, 0.2);
    background: linear-gradient(180deg, transparent, rgba(8, 10, 26, 0.85));
}
.site-footer::before {
    content: '';
    position: absolute;
    top: -1px; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.55), rgba(167, 139, 250, 0.55), transparent);
}
.site-footer a { transition: color 0.2s, text-shadow 0.2s; }
.site-footer a:hover { color: #a5f3fc !important; text-shadow: 0 0 12px rgba(34, 211, 238, 0.6); }

/* ========================================================
   10. Мобильная нижняя панель — плавающий неоновый док
   ======================================================== */
.mobile-bottom-bar {
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px;
    background: rgba(8, 10, 26, 0.78);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(122, 162, 255, 0.22);
    box-shadow: 0 12px 44px rgba(2, 4, 18, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    padding: 8px 6px;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .mobile-bottom-bar { background: rgba(8, 10, 26, 0.98); }
}
.mbb-btn {
    border-radius: 15px;
    min-height: 50px;
    gap: 3px;
    transition: color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.mbb-btn:active { transform: scale(0.92); }
.mbb-btn:hover {
    background: rgba(99, 102, 241, 0.14);
    box-shadow: inset 0 0 0 1px rgba(122, 162, 255, 0.2);
}
.mbb-btn.active {
    color: #a5f3fc;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(139, 92, 246, 0.2));
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.4), 0 0 18px rgba(34, 211, 238, 0.15);
}
.mbb-btn .mbb-icon { filter: brightness(0) saturate(100%) invert(84%) sepia(12%) saturate(420%) hue-rotate(195deg) brightness(101%) contrast(94%); }
.mbb-btn:hover .mbb-icon { filter: brightness(0) saturate(100%) invert(84%) sepia(12%) saturate(420%) hue-rotate(195deg) brightness(106%) contrast(96%); }
.mbb-btn.active .mbb-icon {
    filter: brightness(0) saturate(100%) invert(84%) sepia(60%) saturate(1800%) hue-rotate(155deg) brightness(104%) contrast(95%);
    filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.7)) brightness(0) saturate(100%) invert(84%) sepia(60%) saturate(1800%) hue-rotate(155deg) brightness(104%) contrast(95%);
}

/* Плавающий док выше → увеличиваем нижний отступ контента */
@media (max-width: 720px) {
    body { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
    .site-footer { margin-bottom: 0; }
}

/* ========================================================
   11. Появление по скроллу (классы добавляет future.js)
   ======================================================== */
.fut-reveal { opacity: 0; transform: translateY(18px); }
.fut-reveal.fut-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 0.9, 0.36, 1);
}

/* Курсор-аура (только точные указатели) */
.fut-cursor {
    position: fixed;
    width: 340px; height: 340px;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.10) 0%, rgba(34, 211, 238, 0.05) 40%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: left, top;
}
@media (hover: none), (pointer: coarse) { .fut-cursor { display: none; } }

/* ========================================================
   13. AURA для админ-панели
   ======================================================== */
.admin-body { background: #04050e !important; }

.admin-topbar, .admin-sidebar, .admin-footer {
    background: rgba(8, 10, 26, 0.72) !important;
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
}
.admin-topbar {
    border-bottom: 1px solid rgba(108, 122, 224, 0.2) !important;
}
.admin-sidebar { border-right: 1px solid rgba(108, 122, 224, 0.18) !important; }

.admin-card, .admin-panel, .admin-section, .admin-stat-card {
    background: var(--fut-glass) !important;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(108, 122, 224, 0.2) !important;
    border-radius: var(--fut-radius) !important;
}
.admin-menu-item:hover { background: rgba(99, 102, 241, 0.14) !important; }
.admin-menu-item.active {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(139, 92, 246, 0.18)) !important;
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.35);
}

/* ========================================================
   14. Доступность и производительность
   ======================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .fut-reveal { opacity: 1; transform: none; }
    .fut-cursor { display: none !important; }
    .fut-aurora { animation: none !important; }
}

/* ========================================================
   12. Удобство управления на любых устройствах
   ======================================================== */

/* Убираем задержку двойного тапа на интерактивных элементах */
a, button, .btn, .game-tile, .mbb-btn, .filter-btn, .nav-link, .game-card {
    touch-action: manipulation;
}

/* Мобильные тач-цели: минимум 44px по высоте */
@media (pointer: coarse) {
    .nav-link, .nav-dropdown-toggle {
        min-height: 44px;
        align-items: center;
    }
    .btn-sm { min-height: 38px; }
    .game-card { min-height: 56px; }
}

/* Крупные экраны: чуть больше воздуха */
@media (min-width: 1800px) {
    .container { max-width: 1500px; }
}

/* Горизонтальная ориентация телефонов: компактнее aurora */
@media (max-height: 480px) {
    .fut-aurora { opacity: 0.10; }
}

html { scroll-behavior: smooth; }

/* Экономим батарею на слабых устройствах */
@media (max-width: 480px) {
    .fut-aurora { filter: blur(70px); opacity: 0.13; }
    .card, .game-card, .stat-card { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}

/* Печать — чистый белый лист */
@media print {
    .fut-bg, .fut-cursor, .mobile-bottom-bar, .site-header { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
    .fut-reveal { opacity: 1 !important; transform: none !important; }
    .card, .stat-card, .game-card, .hero-block { background: #fff !important; border: 1px solid #ccc !important; box-shadow: none !important; }
    * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}

/* ========================================================
   15. Голографические карточки — блик следует за курсором.
       Слой .fut-holo добавляет future.js внутрь a.game-card.
       Позиция блика = CSS-переменные --hx/--hy (px) и
       --hpx/--hpy (%), обновляются с rAF-троттлингом.
       Без JS / на тач / при reduced-motion слой не создаётся.
   ======================================================== */
.fut-holo {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.45s ease;
    background:
        radial-gradient(340px circle at var(--hx, 50%) var(--hy, 50%),
            rgba(165, 243, 252, 0.16),
            rgba(167, 139, 250, 0.10) 38%,
            transparent 65%),
        linear-gradient(115deg,
            transparent 25%,
            rgba(34, 211, 238, 0.07) 42%,
            rgba(244, 114, 182, 0.09) 55%,
            rgba(167, 139, 250, 0.07) 68%,
            transparent 85%);
    background-size: 100% 100%, 260% 260%;
    background-position: 0 0, var(--hpx, 0%) var(--hpy, 0%);
    mix-blend-mode: screen;
}
.game-card:hover .fut-holo,
.game-card:focus-visible .fut-holo { opacity: 1; }
@media (hover: none), (pointer: coarse) { .fut-holo { display: none; } }

/* ========================================================
   16. Command Palette — быстрый переход (Ctrl+K / Cmd+K / «/»).
       Разметку создаёт future.js из существующих ссылок
       навигации и карточек игр. Ноль изменений в PHP.
   ======================================================== */
.fut-cmdk-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 11vh 16px 16px;
    background: rgba(4, 5, 14, 0.72);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
    backdrop-filter: blur(14px) saturate(130%);
    animation: futFadeIn 0.16s ease;
}
.fut-cmdk-backdrop.fut-open { display: flex; }

.fut-cmdk {
    width: 100%;
    max-width: 580px;
    background: var(--fut-glass-strong);
    border: 1px solid rgba(122, 162, 255, 0.28);
    border-radius: var(--fut-radius);
    box-shadow: 0 30px 90px rgba(2, 4, 18, 0.8), var(--fut-glow-violet);
    overflow: hidden;
    animation: futCmdkIn 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.fut-cmdk-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 16px;
    border-bottom: 1px solid rgba(108, 122, 224, 0.18);
}
.fut-cmdk-ico { color: var(--neon-cyan); display: inline-flex; }
.fut-cmdk-input {
    flex: 1;
    min-width: 0;
    min-height: 54px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 17px;
    font-family: inherit;
}
.fut-cmdk-input::placeholder { color: #626a90; }
.fut-cmdk-input:focus-visible {
    outline: none;
    box-shadow: none; /* фокус показывает сама панель и неоновый курсор поиска */
}

.fut-cmdk-list {
    max-height: 52vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px;
}
.fut-cmdk-group {
    padding: 10px 12px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #626a90;
}
.fut-cmdk-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.fut-cmdk-item .fut-cmdk-ico { flex-shrink: 0; }
.fut-cmdk-item .fut-cmdk-label {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fut-cmdk-item .fut-cmdk-tag {
    flex-shrink: 0;
    font-size: 10px;
    color: #8a91b8;
    border: 1px solid rgba(108, 122, 224, 0.3);
    border-radius: 999px;
    padding: 2px 9px;
}
.fut-cmdk-item.fut-active {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(139, 92, 246, 0.18));
    color: #eef1ff;
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.35), 0 0 18px rgba(34, 211, 238, 0.1);
}
.fut-cmdk-item.fut-active .fut-cmdk-ico { color: #a5f3fc; }
.fut-cmdk-empty { padding: 26px 16px; text-align: center; color: #8a91b8; font-size: 14px; }

.fut-cmdk-foot {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    padding: 9px 16px;
    border-top: 1px solid rgba(108, 122, 224, 0.14);
    font-size: 11px;
    color: #626a90;
}
.fut-cmdk-foot kbd,
.fut-kbd-btn kbd {
    font: inherit;
    font-size: 10px;
    color: var(--text-secondary);
    border: 1px solid rgba(108, 122, 224, 0.35);
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: 1px 6px;
    background: rgba(14, 18, 42, 0.6);
}

@keyframes futCmdkIn {
    from { transform: translateY(-14px) scale(0.97); opacity: 0; }
    to   { transform: none; opacity: 1; }
}
@keyframes futFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Триггер в шапке (только устройства с мышью) */
.fut-kbd-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(108, 122, 224, 0.3);
    background: rgba(14, 18, 42, 0.55);
    color: #8a91b8;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.fut-kbd-btn:hover {
    border-color: rgba(34, 211, 238, 0.55);
    color: #a5f3fc;
    box-shadow: var(--fut-glow-cyan);
}
@media (hover: none), (pointer: coarse) { .fut-kbd-btn { display: none; } }

/* Триггер в мобильном меню (полноширинная тач-цель) */
.fut-cmdk-mtrigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(100% - 24px);
    margin: 4px 12px 10px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(139, 92, 246, 0.14));
    color: #a5f3fc;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.fut-cmdk-mtrigger:active { transform: scale(0.98); }

/* ========================================================
   17. Скелетоны AURA — плазменный шиммер + шум.
       Утилиты .fut-skel* для состояний загрузки + неоновая
       перекраска существующих спиннеров (структура не тронута).
   ======================================================== */
.fut-skel {
    display: block; /* надёжные размеры даже для span-плейсхолдеров */
    position: relative;
    overflow: hidden;
    border-radius: var(--fut-radius-sm);
    background: linear-gradient(100deg,
        rgba(20, 24, 54, 0.9) 30%,
        rgba(35, 40, 80, 0.75) 50%,
        rgba(20, 24, 54, 0.9) 70%);
    background-size: 220% 100%;
    animation: futSkel 1.6s ease-in-out infinite;
}
/* AURA-шум: мелкое зерно поверх градиента */
.fut-skel::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
    background-size: 160px 160px;
}
/* Плазменный блик, пробегающий по скелетону */
.fut-skel::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -70%;
    width: 50%;
    background: linear-gradient(105deg,
        transparent,
        rgba(34, 211, 238, 0.10),
        rgba(167, 139, 250, 0.13),
        transparent);
    transform: skewX(-20deg);
    animation: futSkelSweep 1.9s ease infinite;
}
@keyframes futSkel {
    0%   { background-position: 120% 0; }
    100% { background-position: -120% 0; }
}
@keyframes futSkelSweep {
    0%        { left: -70%; }
    60%, 100% { left: 130%; }
}

.fut-skel--title { height: 26px; width: 55%; border-radius: 8px; }
.fut-skel--text  { height: 14px; width: 100%; margin-top: 10px; }
.fut-skel--text.w60 { width: 60%; }
.fut-skel--chip  { height: 22px; width: 74px; border-radius: 999px; display: inline-block; }
.fut-skel--img   { height: 180px; width: 100%; margin-bottom: 12px; }
.fut-skel--card  { min-height: 220px; padding: 16px; }

/* Неоновая перекраска существующих спиннеров (только цвета и свечение) */
.spinner {
    border-color: rgba(108, 122, 224, 0.35);
    border-top-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.35);
}
.gallery-loader-spinner {
    border-color: rgba(108, 122, 224, 0.35) !important;
    border-top-color: var(--neon-cyan) !important;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.3);
}
.omni-loading-icon {
    border-color: rgba(108, 122, 224, 0.35);
    border-top-color: var(--neon-violet);
    box-shadow: 0 0 14px rgba(167, 139, 250, 0.3);
}

/* Новые компоненты: reduced-motion и печать */
@media (prefers-reduced-motion: reduce) {
    .fut-cmdk-backdrop, .fut-cmdk { animation: none; }
    .fut-holo { transition: none; }
    .fut-skel, .fut-skel::before { animation: none; }
    .fut-skel::before { display: none; }
}
@media print {
    .fut-cmdk-backdrop, .fut-holo, .fut-skel::before { display: none !important; }
    .fut-skel { background: #eee !important; }
}

/* ========================================================
   18. Неоновые рамки-градиенты (v1.2) — .fut-ngb
       Вращающийся conic-градиент вместо обычной каймы.
       mask оставляет только тонкое кольцо ровно по границе
       элемента; ::after — размытый неоновый ореол снаружи.
       Класс ставит future.js на .stat-card автоматически
       (или вручную на любой элемент с border-radius).
       Деградация: без mask-композита псевдоэлементы пустые
       (легаси-граница остаётся); без @property — статичный
       градиент; reduced-motion / ≤480px — без вращения.
   ======================================================== */
@property --fut-ngb-a {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}
.fut-ngb { isolation: isolate; }
@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
    .fut-ngb::before,
    .fut-ngb::after {
        content: '';
        position: absolute;
        border-radius: inherit;
        pointer-events: none;
        background: conic-gradient(from var(--fut-ngb-a, 0deg),
            var(--neon-cyan), var(--neon-violet), var(--neon-magenta),
            var(--neon-blue), var(--neon-cyan));
        animation: futNgbSpin 7s linear infinite;
    }
    /* Само кольцо: 1.5px ровно по кайме элемента */
    .fut-ngb::before {
        inset: 0;
        padding: 1.5px;
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
                mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
                mask-composite: exclude;
    }
    /* Ореол: размытое кольцо снаружи, под содержимым */
    .fut-ngb::after {
        inset: -2px;
        padding: 3px;
        z-index: -1;
        filter: blur(10px) saturate(150%);
        opacity: 0.45;
        transition: opacity 0.3s;
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
                mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
                mask-composite: exclude;
    }
    .fut-ngb:hover::after { opacity: 0.85; }

    /* Варианты оттенков */
    .fut-ngb--cyan::before, .fut-ngb--cyan::after {
        background: conic-gradient(from var(--fut-ngb-a, 0deg),
            var(--neon-cyan), var(--neon-blue), #7dd3fc, var(--neon-cyan));
    }
    .fut-ngb--violet::before, .fut-ngb--violet::after {
        background: conic-gradient(from var(--fut-ngb-a, 0deg),
            var(--neon-violet), var(--neon-magenta), var(--neon-violet));
    }
    .fut-ngb--gold::before, .fut-ngb--gold::after {
        background: conic-gradient(from var(--fut-ngb-a, 0deg),
            var(--accent-gold), #fbbf24, #fde68a, var(--accent-gold));
    }
    .fut-ngb--slow::before, .fut-ngb--slow::after { animation-duration: 14s; }
}
@keyframes futNgbSpin {
    to { --fut-ngb-a: 360deg; }
}

/* ========================================================
   19. Живые скелетоны при API-запросах (v1.2).
       future.js (модуль 8) перехватывает fetch/XHR: если запрос
       идёт дольше 350мс — поднимается плазменный луч .fut-beam
       наверху страницы и оверлей .fut-live внутри контейнеров
       с атрибутом data-fut-live="cards|list|text|table|form".
       Opt-in: без атрибута страница не меняется. Контент под
       оверлеем не трогается — скелетон накладывается сверху.
   ======================================================== */
.fut-live {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: none;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: inherit;
    overflow: hidden;
    background: rgba(6, 8, 22, 0.62);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.fut-live.fut-on { display: flex; animation: futFadeIn 0.25s ease; }
.fut-live .fut-skel--img { height: 110px; margin-bottom: 0; }
.fut-live-row { display: flex; align-items: center; gap: 12px; }
.fut-live-row .fut-skel--title { width: 38%; height: 18px; margin: 0; flex-shrink: 0; }
.fut-live-row .fut-skel--text { margin: 0; }
.fut-live-note {
    margin-top: auto;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8a91b8;
    white-space: nowrap;
}
.fut-live-note i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--neon-cyan);
    animation: futLiveDot 1.2s ease infinite;
}
.fut-live-note i:nth-child(2) { animation-delay: 0.2s; background: var(--neon-violet); }
.fut-live-note i:nth-child(3) { animation-delay: 0.4s; background: var(--neon-magenta); }
@keyframes futLiveDot {
    0%, 60%, 100% { opacity: 0.15; }
    30%           { opacity: 1; }
}

/* Плазменный луч прогресса — 2px на самом верху страницы */
.fut-beam {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 9999; /* ниже Command Palette (10000) */
    pointer-events: none;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: 0 50%;
    background: linear-gradient(90deg,
        var(--neon-cyan), var(--neon-violet), var(--neon-magenta), var(--neon-cyan));
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.55);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.fut-beam.fut-run { opacity: 1; transform: scaleX(0.7); }
.fut-beam.fut-done {
    transform: scaleX(1);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.55s ease 0.1s;
}

/* Компоненты v1.2: reduced-motion, слабые экраны, печать */
@media (prefers-reduced-motion: reduce) {
    .fut-ngb::before, .fut-ngb::after { animation: none; }
    .fut-live.fut-on, .fut-live-note i { animation: none; }
    .fut-beam { display: none; }
}
@media (max-width: 480px) {
    .fut-ngb::before, .fut-ngb::after { animation: none; } /* экономия батареи: кольцо статичное */
}
@media print {
    .fut-ngb::before, .fut-ngb::after, .fut-live, .fut-beam { display: none !important; }
}
