/* 导航栏样式 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2%;
    z-index: 1000;
    transition: background-color 0.3s ease;
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 50px;
    width: auto;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin-left: 1.2rem;
    margin-right: 1.2rem;
}

nav ul li a {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    color: #0f0;
    text-decoration: none;
    white-space: nowrap;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0f0;
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 30px;
    height: 30px;
    justify-content: space-around;
    padding: 3px;
}

.bar {
    width: 100%;
    height: 3px;
    background-color: #0f0;
    margin: 2px 0;
    transition: 0.4s;
    border-radius: 2px;
}

/* 下拉菜单容器样式 */
.dropdown {
    position: relative;
    display: inline-block;
}

/* 下拉按钮样式 */
.dropbtn {
    cursor: pointer;
}

/* 下拉内容样式 - 默认隐藏 */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #0a0a14;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 1000;
    border-radius: 5px;
    border: 1px solid #30336b;
}

/* 下拉菜单链接样式 */
.dropdown-content a {
    color: #0f0;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: background-color 0.3s;
}

/* 鼠标悬停在下拉菜单链接上时的样式 */
.dropdown-content a:hover {
    background-color: #1a1a2e;
    color: #fff;
}

/* 显示下拉菜单 - 用于JavaScript添加此类 */
.show {
    display: block;
}

/* 优化导航栏布局 */
nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    header {
        padding: 0.8rem 5%;
    }
    
    .menu-toggle {
        display: flex;
        position: relative;
        z-index: 1001;
        margin-right: 5px;
        align-items: center;
        justify-content: center;
    }
    
    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-2px, 6px);
    }
    
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-2px, -6px);
    }
    
    nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: rgba(10, 10, 10, 0.95);
        padding: 1rem 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        opacity: 0;
        visibility: hidden;
        justify-content: flex-start;
        z-index: 999;
    }
    
    nav.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: nowrap;
        width: 100%;
        padding: 20px 0;
        overflow-y: auto;
    }
    
    nav ul li {
        margin: 1rem 0;
    }
    
    .dropdown-content {
        position: relative;
        width: 100%;
        box-shadow: none;
        border: none;
        background-color: transparent;
    }
}