/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 冻结导航栏样式 */
.top-nav {
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 搜索栏容器 */
.search-bar-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 0.5rem;
    position: relative;
}

/* 搜索按钮 - 固定在右侧 */
.search-toggle {
    background: white;
    border: 2px solid #dc3545;
    cursor: pointer;
    padding: 8px 8px;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    order: 2; /* 确保在最右边 */
}

.search-toggle:hover {
    background: rgba(220, 53, 69, 0.05);
}

.search-toggle.active {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
}

.search-icon {
    font-size: 16px;
}

/* 搜索面板 */
.search-panel {
    display: none;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    order: 1; /* 确保在放大镜左边 */
}

.search-panel.active {
    display: flex;
}

.search-input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

.search-date {
    width: 100px;
    font-size: 10px;
    padding: 5px 8px;
    border-color: #e8e8e8;
}

.search-separator {
    color: #ccc;
    font-weight: 400;
    font-size: 13px;
}

.search-type-wrapper {
    position: relative;
}

.search-type-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 5px 10px;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
    color: #666;
}

.search-type-toggle:hover {
    border-color: #dc3545;
    color: #333;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.search-type-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.search-type-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 10px;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.search-type-dropdown.active {
    display: block;
}

.search-type-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.search-type-option:hover {
    background: rgba(220, 53, 69, 0.05);
}

.search-type-option input[type="checkbox"] {
    cursor: pointer;
}

.search-type-option label {
    cursor: pointer;
    flex: 1;
    font-size: 14px;
}

.search-keyword {
    width: 220px;
    padding: 7px 12px;
    font-size: 14px;
}

.search-submit,
.search-clear {
    padding: 9px 25px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-submit {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.search-submit:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.search-clear {
    background: #f5f5f5;
    color: #888;
    font-size: 13px;
    padding: 4px 9px;
}

.search-clear:hover {
    background: #e8e8e8;
    color: #666;
}

/* 悬浮排序按钮 */
.floating-sort {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.sort-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 16px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    transition: all 0.3s ease;
}

.sort-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

.sort-icon {
    font-size: 16px;
    font-weight: bold;
}

.sort-text {
    font-size: 12px;
}

/* 导航链接样式 */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: #fff;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1px solid rgba(220, 53, 69, 0.1);
}

.nav-links a {
    color: #333;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 1100;
    border: 1px solid rgba(220, 53, 69, 0.1);
    overflow: hidden;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* 二维码弹窗样式 */
.nav-link-container {
    position: relative;
    display: inline-block;
}

.qr-popup {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background-color: white;
    padding: 15px;
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    text-align: center;
    z-index: 1100;
    white-space: nowrap;
}

.qr-popup img {
    display: block;
    max-width: 100px;
    height: auto;
    margin-bottom: 8px;
    border-radius: 4px;
}

.qr-popup span {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.nav-link-container:hover .qr-popup {
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 600;
}

.controls {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.language-switch {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.lang-btn:hover,
.lang-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.8);
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-controls select {
    padding: 0.5rem;
    border: none;
    border-radius: 5px;
    background: white;
    color: #333;
}

/* 主要内容区域 */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.news-grid {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
}

.news-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 新闻卡片样式 */
.news-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
    width: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.news-date {
    background: linear-gradient(135deg, #dc3545 0%, #ffffff 100%);
    color: white;
    padding: 0.8rem 1.2rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.news-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    line-height: 1.4;
}

.news-subtitle {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-description {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.description-short {
    display: block;
}

.description-full {
    display: none;
}

.expand-btn {
    color: #dc3545;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    margin-top: 0.5rem;
}

/* 图片网格 */
.images-grid {
    display: grid;
    gap: 0.5rem;
    margin: 1rem 0;
}

/* 根据图片数量设置网格布局 */
.images-grid.images-count-1 {
    grid-template-columns: repeat(3, 1fr);
}

.images-grid.images-count-1 .image-item {
    grid-column: 2;
}

.images-grid.images-count-2 {
    grid-template-columns: repeat(2, 1fr);
    justify-content: center;
    max-width: 66%;
    margin-left: auto;
    margin-right: auto;
}

.images-grid.images-count-3 {
    grid-template-columns: repeat(3, 1fr);
}

.image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-item:hover img {
    transform: scale(1.05);
}

.images-more {
    position: relative;
}

.images-more::after {
    content: attr(data-count);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem;
    line-height: 1.2;
}

/* 视频和链接 */
.videos,
.links {
    margin: 1rem 0;
}

.video-embed {
    position: relative;
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.video-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.link-item {
    display: inline-block;
    margin: 0.25rem 0.5rem 0.25rem 0;
    padding: 0.7rem 1.2rem;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-radius: 25px;
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.link-item:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.page-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid #dc3545;
    background: white;
    color: #dc3545;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-btn:hover:not(:disabled) {
    background: #dc3545;
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-selector {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.8rem 1.2rem;
    border: 2px solid #dc3545;
    background: white;
    color: #dc3545;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.page-selector:hover {
    background: rgba(220, 53, 69, 0.05);
}

.page-dropdown-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.page-selector:hover .page-dropdown-icon {
    transform: translateY(2px);
}

/* 页码选择器弹窗 */
.page-picker-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.page-picker-overlay.active {
    display: block;
}

.page-picker-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.page-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.page-picker-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.page-picker-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.page-picker-close:hover {
    color: #dc3545;
}

.page-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.8rem;
}

.page-picker-btn {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    background: white;
    color: #333;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.page-picker-btn:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: rgba(220, 53, 69, 0.05);
}

.page-picker-btn.active {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-color: #dc3545;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 1.1rem;
}

/* 页脚样式 */
.footer {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 2rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-text {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer-separator {
    margin: 0 0.5rem;
    color: #ccc;
}

.footer-beian {
    margin: 0;
}

.footer-beian a {
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-beian a:hover {
    color: #dc3545;
    text-decoration: underline;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

/* 相册墙模态框 */
.gallery-modal {
    display: block !important;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

.gallery-modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 95%;
    max-width: 1000px;
    top: 50%;
    transform: translateY(-50%);
    max-height: 90vh;
    overflow-y: auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.gallery-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    flex: 1;
}

.gallery-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gallery-btn {
    padding: 0.5rem 1rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.gallery-btn:hover {
    background: #5a6fd8;
}

.gallery-modal .close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.gallery-modal .close:hover {
    opacity: 0.7;
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
}

.image-info {
    margin-top: 1rem;
    text-align: center;
    color: white;
}

.image-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.image-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    margin: 0;
}

.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    opacity: 0.7;
}

.modal-controls {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.modal-controls button {
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.image-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.image-counter {
    color: white;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 1100px) {
    .news-grid {
        flex-direction: column;
        max-width: 650px;
    }
    
    .news-column {
        flex: none;
    }
}

@media (max-width: 768px) {
    .logo-bar {
        padding: 10px 15px;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .logo-text {
        font-size: 20px;
    }

    .logo-img {
        height: 30px;
    }

    /* 移动端搜索优化 */
    .search-bar-container {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }

    .search-toggle {
        align-self: flex-end;
    }

    .search-panel {
        flex-wrap: wrap;
        width: 100%;
        gap: 0.4rem;
    }

    .search-input {
        font-size: 12px;
        padding: 4px 6px;
    }

    /* 第一行：日期范围 - 极限压缩 */
    .search-date {
        flex: 1;
        min-width: 0;
        font-size: 8px;
        padding: 3px 3px;
        border-radius: 12px;
    }

    .search-separator {
        font-size: 8px;
        flex-shrink: 0;
        color: #ddd;
    }

    /* 第二行：类型、关键词、按钮 */
    .search-type-wrapper {
        flex-shrink: 0;
    }

    .search-type-toggle {
        font-size: 11px;
        padding: 4px 7px;
    }

    .search-keyword {
        flex: 1;
        min-width: 0;
        font-size: 13px;
        padding: 5px 8px;
    }

    .search-submit {
        font-size: 12px;
        padding: 8px 16px;
        flex-shrink: 0;
    }

    /* 清除按钮 - 极限压缩 */
    .search-clear {
        font-size: 10px;
        padding: 4px 5px;
        flex-shrink: 0;
        background: #fafafa;
        color: #aaa;
        border-radius: 12px;
    }

    .search-type-dropdown {
        min-width: 180px;
    }

    .floating-sort {
        bottom: 20px;
        right: 20px;
    }

    .sort-btn {
        padding: 10px 14px;
        font-size: 12px;
    }

    .nav-links {
        padding: 8px 10px;
        gap: 15px;
        font-size: 14px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        padding: 6px 10px;
        font-size: 14px;
    }

    .dropdown-content {
        min-width: 140px;
        font-size: 13px;
    }

    .dropdown-content a {
        padding: 10px 12px;
    }

    .qr-popup {
        margin-top: 5px;
        padding: 10px;
    }

    .qr-popup img {
        max-width: 80px;
    }

    .news-grid {
        flex-direction: column;
        gap: 1rem;
        max-width: none;
    }

    .news-card {
        margin-bottom: 1rem;
    }

    .video-embed {
        height: 180px;
    }

    .modal-controls {
        flex-direction: column;
    }

    .image-nav {
        order: -1;
    }

    .gallery-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .gallery-controls {
        justify-content: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    /* 移动端分页优化 */
    .pagination {
        gap: 0.6rem;
    }

    .page-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .page-selector {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    /* 移动端页码选择器优化 */
    .page-picker-content {
        padding: 1rem;
        max-height: 60vh;
    }

    .page-picker-header {
        margin-bottom: 1rem;
        padding-bottom: 0.8rem;
    }

    .page-picker-title {
        font-size: 1rem;
    }

    .page-picker-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 0.6rem;
    }

    .page-picker-btn {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .news-content {
        padding: 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .video-embed {
        height: 160px;
    }

    /* 超小屏幕分页优化 */
    .page-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .page-selector {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .page-picker-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        gap: 0.5rem;
    }

    .page-picker-btn {
        padding: 0.7rem;
        font-size: 0.85rem;
    }

    /* 移动端页脚优化 */
    .footer {
        padding: 1.5rem 0 1rem;
        margin-top: 2rem;
    }

    .footer-text {
        font-size: 0.8rem;
        line-height: 1.8;
    }

    .footer-beian a {
        font-size: 0.75rem;
    }
}