:root {
    --primary-color: #ff0000;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --header-height: 50px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
}

a{
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-content img{
    width: 100%;
}

/* 头部样式 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.menu-button, .search-button {
    background: none;
    border: none;
    font-size: 20px;
    padding: 8px;
    cursor: pointer;
}

.logo {
    height: 30px;
}

.logo img {
    height: 100%;
}

/* 侧边菜单 */
.side-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 1000;
    transition: left 0.3s ease;
}

.side-menu.active {
    left: 0;
}

.menu-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-bottom: 1px solid #eee;
    background-color: #fff;
}

.menu-header::after {
    content: "菜单";
    font-size: 16px;
    font-weight: 500;
    color: #333;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.side-menu ul {
    list-style: none;
    padding: 15px 0;
}

.side-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
}

.side-menu li a.active {
    color: var(--primary-color);
    background: #fff5f5;
}

/* 搜索框 */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 8px 15px;
    display: none;
    z-index: 200;
}

.search-overlay.active {
    display: block;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 0 8px;
}

.search-input {
    background: transparent;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    width: 100%;
    outline: none;
}

.close-search {
    margin-left: 8px;
}

/* 新闻列表 */
main {
    margin-top: calc(var(--header-height) + 10px);
    padding: 0 15px;
}

.news-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 15px;
}

.news-content h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

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

/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 900;
}

.overlay.active {
    display: block;
}

.map {
    height: 200px; /* 设置地图区域高度 */
    background-color: #e0e0e0; /* 地图背景色 */
}

.news {
    padding: 10px;
}

article {
    margin-bottom: 15px;
}

/* 简化的尾部样式 */
.footer {
    background-color: #fff;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

.footer p {
    font-size: 12px;
    color: #999;
    line-height: 1.5;
}

.copyright {
    margin-bottom: 5px;
}

/* 关闭按钮样式优化 */
.close-menu,
.close-search {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.close-menu:hover,
.close-search:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.close-menu i,
.close-search i {
    font-size: 20px;
    color: #666;
}

/* 分类页样式 */
.category-page {
    margin-top: calc(var(--header-height) + 10px);
    padding: 0 15px;
}

.category-header {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.category-header h1 {
    font-size: 18px;
    color: #333;
    font-weight: 500;
}

/* 分类页的新闻列表样式 */
.category-page .news-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.category-page .news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-page .news-content {
    padding: 15px;
}

.category-page .news-content h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.category-page .news-meta {
    color: #999;
    font-size: 12px;
}

/* 详情页样式 */
.detail-page {
    margin-top: var(--header-height);
    padding: 15px;
    background: #fff;
    min-height: calc(100vh - var(--header-height) - 80px);
}

.news-detail {
    max-width: 100%;
    margin: 0 auto;
}

.article-meta {
    margin-bottom: 15px;
    color: #999;
    font-size: 14px;
}

.article-meta .source {
    margin-left: 15px;
}

.article-title {
    font-size: 22px;
    line-height: 1.4;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.article-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.article-text {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.article-text p {
    margin-bottom: 16px;
}

.article-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f5f5f5;
    color: #666;
    font-size: 12px;
    border-radius: 100px;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* 文章头部样式优化 */
.article-header {
    padding: 20px;
    background: linear-gradient(to bottom, #f8f8f8, #fff);
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.article-title {
    font-size: 24px;
    line-height: 1.4;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: #666;
    font-size: 14px;
}

.article-meta i {
    margin-right: 5px;
    color: #999;
}

/* 摘要区域样式 */
.article-summary {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-left: 4px solid  #1a73e8;
    border-radius: 0 8px 8px 0;
    margin-bottom: 25px;
}

.article-summary p {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* 正文内容样式优化 */
.article-content {
    padding-top: 20px;
}

.article-text {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

/* 适配小屏幕 */
@media (max-width: 480px) {
    .article-header {
        padding: 15px;
    }

    .article-title {
        font-size: 20px;
    }

    .article-meta {
        gap: 15px;
    }

    .article-summary {
        padding: 12px 15px;
    }

    .article-summary p {
        font-size: 14px;
    }
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 20px 0;
    margin: 0;
    flex-wrap: wrap;
    gap: 5px;
}

.pagination li {
    display: inline-flex;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.pagination li a:hover {
    background-color: #f5f5f5;
    border-color: #d0d0d0;
}

.pagination li.active span {
    background-color: var(--primary-color, #ff0000);
    color: #fff;
    border-color: var(--primary-color, #ff0000);
}

.pagination li.disabled span {
    color: #999;
    background-color: #f5f5f5;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

/* 适配小屏幕 */
@media (max-width: 480px) {
    .pagination {
        gap: 3px;
    }

    .pagination li a,
    .pagination li span {
        min-width: 28px;
        height: 28px;
        font-size: 13px;
    }
} 