/* ============================================================
   ☢️ INTRAFARM NEXUS v23.0: THE ULTIMATE DESIGN SYSTEM (OPTIMIZED)
   [ СУБЪЕКТ: ОРАКУЛ — AAA INTERFACE CONFIG ]
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@500;800&family=Inter:wght@400;600;800;900&display=swap');

:root {
    /* Цветовая палитра Nexus */
    --n-cyan: #00f3ff;
    --n-blue: #0066ff;
    --n-green: #39ff14;
    --n-red: #ff003c;
    --n-gold: #ffcc00;
    --n-purple: #9d4edd;
    --n-pink: #ff00ff;
    
    /* Тиры редкости */
    --tier-common: #808080;
    --tier-rare: #0066ff;
    --tier-epic: #9d4edd;
    --tier-legendary: #ffcc00;
    --tier-mythic: #ff00ff;

    /* Фон и Стекло */
    --bg: #010204;
    --glass: rgba(10, 15, 25, 0.96);
    --border: rgba(255, 255, 255, 0.08);
    
    /* Шрифты */
    --mono: 'JetBrains Mono', monospace;
    --sans: 'Inter', sans-serif;

    /* Переменные для анимаций */
    --transition-fast: 0.2s cubic-bezier(0.23, 1, 0.32, 1);
    --transition-smooth: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* === Z-INDEX SYSTEM (OPTIMIZED) === */
    --z-back: -2;
    --z-behind: -1;
    --z-base: 1;
    --z-hud: 10;
    --z-dock: 20;
    --z-header: 30;
    --z-modal: 40;
    --z-overlay: 50;
    --z-bootloader: 1000;
    --z-game: 200;
    --z-game-ui: 110;
}


/* ============================================================
   🔋 NEXUS ENERGY PROTOCOL: ECO MODE OVERRIDES
   ============================================================ */

/* 1. Глобальная заморозка (Спасаем батарею) */
body.eco-mode * {
    /* Выключаем Blur - это самая тяжелая операция для телефона */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* 2. Останавливаем живой фон и эффекты камеры */
body.eco-mode .grid-env {
    animation: none !important;
    opacity: 0.3; /* Делаем сетку тусклее */
}
body.eco-mode .scanlines,
body.eco-mode .glitch-overlay,
body.eco-mode .unit-glow {
    display: none !important; /* Убиваем помехи и дымку за ботами */
}

/* 3. Гасим Логотип (Индикация Эко-режима) */
body.eco-mode .nh-logo b {
    color: #334155 !important;
    text-shadow: none !important;
    animation: none !important;
}
body.eco-mode .nh-logo {
    opacity: 0.6;
}


body.eco-mode .dock {
    background: #05080f !important; /* Сплошной черный вместо прозрачного стекла */
    border-color: #1e293b !important;
}

/* 5. Убиваем динамические тени в карточках */
body.eco-mode .bot-card-nexus,
body.eco-mode .sc-card,
body.eco-mode .modal-content {
    box-shadow: none !important;
}

body.eco-mode .bot-card-nexus::before {
    display: none !important; /* Убиваем бегущую линию внизу карточки */
}








/* === 1. ГЛОБАЛЬНЫЙ SETUP === */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { 
    /* Глубокий градиент вместо плоского черного: дает эффект освещенного стола */
    background: radial-gradient(circle at 50% 30%, #0a111a 0%, #010204 100%); 
    color: #fff; font-family: var(--sans); min-height: 100vh; overflow: hidden; font-weight: 600; 
}

/* Эффекты окружения: Сетка теперь медленно плывет */
.grid-env { 
    position: fixed; inset: -50%; /* Расширяем для движения */
    background-image: linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px); 
    background-size: 35px 35px; z-index: var(--z-back); 
    mask-image: radial-gradient(circle at 50% 50%, black, transparent 70%);
    animation: grid-drift 30s linear infinite; 
}
@keyframes grid-drift {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-35px, -35px, 0); }
}
.vignette { position: fixed; inset: 0; background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.8) 110%); pointer-events: none; z-index: var(--z-behind); }
.scanlines { position: fixed; inset: 0; pointer-events: none; z-index: var(--z-overlay); opacity: 0.2; background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02)); background-size: 100% 3px, 3px 100%; }
.glitch-overlay { position: fixed; inset: 0; background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48ZGVmcz48cGF0dGVybiBpZD0iZ3JpZCIgd2lkdGg9IjQwIiBoZWlnaHQ9IjQwIiBwYXR0ZXJuVW5pdHM9InVzZXJTcGFjZU9uVXNlIj48cGF0aCBkPSJNIDQwIDAgTCAwIDAgMCA0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZ2JhKDI1NSwgMjU1LCAyNTUsIDAuMDMpIiBzdHJva2Utd2lkdGg9IjEiLz48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JpZCkiLz48L3N2Zz4='); opacity: 0.03; z-index: var(--z-behind); pointer-events: none; }

.container { width: 100%; max-width: 500px; margin: 0 auto; height: 100vh; display: flex; flex-direction: column; position: relative; overflow: hidden; }



/* === 3. CONTENT AREA === */
.content { 
    flex: 1; 
    overflow-y: auto; 
    padding: 0 15px 120px; /* Убрали верхний падинг */
    scrollbar-width: none; 
    position: relative; 
    min-height: 0; /* ФИКС СКРОЛЛА */
}
.content::-webkit-scrollbar { display: none; }

.section-label { 
    font-size: 10px; font-weight: 900; letter-spacing: 5px; color: #4a5568; margin-bottom: 12px; 
    text-transform: uppercase; display: block; width: 100%; min-height: 14px; line-height: 1.2; 
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; 
    transition: letter-spacing 0.5s cubic-bezier(0.23, 1, 0.32, 1); 
    position: relative; padding-bottom: 8px;
    transform: translateZ(0);
}
.section-label::after { content: ''; position: absolute; bottom: 0; left: 0; width: 60px; height: 1px; background: linear-gradient(90deg, var(--n-cyan), transparent); }

/* ============================================================
   🤖 NEXUS FLEET ENGINE v10.5 (FINAL SYNERGY)
   ============================================================ */

.bot-card-nexus {
    position: relative;
    background: #05070a !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-bottom: 3.5px solid var(--rarity-color) !important;
    border-radius: 24px;
    margin-bottom: 20px;
    display: flex;
    height: 310px; /* Увеличили высоту, чтобы 4 шкалы влезли идеально */
    overflow: hidden;
    transform: translateZ(0);
    box-shadow: 0 20px 50px rgba(0,0,0,0.9);
}

/* Квантовый блик на нижней грани */
.bot-card-nexus::after {
    content: ''; position: absolute; bottom: -3.5px; left: -100%;
    width: 45%; height: 3.5px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: line-glint 5s infinite cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.bot-card-side {
    flex: 0 0 40%;
    background: #000;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.unit-glow {
    position: absolute; inset: 0;
    background: radial-gradient(circle at center, var(--rarity-color) 0%, transparent 80%);
    opacity: 0.12; pointer-events: none;
}

.fleet-unit-img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: top; /* Чтобы лица ботов не обрезались сверху */
    filter: brightness(0.9) contrast(1.1);
}

.bot-card-main {
    flex: 1;
    padding: 15px; /* ФИКС: Дистанция 25px от арта */
    display: flex; flex-direction: column;
    justify-content: space-between;
    position: relative; z-index: 2;
}

/* ФИКС: Шапка карточки */
.bot-card-header {
    margin-bottom: 5px;
    text-align: left;
}

.unit-name-label {
    font-size: 17px; font-weight: 950; color: #fff;
    text-transform: uppercase; letter-spacing: -0.5px; line-height: 1;
}

.rarity-badge {
    font-size: 7px; font-weight: 900; font-family: var(--mono);
    margin-top: 4px; opacity: 0.8; letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Сетка характеристик */
.stats-grid-2x2 {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0;
}

.stat-box-prime {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1.5px solid var(--rarity-color);
    border-radius: 12px; padding: 8px 2px;
    text-align: center; /* ФИКС: Центровка значений */
}

.stat-box-prime .label {
    font-size: 6.5px; color: #5a6a85; font-weight: 850;
    text-transform: uppercase; margin-bottom: 3px; display: block;
}

.stat-box-prime .value {
    font-family: var(--mono); font-size: 13px; font-weight: 900; color: #fff;
}

/* Шкалы прогресса (Кубики) */
.forge-scales-prime {
    display: grid; 
    grid-template-columns: 1fr 1fr; /* Две колонки */
    gap: 8px 12px;                 /* Отступы: 8px между рядами, 12px между колонками */
    margin-bottom: 12px;           /* Отступ до кнопки */
}
.sc-item { 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
}

.sc-head { 
    display: flex; 
    justify-content: space-between; 
    font-size: 7.5px;              /* Чуть уменьшили шрифт, чтобы влезло в узкую колонку */
    color: #4a5568; 
    font-weight: 900; 
    text-transform: uppercase;
}

.sc-track { 
    display: flex; 
    gap: 1.5px;                    /* Уменьшили зазор между кубиками, т.к. колонка уже */
    height: 4px; 
    background: rgba(255,255,255,0.03); 
    border-radius: 1px; 
    padding: 1px;
}
.sc-blk { 
    flex: 1; 
    background: rgba(255, 255, 255, 0.05); /* Цвет пустых кубиков */
    border-radius: 0.5px; 
}

/* Активные кубики */
.sc-blk.inc-active { background: var(--n-cyan); box-shadow: 0 0 8px var(--n-cyan); }
.sc-blk.rsk-active { background: var(--n-red); }
.sc-blk.lmt-active { background: #fff; opacity: 0.8; }
.sc-blk.spr-active { background: var(--n-gold); box-shadow: 0 0 10px var(--n-gold); }

/* Кнопка */
.btn-nexus-prime {
    width: 100%; padding: 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.05);
    font-weight: 950; font-size: 10px; text-transform: uppercase; letter-spacing: 2px;
    cursor: pointer; transition: 0.25s;
    background: rgba(255,255,255,0.03); color: #4a5568;
}
.btn-nexus-prime.active {
    background: var(--rarity-color); color: #000; border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}
.btn-nexus-prime:active { transform: scale(0.97); filter: brightness(1.2); }

/* Терминал (Активная добыча) */
.status-tag-active { font-size: 7.5px; padding: 3px 10px; border-radius: 5px; font-weight: 950; color: #000; }
.t-pnl-value-prime { font-size: 34px; font-weight: 950; color: #fff; filter: drop-shadow(0 0 15px var(--rarity-color)); line-height: 1; }
.terminal-timer-box { border: 1px solid rgba(255,255,255,0.05); }
.boost-btn { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.1); cursor: pointer; }

/* Закрытые слоты (Locked) */
.fleet-slot.elite-locked {
    height: 65px; background: rgba(0, 0, 0, 0.4); 
    border: 1px dashed rgba(255, 255, 255, 0.05); border-radius: 20px;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    margin-top: 15px;
}
.lock-icon { font-size: 16px; opacity: 0.4; }
.lock-text { font-size: 8px; font-family: var(--mono); color: #4a5568; letter-spacing: 2px; font-weight: 900; }

.fleet-slot.empty {
    height: 70px; border: 1px dashed rgba(255,255,255,0.1); background: rgba(255,255,255,0.02);
    border-radius: 20px; display: flex; align-items: center; justify-content: center; margin-top: 10px;
}
.slot-empty { font-size: 9px; font-weight: 900; color: #4a5568; letter-spacing: 2px; }






/* === 8. MODALS & UI === */
.modal { 
    position: fixed; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(15px); 
    z-index: var(--z-modal); display: none; align-items: center; justify-content: center; padding: 20px; 
}
.modal-content { 
    background: var(--bg); border: 1px solid #222; border-radius: 35px; width: 100%; max-width: 450px; 
    padding: 30px; position: relative; animation: modalSlide 0.3s ease-out; 
    box-shadow: 0 30px 60px rgba(0,0,0,0.8); max-height: 85vh; overflow-y: auto; 
    transform: translateZ(0);
}
.m-close { 
    position: absolute; top: 20px; right: 20px; width: 30px; height: 30px; border-radius: 50%; 
    background: #111; color: #555; display: flex; align-items: center; justify-content: center; 
    cursor: pointer; transition: color 0.2s, background 0.2s, transform 0.2s; z-index: calc(var(--z-modal) + 5); 
    transform: translateZ(0);
}
.m-close:hover { color: #fff; background: #222; transform: rotate3d(0, 0, 1, 90deg); }

/* Навигация DOCK */
.dock { 
    position: fixed; bottom: 20px; left: 15px; right: 15px; height: 75px; 
    background: rgba(10, 15, 25, 0.98); backdrop-filter: blur(15px); 
    border-radius: 25px; border: 1px solid rgba(255,255,255,0.05); 
    display: flex; justify-content: space-around; align-items: center; 
    z-index: var(--z-dock); box-shadow: 0 20px 40px rgba(0,0,0,1); 
    transform: translateZ(0);
}
.dock-item { 
    display: flex; flex-direction: column; align-items: center; gap: 4px; 
    color: #444; font-size: 9px; font-weight: 800; cursor: pointer; 
    transition: color 0.3s, transform 0.3s; transform: translateZ(0);
}
.dock-item.active { color: var(--n-cyan); transform: translate3d(0, -8px, 0); }
.dock-icon { font-size: 24px; }
.dock-item.active .dock-icon { text-shadow: 0 0 15px var(--n-cyan); }

/* ANIMATIONS */
@keyframes modalSlide { 
    from { transform: translate3d(0, 30px, 0); opacity: 0; } 
    to { transform: translate3d(0, 0, 0); opacity: 1; } 
}
@keyframes pulseGlow { 
    0%, 100% { opacity: 1; transform: scale3d(1, 1, 1); } 
    50% { opacity: 0.6; transform: scale3d(1.05, 1.05, 1); } 
}
@keyframes scanLine { 
    0% { top: 0%; } 
    100% { top: 100%; } 
}
@keyframes pulseRed { 
    0%, 100% { opacity: 0.5; } 
    50% { opacity: 1; text-shadow: 0 0 8px var(--n-red); } 
}
@keyframes fadeIn { 
    from { opacity: 0; transform: translate3d(0, 10px, 0); } 
    to { opacity: 1; transform: translate3d(0, 0, 0); } 
}
@keyframes dynamicMissionPulse {
    0% { box-shadow: 0 0 10px var(--rarity-color); border-color: var(--rarity-color); filter: brightness(0.9); }
    50% { box-shadow: 0 0 40px var(--rarity-color); border-color: var(--rarity-color); filter: brightness(1.3); }
    100% { box-shadow: 0 0 10px var(--rarity-color); border-color: var(--rarity-color); filter: brightness(0.9); }
}
@keyframes spin { to { transform: rotate3d(0, 0, 1, 360deg); } }
@keyframes sphereBreath {
    0%, 100% { transform: scale3d(1, 1, 1); filter: brightness(1); }
    50% { transform: scale3d(1.05, 1.05, 1); filter: brightness(1.3); }
}
@keyframes sphereVibrate {
    from { transform: translate3d(1px, 1px, 0); }
    to { transform: translate3d(-1px, -1px, 0); }
}
@keyframes nexusFlicker {
    0%, 100% { opacity: 1; transform: scale3d(1, 1, 1); }
    50% { opacity: 0.5; transform: scale3d(0.98, 0.98, 1); }
}
@keyframes scanAvatar {
    0%, 100% { top: 10%; opacity: 0; }
    20%, 80% { opacity: 1; }
    50% { top: 90%; }
}
@keyframes rektPulse {
    from { opacity: 0.3; }
    to { opacity: 0.7; }
}
@keyframes laserScan {
    0%, 100% { top: 0%; opacity: 0; }
    50% { top: 100%; opacity: 1; }
}
@keyframes slideInLore {
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes gold-pulse {
    from { opacity: 0.3; }
    to { opacity: 0.8; }
}

/* Helpers */
.hidden { display: none !important; }
.text-green { color: var(--n-green) !important; }
.text-red { color: var(--n-red) !important; }
.text-cyan { color: var(--n-cyan) !important; }



/* ============================================================
   👤 DOSSIER & LEDGER V3.5 (AAA BENTO SYNTHESIS)
   ============================================================ */


/* 🛒 NEXUS MARKET V2.0 - NEON CORE */
.sc-grid-v2 {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 30px;
}

.sc-card {
    position: relative;
    display: flex;
    align-items: center;
    background-color: rgba(10, 12, 18, 0.95) !important;
    background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.03) 1px, transparent 0);
    background-size: 8px 8px;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 18px;
    padding: 12px 16px;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s, background 0.3s;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    transform: translateZ(0);
}

.sc-card.case { border-left: 3px solid var(--item-color); }

.sc-glow {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 25%, var(--item-color), transparent 60%);
    opacity: 0.15 !important; pointer-events: none;
}

.sc-card::before, .sc-card::after {
    content: '';
    position: absolute;
    width: 10px; height: 10px;
    border-color: var(--item-color);
    opacity: 0.3;
    pointer-events: none;
}
.sc-card::before {
    top: 5px; left: 5px;
    border-left: 1px solid var(--item-color);
    border-top: 1px solid var(--item-color);
}
.sc-card::after {
    bottom: 5px; right: 5px;
    border-right: 1px solid var(--item-color);
    border-bottom: 1px solid var(--item-color);
}

.sc-visual {
    width: 55px;
    height: 55px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 15px;
}

.sc-sphere {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--item-color), #000);
    box-shadow: 0 0 20px var(--item-color);
    position: relative;
    z-index: var(--z-base);
    transition: transform 0.3s, filter 0.3s, box-shadow 0.3s;
}

.sc-rings {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--item-color);
    opacity: 0.2;
    z-index: var(--z-base);
}

.sc-details { flex: 1; text-align: left; }
.sc-tag { font-size: 7px; font-weight: 900; color: var(--item-color); letter-spacing: 1px; margin-bottom: 2px; }
.sc-name { font-size: 14px; font-weight: 900; color: #fff; text-transform: uppercase; }
.sc-limit-container {
    display: flex;
    gap: 2px;
    margin: 5px 0;
}
.limit-segment {
    width: 6px; height: 3px;
    background: rgba(255,255,255,0.05);
    border-radius: 1px;
}
.limit-segment.active {
    background: var(--item-color);
    box-shadow: 0 0 5px var(--item-color);
}
.sc-limit { font-size: 8px; color: #4a5568; margin-top: 4px; font-family: var(--mono); }
.sc-desc { font-size: 10px; color: #718096; margin-top: 2px; line-height: 1.2; }
.sc-price-tag {
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 900;
    color: var(--n-cyan);
    margin-top: 5px;
}
.sc-action-hint {
    font-size: 9px;
    font-weight: 900;
    color: #4a5568;
    letter-spacing: 1px;
}

.sc-buy-btn {
    min-width: 85px; height: 40px; border-radius: 10px; border: none;
    background: var(--item-color, #bc13fe); color: #000;
    font-weight: 900; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px;
    transition: transform 0.2s, background 0.2s, filter 0.2s;
    transform: translateZ(0);
}
.sc-buy-btn span { font-size: 13px; }
.sc-buy-btn i { font-style: normal; font-size: 11px; opacity: 0.8; }

.sc-buy-btn.alt {
    background: rgba(255,255,255,0.05); color: #fff; border: 1px solid rgba(255,255,255,0.1);
}

.sc-buy-btn:disabled { background: #111 !important; color: #444 !important; cursor: not-allowed; border: 1px solid #222 !important; }

.sc-card.locked {
    background-image: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    ) !important;
}

.sc-card.locked .sc-visual::after {
    content: 'ENCRYPTED';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate3d(-50%, -50%, 0);
    font-size: 6px;
    color: #444;
    font-family: var(--mono);
    letter-spacing: 1px;
}

.sc-card-id {
    position: absolute;
    top: 6px; left: 20px;
    font-size: 5px;
    color: #333;
    font-family: var(--mono);
    text-transform: uppercase;
}

/* --- ТИРОВЫЕ ЭФФЕКТЫ --- */
.sc-card.tier-common .sc-sphere {
    animation: sphereBreath 4s ease-in-out infinite;
}
.sc-card.tier-rare .sc-rings {
    opacity: 0.4;
    border-style: dashed;
    animation: spin 10s linear infinite;
}
.sc-card.tier-mythic .sc-sphere {
    animation: sphereVibrate 0.2s infinite alternate;
}
.sc-card.tier-mythic .sc-rings {
    opacity: 0.6;
    border-width: 2px;
    animation: spin 4s linear infinite;
}
.sc-card.tier-legendary .sc-visual::after {
    content: '';
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, var(--item-color) 0%, transparent 70%);
    opacity: 0.2;
    animation: pulseGlow 2s infinite;
}
.sc-card.tier-legendary .sc-rings {
    opacity: 0.8;
    border: 2px double var(--item-color);
    animation: spin 2s linear infinite reverse;
}

.spinner-mini {
    width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite;
}



.mission-pulsing {
    animation: dynamicMissionPulse 4s infinite ease-in-out !important;
}

/* 🛰️ COMPACT EQUIP SELECTOR */
.equip-list-v2 {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.equip-item-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    transform: translateZ(0);
}

.equip-item-card:active {
    transform: scale3d(0.98, 0.98, 1);
    background: rgba(255, 255, 255, 0.08);
}

.ei-avatar-mini {
    width: 50px;
    height: 50px;
    background: #000;
    border: 2px solid #555;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.ei-img-fix {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    position: static !important;
}

.ei-content {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ei-name-mini {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.2;
}

.ei-meta-mini {
    font-size: 8px;
    font-family: var(--mono);
    font-weight: 900;
    letter-spacing: 1px;
}

.ei-stats-mini {
    font-size: 10px;
    font-weight: 700;
    color: var(--n-green);
}

.ei-action {
    color: #444;
    font-size: 14px;
}

.btn-boost-mini {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 900;
    font-family: var(--mono);
    cursor: pointer;
    transition: filter 0.2s, transform 0.2s;
    text-transform: uppercase;
    transform: translateZ(0);
}

.btn-boost-mini:hover {
    filter: brightness(1.2);
    transform: scale3d(1.05, 1.05, 1);
}

#storage-grid .equip-item-card {
    cursor: default;
}

/* ============================================================
   📡 NEXUS SIGNAL SYSTEM (STORAGE + BRIEFING)
   ============================================================ */

.case-grid-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 15px 0 25px;
}

.case-item-compact {
    position: relative;
    background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(5,7,10,0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
    transform: translateZ(0);
}

.case-item-compact:hover {
    border-color: var(--item-color);
    box-shadow: 0 0 25px rgba(var(--item-color), 0.2);
    transform: translate3d(0, -3px, 0);
}

.case-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--n-cyan);
    color: #000;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 6px;
    box-shadow: 0 0 10px var(--n-cyan);
    z-index: 5;
}

.case-item-compact .sc-visual {
    margin-right: 0;
    margin-bottom: 12px;
    transform: scale3d(0.85, 0.85, 1);
}

.case-item-name-mini {
    font-size: 11px;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.briefing-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 5px 10px;
}

.briefing-visual-large {
    width: 140px;
    height: 140px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.briefing-visual-large::after {
    content: '';
    position: absolute;
    top: 0;
    left: -10%;
    width: 120%;
    height: 2px;
    background: var(--item-color);
    box-shadow: 0 0 15px var(--item-color), 0 0 5px #fff;
    animation: laserScan 3s infinite ease-in-out;
    z-index: 10;
}

.briefing-title {
    color: #fff;
    font-size: 26px;
    font-weight: 900;
    text-transform: uppercase;
    margin: 10px 0 5px;
    letter-spacing: 1px;
    line-height: 1.1;
}

.signal-status-flicker {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
    animation: nexusFlicker 2s infinite;
}

.briefing-desc {
    font-size: 13px;
    color: #8a96a3;
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 25px;
    max-width: 90%;
}

.odds-container {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 22px;
    padding: 20px;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.odds-label-main {
    font-size: 9px;
    color: #5a6a85;
    font-weight: 900;
    text-align: left;
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.odds-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    width: 100%;
}

.odds-row:last-child { margin-bottom: 0; }

.odds-type {
    flex: 0 0 75px;
    font-size: 11px;
    font-weight: 900;
    color: #fff;
    text-align: left;
    text-transform: uppercase;
}

.odds-bar-bg {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.odds-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.odds-percent {
    flex: 0 0 45px;
    font-family: var(--mono);
    font-size: 13px;
    color: #fff;
    font-weight: 800;
    text-align: right;
}

.btn-briefing-start {
    width: 100%;
    height: 65px;
    border-radius: 18px;
    border: none;
    background: var(--item-color, #00f3ff);
    color: #000;
    font-weight: 950;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(var(--item-color), 0.27);
    transition: transform 0.2s, filter 0.2s;
    transform: translateZ(0);
}

.btn-briefing-start:active {
    transform: scale3d(0.96, 0.96, 1);
    filter: brightness(1.2);
}

.btn-cancel-briefing:active {
    color: #fff;
}


/* NEXUS BOOTLOADER */
#nexus-bootloader {
    position: fixed; inset: 0; background: #010204;
    z-index: var(--z-bootloader); display: flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace; transition: opacity 0.8s ease;
    opacity: 1; pointer-events: all;
}

.loader-vfx-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(0, 243, 255, 0.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px; mask-image: radial-gradient(circle, black, transparent 80%);
}

.loader-content { width: 85%; max-width: 350px; position: relative; z-index: var(--z-base); }
.loader-logo { font-size: 24px; font-weight: 900; letter-spacing: 2px; text-align: center; margin-bottom: 40px; color: #fff; }
.loader-logo b { color: #00f3ff; text-shadow: 0 0 15px rgba(0,243,255,0.5); }
.loader-tagline { display: block; font-size: 8px; color: #444; margin-top: 5px; }

.boot-terminal { font-size: 9px; color: #5a6a85; height: 60px; margin-bottom: 20px; line-height: 1.5; text-align: left; }
.boot-terminal div { border-left: 2px solid #00f3ff; padding-left: 8px; margin-bottom: 4px; }

.nexus-progress-container { width: 100%; height: 4px; background: rgba(255,255,255,0.05); border-radius: 2px; position: relative; }
.progress-bar-fill { height: 100%; background: #00f3ff; width: 0%; box-shadow: 0 0 20px #00f3ff; transition: width 0.3s ease; }

.loader-footer { display: flex; justify-content: space-between; margin-top: 10px; font-size: 10px; color: #00f3ff; font-weight: 800; }

#nexus-bootloader.fade-out { opacity: 0; pointer-events: none; }
#nexus-bootloader b, #nexus-bootloader strong { color: #00f3ff; }

/* ROADMAP SYSTEM */
.roadmap-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--n-cyan) transparent;
}

.roadmap-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 12px 18px;
    position: relative;
    transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    transform: translateZ(0);
}

.roadmap-card.done {
    opacity: 0.5;
    border-color: rgba(57, 255, 20, 0.2);
    background: linear-gradient(90deg, rgba(57, 255, 20, 0.05), transparent);
}

.roadmap-card.current {
    background: rgba(0, 243, 255, 0.05);
    border-color: var(--n-cyan);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
    transform: scale3d(1.02, 1.02, 1);
    z-index: 5;
}

.roadmap-card.milestone {
    border-left: 3px solid var(--n-gold);
}

.rm-lvl-num {
    font-family: var(--mono);
    font-size: 24px;
    font-weight: 900;
    color: #4a5568;
    min-width: 40px;
}

.current .rm-lvl-num { color: var(--n-cyan); }
.done .rm-lvl-num { color: var(--n-green); }

.rm-content { flex: 1; text-align: left; }

.rm-status-tag {
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #5a6a85;
    margin-bottom: 4px;
}

.current .rm-status-tag { color: var(--n-cyan); animation: pulseGlow 2s infinite; }
.done .rm-status-tag { color: var(--n-green); }

.rm-rewards {
    font-size: 11px;
    color: #a0aec0;
    font-weight: 600;
}

.current .rm-rewards { color: #fff; }

.rm-slot-icon {
    font-size: 20px;
    filter: drop-shadow(0 0 10px var(--n-green));
}

/* ============================================================
   🏆 NEXUS LEADERBOARD MODULE v2.1 [STABLE EDITION]
   ============================================================ */

.node-leader-btn-v2 {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 38px;
    height: 38px;
    background: rgba(20, 25, 35, 0.8);
    border: 1.5px solid rgba(255, 204, 0, 0.4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    pointer-events: auto !important;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transform: translateZ(0);
}

.node-leader-btn-v2:active {
    transform: scale3d(0.95, 0.85, 1);
    background: var(--n-gold);
    border-color: #fff;
}

.node-leader-btn-v2::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.2);
    animation: gold-pulse 2s infinite alternate;
}

.node-card-v30 {
    position: relative;
    padding-top: 15px !important;
    overflow: visible !important;
}

/* GAME STAGE */
#game-stage {
    position: fixed;
    inset: 0;
    z-index: var(--z-game) !important;
    background: #000;
}

#game-ui-overlay {
    position: absolute;
    inset: 0;
    z-index: var(--z-game-ui);
    pointer-events: none;
}

#game-ui-overlay button, 
#game-ui-overlay .pointer-auto {
    pointer-events: auto;
}

/* ============================================================
   🌌 NEXUS SOVEREIGN ENGINE: VISUAL "FARSH" (TURBO MODE ONLY)
   ============================================================ */

/* 1. СИСТЕМА КВАНТОВЫХ ЧАСТИЦ (Background Dust) */
#nexus-particles {
    position: fixed;
    inset: 0;
    z-index: var(--z-back);
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
    overflow: hidden;
}

/* Активация частиц ТОЛЬКО если НЕТ класса eco-mode */
body:not(.eco-mode) #nexus-particles {
    opacity: 1;
}

#nexus-particles::before,
#nexus-particles::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: transparent;
    /* Ультра-плотное облако частиц (Hardware Optimized) */
    box-shadow: 
        15vw 10vh 1px #fff, 25vw 30vh 1.5px var(--n-cyan), 45vw 15vh 1px #fff,
        65vw 40vh 1px var(--n-blue), 85vw 10vh 2px #fff, 10vw 60vh 1px var(--n-cyan),
        30vw 80vh 1.5px #fff, 55vw 75vh 1px var(--n-blue), 80vw 90vh 1px #fff,
        95vw 50vh 2px var(--n-cyan), 5vw 25vh 1px #fff, 50vw 50vh 1px var(--n-blue),
        20vw 45vh 1px #fff, 40vw 10vh 1.5px var(--n-cyan), 70vw 85vh 1px #fff,
        88vw 30vh 1px var(--n-blue), 12vw 15vh 2px #fff, 33vw 66vh 1px var(--n-cyan),
        77vw 22vh 1.5px #fff, 55vw 11vh 1px var(--n-blue), 92vw 88vh 1px #fff,
        44vw 77vh 2px var(--n-cyan), 66vw 33vh 1px #fff, 11vw 92vh 1px var(--n-blue);
    animation: digital-drift 15s linear infinite; /* Ускорили для динамики */
    border-radius: 50%;
    filter: blur(0.5px);
}

#nexus-particles::after {
    width: 3px;
    height: 3px;
    animation-duration: 25s;
    animation-delay: -7s;
    opacity: 0.3; /* Дальние крупные частицы */
    filter: blur(2px);
}

@keyframes digital-drift {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(0, -100vh, 0); }
}

/* 2. ВНЕШНЕЕ СВЕЧЕНИЕ КАРТОЧЕК (Убираем "черные дыры") */
body:not(.eco-mode) .bot-card-nexus {
    /* Мягкий ореол цвета редкости вокруг всей карточки */
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.8),
        0 0 25px -10px var(--rarity-color);
}

/* 3. ЖИВОЕ СЕРДЦЕ СИСТЕМЫ (Logo Pulse) */
body:not(.eco-mode) .nh-logo b {
    animation: logo-vibrate 4s infinite alternate ease-in-out;
}

@keyframes logo-vibrate {
    0%, 100% { 
        filter: drop-shadow(0 0 5px var(--n-cyan)) brightness(1);
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 15px var(--n-cyan)) brightness(1.2);
        transform: scale(1.02);
    }
}

/* 4. ДОПОЛНИТЕЛЬНАЯ ГЛУБИНА СЕТКИ */
body:not(.eco-mode) .grid-env {
    mask-image: radial-gradient(circle at 50% 40%, black 20%, transparent 80%);
    opacity: 0.6;
}


