/* 全局优化 */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --background-color: #f8f9fa;
    --border-color: #dee2e6;
    --text-color: #333;
    --light-text: #6c757d;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --hover-transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* 按钮样式优化 */
.btn {
    display: inline-block;
    font-weight: 500;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: var(--hover-transition);
}

.btn:hover {
    background-color: #0062cc;
    border-color: #0062cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.15);
    text-decoration: none;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
    margin: 0 5px;
}

/* Logo样式优化 */
.logo-container {
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
}

.logo-container img,
.logo-img {
    max-height: 45px !important;
    width: auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.logo {
    display: flex;
    align-items: center;
}

.logo span {
    margin: 0 10px;
    color: #8f9295;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--hover-transition);
}

.logo a:hover {
    color: #0056b3;
    text-decoration: none;
}

/* 头部样式优化 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
    margin-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 500;
    text-decoration: none;
    transition: var(--hover-transition);
    position: relative;
    padding: 0.5rem 0;
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* 导航选中状态 */
.main-nav a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--hover-transition);
}

.main-nav a:hover::after {
    width: 100%;
}

/* 活动状态下的底部指示条 */
.main-nav a.active::after {
    width: 100%;
    background-color: var(--primary-color);
}

/* 按钮选中状态 */
.btn-active {
    background-color: #0056b3;
    border-color: #004085;
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
    transform: translateY(-1px);
}

/* 轮廓按钮选中状态 */
.btn-outline.btn-active {
    background-color: rgba(0, 123, 255, 0.1);
    color: #0056b3;
    border-color: #0056b3;
    font-weight: 600;
}

/* 公告滚动条优化 */
.announcement-bar {
    background-color: #e8f4ff;
    border-bottom: 1px solid #c2e0ff;
    padding: 5px 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.announcement-wrapper {
    display: flex;
    align-items: center;
    height: 40px;
}

.announcement-icon {
    margin-right: 15px;
    flex-shrink: 0;
    font-size: 22px;
    color: #0056b3;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 123, 255, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.announcement-scroll {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.announcement-flip {
    position: relative;
    height: 100%;
    width: 100%;
}

.flip-container {
    position: relative;
    height: 100%;
    width: 100%;
}

.flip-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    transform: translateY(20px) rotateX(-90deg);
    transition: transform 0.8s ease, opacity 0.5s ease, visibility 0s 0.5s;
}

.flip-item.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) rotateX(0);
    transition: transform 0.8s ease, opacity 0.5s ease;
}

.flip-item a {
    display: flex;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    white-space: nowrap;
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    padding: 0 10px;
    transition: var(--hover-transition);
    pointer-events: auto;
    cursor: pointer;
    position: relative;
}

.flip-item a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.flip-item a:hover::after {
    content: '查看详情 →';
    position: absolute;
    right: 10px;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.notice-title, .notice-content {
    pointer-events: none;
}

.notice-date {
    font-weight: 500;
    margin-right: 12px;
    white-space: nowrap;
    color: #0056b3;
    background-color: rgba(0, 123, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    pointer-events: none;
}

.notice-title {
    font-weight: bold;
    margin-right: 15px;
    white-space: nowrap;
    color: #e41c23;
    background-color: rgba(228, 28, 35, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
}

.notice-content {
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
}

/* 首页样式优化 */
.hero-section {
    text-align: center;
    padding: 4rem 0;
    margin-bottom: 3rem;
    background-color: #e8f4ff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.hero-title {
    font-size: 2.75rem;
    margin-bottom: 1.25rem;
    color: #0056b3;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: #555;
    max-width: 700px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.75rem;
}

.section-title {
    margin: 0;
    color: #0056b3;
    font-size: 1.75rem;
}

.section-link {
    color: var(--primary-color);
    font-weight: 500;
    transition: var(--hover-transition);
}

.section-link:hover {
    color: #0062cc;
    text-decoration: none;
    transform: translateX(5px);
}

/* 帖子列表优化 */
.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.post-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 1.75rem;
    transition: var(--hover-transition);
    /* border-left: 4px solid var(--primary-color); */
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.post-title {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.post-title a {
    color: #333;
    text-decoration: none;
    transition: var(--hover-transition);
}

.post-title a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.post-meta {
    margin-bottom: 1rem;
    color: var(--light-text);
    font-size: 0.875rem;
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.post-author, .post-date, .post-type {
    margin-right: 1.5rem;
    display: flex;
    align-items: center;
}

.post-author::before {
    content: '👤';
    margin-right: 5px;
}

.post-date::before {
    content: '📅';
    margin-right: 5px;
}

.post-type::before {
    content: '📄';
    margin-right: 5px;
}

.post-excerpt {
    margin-bottom: 1.25rem;
    line-height: 1.6;
    color: #555;
}

.read-more {
    display: inline-block;
    font-weight: 500;
    color: var(--primary-color);
    transition: var(--hover-transition);
    position: relative;
    padding-right: 20px;
}

.read-more::after {
    content: '→';
    position: absolute;
    right: 0;
    transition: var(--hover-transition);
}

.read-more:hover {
    color: #0062cc;
    text-decoration: none;
    padding-right: 25px;
}

.read-more:hover::after {
    right: -5px;
}

/* 帖子详情页样式优化 */
.post-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
}

.post-header {
    /* margin-bottom: 2rem; */
    /* border-bottom: 1px solid var(--border-color); */
    padding-bottom: 1rem;
}

.post-content {
    margin-bottom: 2rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1rem 0;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

/* 评论区样式优化 */
.comment-section {
    margin-top: 2.5rem;
}

.section-title {
    margin-bottom: 1.5rem;
    color: #0056b3;
    font-size: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.comment-form-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.comment-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border-left: 3px solid #6c757d;
    transition: var(--hover-transition);
}

.comment-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    color: var(--light-text);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.comment-content {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* 列表页面样式优化 */
.page-header {
    margin-bottom: 2.5rem;
    text-align: center;
    background-color: #e8f4ff;
    padding: 3rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

.page-title {
    margin-bottom: 0.75rem;
    color: #0056b3;
    font-size: 2.25rem;
}

.page-subtitle {
    color: #555;
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.page-link {
    display: inline-block;
    padding: 0.6rem 1rem;
    margin: 0 0.3rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--hover-transition);
    font-weight: 500;
}

.page-link:hover {
    background-color: #e8f4ff;
    border-color: var(--primary-color);
    text-decoration: none;
    transform: translateY(-2px);
}

.page-link.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 响应式布局优化 */
@media (min-width: 992px) {
    .post-list {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (min-width: 1200px) {
    .post-list {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width: 767px) {
    .post-list {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .post-container {
        padding: 1.5rem;
    }
    
    /* 导航菜单样式 */
    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background-color: #fff;
        z-index: 999;
        padding: 80px 20px 20px;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
        opacity: 0;
        visibility: hidden;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, visibility 0.2s ease;
        overflow-y: auto;
    }
    
    .main-nav.active {
        left: 0;
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        background-color: #f3f3f3;
    }
    
    /* 菜单内容滚动时顶部阴影 */
    /* .main-nav::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background-color: #fff;
        z-index: 2;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    } */
    
    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        position: relative;
        z-index: 3;
        gap: 8px;
    }
    
    .nav-item {
        margin: 5px 0;
        width: 100%;
        opacity: 0;
        transform: translateX(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        transition-delay: calc(var(--item-index, 0) * 0.05s);
    }
    
    .main-nav.active .nav-item {
        opacity: 1;
        transform: translateX(0);
    }
    
    .nav-link {
        padding: 12px 15px;
        width: 100%;
        font-size: 16px;
        border-radius: 8px;
        font-weight: 500;
        transition: all 0.2s ease;
    }
    
    .nav-link:hover {
        background-color: rgba(0, 123, 255, 0.08);
        transform: translateX(5px);
        text-decoration: none;
    }
    
    .nav-link.active {
        background-color: rgba(0, 123, 255, 0.15);
        color: var(--primary-color);
        font-weight: 600;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    .menu-overlay {
        transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
    }
    
    .mobile-menu-toggle {
        display: flex;
        margin-left: 10px;
        z-index: 1001;
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    /* 用户导航和搜索框调整 */
    .user-nav {
        display: none !important;
    }
    
    .logo-container img,
    .logo-img {
        max-height: 40px;
    }

    .logo a {
        font-size: 1.2rem;
    }
}

/* 特小屏幕适配 */
@media (max-width: 320px) {
    .logo-container img,
    .logo-img {
        max-height: 30px;
    }
    
    .logo a {
        font-size: 1rem;
    }
}

/* 空状态样式优化 */
.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    width: 100%;
    grid-column: 1 / -1;
    margin: 2rem 0;
}

.empty-state p {
    color: #6c757d;
    font-size: 1.25rem;
    margin: 0;
    position: relative;
    padding-left: 32px;
}

.empty-state p::before {
    content: '📝';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

.no-notices {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    color: #6c757d;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
}

.no-notices span {
    position: relative;
    padding-left: 28px;
}

.no-notices span::before {
    content: '🔔';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
}

/* 表单样式优化 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

textarea.form-control {
    height: auto;
}

/* 登录表单样式 */
.auth-container {
    max-width: 500px;
    margin: 3rem auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 2rem;
    color: #0056b3;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #6c757d;
    font-size: 1rem;
}

.login-prompt {
    background-color: #e8f4ff;
    border-left: 3px solid #007bff;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.login-prompt p {
    margin: 0;
    color: #495057;
}

.login-prompt a {
    color: #007bff;
    font-weight: 500;
    text-decoration: none;
}

.login-prompt a:hover {
    text-decoration: underline;
}

/* 按钮变体 */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-outline {
    color: #007bff;
    background-color: transparent;
    border-color: #007bff;
}

.btn-outline:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

/* 警告消息样式 */
.alert {
    position: relative;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert .close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 1rem;
    color: inherit;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.5;
}

.alert .close:hover {
    opacity: 1;
}

/* 搜索框样式优化 */
.header-search {
    position: relative;
    margin: 0;
    width: 100%;
}

.search-form {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.search-input {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 40px 8px 15px;
    width: 100%;
    font-size: 14px;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #f5f8fa;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    background-color: #fff;
}

.search-input::placeholder {
    color: #aab5bd;
}

.search-btn {
    position: absolute;
    right: 0px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    transition: var(--hover-transition);
    padding: 0;
}

.search-btn:hover {
    background-color: #0062cc;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.search-btn:focus {
    outline: none;
}

/* 导航分隔线样式 */
.nav-divider {
    color: #ddd;
    margin: 0 10px;
    font-weight: 300;
}

.header-divider {
    color: #ddd;
    margin: 0 10px;
    font-weight: 300;
    padding: 0 5px;
}

/* 响应式调整 */
@media (max-width: 991px) {
    .search-input {
        max-width: 180px;
    }
    
    .search-input:focus {
        max-width: 220px;
    }
    
    .nav-list {
        gap: 10px;
    }
    
    .main-nav a {
        padding: 0.5rem 0.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 850px) {
    .header-wrapper {
        flex-direction: column;
    }
    
    .logo {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .top-nav-row {
        width: 100%;
        justify-content: space-between;
        margin-bottom: 10px;
        order: 1;
    }
    
    .search-row {
        width: 100%;
        order: 2;
        margin: 10px 0;
    }
    
    .main-nav {
        width: 100%;
        order: 3;
    }
    
    .nav-list {
        justify-content: center;
    }
    
    .header-search {
        width: 100%;
    }
    
    .search-input,
    .search-input:focus {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .header {
        padding: 5px 0;
    }
    
    .container {
        padding-right: 0;
        padding-left: 0;
        position: relative;
    }
    
    .header-wrapper {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        position: relative;
        padding: 10px 15px !important;
    }
    
    .logo {
        order: 1;
        flex: 1;
        margin: 0;
        padding: 0;
        text-align: left;
    }
    
    .top-nav-row {
        order: 2;
        width: auto;
        margin: 0;
        padding: 0;
        position: static;
    }
    
    .right-controls {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        margin: 0;
        padding: 0;
    }
    
    .search-row {
        order: 3;
        width: 100%;
        margin-top: 10px;
        margin-bottom: 0;
    }
    
    .main-nav {
        order: 4;
        width: 100%;
    }
    
    /* 重要：这会覆盖style.css中的样式 */
    .mobile-menu-toggle {
        display: flex !important;
        position: static !important;
        margin: 0 !important;
        padding: 0 !important;
        order: 1 !important;
        z-index: 1001 !important;
        width: 30px !important;
        height: 24px !important;
    }
    
    /* 添加额外的样式，确保按钮不受其他样式影响 */
    .right-controls {
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }
    
    /* 清除可能影响定位的浮动 */
    .top-nav-row:after,
    .right-controls:after {
        content: "";
        display: table;
        clear: both;
    }
    
    /* 确保用户导航不影响按钮位置 */
    .user-nav {
        display: none !important;
    }
    
    .logo-container img,
    .logo-img {
        max-height: 40px;
    }
    
    
    .logo a {
        font-size: 1.2rem;
    }
}

/* 导航栏新布局样式 */
.top-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.right-controls {
    display: flex;
    align-items: center;
}

.search-row {
    width: 100%;
    margin: 10px 0;
}

/* PC端布局优化 */
@media (min-width: 768px) {
    /* 调整整体布局 */
    .header-wrapper {
        display: grid;
        grid-template-columns: auto 1fr auto auto;
        grid-template-areas: "logo nav search user";
        gap: 20px;
        align-items: center;
    }
    
    /* LOGO放在最左侧 */
    .logo {
        grid-area: logo;
        margin-right: 0;
        padding-right: 10px;
        justify-self: start;
    }
    
    .logo a {
        white-space: nowrap;
        font-size: 1.4rem;
    }
    
    /* 导航在LOGO右侧 */
    .main-nav {
        grid-area: nav;
        height: auto;
        padding: 0;
        position: static;
        visibility: visible;
        opacity: 1;
        transform: none;
        box-shadow: none;
        overflow: visible;
        background-color: transparent;
    }
    
    .nav-list {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        gap: 20px;
        padding-left: 0;
    }
    
    /* 搜索框在导航右侧 */
    .search-row {
        grid-area: search;
        width: auto;
        margin: 0;
    }
    
    /* 用户登录按钮在最右侧 */
    .top-nav-row {
        grid-area: user;
        margin: 0;
        justify-self: end;
        width: auto;
    }
    
    /* 移除 top-nav-row 内除了右侧控件外的其他内容 */
    .top-nav-row > *:not(.right-controls) {
        display: none;
    }
    
    /* 隐藏移动菜单按钮 */
    .mobile-menu-toggle {
        display: none;
    }
    
    /* 移除菜单遮罩 */
    .menu-overlay {
        display: none;
    }
    
    /* 搜索框样式调整 */
    .header-search {
        width: 250px;
    }
    
    .search-input {
        width: 100%;
    }
    
    /* 导航项样式 */
    .nav-item {
        opacity: 1;
        transform: none;
        width: auto;
        margin: 0;
    }
    
    .main-nav a {
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }
    
    .main-nav a::after {
        bottom: -3px;
        height: 3px;
    }
    
    /* 用户导航样式 */
    .user-nav {
        display: flex;
        align-items: center;
    }
    
    .user-nav .username {
        margin-right: 10px;
    }
    
    .user-nav .btn {
        margin: 0 5px;
    }
}

/* 平板特定布局处理 */
@media (min-width: 768px) and (max-width: 850px) {
    .header-wrapper {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas: 
            "logo nav user"
            "empty search search";
        gap: 10px;
    }
    
    .logo {
        grid-area: logo;
        margin-right: 0;
        margin-bottom: 0;
    }
    
    .main-nav {
        grid-area: nav;
        width: auto;
        justify-self: center;
    }
    
    .nav-list {
        justify-content: center;
        gap: 15px;
    }
    
    .top-nav-row {
        grid-area: user;
        width: auto;
        justify-self: end;
        margin-bottom: 0;
    }
    
    .search-row {
        grid-area: search;
        width: 100%;
        margin: 10px 0;
        justify-self: end;
    }
    
    .header-search {
        width: 250px;
        margin-left: auto;
    }
}

/* 移动端布局优化 */
@media (max-width: 767px) {
    .header-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
    
    .container {
        padding-right: 0;
    }
    
    .logo {
        order: 1;
        margin-right: auto;
        z-index: 2;
        max-width: 70%;
    }
    
    .top-nav-row {
        order: 2;
        width: auto;
        margin: 0;
        padding: 0;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .right-controls {
        display: flex;
        align-items: center;
        margin: 0;
        padding: 0;
    }
    
    .search-row {
        order: 3;
        width: 100%;
        margin: 10px 0;
    }
    
    .main-nav {
        order: 4;
        width: 100%;
    }
    
    .mobile-menu-toggle {
        display: flex;
        margin: 0;
        padding: 0;
        position: relative;
        right: 10px;
    }
}

/* 移动端菜单按钮单独定位 */
@media (max-width: 767px) {
    .header-wrapper {
        position: relative;
    }
    
    .mobile-menu-toggle {
        position: absolute !important;
        top: 15px !important;
        right: 15px !important;
        display: flex !important;
        z-index: 1100 !important;
    }
    
    .top-nav-row {
        margin-right: 50px;
    }
}

/* 重置原始的移动菜单按钮样式 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    cursor: pointer;
    padding: 0;
    background: transparent;
    border: none;
    z-index: 1100;
}

.mobile-menu-toggle span {
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
    background-color: #e41c23;
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
    background-color: #e41c23;
}

/* 菜单遮罩增强 */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(3px);
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 移动菜单动画效果 */
@media (max-width: 767px) {
    .main-nav {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, visibility 0.2s ease;
    }
    
    .main-nav.active {
        transform: translateX(0);
    }
    
    .menu-overlay {
        transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
    }
    
    /* 子元素动画 */
    .nav-item {
        opacity: 0;
        transform: translateX(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        transition-delay: calc(var(--item-index, 0) * 0.05s);
    }
    
    .main-nav.active .nav-item {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 宽屏幕导航优化 */
@media (min-width: 1200px) {
    .header .container {
        max-width: 1180px;
    }
    
    .search-row {
        flex: 0 1 300px;
    }
    
    .search-input {
        max-width: 300px;
    }
    
    .search-input:focus {
        max-width: 320px;
    }
    
    .nav-list {
        gap: 25px;
    }
    
    .main-nav a {
        padding: 0.5rem 1rem;
    }
}

/* 移动导航菜单调整，为顶部标题留出空间 */
@media screen and (max-width: 768px) {
    .main-nav {
        padding-top: 60px; /* 为顶部标题留出空间 */
        padding-bottom: 80px; /* 留出底部按钮空间 */
    }
    
    .nav-list {
        margin-top: 10px;
    }
}

/* 移动导航底部登录按钮样式 */
.mobile-nav-footer {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid rgba(74, 144, 226, 0.2);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: 30px;
    left: 0;
}

.mobile-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #4a90e2;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    margin-bottom: 10px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    width: 60%;
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

.mobile-login-btn:hover {
    background-color: #3a80d2;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(74, 144, 226, 0.4);
}

.mobile-login-btn:last-child {
    margin-bottom: 0;
}

.mobile-login-btn.admin-btn {
    background-color: #34c759;
}

.mobile-login-btn.logout-btn {
    background-color: #007bff;
    color: #ffffff;
    text-align: center;
    padding: 12px 20px;
}

.mobile-login-btn.profile-btn {
    background-color: #5856d6;
}

.btn-text {
    font-size: 16px;
    text-align: center;
    color: #ffffff;
    font-weight: 500;
}

/* 在移动设备上显示 */
@media screen and (max-width: 768px) {
        /* 移动导航标题样式 */
    .mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 15px 15px;
        border-bottom: 1px solid rgba(74, 144, 226, 0.2);
        background-color: rgba(74, 144, 226, 0.08);
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 5;
    }

    .mobile-nav-title {
        color: #4a90e2;
        font-size: 20px;
        font-weight: 600;
        text-align: center;
    }
    .mobile-nav-footer {
        display: flex;
    }
    
    .main-nav {
        padding-bottom: 80px; /* 留出底部按钮空间 */
    }
}

/* 在桌面设备上隐藏 */
@media screen and (min-width: 769px) {
    .mobile-nav-footer {
        display: none;
    }
    .mobile-nav-header{
        display: none;
    }
}

/* PC端搜索框尺寸保持一致 */
@media (min-width: 1200px) {
    .search-input, 
    .search-input:focus {
        max-width: 300px; /* 焦点状态和普通状态保持相同宽度 */
    }
}

/* 针对平板和小屏设备的特殊导航栏样式 */
@media screen and (max-width: 768px) and (min-width: 576px) {
    /* 导航栏容器样式 */
    .header-wrapper {
        display: grid !important;
        grid-template-columns: auto 1fr auto !important;
        grid-template-rows: auto auto !important;
        grid-template-areas: 
            "logo nav user"
            "search search search" !important;
        gap: 10px !important;
        padding: 0 10px !important;
        align-items: center !important;
    }
    
    /* Logo区域样式 */
    .logo {
        grid-area: logo !important;
        display: flex !important;
        align-items: center !important;
        max-width: none !important;
        flex: 0 0 auto !important;
        padding: 5px 0 !important;
        margin-right: 15px !important;
        justify-content: flex-start !important;
    }
    
    /* 导航菜单样式 */
    .main-nav {
        grid-area: nav !important;
        display: flex !important;
        position: static !important;
        transform: none !important;
        width: auto !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        background-color: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 100 !important;
        left: auto !important;
    }
    
    /* 用户登录区域样式 */
    .top-nav-row {
        grid-area: user !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 !important;
        position: static !important;
        transform: none !important;
        width: auto !important;
        height: auto !important;
        min-width: 60px !important;
    }
    
    .right-controls {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        position: static !important;
        transform: none !important;
        width: auto !important;
    }
    
    .user-nav {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .user-nav .btn,
    .btn.btn-sm {
        display: inline-block !important;
        padding: 5px 10px !important;
        font-size: 13px !important;
        margin: 0 !important;
        vertical-align: middle !important;
        white-space: nowrap !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* 搜索行样式 */
    .search-row {
        grid-area: search !important;
        width: 100% !important;
        margin-top: 10px !important;
        margin-bottom: 5px !important;
    }
}

/* 特别针对576-768px范围的Logo样式修复 */
@media screen and (min-width: 576px) and (max-width: 768px) {
    /* 针对Logo的额外修复 */
    .logo-container {
        display: flex !important;
        align-items: center !important; 
    }
    
    .logo-container img,
    .logo-img {
        max-height: 40px !important;
        width: auto !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding-bottom: 5px !important;
    }
    
    /* 确保标题栏各元素正确显示 */
    .header-wrapper {
        grid-template-areas: 
            "logo nav user"
            "search search search" !important;
    }
    
    /* 确保用户导航显示 */
    .user-nav {
        display: flex !important;
        position: static !important;
    }
    
    /* 调整顶部行样式 */
    .top-nav-row {
        position: static !important;
        transform: none !important;
        grid-area: user !important;
        justify-content: flex-end !important;
        align-items: center !important;
        max-width: none !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 确保顶部右侧控件显示 */
    .right-controls {
        position: static !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        transform: none !important;
        height: auto !important;
    }
    
    /* 调整按钮样式 */
    .user-nav .btn {
        display: inline-block !important;
        padding: 5px 10px !important;
        font-size: 13px !important;
        margin: 0 0 0 5px !important;
        white-space: nowrap !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* 移除可能影响布局的冲突样式 */
    body {
        overflow-x: hidden !important;
    }
    
    .header {
        overflow: visible !important;
    }
    
    /* 隐藏移动菜单按钮 */
    .mobile-menu-toggle {
        display: none !important;
    }
} 