/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 65px;
    line-height: 65px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
    backdrop-filter: blur(10px);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #1E9FFF;
    letter-spacing: 1px;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* 汉堡菜单动画效果 */
.hamburger-menu.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

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

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    margin-right: 20px;
    padding: 0;
}

.nav-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 16px;
    padding: 0 10px;
    position: relative;
}

.nav-link:after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 0;
    height: 3px;
    background: #1E9FFF;
    transition: width 0.3s;
}

.nav-link:hover:after,
.nav-link.active:after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: #1E9FFF;
}

/* 下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-dropdown{
    position: relative;
    display: inline-block;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0px 20px;
    color: #333;
    text-decoration: none;
    line-height: 50px;
    transition: background-color 0.3s;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f9f9f9;
    color: #1E9FFF;
    border-radius: 4px;
}

.dropdown-toggle {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-arrow {
    height: 65px;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        z-index: 999;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    /* 当菜单激活时显示 */
    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-link {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
        text-align: center;  /* 移动端菜单文字居中对齐 */
    }

    .nav-dropdown {
        position: relative;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f9f9f9;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-dropdown.active .dropdown-menu {
        max-height: 300px;
    }

    .nav-link:after {
        content: '';
        position: absolute;
        bottom: 0px;
        left: 0;
        width: 0;
        height: 3px;
        background: none;
        transition: width 0.3s;
    }

    .dropdown-item {
        padding: 12px 40px;
        border-bottom: 1px solid #eee;
        text-align: center;  /* 移动端下拉菜单文字居中对齐 */
        position: relative;
    }
    
    .dropdown-item:after {
        content: '';
        position: absolute;
        bottom: 0px;
        left: 0;
        width: 0;
        height: 3px;
        background: #1E9FFF;
        transition: width 0.3s;
    }
    .dropdown-item.active{
        color: #1E9FFF;
    }
    .dropdown-item.active:after {
        width: 100%;
    }
    
}