/* [13/10] Thanh bên trái dùng chung (index, check_acc, acc_loss5, auto_up_level, recharge, history, apps).
   Nạp cuối <head> nên đè lên CSS riêng từng trang. Mục đang mở: class .k8-active (gắn bằng k8-sidebar.js theo đường dẫn). */
body .sidebar {
    background:
        radial-gradient(120% 40% at 0% 0%, rgba(0, 229, 255, 0.16) 0%, transparent 60%),
        radial-gradient(120% 35% at 100% 100%, rgba(255, 0, 127, 0.14) 0%, transparent 60%),
        linear-gradient(180deg, #0d1424 0%, #0a0e18 50%, #110b1a 100%);
    border-right: none;
    box-shadow: 6px 0 30px rgba(0, 0, 0, 0.45);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 229, 255, 0.25) transparent;
}
/* Viền phải neon xanh → hồng */
body .sidebar::after {
    content: ""; position: absolute; top: 0; right: 0; width: 1px; height: 100%;
    background: linear-gradient(180deg, rgba(0, 229, 255, 0.7), rgba(162, 155, 254, 0.35) 50%, rgba(255, 0, 127, 0.6));
    pointer-events: none;
}
/* Lưới mờ */
body .sidebar::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
    background-image: linear-gradient(rgba(0, 229, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 229, 255, 0.035) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%); mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}
body .sidebar > * { position: relative; z-index: 1; }

body .sidebar-header { border-bottom: none; padding: 26px 20px 18px; }
body .sidebar-header h2 {
    background: linear-gradient(90deg, #00e5ff, #7cf3ff 45%, #ff4fa3);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.35)); letter-spacing: 2px;
}
body .sidebar-header::after {
    content: ""; display: block; height: 2px; width: 60%; margin: 14px auto 0; border-radius: 2px;
    background: linear-gradient(90deg, transparent, #00e5ff, #ff007f, transparent);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

/* Thẻ người dùng: kính mờ + viền gradient */
body .user-info {
    margin: 6px 14px 10px; padding: 16px; border-radius: 14px;
    background:
        linear-gradient(#111827cc, #111827cc) padding-box,
        linear-gradient(135deg, rgba(0, 229, 255, 0.55), rgba(255, 0, 127, 0.45)) border-box;
    border: 1px solid transparent;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35), inset 0 0 20px rgba(0, 229, 255, 0.05);
}

/* Menu: dạng viên bo tròn */
body .sidebar-menu { margin: 12px 0; padding: 0 10px; }
body .sidebar-menu li a {
    position: relative; margin: 3px 0; padding: 12px 16px; border-radius: 10px;
    border-left: none !important; color: #a8b3c7; transition: background 0.25s, color 0.25s, transform 0.25s;
}
body .sidebar-menu li a:hover {
    color: #fff; transform: translateX(3px);
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.14), rgba(0, 229, 255, 0.02));
}
body .sidebar-menu li a.k8-active,
body .sidebar-menu li a.active {
    color: #fff !important;
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.22), rgba(255, 0, 127, 0.10)) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.25), 0 6px 18px rgba(0, 229, 255, 0.12);
}
body .sidebar-menu li a.k8-active::before,
body .sidebar-menu li a.active::before {
    content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px; border-radius: 3px;
    background: linear-gradient(180deg, #00e5ff, #ff007f); box-shadow: 0 0 10px #00e5ff;
}

/* Hộp thống kê cuối thanh */
body .stats-widget {
    margin: 10px 14px 16px; border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.07), rgba(255, 0, 127, 0.05));
    border: 1px solid rgba(0, 229, 255, 0.18);
}

/* [24/10] Menu "Thập Kỷ Chung Sức" — nền vàng chạy + viền sáng nhấp nháy + nhãn HOT chớp */
body .sidebar-menu li a[href="/chung-suc"] {
    position: relative; color: #ffe066 !important; padding-right: 52px !important;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.18), rgba(255, 0, 127, 0.14), rgba(255, 215, 0, 0.18)) !important;
    background-size: 200% 100% !important;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.55);
    animation: k8csSang 1.6s ease-in-out infinite, k8csChay 3s linear infinite;
}
body .sidebar-menu li a[href="/chung-suc"]::after {
    content: "HOT"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    font-size: 10px; font-weight: 900; letter-spacing: 1px; padding: 2px 6px; border-radius: 6px;
    background: linear-gradient(135deg, #ff1744, #ff007f); color: #fff; text-shadow: none;
    box-shadow: 0 0 10px rgba(255, 23, 68, 0.8); animation: k8csChop 0.9s steps(2, start) infinite;
}
@keyframes k8csSang {
    0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.45), 0 0 6px rgba(255, 215, 0, 0.25); }
    50% { box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.95), 0 0 18px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 0, 127, 0.35); }
}
@keyframes k8csChay { from { background-position: 0 0; } to { background-position: 200% 0; } }
@keyframes k8csChop { 50% { opacity: 0.25; } }

/* [24/10] Điện thoại: nút "Thập Kỷ Chung Sức" trên thanh đầu trang (.mobile-header chỉ hiện ≤768px) — k8-sidebar.js chèn vào */
.mobile-header { gap: 8px; }
.mobile-header h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-header a.k8-cs-dau {
    margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px;
    font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; color: #ffe066;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.18), rgba(255, 0, 127, 0.14), rgba(255, 215, 0, 0.18));
    background-size: 200% 100%; text-shadow: 0 0 8px rgba(255, 215, 0, 0.55);
    animation: k8csSang 1.6s ease-in-out infinite, k8csChay 3s linear infinite;
}
.mobile-header a.k8-cs-dau b {
    font-size: 9.5px; font-weight: 900; letter-spacing: 1px; padding: 2px 5px; border-radius: 5px; color: #fff; text-shadow: none;
    background: linear-gradient(135deg, #ff1744, #ff007f); box-shadow: 0 0 8px rgba(255, 23, 68, 0.8); animation: k8csChop 0.9s steps(2, start) infinite;
}
.mobile-header a.k8-cs-dau .ngan { display: none; }
@media (max-width: 420px) { .mobile-header a.k8-cs-dau .dai { display: none; } .mobile-header a.k8-cs-dau .ngan { display: inline; } }
