* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
    padding-top: 80px;
}

@media (max-width: 768px) {
    body {
        padding-top: 50px;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px 0;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.1rem;
    color: #666;
    font-weight: 300;
}

.filter-sort-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: nowrap;
    gap: 20px;
}

.news-categories {
    display: flex;
    justify-content: flex-start;
    gap: 30px;
    flex-wrap: nowrap;
}

.category-btn i,
.sort-btn i,
.pagination-btn i,
.news-meta i {
    font-size: 14px !important;
    width: 14px;
    height: 14px;
    display: inline-block;
    text-align: center;
    line-height: 1;
}

.category-btn i,
.sort-btn i {
    margin-right: 6px;
}

.pagination-btn i {
    margin: 0 4px;
}

.news-meta i {
    margin-right: 4px;
    color: #999;
}

.category-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 15px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    font-weight: 400;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.category-btn:hover {
    color: #333;
    border-bottom-color: #ddd;
}

.category-btn.active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
    font-weight: 500;
}

.sort-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.sort-btn {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #666;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.sort-btn:hover {
    color: #333;
    border-bottom-color: #ddd;
}

.sort-btn.active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
    font-weight: 500;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.news-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.news-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.news-image {
    width: 100%;
    height: 200px;
    background: #f8f9fa url('https://ldy.wm5s.cn/xinwen.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    position: relative;
}

.news-category {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-block;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.news-tags {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

.news-tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: white;
}

.news-tag.hot {
    background-color: #FF4D4F;
}

.news-tag.featured {
    background-color: #52C41A;
}

.news-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 20px 16px 16px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.news-content {
    padding: 16px;
    padding-top: 12px;
}

.news-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
}

.news-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 新闻详情弹窗 - 采用您的设计 */
.news-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.news-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideInUp 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.news-modal-header {
    background: linear-gradient(135deg, #1890ff, #40a9ff);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.news-modal-title {
    flex: 1;
}

.news-modal-header h2 {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
}

.news-modal-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    opacity: 0.9;
}

.news-modal-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
    margin-top: -8px;
}

.modal-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.news-modal-body {
    padding: 30px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
    line-height: 1.8;
    color: #333;
}

.news-modal-body p {
    margin-bottom: 16px;
}

.news-modal-body h3 {
    font-size: 18px;
    font-weight: 500;
    margin: 24px 0 12px 0;
    color: #1a1a1a;
}

.news-modal-body ul {
    margin-bottom: 16px;
    padding-left: 20px;
}

.news-modal-body li {
    margin-bottom: 8px;
}

/* 滚动条样式 */
.news-modal-body::-webkit-scrollbar {
    width: 6px;
}

.news-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.news-modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.news-modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 40px 0;
    padding: 20px;
}

.pagination-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.pagination-btn:hover:not(:disabled) {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.pagination-btn.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.page-info {
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .page-header {
        margin-bottom: 15px;
        padding: 15px 0;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .filter-sort-container {
        flex-wrap: wrap;
        gap: 15px;
        margin-bottom: 20px;
        justify-content: space-between;
        align-items: center;
    }

    .news-categories {
        gap: 15px;
        margin-bottom: 0;
        flex-wrap: wrap;
        flex: 1;
    }

    .category-btn {
        padding: 6px 12px;
        font-size: 14px;
    }

    .sort-buttons {
        flex-shrink: 0;
        gap: 3px;
    }

    .sort-btn {
        padding: 6px 10px;
        font-size: 13px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }

    .news-image {
        height: 180px;
    }

    .news-title {
        font-size: 15px;
        padding: 16px 12px 12px;
    }

    .news-category {
        top: 10px;
        left: 10px;
        padding: 3px 6px;
        font-size: 11px;
    }

    .news-content {
        padding: 12px;
        padding-top: 8px;
    }

    .news-meta {
        font-size: 12px;
    }

    .news-modal-content {
        margin: 20px;
        max-height: 90vh;
    }

    .news-modal-header {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }

    .news-modal-header h2 {
        font-size: 20px;
        padding-right: 40px;
    }

    .modal-close-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        margin-top: 0;
    }

    .news-modal-body {
        padding: 20px;
        max-height: calc(100vh - 200px);
    }

    .pagination {
        gap: 8px;
        margin: 30px 0;
        padding: 15px;
        flex-wrap: wrap;
    }

    .pagination-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .page-info {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.8rem;
    }

    .filter-sort-container {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .news-categories {
        gap: 10px;
        justify-content: center;
        flex: none;
        width: 100%;
        flex-wrap: wrap;
    }

    .category-btn {
        padding: 5px 10px;
        font-size: 13px;
    }

    .sort-buttons {
        gap: 2px;
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
    }

    .sort-btn {
        padding: 5px 8px;
        font-size: 12px;
    }

    .news-image {
        height: 160px;
    }

    .news-title {
        font-size: 14px;
        padding: 14px 10px 10px;
    }

    .news-modal-header {
        padding: 15px;
    }

    .news-modal-header h2 {
        font-size: 18px;
        padding-right: 35px;
    }

    .modal-close-btn {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .news-modal-body {
        padding: 15px;
    }

    .news-modal-meta {
        flex-direction: column;
        gap: 8px;
    }

    .pagination {
        gap: 6px;
        margin: 20px 0;
        padding: 10px;
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    .pagination-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .page-info {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}