/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #F4F9F8;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    position: relative;
}

/* PC端居中显示 - 固定手机屏幕宽度（全屏贴边显示） */
body.mobile-preview {
    background-color: #f0f0f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    /* 去掉上下 20px 留白，整体贴顶贴底 */
}

body.mobile-preview::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #f0f0f0;
    z-index: -1;
}

body.mobile-preview::after {
    content: '';
    display: block;
    width: 414px;
    min-height: 100vh;
    /* 全屏高度，不再减 40px */
    position: absolute;
    top: 0;
    /* 贴顶 */
    left: 50%;
    transform: translateX(-50%);
    background-color: #F4F9F8;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    z-index: -1;
    pointer-events: none;
}

body.mobile-preview>* {
    width: 414px;
    max-width: 414px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

/* Footer在移动预览模式下保持fixed定位 */
body.mobile-preview>.footer {
    position: fixed;
}

/* 固定定位的元素需要特殊处理 - 在PC预览模式下也限制宽度 */
body.mobile-preview .side-menu {
    left: 50%;
    margin-left: -207px;
    /* 414px / 2 = 207px */
    width: 414px;
    max-width: 414px;
    position: fixed !important;
    /* 确保fixed定位 */
    z-index: 1000 !important;
    /* 确保层级足够高 */
}

/* PC预览模式下侧边菜单内容区域确保可以点击 */
body.mobile-preview .side-menu-content {
    pointer-events: auto !important;
    z-index: 1001 !important;
}

/* PC预览模式下导航项确保可以点击 */
body.mobile-preview .side-menu-content .nav-item {
    pointer-events: auto !important;
    cursor: pointer;
}

body.mobile-preview .search-modal {
    left: 50%;
    margin-left: -207px;
    /* 414px / 2 = 207px */
    width: 414px;
    max-width: 414px;
    position: fixed !important;
    /* 确保fixed定位 */
    z-index: 2000 !important;
    /* 确保层级足够高 */
    top: 0 !important;
    /* 从顶部开始 */
    height: 100vh !important;
    /* 全屏高度 */
}

/* Search Page Styles */
.search-page-content {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 45px);
    background-color: #F4F9F8;
    margin-top: 10px;
}

.search-page-content .search-header {
    padding: 10px 15px;
    background-color: #F4F9F8;
    border-bottom: 1px solid #DEDEDE;
    position: sticky;
    top: 45px;
    z-index: 10;
}

.search-page-content .search-results {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: #F4F9F8;
}

body.mobile-preview .side-menu-overlay,
body.mobile-preview .search-modal-overlay {
    width: 100vw;
    left: 50%;
    margin-left: -50vw;
}

/* Footer在PC预览模式下也需要特殊处理 */
body.mobile-preview .footer {
    width: 414px;
    max-width: 414px;
    left: 50%;
    margin-left: -207px;
    /* 414px / 2 = 207px */
}

/* Header Styles */
.header {
    position: sticky;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 45px;
    opacity: 1;
    background: #F4F9F8;
    box-sizing: border-box;
    border-width: 0px 0px 1px 0px;
    border-style: solid;
    border-color: #DEDEDE;
    z-index: 100;
}

.header-content {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    width: 30px;
    height: 30px;
}

.menu-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-weight: bold;
    font-size: 18px;
}

.logo-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-size: 18px;
    color: #333;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.search-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Advertisement Section */
.ad-section {
    background-color: #F4F9F8;
    padding: 0;
    text-align: center;
}

.ad-label {
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
    text-align: center;
}

.ad-banner {
    width: 100%;
    height: 210px;
    overflow: hidden;
}

.ad-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Main Content */
.main-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0 80px 0;
    background-color: #F4F9F8;
    min-height: calc(100vh - 45px - 80px);
}

.news-list {
    padding: 0 16px;
}

.news-item {
    display: flex;
    padding: 16px;
    margin-bottom: 16px;
    gap: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    background-color: #fff;
    border-radius: 0;
    box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.04);
}

.news-item:hover {
    background-color: #fafafa;
}

.news-item:last-child {
    margin-bottom: 0;
}

/* 类型1：无缩略图，标题+内容+底部 */
.news-item.type-1 {
    flex-direction: column;
    gap: 0;
}

/* 类型2：有缩略图，左侧封面+右侧内容 */
.news-item.type-2 {
    flex-direction: row;
}

.news-thumbnail {
    flex-shrink: 0;
    width: 118px;
    height: 132px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.news-item.type-1 .news-thumbnail {
    display: none;
}

.news-item.type-2 .news-thumbnail {
    display: block;
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-thumbnail.empty {
    background-color: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-thumbnail.empty::after {
    content: '📰';
    font-size: 32px;
    opacity: 0.3;
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.news-item.type-1 .news-content {
    width: 100%;
}

.news-item.type-2 .news-content {
    flex: 1;
}

.news-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-snippet {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #999;
    margin-top: auto;
}

.news-source {
    font-weight: 500;
}

.news-time {
    color: #999;
}

/* 广告位样式 */
.ad-slot {
    width: 100%;
    margin: 20px 0;
    padding: 0;
    background-color: #F4F9F8;
    text-align: center;
    box-sizing: border-box;
}

.ad-slot-placeholder {
    background-color: #FAFAFA;
    padding: 20px 16px;
    border: 1px dashed #DEDEDE;
    border-radius: 6px;
    min-height: 60px;
}

.ad-slot-content {
    font-size: 14px;
    color: #999;
    font-weight: 500;
}

.ad-slot-content.ad-loading {
    color: #CCC;
    font-style: italic;
}

/* 广告位内的标签和横幅样式（复用顶部广告样式） */
.ad-slot .ad-label {
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
    text-align: center;
}

.ad-slot .ad-banner {
    width: 100%;
    height: 210px;
    overflow: hidden;
}

.ad-slot .ad-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Show More Button */
.show-more-btn {
    width: 118px;
    height: 38px;
    margin: 20px auto;
    padding: 0;
    background-color: #fff;
    border: 0.2px solid #072D4B;
    border-radius: 4px;
    color: #072D4B;
    font-family: Roboto;
    font-size: 15px;
    font-weight: normal;
    line-height: 21px;
    text-align: center;
    cursor: pointer;
    display: block;
    transition: all 0.3s;
}

.show-more-btn:hover {
    opacity: 0.8;
}

.show-more-btn:active {
    transform: scale(0.98);
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #F4F9F8;
    padding: 20px 15px;
    border-top: 1px solid #DEDEDE;
    z-index: 50;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-content {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
    color: #072D4B;
}

.footer-content>* {
    flex: 0 0 auto;
}

.footer-contact {
    display: flex;
    align-items: center;
}

.footer-email {
    color: #072D4B;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-email:hover {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a {
    color: #072D4B;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

.divider {
    color: #072D4B;
}

/* Detail Page */
.detail-page {
    background-color: #F4F9F8;
    margin: 0;
    padding: 0;
    position: relative;
}

.detail-main {
    padding: 0 16px 100px 16px;
    margin-top: 60px;
    background-color: #F4F9F8;
    min-height: calc(100vh - 45px - 80px);
}

.detail-header-content {
    justify-content: space-between;
}

.back-btn {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.back-icon {
    font-size: 20px;
    color: #1a73e8;
}

.article-detail {
    background-color: #F4F9F8;
    padding: 16px;
}

.article-title {
    font-size: 20px;
    font-weight: bold;
    color: #1c1c1c;
    line-height: 1.4;
    margin-bottom: 12px;
}

.article-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tag-pill {
    padding: 4px 10px;
    border-radius: 12px;
    background-color: #e8f4ff;
    color: #0a7aff;
    font-size: 12px;
}

.article-subtitle {
    font-size: 14px;
    color: #555;
    margin-bottom: 16px;
}

.article-hero {
    width: 100%;
    height: 210px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.article-body p {
    margin-bottom: 12px;
}

.article-list {
    list-style: none;
    padding-left: 0;
    margin: 8px 0 16px;
}

.article-list li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 6px;
}

.article-list li::before {
    content: '■';
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 10px;
    color: #1a73e8;
}

.more-news-section {
    margin-top: 16px;
}

.more-news-title {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin: 0 0 8px;
    padding: 0 0 0 4px;
}

.more-news-list {
    background-color: #F4F9F8;
}

/* Side Menu */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
}

.side-menu.active {
    display: block;
}

.side-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s;
}

.side-menu.active .side-menu-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

.side-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 70%;
    max-width: 320px;
    height: 100%;
    background-color: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
}

.side-menu.active .side-menu-content {
    transform: translateX(0);
}

.side-menu-header {
    background-color: #fff;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.side-menu-header .logo-icon-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.side-menu-header .logo-text {
    font-size: 20px;
    font-weight: bold;
    flex: 1;
    color: #0A7AFF;
}

.close-btn {
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 0.7;
}

.close-btn svg {
    width: 24px;
    height: 24px;
}

.side-menu-nav {
    padding: 30px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 18px 30px;
    color: #333;
    font-size: 16px;
    text-decoration: none;
    transition: background-color 0.2s;
    position: relative;
}

.nav-item:hover {
    background-color: #f8f9fa;
}

.nav-item.active {
    background-color: #E8F4FF;
    color: #0A7AFF;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #0A7AFF;
}

.nav-icon {
    margin-right: 12px;
    font-size: 8px;
    color: #0A7AFF;
}

.nav-item:not(.active) .nav-icon {
    display: none;
}

.nav-text {
    flex: 1;
}

.nav-item-search {
    margin-top: 20px;
    padding-left: 30px;
}

.nav-item-search svg {
    width: 24px;
    height: 24px;
    color: #666;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

/* Responsive */
@media (max-width: 480px) {
    .news-item {
        padding: 12px 15px;
    }

    .news-thumbnail {
        width: 118px;
        height: 132px;
        /* 与设计稿保持一致：118x132 */
    }

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

    .news-snippet {
        font-size: 13px;
    }
}
.lazy-img {
  max-width: 100%;
  height: auto;
  display: block;
}