/* 统一导航栏样式 - 优化版 */

/* 基础导航栏样式 */
header {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    position: relative;
    z-index: 100;
    animation: fadeIn 1s ease-out;
    transition: all 0.3s ease;
}

/* 滚动时导航栏样式变化 */
header.scrolled {
    padding: 10px 20px;
    background: rgba(44, 44, 44, 0.95);
    backdrop-filter: blur(10px);
}

/* 俱乐部LOGO与名称容器 */
.logo-container {
    display: flex;
    align-items: center;
    animation: slideIn 1s ease-out;
    position: relative;
}

/* 俱乐部LOGO图标 */
.team-logo {
    width: 48px;
    height: 48px;
    margin-right: 10px;
    background: url('MGlogo/生成木阁 logo.png') no-repeat center/cover;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.team-logo:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.3);
    border-color: #4CAF50;
}

/* 俱乐部名称文字 */
.team-name {
    font-size: 1.3em;
    font-weight: 600;
    color: #4CAF50;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.team-name:hover {
    color: #66bb6a;
    text-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

/* 导航链接容器 */
nav {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

/* 导航链接样式 */
nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    overflow: hidden;
}

/* 导航链接悬停效果 */
nav a:hover {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    transform: translateY(-2px);
}

/* 导航链接下划线动画 */
nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #4CAF50;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* 当前页面导航项高亮样式 */
nav a.active {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

nav a.active::after {
    width: 100%;
}



/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    z-index: 200;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #4CAF50;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 平滑滚动效果 */
html {
    scroll-behavior: smooth;
}

/* 响应式设计 - 平板和手机 */
@media (max-width: 992px) {
    nav {
        gap: 10px;
    }
    
    nav a {
        margin-left: 0;
        padding: 6px 10px;
        font-size: 0.9em;
    }
    
    .team-name {
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    /* 移动端导航栏布局 */
    header {
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 15px;
    }
    
    /* 显示移动端菜单按钮 */
    .menu-toggle {
        display: block;
    }
    
    /* 隐藏默认导航 */
    nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        background: #2c2c2c;
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 20px 20px;
        box-shadow: -4px 0 12px rgba(0,0,0,0.3);
        transition: right 0.3s ease;
        z-index: 150;
        gap: 0;
    }
    
    /* 移动端导航展开样式 */
    nav.active {
        right: 0;
    }
    
    /* 移动端导航链接样式 */
    nav a {
        width: 100%;
        margin-left: 0;
        padding: 12px 15px;
        font-size: 1em;
        border-radius: 4px;
        margin-bottom: 8px;
    }
    
    /* 移动端导航背景遮罩 */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 140;
        transition: opacity 0.3s ease;
    }
    
    .nav-overlay.active {
        display: block;
    }
    
    /* 移动端LOGO样式调整 */
    .team-logo {
        width: 40px;
        height: 40px;
    }
    
    .team-name {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    /* 小屏幕设备优化 */
    .team-name span {
        display: none;
    }
    
    nav {
        width: 100%;
        right: -100%;
    }
}