/* ==========================================================================
   Modern Header Theme - 2024 Redesign
   Blue & White Glassmorphism Edition
   ========================================================================== */

/* --- Variables & Reset --- */
:root {
    --header-height: 80px; /* Increased from 72px (~11% taller, visually better than 25% which might be too bulky, but let's try 80px first) */
    --primary-blue: #006eff;
    --primary-hover: #0056cc;
    --secondary-blue: #f0f7ff;
    --text-main: #1d2129;
    --text-sub: #4e5969;
    --text-light: #86909c;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: 1px solid rgba(255, 255, 255, 0.8);
    --glass-blur: blur(20px);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --radius-md: 8px;
    --radius-lg: 12px;
    --max-width: 1400px;
}

/* Hide Old Header Elements */
.idcmaster-nav .header,
.idcmaster-nav .header-wrapper,
.idcmaster-nav .header-nav {
    display: none !important;
}

/* --- Main Header Container --- */
.idcmaster-nav {
    width: 100%;
    height: var(--header-height);
    position: relative;
    top: 0;
    left: 0;
    z-index: 10000;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: var(--glass-border);
    box-shadow: var(--shadow-sm);
    pointer-events: auto;
}

.header-container-modern {
    max-width: var(--max-width);
    height: 100%;
    margin: 0 auto;
    /*padding: 0 24px; !* Added padding back to prevent touching edges *!*/
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    flex-wrap: nowrap; /* Force single line */
}

/* --- Logo --- */
.header-logo .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
    white-space: nowrap; /* Prevent stacking */
}

.header-logo img {
    height: 36px;
    width: auto;
    flex-shrink: 0; /* Prevent image from shrinking */
}

.header-logo .site-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-blue);
    letter-spacing: -0.5px;
}

/* --- Menu --- */
.header-menu {
    flex: 1;
    height: 100%;
    margin: 0 40px;
    display: flex; /* Add flex to control width */
    /* overflow: hidden; Removed to allow dropdowns to show */
}

.menu-list {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 8px;
    flex-wrap: nowrap; /* Ensure items don't wrap */
}

.menu-item {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative; /* Changed from static to relative for simple dropdowns */
}

/* Mega Menu Item - Needs static positioning for full width */
.menu-item.has-dropdown {
    position: static;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 40px;
    border-radius: 20px;
    font-size: 15px;
    color: var(--text-main);
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    gap: 6px;
    white-space: nowrap; /* Prevent vertical stacking */
    position: relative;
}

.menu-link i {
    font-size: 12px;
    transition: transform 0.3s;
    opacity: 0.6;
}

.menu-item:hover .menu-link {
    color: var(--primary-blue);
    background: var(--secondary-blue);
}

.menu-item:hover .menu-link i {
    transform: rotate(180deg);
    opacity: 1;
}

/* --- Mega Menu --- */
.mega-menu {
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: #fff;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-out;
    z-index: 1001;
    border: 1px solid #f0f0f0;
    border-top: none;
    padding: 0;
    overflow: hidden;
}

.menu-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
}

/* Mega Menu Layout (3 Columns) */
.mega-content {
    display: flex;
    height: 460px;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Column 1: Featured (Left) - 20% */
.mega-col-left {
    width: 20%;
    background: #f8f9fa; /* Light gray background */
    padding: 40px 30px; /* Adjusted padding */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #f0f0f0;
    position: relative;
}

.mega-featured-title {
    font-size: 20px; /* Matched image visual weight */
    font-weight: 800;
    color: #000;
    margin-bottom: 12px;
    line-height: 1.2;
}

.mega-featured-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.mega-link-btn {
    display: inline-block;
    color: var(--primary-blue);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-top: auto; /* Push to bottom if needed, but image is there */
    margin-bottom: 10px;
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 2;
}
.mega-link-btn:hover {
    text-decoration: underline;
}

.mega-featured-img {
    width: 80%;
    align-self: center;
    margin-top: auto;
    max-height: 180px;
    object-fit: contain;
    mix-blend-mode: multiply;
    margin-bottom: 20px; /* Space for link */
}

/* Column 2: Area List (Middle) - 25% */
.mega-col-middle {
    width: 25%;
    border-right: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    padding: 30px;
    background: #fff;
}

.mega-col-title {
    font-size: 13px;
    color: #999;
    font-weight: 500;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mega-col-title i {
    color: var(--primary-blue);
    font-size: 14px;
}

.area-scroll-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    overflow-y: auto;
    padding-right: 5px;
    padding-top: 5px; /* Prevent hover clip */
}

.area-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid transparent; /* Remove visible border */
    height: 50px;
    background: #fff;
}

.area-item:hover, .area-item.active {
    border-color: transparent; /* Remove hover border */
    box-shadow: 0 4px 12px rgba(0, 110, 255, 0.08);
    transform: translateY(-2px);
    color: var(--primary-blue);
    background: #fff;
}
/* Active state dot or highlight */
.area-item.active .area-name {
    font-weight: 600;
}

.area-icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.area-icon img, .area-icon svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.area-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Column 3: Category List (Right) - 55% */
.mega-col-right {
    flex: 1;
    padding: 30px 40px;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.category-scroll-container {
    flex: 1;
    overflow-y: auto;
    position: relative;
    padding-right: 5px;
    padding-top: 5px; /* Prevent hover clip */
}

/* Custom Scrollbar */
.category-scroll-container::-webkit-scrollbar,
.area-scroll-list::-webkit-scrollbar {
    width: 4px;
}
.category-scroll-container::-webkit-scrollbar-thumb,
.area-scroll-list::-webkit-scrollbar-thumb {
    background: #e5e6eb;
    border-radius: 2px;
}

.category-group {
    display: none;
    grid-template-columns: repeat(3, minmax(220px, 1fr)); /* Force 3 columns */
    gap: 16px;
    align-content: flex-start;
}

.category-group.active {
    display: grid;
    animation: fadeIn 0.3s ease;
}

.category-card {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s;
    background: #fff;
    height: auto;
    min-height: 50px;
}

.category-card:hover {
    border-color: transparent; /* Remove hover border */
    box-shadow: 0 4px 12px rgba(0, 110, 255, 0.08);
    transform: translateY(-2px);
}

.cat-icon-lg {
    width: 36px;
    height: 36px;
    margin-right: 12px;
    flex-shrink: 0;
    /* background: #f7f8fa; */
    border-radius: 50%; /* Circle flags in image */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    overflow: hidden;
}
.cat-icon-lg img, .cat-icon-lg svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    justify-content: center;
}

.cat-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-card:hover .cat-name {
    color: var(--primary-blue);
}

/* --- Simple Dropdown --- */
.simple-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 1001;
    border: 1px solid #f0f0f0;
    width: 200px;
    padding: 8px;
    display: flex;
    flex-direction: column;
}

/* Fix: Ensure hover on menu-item triggers simple-dropdown visibility */
.menu-item:hover .simple-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.drop-link {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.drop-link i {
    margin-right: 10px;
    font-size: 16px;
    color: var(--text-light);
}

.drop-link:hover {
    background: var(--secondary-blue);
    color: var(--primary-blue);
}
.drop-link:hover i {
    color: var(--primary-blue);
}

/* --- User Actions & Search --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px; /* Added gap between search and buttons */
    flex-shrink: 0; /* Prevent actions from being squished */
}

/* Search Bar Styles */
.header-search {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 10px; /* Add some space before buttons */
}

.search-input {
    width: 150px; /* Base width */
    height: 36px;
    border-radius: 18px; /* Pill shape */
    border: 1px solid #e5e6eb; /* Neutral border */
    background: #f4f5f7; /* Light gray background like idcmaster */
    padding: 0 36px 0 16px;
    font-size: 14px;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
}

.search-input::placeholder {
    color: #9aa0a6; /* Visible placeholder */
    transition: color 0.3s;
}

/* Expanded/Focus State */
.search-input:focus,
.search-input:not(:placeholder-shown) {
    width: 200px; /* Slightly expand on focus */
    background: #fff;
    border: 1px solid var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 110, 255, 0.15); /* Brand focus ring */
}

.search-input:focus::placeholder {
    color: #9aa0a6; /* Show placeholder when expanded */
}

.search-icon {
    position: absolute;
    right: 10px;
    color: #9aa0a6;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 2;
    padding: 5px;
}

.search-input:focus + .search-icon,
.search-input:not(:placeholder-shown) + .search-icon {
    color: var(--primary-blue);
}

/* Tooltip */
.search-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #1d2129; /* Dark gray/black like image */
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1002;
}

/* Tooltip Arrow */
.search-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 14px; /* Align arrow near the right side (under the icon) */
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #1d2129;
}

/* Tooltip Active State */
.search-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- Modern Search Toast --- */
.modern-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    padding: 16px 24px 16px 20px;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    min-width: 280px;
}

.modern-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.toast-accent {
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 4px;
    background: #ef4444; /* Red accent */
    border-radius: 0 4px 4px 0;
}

.toast-icon {
    color: #ef4444;
    font-size: 24px;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-content {
    display: flex;
    flex-direction: column;
}

.toast-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.toast-msg {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

@media (max-width: 768px) {
    .modern-toast {
        top: 20px;
        left: 20px;
        right: 20px;
        min-width: auto;
    }
}

.user-guest, .user-logged {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-link {
    color: var(--text-sub);
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    transition: color 0.2s;
    white-space: nowrap; /* Prevent vertical stacking */
}
.login-link:hover {
    color: var(--primary-blue);
}

.register-btn {
    width: auto !important;
    min-width: 100px;
    padding: 0 20px !important;
    white-space: nowrap;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    height: 38px !important;
    border-radius: 19px !important;
    background: linear-gradient(135deg, #006eff 0%, #0056cc 100%);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 110, 255, 0.2);
    transition: all 0.3s;
}

.register-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(0, 110, 255, 0.3);
}

.register-btn i {
    font-size: 16px;
    margin-right: 6px;
    color: #fff;
    animation: gift-bounce 2s infinite;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-main);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap; /* Prevent vertical stacking */
}
.user-btn i {
    font-size: 18px;
    color: var(--text-light);
}

.console-btn {
    margin-left: 12px;
    padding: 6px 16px;
    border: 1px solid #e5e6eb;
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s;
}
.console-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

@keyframes gift-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    /* --- Global Overrides for Mobile to fix old fixed-width constraints --- */
    body, html {
        min-width: 0 !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    .container, .auto, .header-container, .footer-container, .common-layout {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }

    .index-banner, .zonkvm-buy-banner, .middle-tab-content-type1, .header-activity {
        min-width: 0 !important;
        padding-top: 0 !important; /* Remove huge padding from inner banners on mobile */
    }

    /* --- Header logic --- */
    .header-container-modern {
        display: none !important;
    }
    .idcmaster-nav {
        display: none !important; /* Fully hide PC header on mobile */
    }
    
    /* Force hide any old empty header wrappers that might take up space */
    .header, .header-v2, .top-header, .header-top, .zonkvm-buy-banner .header-info, .header-banner .container, .index-header .top-header {
        display: none !important;
    }
    
    /* Show mobile header */
    .mobile-header-modern {
        display: block;
    }
    
    .mobile-topbar {
        height: 80px;
        padding: 0 20px;
    }
    
    .mobile-logo img {
        height: 42px;
    }
    
    body {
        padding-top: 80px !important;
    }

    .mobile-drawer {
        top: 80px;
        height: calc(100vh - 80px);
    }
    
    .mobile-drawer-overlay {
        top: 80px;
        height: calc(100vh - 80px);
    }
}

/* Make sure any padding applied to page wrappers in old layout is completely removed */
.page-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.zonkvn-top {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

#app {
    margin-top: 0 !important;
}

body {
    padding-top: 0 !important; /* Force remove any body padding left over */
}

/* Force Hide Old Header Elements in common/header.html */
.header, .header-wrapper, .header-nav {
    display: none !important;
}

/* Ensure new header is visible and positioned correctly */
.idcmaster-nav {
    display: block !important;
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
}

body {
    /* padding-top: 80px; Removed for relative positioning */
}

/* --- Modern Side Consult Bar --- */
.consult-modern {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.consult-modern.collapsed {
    transform: translate(calc(100% + 20px), -50%);
}

.consult-modern-toggle {
    position: absolute;
    left: -28px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: -4px 0 15px rgba(0,0,0,0.05);
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-right: none;
    color: #666;
    transition: all 0.3s;
    z-index: 1000;
}

.consult-modern-toggle:hover {
    color: var(--primary-blue, #006eff);
    background: #fff;
}

.consult-modern-toggle i {
    font-size: 14px;
    transition: transform 0.4s ease;
}

.consult-modern.collapsed .consult-modern-toggle i {
    transform: rotate(180deg);
}

.consult-pulse-dot {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 6px;
    height: 6px;
    background: #52c41a;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
}

.consult-pulse-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid rgba(82, 196, 26, 0.4);
    animation: pulse-green 2s infinite;
}

.consult-modern.collapsed .consult-pulse-dot {
    opacity: 1;
}

.consult-modern-bar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.consult-modern-item {
    position: relative;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-sub, #666);
}

.consult-modern-item:hover {
    color: var(--primary-blue, #006eff);
}

.consult-modern-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f4f7fc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.status-pulse-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: #52c41a;
    border-radius: 50%;
    border: 2px solid #fff;
}

.status-pulse-dot::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 1px solid rgba(82, 196, 26, 0.6);
    animation: pulse-green 2s infinite;
}

.consult-modern-item:hover .consult-modern-icon-wrap {
    background: var(--primary-blue, #006eff);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 110, 255, 0.3);
}

.consult-modern-icon-wrap i {
    font-size: 18px;
}

.consult-modern-name {
    font-size: 12px;
    font-weight: 500;
}

.consult-modern-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent);
    margin: 4px 16px;
}

/* Hover Bubble */
.consult-modern-bubble {
    position: absolute;
    right: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    width: 240px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.consult-modern-item:hover .consult-modern-bubble,
.consult-modern-bubble:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
}

/* Little arrow pointing right */
.consult-modern-bubble::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fff;
    box-shadow: 4px -4px 4px rgba(0,0,0,0.02);
    border-radius: 2px;
}

/* Invisible bridge to prevent hover loss */
.consult-modern-bubble::before {
    content: '';
    position: absolute;
    right: -15px;
    top: 0;
    width: 15px;
    height: 100%;
    background: transparent;
}

.bubble-modern-header {
    display: flex;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #f8faff 0%, #eef3ff 100%);
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.bubble-modern-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    background: #fff;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bubble-modern-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

.bubble-modern-info p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.bubble-modern-body {
    padding: 8px 16px;
}

.staff-modern-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.05);
}

.staff-modern-row:last-child {
    border-bottom: none;
}

.staff-modern-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.staff-modern-name::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #52c41a; /* Green dot for online status */
    border-radius: 50%;
    display: inline-block;
}

.staff-modern-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(0, 110, 255, 0.08);
    color: var(--primary-blue, #006eff);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.staff-modern-action:hover {
    background: var(--primary-blue, #006eff);
    color: #fff;
}

.go-top-modern {
    margin-top: 4px;
}

.consult-modern-trigger {
    display: none; /* Mobile only */
}

@media (max-width: 1024px) {
    .consult-modern {
        top: auto;
        bottom: 20px;
        right: 20px;
        transform: none;
    }
    
    .consult-modern.collapsed {
        transform: none; /* Mobile doesn't use the collapse logic this way */
    }

    .consult-modern-toggle {
        display: none !important;
    }
    
    .consult-modern-bar {
        display: none;
        position: absolute;
        bottom: 60px;
        right: 0;
        width: 60px;
    }
    
    .consult-modern-bubble {
        right: 100%;
        transform: translateY(-50%) translateX(0);
        margin-right: 10px;
    }

    .consult-modern-item:hover .consult-modern-bubble {
        transform: translateY(-50%) translateX(0);
    }
    
    .consult-modern-trigger {
        display: flex;
        width: 48px;
        height: 48px;
        background: var(--primary-blue, #006eff);
        color: #fff;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 15px rgba(0, 110, 255, 0.4);
        cursor: pointer;
        z-index: 998;
    }
    .consult-modern-trigger i {
        font-size: 24px;
    }
}

/* ==========================================================================
   Modern Mobile Header Styles
   ========================================================================== */
.mobile-header-modern {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
}

@media (max-width: 1200px) {
    body {
        padding-top: 60px; /* Space for fixed mobile header */
    }

    /* Force reset any hardcoded padding/margin from older CSS that creates blank gaps */
    .idcmaster-nav {
        display: none !important; 
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .index-header {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Force fix for server category page spacing */
    .server-hero {
        margin-top: 0 !important;
        padding-top: 80px !important;
        padding-bottom: 60px !important;
    }
    .header-banner {
        display: none !important; /* Hide old empty banner */
        height: 0 !important;
    }
    
    /* Clean up the main layout empty space */
    .zonkvm-buy-banner {
        display: none !important; /* Old empty banner space */
        height: 0 !important;
        padding-top: 0 !important;
    }
    
    .index-header {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        display: none !important; /* Force hide old header wrapper completely */
    }
    
    #header {
        display: none !important;
    }
    
    /* Ensure content connects directly below mobile header */
    .content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .zonkvn-top {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    #app {
        margin-top: 0 !important;
    }
    
    /* Make side spacing more comfortable for mobile */
    .container, .auto, .header-container, .footer-container, .common-layout {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .mobile-header-modern {
        display: block;
    }

    .mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 60px;
        padding: 0 16px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
        position: relative;
        z-index: 10001;
    }

    .mobile-logo img {
        height: 32px;
        width: auto;
    }

    .mobile-actions {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .mobile-user-btn {
        color: var(--primary-blue, #006eff);
        font-size: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
    }

    .mobile-login-btn {
        color: #fff;
        background: linear-gradient(135deg, #006eff 0%, #0056cc 100%);
        font-size: 13px;
        font-weight: 500;
        padding: 6px 14px;
        border-radius: 16px;
        text-decoration: none;
        box-shadow: 0 2px 8px rgba(0, 110, 255, 0.2);
    }

    /* Hamburger Menu Toggle */
    .mobile-menu-toggle {
        width: 24px;
        height: 20px;
        position: relative;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .hamburger-line {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--text-main, #1d2129);
        border-radius: 2px;
        transition: all 0.3s ease-in-out;
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Mobile Drawer */
    .mobile-drawer {
        position: fixed;
        top: 60px; /* Below topbar */
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: calc(100vh - 60px);
        background: #fff;
        z-index: 10000;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }

    .mobile-drawer.active {
        right: 0;
    }

    .mobile-drawer-inner {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .mobile-drawer-user-info {
        display: flex;
        align-items: center;
        padding: 24px;
        background: linear-gradient(135deg, #f8faff 0%, #eef3ff 100%);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .mobile-drawer-avatar {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        margin-right: 16px;
        box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    }

    .mobile-drawer-user-text {
        flex: 1;
        overflow: hidden;
    }

    .mobile-drawer-user-text .name {
        font-weight: 600;
        color: #0f172a;
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 4px;
    }

    .mobile-drawer-user-text .balance {
        font-size: 13px;
        color: var(--primary-blue, #006eff);
        font-weight: 500;
    }

    .mobile-menu-list {
        flex: 1;
        overflow-y: auto;
        padding: 20px 0;
    }

    .mobile-menu-list::-webkit-scrollbar {
        width: 4px;
    }
    .mobile-menu-list::-webkit-scrollbar-thumb {
        background: #e5e6eb;
        border-radius: 2px;
    }

    .mobile-menu-item {
        display: block;
        padding: 14px 24px;
        font-size: 16px;
        color: var(--text-main, #1d2129);
        font-weight: 500;
        text-decoration: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    }

    .mobile-menu-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
    }

    .mobile-menu-title i {
        font-size: 14px;
        color: #86909c;
        transition: transform 0.3s;
    }

    .mobile-menu-item.active .mobile-menu-title {
        color: var(--primary-blue, #006eff);
    }

    .mobile-menu-item.active .mobile-menu-title i {
        transform: rotate(180deg);
        color: var(--primary-blue, #006eff);
    }

    /* Sub Menu */
    .mobile-sub-menu {
        display: none;
        background: #f8f9fa;
        padding: 10px 0;
        margin: 10px -24px -14px -24px; /* Pull to edges */
    }

    .mobile-sub-group {
        padding: 10px 24px;
    }

    .mobile-sub-group-title {
        font-size: 13px;
        color: #86909c;
        margin-bottom: 12px;
        font-weight: 500;
    }

    .mobile-sub-group-title.link-title {
        color: var(--primary-blue, #006eff);
        text-decoration: none;
        display: inline-block;
    }

    .mobile-sub-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .mobile-sub-links a {
        display: block;
        padding: 10px 12px;
        background: #fff;
        border-radius: 8px;
        font-size: 13px;
        color: var(--text-sub, #4e5969);
        text-decoration: none;
        text-align: center;
        box-shadow: 0 1px 3px rgba(0,0,0,0.02);
        border: 1px solid #f0f0f0;
        transition: all 0.2s;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-sub-links a:active {
        background: var(--secondary-blue, #f0f7ff);
        color: var(--primary-blue, #006eff);
        border-color: var(--primary-blue, #006eff);
    }

    .mobile-simple-link {
        display: block;
        padding: 12px 24px;
        font-size: 14px;
        color: var(--text-sub, #4e5969);
        text-decoration: none;
    }

    .mobile-simple-link:active {
        color: var(--primary-blue, #006eff);
        background: rgba(0, 110, 255, 0.05);
    }

    /* Footer */
    .mobile-drawer-footer {
        padding: 20px 24px;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        background: #fff;
    }

    .mobile-register-btn {
        display: block;
        width: 100%;
        padding: 12px 0;
        text-align: center;
        background: var(--primary-blue, #006eff);
        color: #fff;
        font-size: 15px;
        font-weight: 600;
        border-radius: 8px;
        text-decoration: none;
        box-shadow: 0 4px 12px rgba(0, 110, 255, 0.2);
    }
    
    .mobile-logout-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        padding: 12px 0;
        text-align: center;
        background: #fef2f2;
        color: #ef4444;
        font-size: 15px;
        font-weight: 600;
        border-radius: 8px;
        text-decoration: none;
        border: 1px solid #fca5a5;
    }

    /* Overlay */
    .mobile-drawer-overlay {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-drawer-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}