/* 导航栏样式优化 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

/* 下拉菜单样式 */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 8px 0;
    margin-top: 8px;
    display: none;
    animation: fadeInDown 0.3s ease;
    min-width: 200px;
    z-index: 1000;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #343a40;
}

/* 确保下拉菜单容器有相对定位 */
.nav-item.dropdown {
    position: relative;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 12px 20px;
    font-size: 14px;
    color: white;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
    transform: translateX(4px);
}

.dropdown-divider {
    margin: 6px 0;
    border-color: #e9ecef;
}

/* 导航链接悬停效果 */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #fff !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #fff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* 下拉菜单显示时隐藏下划线 */
.dropdown.show .nav-link::after {
    display: none;
}

/* 下拉菜单激活状态 */
.dropdown.show .nav-link {
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
    color: #fff !important;
}

/* 下拉菜单箭头动画 */
.dropdown-toggle::after {
    transition: transform 0.2s ease;
}

.dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* 下拉菜单显示状态 */
.dropdown.show .dropdown-menu {
    display: block !important;
}

/* 响应式优化 */
@media (max-width: 991.98px) {
    .dropdown-menu {
        border: none;
        box-shadow: none;
        background-color: rgba(255,255,255,0.1);
        margin-top: 0;
    }
    
    .dropdown-item {
        color: rgba(255,255,255,0.8);
        padding: 10px 20px;
    }
    
    .dropdown-item:hover {
        background-color: rgba(255,255,255,0.1);
        color: #fff;
        transform: none;
    }
    
    .dropdown-divider {
        border-color: rgba(255,255,255,0.2);
    }
}

/* 工具分类标签样式 */
.dropdown-item[href*="gm_"] {
    position: relative;
}

.dropdown-item[href*="gm_"]::before {
    content: "国密";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    background-color: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* 图标样式优化 */
.dropdown-item i {
    width: 16px;
    text-align: center;
    opacity: 0.8;
}

.dropdown-item:hover i {
    opacity: 1;
}

.nav-link i {
    opacity: 0.9;
}

.nav-link:hover i {
    opacity: 1;
}

/* 新工具标签 */
.dropdown-item[href*="key_generator"]::after {
    content: "新";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    background-color: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* 外部链接样式 */
.dropdown-item[target="_blank"]:not([href*="gm_"]):not([href*="key_generator"])::after {
    content: "\F285";
    font-family: "bootstrap-icons";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.6;
} 