/**
 * 导航栏组件 - 样式文件
 * 文件名：navbar.css
 * 功能：完整响应式导航栏样式
 */

/* 基础导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(100, 116, 139, 0.2);
    z-index: 10000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar--scrolled {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-bottom-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Logo */
.navbar__logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar__logo:hover {
    transform: scale(1.05);
}

/* 桌面端菜单 */
.navbar__menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.navbar__link {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.navbar__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #60a5fa, #c084fc);
    transition: width 0.3s ease;
}

.navbar__link:hover {
    color: #ffffff;
}

.navbar__link:hover::after {
    width: 100%;
}

.navbar__link--active {
    color: #60a5fa;
    font-weight: 700;
}

.navbar__link--active::after {
    width: 100%;
}

/* 桌面端按钮 */
.navbar__button {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.navbar__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* 移动端切换按钮 */
.navbar__toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.navbar__toggle-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #60a5fa, #c084fc);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar__toggle--active .navbar__toggle-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.navbar__toggle--active .navbar__toggle-line:nth-child(2) {
    opacity: 0;
}

.navbar__toggle--active .navbar__toggle-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* 移动端菜单 */
.navbar__mobile {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 500;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.navbar__mobile--open {
    transform: translateX(0);
}

.navbar__mobile-content {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.navbar__mobile-link {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(100, 116, 139, 0.1);
}

.navbar__mobile-link:hover {
    background: rgba(30, 41, 59, 0.8);
    color: #ffffff;
    transform: translateX(8px);
}

.navbar__mobile-link--active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border-color: rgba(96, 165, 250, 0.4);
    color: #60a5fa;
}

.navbar__mobile-button {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 1.25rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    margin-top: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.navbar__mobile-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar__container {
        padding: 0 1rem;
        height: 68px;
    }
    
    .navbar__menu,
    .navbar__button {
        display: none;
    }
    
    .navbar__toggle {
        display: flex;
    }
    
    .navbar__mobile {
        top: 68px;
        padding: 1.5rem 1rem;
    }
}

/* Body padding */
body {
    padding-top: 72px;
}

@media (max-width: 768px) {
    body {
        padding-top: 68px;
    }
}