/* 导航区域整体样式 */
header {
    background: linear-gradient(to bottom, rgba(139, 69, 19, 0.05), transparent);
    padding: 20px 0;
    border-bottom: 1px solid rgba(139, 69, 19, 0.1);
}

/* Logo样式 */
.logo {
    text-align: center;
    margin-bottom: 25px;
}

.logo h1 {
    font-family: "STKaiti", "KaiTi", serif;
    font-size: 42px;
    color: #8B4513;
    margin: 0;
    letter-spacing: 8px;
    position: relative;
    display: inline-block;
    font-weight: bold;
}

.logo .subtitle {
    font-family: "FangSong", "STFangsong", serif;
    font-size: 16px;
    color: #A0522D;
    margin-top: 8px;
    letter-spacing: 4px;
    position: relative;
    font-weight: bold;
}

/* 装饰元素 */
.logo h1::before,
.logo h1::after {
    content: '●';
    font-size: 14px;
    color: #CD853F;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.logo h1::before {
    left: -30px;
}

.logo h1::after {
    right: -30px;
}

/* 导航栏样式 */
nav {
    margin-top: 1.5rem;
    padding: 0.8rem 0;
    background: linear-gradient(to right, transparent, rgba(222, 184, 135, 0.1), transparent);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
}

nav ul li {
    margin: 0 0.8rem;
    position: relative;
}

nav ul li a {
    color: #4A3728;
    text-decoration: none;
    padding: 0.5rem 1.2rem;
    font-size: 1.2rem;
    font-family: "FangSong", "STFangsong", "楷体", "KaiTi", serif;
    letter-spacing: 2px;
    transition: all 0.4s ease;
    display: block;
    position: relative;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* 悬停效果 */
nav ul li a:hover {
    color: #8B4513;
    transform: translateY(-2px);
}

/* 下划线动画效果 */
nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, #8B4513, transparent);
    transition: all 0.4s ease;
    transform: translateX(-50%);
}

nav ul li a:hover::after {
    width: 80%;
}

/* 活动状态 */
nav ul li a.active {
    color: #8B4513;
    font-weight: bold;
}

nav ul li a.active::after {
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, #8B4513, transparent);
}

/* 分隔符样式 */
nav ul li.divider {
    color: #DEB887;
    opacity: 0.6;
    margin: 0 0.3rem;
    font-family: "SimSun", "宋体", serif;
    position: relative;
    top: -2px;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    align-items: center;
    margin-left: 1.5rem;
    position: relative;
}

.search-box input {
    padding: 0.5rem 1rem;
    border: 1px solid #DEB887;
    border-radius: 20px;
    margin-right: 0.5rem;
    font-size: 0.9rem;
    font-family: "FangSong", "STFangsong", serif;
    background: rgba(255, 248, 240, 0.9);
    width: 180px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 5px rgba(139, 69, 19, 0.2);
    width: 200px;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #8B4513;
    transition: all 0.3s ease;
    padding: 0.5rem;
}

.search-btn:hover {
    transform: scale(1.1) rotate(5deg);
    color: #CD853F;
}

/* 用户菜单样式 */
.user-menu a {
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-menu .login-btn {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 6px 16px;
}

.user-menu .login-btn:hover {
    background: rgba(139, 69, 19, 0.05);
}

/* 管理按钮样式 */
.admin-upload-btn {
    background: rgba(139, 69, 19, 0.1);
    border-radius: 20px;
    padding: 6px 16px !important;
    transition: all 0.3s ease;
}

.admin-upload-btn:hover {
    background: rgba(139, 69, 19, 0.2);
}

/* 搜索结果弹窗样式 */
.search-result {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-result-content {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.search-result.active {
    opacity: 1;
    display: flex;
}

.search-result.active .search-result-content {
    transform: translateY(0);
}

.close-search {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #8B4513;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

.close-search:hover {
    transform: rotate(90deg);
}

/* 移动端响应式布局 */
@media screen and (max-width: 768px) {
    /* Logo样式调整 */
    .logo h1 {
        font-size: 32px;
        letter-spacing: 4px;
    }

    .logo .subtitle {
        font-size: 14px;
        letter-spacing: 2px;
    }

    /* 导航菜单调整 */
    nav ul {
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 10px;
    }

    nav ul li a {
        font-size: 14px;
        padding: 6px 10px;
    }

    /* 隐藏分隔符 */
    nav ul li.divider {
        display: none;
    }

    /* 搜索框调整 */
    .search-box {
        width: 100%;
        order: 1;
        margin: 10px 0;
    }

    #searchInput {
        width: 100%;
        max-width: none;
    }

    /* 用户菜单调整 */
    .user-menu {
        margin-left: auto;
    }

    .admin-upload-btn {
        padding: 6px 12px !important;
        font-size: 14px;
    }
}

/* 更小屏幕的优化 */
@media screen and (max-width: 480px) {
    .logo h1 {
        font-size: 28px;
    }

    nav ul {
        gap: 5px;
    }

    nav ul li a {
        font-size: 13px;
        padding: 5px 8px;
    }
}

/* 导航区域整体样式 */
.logo-decoration {
    text-align: center;
    position: relative;
}

.decoration {
    display: inline-block;
    width: 30px;
    height: 2px;
    background: var(--secondary-color);
    position: absolute;
    top: 50%;
}

.decoration.left {
    left: -40px;
}

.decoration.right {
    right: -40px;
} 