/* ===== 导航栏样式 ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header .container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 85px;
    transition: all 0.3s ease;
    padding-left: 0;
    margin: 0px 30px;
    max-width: 100%;
}

/* Logo样式 */
.logo {
    margin-right: 50px;
    margin-left: 0 !important;
    padding-left: 0 !important;
    display: inline-block;
}

.logo a {
    font-size: 28px;
    font-weight: bold;
    color: #1e88e5;
    transition: color 0.3s;
    display: block;
}

.logo a:hover {
    color: #1565c0;
}

/* 导航菜单样式 */
.nav ul {
    display: flex;
}

.nav ul li {
    margin-left: 60px;
}

.nav ul li a {
    color: #fff;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    padding: 5px 0;
}

.nav ul li a:hover {
    color: #1e88e5;
}

.nav ul li a.active {
    color: #1e88e5;
}

.nav ul li a.active::after,
.nav ul li a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #1e88e5;
    border-radius: 1px;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    transition: all 0.3s;
    margin-left: auto;
}

.mobile-menu-btn:hover {
    color: #1e88e5;
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .header .container {
        margin: 0 20px;
    }
}

/* 移动端菜单样式 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: #000;
    z-index: 1002;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #333;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s;
}

.mobile-menu-close:hover {
    color: #1e88e5;
    transform: rotate(90deg);
}

.mobile-nav {
    padding: 20px 0;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav ul li {
    margin: 0;
    border-bottom: 1px solid #222;
}

.mobile-nav ul li:last-child {
    border-bottom: none;
}

.mobile-nav ul li a {
    display: block;
    padding: 15px 25px;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.mobile-nav ul li a:hover,
.mobile-nav ul li a.active {
    background-color: #1e88e5;
    color: #fff;
}

.mobile-nav ul li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background-color: #1e88e5;
    transition: height 0.3s;
}

.mobile-nav ul li a:hover::before,
.mobile-nav ul li a.active::before {
    height: 100%;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 移动端菜单响应式优化 */
@media (max-width: 480px) {
    .mobile-menu {
        width: 90%;
        right: -100%;
    }
    
    .mobile-menu.active {
        right: 0;
    }
}

@media (max-width: 320px) {
    .mobile-menu {
        width: 95%;
    }
    
    .header .container {
        margin: 0 10px;
    }
    
    .logo a {
        font-size: 24px;
    }
}

/* 防止滚动 */
body.menu-open {
    overflow: hidden;
}
