/* ===== 原有分类下拉菜单样式 ===== */
.nav-dropdown .dropdown-menu {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.nav-dropdown:hover .dropdown-menu {
    display: grid !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    grid-template-rows: repeat(10, auto);
    grid-auto-flow: column;
    grid-auto-columns: minmax(160px, max-content);
    max-width: 80vw;
}

.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 8px;
    z-index: 5;
}

.dropdown-menu {
    transition-delay: 0.15s;
}
.nav-dropdown:hover .dropdown-menu {
    transition-delay: 0s;
}

.dropdown-menu a {
    position: relative;
}

.dropdown-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.dropdown-menu a:hover::before {
    transform: scaleY(1);
}

/* ===== Mega Menu 样式 ===== */
.nav-mega .mega-panel {
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.nav-mega.open .mega-panel {
    display: block !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 填充按钮与面板之间的间隙 */
.nav-mega::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    height: 8px;
    z-index: 5;
}

.mega-panel {
    transition-delay: 0.15s;
}
.nav-mega.open .mega-panel {
    transition-delay: 0s;
}

/* 左侧分类项激活态 */
.mega-cat-item.active {
    color: #2563eb;
    background-color: #eff6ff;
    font-weight: 500;
}

.mega-cat-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 0 2px 2px 0;
}

/* 右侧工具网格项 hover 指示条 */
.mega-tools-grid a {
    position: relative;
}

.mega-tools-grid a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    transform: scaleY(0);
    transition: transform 0.2s ease;
    border-radius: 0 1px 1px 0;
}

.mega-tools-grid a:hover::before {
    transform: scaleY(1);
}

.mobile-accordion {
    border-bottom: 1px solid #f1f5f9;
}

.mobile-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 0;
    text-align: left;
    font-weight: 500;
    color: #1e293b;
}

.mobile-accordion-header i.fa-chevron-down {
    transition: transform 0.2s ease;
}

.mobile-accordion.open .mobile-accordion-header i.fa-chevron-down {
    transform: rotate(180deg);
}

.mobile-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-accordion.open .mobile-accordion-content {
    max-height: 500px;
}

.mobile-accordion-content a {
    display: block;
    padding: 10px 16px;
    color: #64748b;
    font-size: 14px;
}

.mobile-accordion-content a:hover {
    color: #3b82f6;
    background: #eff6ff;
    border-radius: 8px;
}