/* =========================================
   БАЗОВІ ЗМІННІ ТА ІЗОЛЯЦІЯ (AMOLED Liquid Glass)
   ========================================= */
   .sidebar {
    --sb-primary: #00d4ff;
    --sb-primary-glow: rgba(0, 212, 255, 0.4);
    --sb-bg: rgba(0, 0, 0, 0.25); /* Прозорий чорний, щоб було видно фон сайту */
    --sb-panel-bg: rgba(0, 0, 0, 0.4); /* Фон для внутрішніх карток в сайдбарі */
    --sb-border: rgba(255, 255, 255, 0.05); /* Ледве помітна рамка */
    --sb-highlight: rgba(255, 255, 255, 0.1); /* Відблиск зверху */
    --sb-hover: rgba(255, 255, 255, 0.06);
    --sb-text-muted: #8b979f;
    --sb-gold: #ffcc00;
    --sb-green: #00ff88;
    --sb-red: #ff4b4b;

    width: 250px;
    background: var(--sb-bg); 
    backdrop-filter: saturate(160%) blur(22px);
    -webkit-backdrop-filter: saturate(160%) blur(22px);
    border-right: 1px solid var(--sb-border);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6), inset -1px 0 0 rgba(255,255,255,0.03); /* тінь і внутрішній відблиск */
    display: flex;
    flex-direction: column;
    padding: 25px 0 0 0;
    flex-shrink: 0;
    z-index: 1000;
    height: 100vh;
    font-size: 14px;
    box-sizing: border-box;
    position: relative;
    contain: layout style;
}

/* БЛОК ЛОГОТИПУ */
.sidebar .brand-area {
    padding: 0 20px 30px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}
.sidebar .brand-area::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sb-border), transparent);
}

.sidebar .brand-block {
    text-decoration: none;
    display: block;
    position: relative;
}

.sidebar .logo-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar .main-logo {
    width: 100%;
    height: auto;
    position: relative;
    z-index: 2;
    mix-blend-mode: screen; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sidebar .brand-block:hover .main-logo {
    filter: brightness(1.2) drop-shadow(0 0 15px var(--sb-primary-glow));
    transform: translateY(-2px) scale(1.02);
}

/* =========================================
   НАВІГАЦІЯ
   ========================================= */
   .navigation-menu {
    flex-grow: 1;
    padding: 15px 12px; 
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}
.navigation-menu::-webkit-scrollbar { width: 4px; }
.navigation-menu::-webkit-scrollbar-track { background: transparent; }
.navigation-menu::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
.navigation-menu::-webkit-scrollbar-thumb:hover { background: var(--sb-primary); }

.sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    color: var(--sb-text-muted);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 0.95em;
    border-radius: 12px; 
    /* Apple-подібна плавність для самої плашки */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    letter-spacing: 0.5px;
    z-index: 1;
    /* Резервуємо прозорий бордер і фон для ідеального транзішену */
    background: rgba(255, 255, 255, 0);
    border: 1px solid transparent;
}

.navigation-menu .nav-item:nth-child(1) { --item-color: #00d4ff; --item-glow: rgba(0, 212, 255, 0.6); --item-bg: rgba(0, 212, 255, 0.2); --item-ambient: rgba(0, 212, 255, 0.12); } 
.navigation-menu .nav-item:nth-child(2) { --item-color: #00ff88; --item-glow: rgba(0, 255, 136, 0.6); --item-bg: rgba(0, 255, 136, 0.2); --item-ambient: rgba(0, 255, 136, 0.12); } 
.navigation-menu .nav-item:nth-child(3) { --item-color: #ffcc00; --item-glow: rgba(255, 204, 0, 0.6); --item-bg: rgba(255, 204, 0, 0.2); --item-ambient: rgba(255, 204, 0, 0.12); } 
.navigation-menu .nav-item:nth-child(4) { --item-color: var(--sb-gold); --item-glow: rgba(255, 204, 0, 0.6); --item-bg: rgba(255, 204, 0, 0.2); --item-ambient: rgba(255, 204, 0, 0.12); } 
.navigation-menu .nav-item:nth-child(5) { --item-color: #a855f7; --item-glow: rgba(168, 85, 247, 0.6); --item-bg: rgba(168, 85, 247, 0.2); --item-ambient: rgba(168, 85, 247, 0.12); } 
.navigation-menu .nav-item:nth-child(6) { --item-color: #f48024; --item-glow: rgba(244, 128, 36, 0.6); --item-bg: rgba(244, 128, 36, 0.2); --item-ambient: rgba(244, 128, 36, 0.12); } 

.sidebar .nav-item i,
.sidebar .nav-item svg {
    width: 24px;
    text-align: center;
    font-size: 1.2em;
    color: #5a677a;
    /* Spring-анімація іконки (пружний відскок, як в iOS) */
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: scale(1) translateY(0) rotate(0deg); 
}

/* ── ПРЕМІУМ LIQUID GLASS HOVER (APPLE STYLE) ── */
.sidebar .nav-item:hover {
    color: #fff;
    transform: translateX(4px) scale(1.02);
    
    /* Скляний градієнт з ледь помітним білим відтінком */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 100%);
    
    /* Ефект заломлення світла на гранях скла (Highlighting) */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    
    /* Багатошарова тінь: темна основа + кольорове світіння пункта меню */
    box-shadow: 
        0 10px 25px -5px rgba(0, 0, 0, 0.35),
        0 5px 15px -5px var(--item-ambient),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
        
    z-index: 2;
}

.sidebar .nav-item:hover i,
.sidebar .nav-item.active i,
.sidebar .nav-item:hover svg,
.sidebar .nav-item.active svg {
    color: var(--item-color);
    filter: drop-shadow(0 0 12px var(--item-glow));
}

.sidebar .nav-item:hover i,
.sidebar .nav-item:hover svg {
    /* Елегантний об'ємний рух іконки при наведенні */
    transform: scale(1.15) translateY(-2px) rotate(4deg);
}

.sidebar .nav-item.active i,
.sidebar .nav-item.active svg {
     transform: scale(1) translateY(0) rotate(0deg);
}

/* ── РЕАЛІСТИЧНЕ МАТОВЕ СКЛО APPLE (Liquid Glass) ── */
.sidebar .nav-item.active {
    color: #fff;
    font-weight: 700;
    
    /* Фізична основа скла: ледь прозорий білий градієнт з відблиском зверху */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.15); /* Яскравий верхній блік (specular highlight) */
    
    /* Внутрішнє відбиття скла + м'яке зовнішнє розсіювання (box-shadow не створює скролів!) */
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1), 
        inset 0 -1px 10px rgba(0, 0, 0, 0.3),
        0 8px 25px -5px var(--item-ambient);
        
    position: relative;
    z-index: 2;
}

/* Індикатор активної вкладки (як фізичний LED-елемент збоку) */
.sidebar .nav-item.active::before {
    content: '';
    position: absolute;
    left: -1px; /* Вирівнюємо з бордером скла */
    top: 20%;
    height: 60%;
    width: 3px;
    background: var(--item-color);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--item-glow), 0 0 20px var(--item-glow);
    z-index: 3;
}

/* Світло, яке пульсує "під" склом і дає м'який відтінок (Ambient Light) */
.sidebar .nav-item.active::after {
    content: '';
    position: absolute;
    inset: 0; /* Чітко по розміру кнопки, НЕ розтягує контейнер! */
    border-radius: inherit;
    /* Радіальний градієнт імітує джерело світла всередині скла */
    background: radial-gradient(ellipse at 50% 120%, var(--item-bg) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
    /* Анімація світіння і "руху" розсіяного світла */
    animation: appleGlassBreathe 4s ease-in-out infinite alternate;
    will-change: opacity, box-shadow, transform;
}

@keyframes appleGlassBreathe {
    0% { opacity: 0.5; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

.sidebar .nav-notif-badge {
    background: var(--sb-red);
    color: #fff;
    font-size: 11px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    padding: 3px 7px;
    border-radius: 12px;
    margin-left: auto; 
    box-shadow: 0 0 10px rgba(255, 75, 75, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* =========================================
   BUG REPORT LINK 
   ========================================= */
.sidebar .nav-item.bug-report-link {
    color: rgba(255, 75, 75, 0.7);
    margin-top: auto;
    margin-bottom: 10px;
    background: rgba(255, 75, 75, 0.03);
    border: 1px solid transparent;
}
.sidebar .nav-item.bug-report-link i { color: rgba(255, 75, 75, 0.7); }

.sidebar .nav-item.bug-report-link:hover {
    background: rgba(255, 75, 75, 0.08);
    border-color: rgba(255, 75, 75, 0.2);
    color: var(--sb-red);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 75, 75, 0.1);
}
.sidebar .nav-item.bug-report-link:hover i { 
    color: var(--sb-red); 
    transform: scale(1.2) rotate(-5deg);
    text-shadow: 0 0 15px rgba(255, 75, 75, 0.6);
}

/* =========================================
   НИЖНЯ СЕКЦІЯ ТА ВІДЖЕТИ
   ========================================= */
.sidebar-bottom-section {
    padding: 20px 15px;
    background: transparent;
    border-top: 1px solid var(--sb-border);
    position: relative;
    z-index: 10;
}

/* =========================================
   КАРТКА КОРИСТУВАЧА (AMOLED Liquid Glass)
   ========================================= */
.user-cabinet-wrapper { margin-top: 5px; position: relative; }

.user-cabinet-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--sb-panel-bg);
    border: 1px solid var(--sb-border);
    border-top: 1px solid var(--sb-highlight);
    padding: 12px 10px;
    border-radius: 16px; 
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.user-cabinet-card::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.user-cabinet-card:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(0, 212, 255, 0.15);
    transform: translateY(-3px);
}
.user-cabinet-card:hover::after { left: 150%; }

.avatar-status-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px; 
    object-fit: cover;
    border: 1px solid var(--sb-border);
    transition: 0.3s;
    background: #000;
}
.user-cabinet-card:hover .nav-user-avatar { border-color: var(--sb-primary); box-shadow: 0 0 10px var(--sb-primary-glow); }

.status-online-dot {
    display: none; 
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background-color: var(--sb-green);
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.8); 
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
}

.nav-user-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    flex-grow: 1;
    gap: 6px;
}

.nav-user-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    overflow: hidden;
}

.nav-user-name {
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    font-size: 1.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.5px;
    line-height: 1;
    flex-shrink: 1;
}

#elo-sidebar {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(0,0,0,0.5);
    padding: 2px 5px;
    border-radius: 6px;
    border: 1px solid var(--sb-border);
    flex-shrink: 0; 
}

#nav-user-elo {
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    font-size: 0.85em;
    line-height: 1;
}

#elo-sidebar svg {
    width: 1.1em;
    height: 1.1em;
    color: var(--sb-text-muted);
}

.nav-user-stats-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.nav-user-balance {
    color: var(--sb-primary);
    font-size: 0.95em; 
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    text-shadow: 0 0 10px var(--sb-primary-glow);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis;
}

.b-coin-svg {
    color: var(--sb-primary);
    filter: drop-shadow(0 0 3px var(--sb-primary-glow));
    flex-shrink: 0;
}

.arrow-icon {
    color: var(--sb-text-muted);
    font-size: 0.9em;
    transition: 0.3s;
}
.user-cabinet-card:hover .arrow-icon {
    color: var(--sb-primary);
    transform: translateX(4px);
}

/* =========================================
   КНОПКА АДМІНА (AMOLED Glass)
   ========================================= */
.sidebar .admin-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sb-red);
    background: rgba(255, 75, 75, 0.08);
    padding: 12px 15px;
    border-radius: 14px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 75, 75, 0.15);
    border-top: 1px solid rgba(255, 75, 75, 0.3);
    font-size: 0.9em;
}

.sidebar .admin-link:hover {
    background: rgba(255, 75, 75, 0.15);
    border-color: var(--sb-red);
    box-shadow: 0 0 15px rgba(255, 75, 75, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

/* =========================================
   СИСТЕМА СПОВІЩЕНЬ В САЙДБАРІ (TOASTS)
   ========================================= */
.sidebar-notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--sb-red);
    color: #fff;
    font-size: 10px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.8);
    z-index: 10;
    box-shadow: 0 0 10px rgba(255, 75, 75, 0.5);
}

.sidebar-toast {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 10px;
    right: 10px;
    background: var(--sb-panel-bg);
    border: 1px solid var(--sb-border);
    border-left: 4px solid var(--sb-primary);
    border-radius: 14px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 212, 255, 0.15);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    cursor: pointer;
}
.sidebar-toast.show {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}
.sidebar-toast:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: var(--sb-primary);
}
.sidebar-toast .toast-title {
    color: var(--sb-primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85em;
    font-weight: 900;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.sidebar-toast .toast-msg {
    color: #e2e8f0;
    font-size: 0.85em;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Roboto', sans-serif;
}
.nav-item.gold-hover:hover i,
.nav-item.gold-hover.active i {
    color: var(--sb-gold) !important;
    text-shadow: 0 0 15px rgba(255, 204, 0, 0.6) !important;
}

/* =========================================
   АНІМАЦІЯ ЗМІНИ БАЛАНСУ
   ========================================= */
.balance-anim-container {
    position: absolute;
    right: 15px;
    top: -20px;
    pointer-events: none;
    z-index: 100;
}

.b-anim {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 900;
    font-size: 1.4em;
    opacity: 0;
    position: absolute;
    right: 0;
    white-space: nowrap;
}

.b-anim.plus { color: var(--sb-green); text-shadow: 0 0 15px rgba(0, 255, 136, 0.8); animation: floatUp 2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; }
.b-anim.minus { color: var(--sb-red); text-shadow: 0 0 15px rgba(255, 75, 75, 0.8); animation: floatDown 2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; }

@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    15% { transform: translateY(-8px) scale(1.1); opacity: 1; }
    100% { transform: translateY(-50px) scale(1); opacity: 0; }
}
@keyframes floatDown {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    15% { transform: translateY(8px) scale(1.1); opacity: 1; }
    100% { transform: translateY(50px) scale(1); opacity: 0; }
}

/* =========================================
   МОБІЛЬНА АДАПТАЦІЯ
   ========================================= */
@media (max-width: 1000px) {
    .hide-on-mobile { display: none !important; }
    
    .sidebar { 
        position: fixed !important; 
        left: -300px !important; 
        top: 0; 
        height: 100vh !important; 
        z-index: 99999 !important; 
        transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important; 
        width: 270px !important; 
        
        /* Робимо сайдбар скляним на мобілках */
        background: rgba(10, 12, 16, 0.65) !important; 
        backdrop-filter: saturate(160%) blur(22px) !important;
        -webkit-backdrop-filter: saturate(160%) blur(22px) !important;
        
        border-right: 1px solid rgba(255, 255, 255, 0.1) !important; 
        box-shadow: 15px 0 40px rgba(0, 0, 0, 0.8), inset -1px 0 0 rgba(255,255,255,0.05) !important; 
    }
    
    .sidebar.open { left: 0 !important; }
    
    .sidebar-bottom-section { padding: 15px; background: transparent !important; }
    .user-cabinet-card { margin-top: 0; }
}

/* =========================================
   PARTY / SQUAD ПАНЕЛЬ (AMOLED Glass)
   ========================================= */
#party-sidebar {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 12px 0;
    padding: 12px 14px;
    background: var(--sb-panel-bg);
    border: 1px solid var(--sb-border);
    border-top: 1px solid var(--sb-highlight);
    border-radius: 16px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}
#party-sidebar.visible { display: flex; }

.party-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65em;
    color: var(--sb-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 900;
    margin-bottom: 2px;
}
.party-header .party-size { font-size: 0.9em; color: rgba(0,255,136,0.6); font-weight: 600; }

.party-members-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.party-member-slot {
    position: relative; width: 34px; height: 34px;
    border-radius: 50%; cursor: pointer; flex-shrink: 0; transition: transform 0.15s;
}
.party-member-slot:hover { transform: scale(1.1); }
.party-member-slot img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 1px solid var(--sb-border); display: block; background: #111; }
.party-member-slot.is-me img { border-color: var(--sb-green); box-shadow: 0 0 8px rgba(0,255,136,0.4); }
.party-member-slot.leader img { border-color: var(--sb-gold); box-shadow: 0 0 8px rgba(255,204,0,0.4); }

.party-member-slot .member-tooltip {
    position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
    background: rgba(5, 8, 14, 0.94);
    border: 1px solid var(--sb-border); border-radius: 8px;
    padding: 5px 9px; font-family: 'Orbitron', sans-serif; font-size: 0.65em; color: #fff;
    white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s; z-index: 200;
}
.party-member-slot:hover .member-tooltip { opacity: 1; }

.party-member-slot .kick-overlay {
    position: absolute; inset: 0; border-radius: 50%; background: rgba(255,75,75,0.75);
    display: none; align-items: center; justify-content: center; font-size: 0.75em; color: #fff;
}
.party-member-slot.kickable:hover .kick-overlay { display: flex; }

.party-add-slot {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.04);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: rgba(255, 255, 255, 0.6); font-size: 1em; flex-shrink: 0; transition: 0.15s;
}
.party-add-slot:hover { border-color: var(--sb-green); background: rgba(0,255,136,0.1); color: var(--sb-green); transform: scale(1.1); }

.party-invite-dropdown {
    position: absolute; bottom: calc(100% + 8px); left: 10px; right: 10px;
    background: rgba(5, 8, 14, 0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--sb-border); border-top: 1px solid var(--sb-highlight);
    border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); z-index: 300;
    max-height: 220px; overflow-y: auto; display: none;
}
.party-invite-dropdown.open { display: block; }
.party-invite-dropdown::-webkit-scrollbar { width: 4px; }
.party-invite-dropdown::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 2px; }

.party-invite-header {
    padding: 10px 12px 6px; font-family: 'Orbitron', sans-serif; font-size: 0.65em;
    color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.party-invite-friend {
    display: flex; align-items: center; gap: 9px; padding: 8px 12px;
    cursor: pointer; transition: 0.15s; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.party-invite-friend:hover { background: rgba(255, 255, 255, 0.05); }
.party-invite-friend:last-child { border-bottom: none; }
.party-invite-friend img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid var(--sb-border); background: #111; }
.party-invite-friend span { font-family: 'Orbitron', sans-serif; font-size: 0.7em; color: #ccc; flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.party-invite-friend .pif-btn {
    background: rgba(0,255,136,0.1); border: 1px solid rgba(0,255,136,0.3); color: var(--sb-green);
    padding: 3px 9px; border-radius: 6px; font-family: 'Orbitron', sans-serif; font-size: 0.62em;
    font-weight: 900; cursor: pointer; transition: 0.15s; flex-shrink: 0;
}
.party-invite-friend .pif-btn:hover { background: rgba(0,255,136,0.2); }
.party-invite-friend .pif-btn.invited { background: transparent; border-color: var(--sb-border); color: #888; cursor: default; }

.party-leave-btn {
    background: rgba(255,75,75,0.08); border: 1px solid rgba(255,75,75,0.25); color: var(--sb-red);
    border-radius: 8px; padding: 6px 0; font-family: 'Orbitron', sans-serif; font-size: 0.65em;
    font-weight: 900; cursor: pointer; transition: 0.15s; text-align: center;
    text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; width: 100%;
}
.party-leave-btn:hover { background: rgba(255,75,75,0.18); border-color: var(--sb-red); }

/* =========================================
   MULTI-STATE MATCH PANEL (AMOLED Glass)
   ========================================= */
.sb-match-panel {
    margin: 0 0 12px 0;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}
.sb-match-panel:empty { display: none; }

.sb-match-panel > div { display: none; flex-direction: column; gap: 8px; padding: 13px 14px; }
.sb-match-panel > div.active { display: flex; }

/* ── IN LOBBY ── */
#smp-lobby { background: rgba(0,212,255,0.05); border: 1px solid rgba(0,212,255,0.2); border-top: 1px solid rgba(0,212,255,0.4); border-radius: 16px; animation: matchPulse 2s ease-in-out infinite; text-align: center; box-shadow: 0 0 14px rgba(0,212,255,0.25); will-change: opacity; }
.match-mode-map { font-size: 0.7em; color: #00d4ff; font-family: 'Orbitron', sans-serif; text-transform: uppercase; letter-spacing: 1px; }
.smp-return-btn { background: #00d4ff; color: #000; font-family: 'Orbitron', sans-serif; font-weight: bold; text-decoration: none; font-size: 0.85em; display: block; padding: 8px; border-radius: 8px; transition: 0.2s; text-align: center; }
.smp-return-btn:hover { background: #fff; box-shadow: 0 0 15px rgba(0,212,255,0.6); }

/* ── SEARCHING ── */
#smp-searching { background: rgba(0,212,255,0.05); border: 1px solid rgba(0,212,255,0.2); border-top: 1px solid rgba(0,212,255,0.4); border-radius: 16px; }
.smp-search-top { display: flex; align-items: center; gap: 8px; }
.smp-dots { display: inline-flex; gap: 3px; }
.smp-dots span { width: 5px; height: 5px; border-radius: 50%; background: var(--sb-primary); animation: dotB 1.2s infinite; }
.smp-dots span:nth-child(2) { animation-delay: 0.2s; }
.smp-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotB { 0%,80%,100% { transform:scale(0.6); opacity:0.4; } 40% { transform:scale(1); opacity:1; } }
.smp-search-label { font-family: 'Orbitron', sans-serif; font-size: 0.7em; color: var(--sb-primary); font-weight: 900; letter-spacing: 1px; text-transform: uppercase; }
.smp-search-meta { display: flex; align-items: center; justify-content: space-between; }
#smp-mode-text { font-family: 'Orbitron', sans-serif; font-size: 0.68em; color: #8b979f; text-transform: uppercase; }
.smp-timer { font-family: 'Orbitron', sans-serif; font-size: 1.2em; font-weight: 900; color: #fff; }
.smp-cancel-btn { background: rgba(255,75,75,0.08); border: 1px solid rgba(255,75,75,0.25); color: #ff5555; padding: 6px; border-radius: 8px; font-family: 'Orbitron', sans-serif; font-size: 0.62em; font-weight: 900; cursor: pointer; transition: 0.15s; text-transform: uppercase; }
.smp-cancel-btn:hover { background: rgba(255,75,75,0.18); border-color: #ff3333; }

/* ── MATCH FOUND ── */
#smp-found { background: rgba(0,255,136,0.05); border: 1px solid rgba(0,255,136,0.3); border-top: 1px solid rgba(0,255,136,0.5); border-radius: 16px; animation: matchPulseGreen 1s ease-in-out infinite; box-shadow: 0 0 14px rgba(0,255,136,0.25); will-change: opacity; }
.smp-found-title { font-family: 'Orbitron', sans-serif; font-size: 0.72em; color: #00ff88; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; text-align: center; }
.smp-found-meta { font-family: 'Orbitron', sans-serif; font-size: 0.65em; color: #8b979f; text-align: center; text-transform: uppercase; }
.smp-accept-counter { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: 'Orbitron', sans-serif; font-size: 0.65em; color: #8b979f; }
#smp-accepted-icons { display: flex; gap: 3px; }
#smp-accepted-icons i { font-size: 0.9em; }
#smp-accepted-icons i.done { color: #00ff88; }
#smp-accepted-icons i.wait { color: #555; }
.smp-found-btns { display: flex; gap: 8px; }
.smp-btn-accept { flex: 1; background: rgba(0,255,136,0.15); border: 1px solid #00ff88; color: #00ff88; padding: 8px 0; border-radius: 8px; font-family: 'Orbitron', sans-serif; font-size: 0.65em; font-weight: 900; cursor: pointer; transition: 0.15s; }
.smp-btn-accept:hover { background: rgba(0,255,136,0.3); }
.smp-btn-accept:disabled { opacity: 0.5; cursor: default; pointer-events: none; }
.smp-btn-decline { flex: 0 0 38px; background: rgba(255,75,75,0.08); border: 1px solid rgba(255,75,75,0.3); color: #ff5555; border-radius: 8px; cursor: pointer; transition: 0.15s; font-size: 0.9em; }
.smp-btn-decline:hover { background: rgba(255,75,75,0.2); }
.smp-timeout-bar { height: 3px; background: rgba(0,255,136,0.1); border-radius: 2px; overflow: hidden; }
.smp-timeout-fill { height: 100%; background: #00ff88; border-radius: 2px; transition: width 1s linear; }

@keyframes matchPulse {
    0%, 100% { opacity: 0.82; }
    50% { opacity: 1; }
}

@keyframes matchPulseGreen {
    0%, 100% { opacity: 0.82; }
    50% { opacity: 1; }
}

/* =========================================
   ОВЕРЛЕЙ ДЛЯ МОБІЛЬНОГО МЕНЮ (ГЛОБАЛЬНИЙ)
   ========================================= */
.mobile-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background: rgba(0, 0, 0, 0.5); /* Напівпрозорий темний фон */
    backdrop-filter: blur(15px); /* Ефект розмиття заднього плану */
    -webkit-backdrop-filter: blur(15px);
    z-index: 99999; 
    display: none; 
    opacity: 0; 
    transition: opacity 0.4s ease; 
}

.mobile-overlay.active { 
    display: block; 
    opacity: 1; 
}

/* =========================================
   GPU ОПТИМІЗАЦІЯ (SIDEBAR) — ПРАВИЛЬНА
   ========================================= */

/* will-change ТІЛЬКИ на елементах що РЕАЛЬНО анімуються —
   масове використання will-change перевантажує VRAM і дає зворотній ефект */
.nav-item.active::after,
.b-anim {
    will-change: opacity, transform;
}
.smp-dots span {
    will-change: transform, opacity;
}

/* Згладжування шрифтів */
.sidebar * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Забороняємо виділення тексту на інтерактивних елементах */
.nav-item, .user-cabinet-card, .admin-link, .smp-btn-accept,
.smp-btn-decline, .smp-cancel-btn, .party-member-slot {
    user-select: none;
    -webkit-user-select: none;
}