/* 现代化导航系统 */
:root {
    --nav-height: 70px;
    --nav-bg: rgba(255, 255, 255, 0.98);
    --nav-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    --primary-color: #667eea;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
}

/* 导航容器 */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: transform 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.main-nav.hidden {
    transform: translateY(-100%);
}

/* 导航内容 */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
}

/* Logo/品牌区 */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-color);
    transition: transform 0.3s ease;
}

.nav-brand:hover {
    transform: scale(1.05);
}

.nav-brand-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

.nav-brand-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* 导航链接 */
.nav-links {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    position: relative;
    padding: 10px 20px;
    text-decoration: none;
    color: #2c3e50;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    transform: translateY(-1px);
}

.nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nav-link.primary {
    /* 投稿按钮使用普通样式，无特殊颜色 */
}

/* 移动端菜单按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s;
}

.nav-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #2c3e50;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* 页面内容调整（避免被固定导航遮挡） */
body {
    padding-top: var(--nav-height);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-brand-text {
        font-size: 16px;
    }

    .nav-brand-icon {
        font-size: 24px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        padding: 20px;
        gap: 10px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.3s ease;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {
        max-height: 500px;
        opacity: 1;
    }

    .nav-link {
        width: 100%;
        padding: 16px 20px;
        justify-content: center;
        font-size: 16px;
        font-weight: 600;
    }

    .nav-link.active {
        transform: scale(1.02);
    }
}

/* 平滑滚动行为 */
html {
    scroll-behavior: smooth;
}

/* 页面内容容器调整 */
.page-content {
    min-height: calc(100vh - var(--nav-height));
}

/* 导航图标 */
.nav-icon {
    font-size: 18px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* 导航徽章（用于通知等） */
.nav-badge {
    position: absolute;
    top: 4px;
    right: 12px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

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

.main-nav {
    animation: slideDown 0.5s ease;
}

/* 优化移动端触摸体验 */
@media (max-width: 768px) {
    .nav-link {
        -webkit-tap-highlight-color: transparent;
    }
}

/* 深色模式支持（可选） */
@media (prefers-color-scheme: dark) {
    :root {
        --nav-bg: rgba(30, 30, 30, 0.98);
        --text-color: #ecf0f1;
        --text-light: #bdc3c7;
    }
}

