.navbar-logo {
  display: flex;
  align-items: center;
}
.navbar-logo img {
  height: 40px; 
  vertical-align: middle;
  transition: all 0.25s ease-in-out;
  transform-origin: center center;
  border-radius: 4px;
}
.navbar-logo img:hover {
  transform: scale(1.08) translateY(-1px);
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.2);
}
.navbar-logo span {
  margin-left: 8px; 
  vertical-align: middle;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  font-family: "Microsoft YaHei", sans-serif;
}

/* 下拉菜单*/
.navbar-dropdown {
    position: relative;
    display: inline-block;
    z-index: 1; 
}
.navbar-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 90px;
    background: #ffffff !important; /* 强制白色背景 */
    border: 1px solid #e5e7eb !important; /* 强制边框 */
    border-radius: 4px;
    padding: 0 !important; /* 完全取消菜单上下内边距 */
    margin: 0 !important; /* 取消外边距 */
    z-index: 99999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}
.navbar-submenu a {
    display: block;
    padding: 4px 16px !important; /* 极致缩小上下内边距（仅4px） */
    margin: 0 !important; /* 取消菜单项外边距 */
    color: #333333 !important; /* 强制深灰色文字，取消绿色高亮 */
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    line-height: 1.8 !important; /* 最小行高，压缩垂直间距 */
    height: auto !important; /* 取消固定高度 */
}
.navbar-submenu a:hover {
    background: #f3f4f6 !important; /* hover背景色 */
    color: #28a745 !important; /* hover文字色 */
}
.navbar-dropdown:hover .navbar-submenu {
    display: block !important;
}

/* ========== 导航栏布局========== */
.navbar {
    background-color: #28a745;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    overflow: visible !important;
}
.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 0 !important;
}

/* 导航项样式（原始间距/颜色） */
.navbar-menu a {
    color: #fff;
    text-decoration: none;
    padding: 0 15px;
    height: 60px;
    line-height: 60px;
    font-size: 14px;
    font-family: "Microsoft YaHei", sans-serif;
    display: inline-block;
}
.navbar-menu a:hover {
    background-color: rgba(255,255,255,0.1);
    transition: background-color 0.2s;
}

/* 劫持检测+三角 */
.navbar-dropdown span {
    color: #fff;
    padding: 0 25px 0 15px;
    height: 60px;
    line-height: 60px;
    font-size: 14px;
    font-family: "Microsoft YaHei", sans-serif;
    cursor: pointer;
    display: inline-block;
    position: relative;
}
.navbar-dropdown span:hover {
    background-color: rgba(255,255,255,0.1);
    transition: background-color 0.2s;
}
.navbar-dropdown span::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 4px solid #fff;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

/* ========== 新增：全部工具全屏下拉菜单样式（最终版） ========== */
/* 全屏下拉容器 - 右对齐向左展开 */
.fullwidth-dropdown .navbar-fullmenu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0; /* 右对齐，向左展开 */
    width: 100vw; /* 全屏宽度 */
    max-width: calc(100vw - 20px); /* 避免超出屏幕 */
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 20px;
    margin: 0;
    z-index: 99999;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    transform: none; /* 取消居中位移 */
}
/* 悬浮显示全屏菜单 */
.fullwidth-dropdown:hover .navbar-fullmenu {
    display: block !important;
}
/* 工具分类容器 - 网格布局 */
.tools-category {
    max-width: 1200px;
    margin: 0 0 0 auto; /* 右对齐，减少左侧遮挡 */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 5px; /* 缩小列间距，更紧凑 */
}
/* 分类项 - 核心美化：左侧绿线 + 悬浮高亮 */
.category-item {
    padding: 10px 15px;
    border-radius: 4px;
    transition: all 0.2s ease;
    position: relative; /* 为左侧绿线定位 */
}
/* 分类标题左侧绿色竖线 */
.category-item h4 {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0 0 12px 0;
    padding-left: 12px; /* 给绿线留空间 */
    position: relative;
    font-family: "Microsoft YaHei", sans-serif;
}
.category-item h4::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 3px;
    background-color: #28a745; /* 绿色竖线，匹配导航栏主色 */
    border-radius: 2px;
}
/* 分类列悬浮效果：背景高亮 + 阴影 */
.category-item:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.1); /* 绿色系阴影 */
}
/* 分类列表 */
.category-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-item ul li {
    margin: 6px 0;
}
/* 分类链接样式 */
.category-item ul li a {
    display: block;
    padding: 4px 0 !important;
    color: #666 !important;
    font-size: 14px;
    text-decoration: none;
    line-height: 1.6 !important;
    height: auto !important;
    transition: color 0.2s ease;
}
/* 链接hover效果 */
.category-item ul li a:hover {
    color: #28a745 !important;
    background: transparent !important;
}
/* 激活状态样式 */
.category-item ul li a.active {
    color: #28a745 !important;
    font-weight: bold;
}

/* ========== 移动端适配（核心：隐藏全部工具） ========== */
@media (max-width: 768px) {
    /* 隐藏全部工具按钮 */
    .fullwidth-dropdown {
        display: none !important;
    }
    /* 保留其他导航样式 */
    .navbar {
        padding: 10px 15px;
        height: auto;
    }
    .navbar-container {
        flex-wrap: wrap;
        height: auto;
        align-items: flex-start;
    }
    .navbar-logo {
        margin-bottom: 10px;
    }
    .navbar-menu {
        flex-wrap: wrap;
        width: 100%;
    }
    .navbar-menu a, .navbar-dropdown span {
        padding: 5px 10px;
        height: auto;
        line-height: 1.5;
    }
    .navbar-dropdown span {
        padding-right: 20px;
    }
    .navbar-dropdown span::after {
        right: 5px;
        border-top: 3px solid #fff;
        border-left: 3px solid transparent;
        border-right: 3px solid transparent;
    }
    /* 全屏菜单移动端兜底（实际不会显示） */
    .fullwidth-dropdown .navbar-fullmenu {
        display: none !important;
    }
}
