/* [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; } }

/* [31/10] Menu "Sự Kiện Truyền Lửa" — nền lửa chạy + viền sáng nhấp nháy + nhãn HOT chớp (như Chung Sức, màu cam) */
body .sidebar-menu li a[href="/truyen-lua"] {
    position: relative; color: #ffb066 !important; padding-right: 52px !important;
    background: linear-gradient(90deg, rgba(255, 106, 0, 0.2), rgba(255, 0, 60, 0.16), rgba(255, 106, 0, 0.2)) !important;
    background-size: 200% 100% !important;
    text-shadow: 0 0 8px rgba(255, 106, 0, 0.6);
    animation: k8tlSang 1.4s ease-in-out infinite, k8csChay 3s linear infinite;
}
body .sidebar-menu li a[href="/truyen-lua"]::after {
    content: "MỚI"; 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, #ff6a00, #ff1744); color: #fff; text-shadow: none;
    box-shadow: 0 0 10px rgba(255, 106, 0, 0.85); animation: k8csChop 0.9s steps(2, start) infinite;
}
@keyframes k8tlSang {
    0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 106, 0, 0.45), 0 0 6px rgba(255, 106, 0, 0.25); }
    50% { box-shadow: inset 0 0 0 1px rgba(255, 140, 0, 0.95), 0 0 18px rgba(255, 106, 0, 0.65), 0 0 30px rgba(255, 23, 68, 0.4); }
}

/* [01/11] Menu "Sự Kiện Hợp Tác" — nền chạy + viền sáng nhấp nháy + nhãn MỚI chớp (tím hồng) */
body .sidebar-menu li a[href="/hop-tac"] {
    position: relative; color: #f3b6ff !important; padding-right: 52px !important;
    background: linear-gradient(90deg, rgba(180, 60, 255, 0.22), rgba(255, 0, 140, 0.18), rgba(180, 60, 255, 0.22)) !important;
    background-size: 200% 100% !important;
    text-shadow: 0 0 8px rgba(200, 80, 255, 0.7);
    animation: none;   /* 09/11: sự kiện đã kết thúc, bỏ nhấp nháy */
}
body .sidebar-menu li a[href="/hop-tac"]::after {
    content: "MỚI"; 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, #b43cff, #ff0f8c); color: #fff; text-shadow: none;
    box-shadow: 0 0 10px rgba(200, 60, 255, 0.85); animation: none;
}
@keyframes k8htSang {
    0%, 100% { box-shadow: inset 0 0 0 1px rgba(180, 60, 255, 0.45), 0 0 6px rgba(180, 60, 255, 0.25); }
    50% { box-shadow: inset 0 0 0 1px rgba(220, 120, 255, 0.95), 0 0 18px rgba(200, 60, 255, 0.65), 0 0 30px rgba(255, 15, 140, 0.4); }
}

/* [01/11] Tin chúc mừng khách trúng SKIN — dải nổi giữa đầu trang, trượt xuống rồi tự ẩn */
.k8-tin { position: fixed; left: 50%; top: 14px; transform: translate(-50%, -140%); z-index: 99999; max-width: min(92vw, 720px);
    display: flex; align-items: center; gap: 10px; padding: 11px 20px; border-radius: 999px; font-size: 15px; line-height: 1.35; color: #fff; text-align: center;
    background: linear-gradient(90deg, #7c3aed, #db2777, #f59e0b); box-shadow: 0 8px 30px rgba(219, 39, 119, .55), 0 0 0 2px rgba(255, 255, 255, .35) inset;
    transition: transform .55s cubic-bezier(.2, .9, .3, 1.2), opacity .5s; opacity: 0; pointer-events: none; }
.k8-tin.hien { transform: translate(-50%, 0); opacity: 1; }
.k8-tin b { color: #fff7b0; }
.k8-tin-ic { font-size: 20px; animation: k8tinNhay 1s ease-in-out infinite; }
@keyframes k8tinNhay { 0%, 100% { transform: scale(1) rotate(-6deg); } 50% { transform: scale(1.25) rotate(8deg); } }
@media (max-width: 520px) { .k8-tin { font-size: 13px; padding: 9px 14px; border-radius: 18px; } }

/* [05/11] Menu "Rương Thần Long - Bạch Vệ" (/mua-ruong) — nền chạy + viền sáng nhấp nháy + nhãn HOT chớp (xanh ngọc). Dán vào cuối assets/k8-sidebar.css */
body .sidebar-menu li a[href="/mua-ruong"] {
    position: relative; color: #8ff5dd !important; padding-right: 52px !important;
    background: linear-gradient(90deg, rgba(0, 214, 170, 0.2), rgba(0, 170, 255, 0.16), rgba(0, 214, 170, 0.2)) !important;
    background-size: 200% 100% !important;
    text-shadow: 0 0 8px rgba(0, 220, 180, 0.65);
    animation: k8rgSang 1.4s ease-in-out infinite, k8csChay 3s linear infinite;
}
body .sidebar-menu li a[href="/mua-ruong"]::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, #00d4aa, #00a8ff); color: #fff; text-shadow: none;
    box-shadow: 0 0 10px rgba(0, 214, 170, 0.85); animation: k8csChop 0.9s steps(2, start) infinite;
}
@keyframes k8rgSang {
    0%, 100% { box-shadow: inset 0 0 0 1px rgba(0, 214, 170, 0.45), 0 0 6px rgba(0, 214, 170, 0.25); }
    50% { box-shadow: inset 0 0 0 1px rgba(80, 240, 210, 0.95), 0 0 18px rgba(0, 214, 170, 0.65), 0 0 30px rgba(0, 168, 255, 0.4); }
}
