/* === GIAO DIỆN GLASSMORPHISM 2.0 & VIỀN SPOTLIGHT === */
.dark-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050;
    background: rgba(8, 12, 28, 0.55);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.dark-navbar.scrolled {
    background: rgba(6, 9, 22, 0.8);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5);
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    gap: 24px;
}
.navbar-logo img {
    height: 38px;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.navbar-logo img:hover {
    transform: scale(1.06);
}

/* === DESKTOP MENU & ĐỘNG LỰC HỌC LÒ XO === */
.dark-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: #94A3B8;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.nav-link i {
    font-size: 15px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-link:hover i {
    transform: translateY(-2px) scale(1.1);
}
.nav-link:hover {
    color: #F1F5F9;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.03);
}
.nav-link.active {
    color: #3B82F6;
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* === MINI MEGA MENU NẠP TIỀN CHIA CỘT === */
.nav-deposit-dropdown { position: relative; }
.nav-dropdown-icon {
    font-size: 11px !important;
    margin-left: 4px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-deposit-dropdown:hover .nav-dropdown-icon { transform: rotate(180deg); color: #3B82F6; }

.nav-deposit-menu-mega {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(12px) scale(0.95);
    width: 440px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(9, 13, 26, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1060;
}
.nav-deposit-dropdown:hover .nav-deposit-menu-mega {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}
.mega-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mega-title {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-left: 10px;
    margin-bottom: 4px;
}
.nav-deposit-menu-mega a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    color: #94A3B8;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}
.nav-deposit-menu-mega a:hover {
    color: #FFF;
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.15);
}
.mega-icon-wrap {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
}
.mega-text { display: flex; flex-direction: column; }
.mega-text span { font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.mega-text small { font-size: 11px; color: #64748B; margin-top: 2px; display: flex; align-items: center; gap: 4px; }

.badge-status-dot {
    width: 6px; height: 6px; border-radius: 50%; background: #10B981;
    display: inline-block; animation: blinkStatus 1.5s infinite ease-in-out;
}
@keyframes blinkStatus { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.text-gradient-gold {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* === CỤM NÚT ĐĂNG NHẬP & ĐĂNG KÝ PREMIUM DESKTOP === */
.auth-buttons-group {
    display: flex;
    align-items: center;
    gap: 4px;
}
.dark-btn-register {
    color: #94A3B8;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 12px;
    transition: all 0.25s ease;
}
.dark-btn-register:hover {
    color: #F1F5F9;
    background: rgba(255, 255, 255, 0.04);
}
.dark-btn-login-modern {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 12px;
    background: #0D1527;
    text-decoration: none;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.dark-btn-login-modern .btn-text {
    color: #3B82F6;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    z-index: 3;
    transition: all 0.3s ease;
}
.dark-btn-login-modern .btn-glow-track {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: conic-gradient(from 0deg, transparent 40%, #3B82F6, #8B5CF6, transparent 60%);
    transform: translate(-50%, -50%) rotate(0deg);
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}
@keyframes spinGlow {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
.dark-btn-login-modern::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 11px;
    background: #090D1A;
    z-index: 2;
    transition: all 0.3s ease;
}
.dark-btn-login-modern:hover {
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: 0 15px 30px -5px rgba(59, 130, 246, 0.3), 0 0 15px rgba(139, 92, 246, 0.2);
}
.dark-btn-login-modern:hover .btn-glow-track {
    opacity: 1;
    animation: spinGlow 2.5s linear infinite;
}
.dark-btn-login-modern:hover .btn-text {
    color: #FFFFFF;
}
.dark-btn-login-modern:hover::before {
    background: #05070F;
}

/* === HỘP TÌM KIẾM CHUẨN NEON SAAS === */
.nav-search { 
    position: relative; 
    flex: 1; 
    max-width: 380px; 
    perspective: 1000px;
}
.nav-search-input {
    position: relative;
    display: flex;
    align-items: center;
    height: 42px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07); 
    border-radius: 12px;
    padding: 0 4px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-search-input:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}
.nav-search-input:focus-within {
    background: rgba(5, 8, 22, 0.85);
    border-color: #3b82f6;
    box-shadow: 
        0 0 0 1px #3b82f6,
        0 0 20px -3px rgba(59, 130, 246, 0.5),
        0 20px 40px -15px rgba(0, 0, 0, 0.7);
    transform: translateY(-1px);
}
.nav-search-icon { 
    margin-left: 12px; 
    color: #64748b; 
    font-size: 13px;
    transition: all 0.3s ease;
}
.nav-search-input:focus-within .nav-search-icon {
    color: #3b82f6;
    transform: scale(1.1);
}
.nav-search-input input {
    background: none;
    border: none;
    outline: none;
    color: #f8fafc;
    font-size: 13.5px;
    font-weight: 500;
    padding: 0 12px;
    width: 100%;
}
.nav-search-input input::placeholder {
    color: #475569;
    font-weight: 400;
}
.search-hotkey-tag {
    position: absolute; 
    right: 12px;
    padding: 4px 8px; 
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #64748b; 
    font-size: 10px; 
    font-weight: 600; 
    font-family: monospace, sans-serif;
    letter-spacing: 0.05em;
    pointer-events: none; 
    transition: all 0.25s ease;
}
.nav-search-input:focus-within .search-hotkey-tag { 
    opacity: 0;
    transform: scale(0.8) translateX(10px);
}
.nav-search-clear {
    position: absolute; 
    right: 10px;
    width: 22px; 
    height: 22px; 
    border-radius: 6px; 
    border: none;
    background: rgba(255, 255, 255, 0.06); 
    color: #94a3b8;
    display: none; 
    align-items: center; 
    justify-content: center;
    cursor: pointer; 
    font-size: 10px; 
    z-index: 2;
    transition: all 0.2s;
}
.nav-search-clear:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}
.nav-search-loading {
    position: absolute; 
    right: 38px;
    width: 14px; 
    height: 14px; 
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.1); 
    border-top-color: #3b82f6;
    animation: navSpin .6s linear infinite; 
    display: none;
}
.nav-search-dropdown {
    position: absolute; 
    top: calc(100% + 12px); 
    left: 0; 
    width: 100%;
    background: rgba(9, 13, 26, 0.95); 
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px; 
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden; 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateY(10px) scale(0.98); 
    opacity: 0;
    pointer-events: none; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-search.open .nav-search-dropdown { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
    pointer-events: auto; 
}

/* === KHU VỰC USER VÀ TÍNH NĂNG ẨN SỐ DƯ === */
.sidebar-user-btn {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px; padding: 6px 14px 6px 6px;
    transition: all 0.2s ease;
}
.sidebar-user-btn img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.dark-user-info { display: flex; flex-direction: column; text-align: left; }
.dark-user-info .username { color: #E2E8F0; font-size: 13px; font-weight: 600; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-user-balance-wrapper { display: flex; align-items: center; gap: 6px; }
.sidebar-user-balance { color: #10B981; font-size: 12px; font-weight: 800; line-height: 1; }
.toggle-money-btn { font-size: 11px; color: #475569; cursor: pointer; transition: color 0.2s; }
.toggle-money-btn:hover { color: #94A3B8; }

.sidebar-account-dropdown .sidebar-user-btn[aria-expanded="true"] { background: rgba(255,255,255,0.06); border-color: #3B82F6; }

/* Dropdown Menu User */
.sidebar-account-menu {
    min-width: 290px; padding: 12px; margin-top: 12px !important;
    border: 1px solid rgba(255,255,255,0.08); border-radius: 20px;
    background: rgba(9, 13, 26, 0.98); box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    backdrop-filter: blur(20px); transform-origin: top right;
}
.sidebar-account-profile { display: flex; align-items: center; gap: 12px; padding: 4px 4px 12px; }
.sidebar-account-profile img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.sidebar-account-name { color: #FFF; font-size: 15px; font-weight: 700; }
.sidebar-account-role { color: #475569; font-size: 12px; font-weight: 600; }

.sidebar-balance-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-radius: 14px;
    background: rgba(16, 185, 129, 0.06); border: 1px solid rgba(16, 185, 129, 0.12);
    margin-bottom: 8px;
}
.sidebar-balance-card span { display: block; color: #A7F3D0; font-size: 11.5px; font-weight: 500; margin-bottom: 2px; }
.sidebar-balance-card strong { color: #10B981; font-size: 18px; font-weight: 800; display: block; }
.sidebar-balance-action {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 10px; color: #FFF;
    background: #10B981; text-decoration: none; transition: all 0.2s ease;
}
.sidebar-balance-action:hover { background: #059669; color: #FFF; transform: scale(1.05); }

.sidebar-account-menu .dropdown-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border-radius: 10px; color: #94A3B8; font-size: 13.5px; font-weight: 600;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.sidebar-account-menu .dropdown-item i { width: 16px; text-align: center; color: #475569; }
.sidebar-account-menu .dropdown-item:hover { color: #FFF; background: rgba(255, 255, 255, 0.04); transform: translateX(2px); }
.sidebar-account-menu .dropdown-item:hover i { color: #3B82F6; }
.sidebar-account-menu .dropdown-item.text-danger { color: #EF4444 !important; }
.sidebar-account-menu .dropdown-item.text-danger:hover { background: rgba(239, 68, 68, 0.08); }
.sidebar-account-menu .dropdown-divider { margin: 8px 0; border-color: rgba(255,255,255,0.05); }

/* Toggle Mobile BUTTON */
.mobile-search-toggle, .dark-toggler {
    display: none; width: 40px; height: 40px; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.03);
    color: #FFF; align-items: center; justify-content: center; cursor: pointer;
}
.mobile-search-toggle:hover, .dark-toggler:hover { background: rgba(255,255,255,0.06); }

/* === MOBILE SEARCH PANEL === */
.mobile-search-panel { display: none; position: fixed; top: 76px; left: 16px; right: 16px; z-index: 9998; }
.mobile-search-panel.open { display: block; }
.mobile-nav-search .nav-search-input { background: #090D1A; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.mobile-nav-search .nav-search-dropdown { position: static; margin-top: 8px; opacity: 1; pointer-events: auto; transform: none; }

/* === RESPONSIVE & MOBILE FOOTER FIX === */
.dark-sidebar-footer {
    display: flex;
    gap: 10px;
    padding: 15px;
}
.dark-sidebar-footer a {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.dark-sidebar-footer .sbar-login {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.dark-sidebar-footer .sbar-register {
    background: rgba(255, 255, 255, 0.04);
    color: #94A3B8;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 1199px) {
    .dark-nav-links { display: none; }
    .mobile-search-toggle, .dark-toggler { display: inline-flex; }
    .nav-search { display: none; }
    .dark-nav-right .sidebar-account-dropdown { display: none !important; }
    .dark-nav-right { gap: 10px; }
}
@media (max-width: 575px) {
    .dark-user-info { display: none; }
    .sidebar-user-btn { padding: 6px; }
}

/* Hiệu ứng trượt cho Sidebar Mobile */
.dark-sidebar {
    position: fixed;
    top: 0;
    right: -300px; 
    width: 300px;
    height: 100%;
    background: #090d1a;
    z-index: 10000;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}
.dark-sidebar.open {
    right: 0; 
}
.dark-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.dark-sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
}