* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    width: 100%;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, Helvetica, Arial, sans-serif;
    background: #ffffff;
    color: #1e2f3e;
    line-height: 1.5;
}

/* 页面主容器 */
.news-detail-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 48px 28px 80px;
}

/* 面包屑导航 */
.breadcrumb {
    margin-bottom: 32px;
    font-size: 0.85rem;
    color: #8a9eb0;
}

.breadcrumb a {
    color: #3470ba;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 8px;
}

/* 新闻详情卡片 */
.news-detail-card {
    background: #ffffff;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

/* 新闻头部 */
.news-header {
    padding: 40px 40px 20px;
    border-bottom: 1px solid #eef2f6;
}

.news-category {
    display: inline-block;
    background: #e8f0fe;
    color: #3470ba;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 30px;
    margin-bottom: 16px;
}

.news-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f3b4c;
    line-height: 1.3;
    margin-bottom: 20px;
}

.news-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    color: #8a9eb0;
    font-size: 0.85rem;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef2f6;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 新闻内容区域 - 富文本样式 */
.news-content {
    padding: 40px;
}

.news-cover {
    margin-bottom: 32px;
    text-align: center;
}

.news-cover img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 富文本内容样式 */
.news-body {
    font-size: 1rem;
    line-height: 1.8;
    color: #2e4a5c;
    word-wrap: break-word;
}

.news-body p {
    margin-bottom: 1.2em;
}

.news-body img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 12px;
    display: block;
}

.news-body h1,
.news-body h2,
.news-body h3,
.news-body h4 {
    margin: 1.5em 0 0.8em;
    color: #1f3b4c;
    font-weight: 600;
}

.news-body h1 {
    font-size: 1.8rem;
}

.news-body h2 {
    font-size: 1.5rem;
}

.news-body h3 {
    font-size: 1.3rem;
}

.news-body h4 {
    font-size: 1.1rem;
}

.news-body ul,
.news-body ol {
    margin: 1em 0 1em 2em;
}

.news-body li {
    margin-bottom: 0.5em;
}

.news-body a {
    color: #3470ba;
    text-decoration: none;
}

.news-body a:hover {
    text-decoration: underline;
}

.news-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.news-body th,
.news-body td {
    border: 1px solid #ddd;
    padding: 8px 12px;
}

.news-body th {
    background: #f5f7fa;
}

.news-body blockquote {
    margin: 1em 0;
    padding: 0.5em 1em;
    border-left: 4px solid #3470ba;
    background: #f8fafc;
    color: #5c6f87;
}

.news-body pre {
    background: #f5f7fa;
    padding: 1em;
    overflow-x: auto;
    border-radius: 8px;
    font-family: monospace;
}

.news-body code {
    background: #f5f7fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* 返回按钮 */
.back-button {
    margin-top: 32px;
    text-align: center;
}

.btn-back {
    display: inline-block;
    background: #f5f7fa;
    color: #3470ba;
    border: 1px solid #d0e2ec;
    padding: 10px 28px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-back:hover {
    background: #e8f0fe;
    border-color: #3470ba;
}

/* 加载状态 */
.loading-container {
    text-align: center;
    padding: 100px 20px;
    background: white;
    border-radius: 28px;
    color: #5e7a93;
}

.error-container {
    text-align: center;
    background: #fff5f2;
    border-left: 5px solid #e86b5e;
    padding: 60px 32px;
    border-radius: 28px;
    color: #b13e30;
}

.retry-btn {
    background: #3470ba;
    border: none;
    padding: 10px 32px;
    border-radius: 40px;
    color: white;
    margin-top: 20px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* 页脚 */
.footer-note {
    text-align: center;
    margin-top: 64px;
    padding-top: 28px;
    border-top: 1px solid #e9ecef;
    color: #8a9eb0;
    font-size: 0.85rem;
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}




/* 新增：上一篇/下一篇导航样式 */
.news-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
    padding: 20px 0;
    border-top: 1px solid #eef2f6;
    border-bottom: 1px solid #eef2f6;
}

.nav-item {
    flex: 1;
    min-width: 0;
    max-width: 45%;
}

.nav-item.prev {
    text-align: left;
}

.nav-item.next {
    text-align: right;
}

.nav-link {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    color: #1e2f3e;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
    max-width: 100%;
}

.nav-link:hover {
    background: #f5f8fc;
}

.nav-link .nav-label {
    font-size: 0.8rem;
    color: #8a9eb0;
    font-weight: 500;
}

.nav-link .nav-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1f3b4c;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-link.disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.nav-link.disabled:hover {
    background: transparent;
}

.nav-link .nav-arrow {
    font-size: 1.2rem;
    color: #3470ba;
}

@media (max-width: 768px) {
    .news-navigation {
        flex-direction: column;
        gap: 12px;
    }

    .nav-item {
        max-width: 100%;
    }

    .nav-item.next {
        text-align: left;
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .news-detail-page {
        padding: 24px 16px 48px;
    }

    .news-header {
        padding: 24px 24px 16px;
    }

    .news-title {
        font-size: 1.5rem;
    }

    .news-content {
        padding: 24px;
    }

    .news-meta {
        gap: 16px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-detail-card {
    animation: fadeIn 0.4s ease;
}