a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}
/* 全站频道导航条 */
.site-nav {
    background-color: #5a3921;
    color: white;
    padding: 10px 0;
    font-size: 0.9rem;
}

.site-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-nav-links {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

.site-nav-links li {
    margin-right: 15px;
}

.site-nav-links a {
    color: #e8dfca;
    text-decoration: none;
    transition: color 0.3s;
    font-family: 'Noto Serif SC', serif;
    white-space: nowrap;
}

.site-nav-links a:hover {
    color: #f8d568;
}

.site-nav-links .current a {
    color: #f8d568;
    font-weight: bold;
}

.user-actions a {
    color: #e8dfca;
    text-decoration: none;
    margin-left: 10px;
    font-family: 'Noto Serif SC', serif;
    white-space: nowrap;
}

.user-actions a:hover {
    color: #f8d568;
}

/* 用户下拉菜单 */
.user-dropdown {
    position: relative;
    cursor: pointer;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f8d568;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5a3921;
    font-weight: bold;
    font-size: 0.8rem;
}
.user-avatar img{
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.username {
    font-size: 14px;
    color: #e8dfca;
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 160px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 10px 0;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 15px;
    border: 8px solid transparent;
    border-bottom-color: white;
}

.dropdown-menu a {
    display: block;
    padding: 8px 15px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: #784620;
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}

/* 古诗文站点导航 */
.gushi-nav {
    background-color: #784620;
    padding: 12px 0;
}

.gushi-nav .container {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 0;
}

.gushi-brand-link {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}

.gushi-brand-wordmark {
    display: block;
    width: auto;
    height: 54px;
    max-width: min(34vw, 264px);
    object-fit: contain;
}

.gushi-nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    margin-left: 8px;
    padding-bottom: 2px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.gushi-nav-links::-webkit-scrollbar {
    display: none;
}

.gushi-nav-links li {
    flex: 0 0 auto;
    margin-right: 0;
}

.gushi-nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
    font-family: 'Noto Serif SC', serif;
    white-space: nowrap;
}

.gushi-nav-links a:hover {
    color: #f8d568;
}

.gushi-nav-links .current a {
    color: #f8d568;
    font-weight: bold;
}

.nav-right {
    display: flex;
    align-items: center;
    margin-left: auto;
    flex: 0 1 auto;
    min-width: 0;
}

.nav-search {
    display: flex;
    min-width: 0;
}
.nav-search form{
    display: flex;
    max-width: 100%;
}
.nav-search input {
    padding: 6px 12px;
    border: none;
    border-radius: 20px 0 0 20px;
    width: clamp(160px, 24vw, 320px);
    min-width: 0;
    font-size: 0.9rem;
    outline: none;
    font-family: 'Noto Serif SC', serif;
}

.nav-search button {
    background: #f8d568;
    color: #5a3921;
    border: none;
    padding: 6px 12px;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
    font-family: 'Noto Serif SC', serif;
}

.nav-search button:hover {
    background: #e6c350;
}

@media (max-width: 1100px) {
    .gushi-nav .container {
        gap: 14px;
    }

    .gushi-brand-wordmark {
        height: 48px;
        max-width: min(30vw, 224px);
    }

    .gushi-nav-links {
        gap: 16px;
    }

    .nav-search input {
        width: clamp(132px, 18vw, 220px);
    }
}

@media (max-width: 900px) {
    .gushi-nav .container {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .logo {
        order: 1;
    }

    .nav-right {
        order: 2;
    }

    .gushi-nav-links {
        order: 3;
        flex-basis: 100%;
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .gushi-nav {
        padding: 10px 0;
    }

    .gushi-nav .container {
        gap: 10px;
    }

    .gushi-brand-wordmark {
        height: 38px;
        max-width: min(70vw, 220px);
    }

    .gushi-nav-links {
        gap: 12px;
    }

    .nav-right {
        width: 100%;
        margin-left: 0;
    }

    .nav-search {
        width: 100%;
    }

    .nav-search form {
        width: 100%;
    }

    .nav-search input {
        width: 100%;
        flex: 1 1 auto;
    }
}
