/* 从 news.css 提取的布局样式 */
.main-layout {
    max-width: 1280px;
    margin: 2rem auto 3rem;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
}

.left-news-list {
    background: white;
    border-radius: 32px;
    padding: 1.5rem;
    border: 1px solid #f0e4fa;
    box-shadow: 0 8px 24px rgba(0,0,0,0.03);
}

.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-card {
    background: white;
    border-radius: 28px;
    padding: 1.5rem;
    border: 1px solid #f0e4fa;
    box-shadow: 0 8px 20px rgba(0,0,0,0.03);
}

.sidebar-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0e4fa;
    color: #2c273f;
}

.sidebar-article {
    padding: 0.8rem 0;
    border-bottom: 1px solid #f5edfe;
}

.sidebar-article:last-child {
    border-bottom: none;
}

.sidebar-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d2a3e;
    text-decoration: none;
    display: block;
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.sidebar-title:hover {
    color: #cc5ceb;
}

.sidebar-date {
    font-size: 0.7rem;
    color: #9b8cb0;
}

.footer {
    background: #1a1427;
    color: #d9d0e8;
    margin-top: 2rem;
    padding: 3rem 5% 2rem;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 3rem;
}

.footer-col h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #c5b9e0;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.7rem;
}

.footer-links a {
    color: #c5b9e0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.2s;
}

.footer-links a:hover {
    color: #cc5ceb;
}

.copyright {
    text-align: center;
    padding-top: 2.5rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(203, 165, 235, 0.2);
    font-size: 0.8rem;
    color: #9b8cb0;
}

/* 原 post-body 样式 */
.post-body {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    word-wrap: break-word;
    color: #333;
    font-size: 1rem;
}

.post-body *,
.post-body *:after,
.post-body *:before {
    box-sizing: border-box;
}

.post-body h1, .post-body h2, .post-body h3,
.post-body h4, .post-body h5, .post-body h6 {
    color: inherit;
    font-weight: 500;
    line-height: 1.2;
    margin-block-end: 1rem;
    margin-block-start: .5rem;
}

.post-body h1 {
    font-size: 2.5rem;
}

.post-body h2 {
    font-size: 1.6rem;
}

.post-body h3 {
    font-size: 1.75rem;
}

.post-body h4 {
    font-size: 1.2rem;
}

.post-body h5 {
    font-size: 1.25rem;
}

.post-body h6 {
    font-size: 1rem;
}

.post-body p {
    margin-block-end: .9rem;
    margin-block-start: 0;
}

.post-body a {
    background-color: transparent;
    color: #c36;
    text-decoration: none;
}

.post-body a:active,
.post-body a:hover {
    color: #336;
}

.post-body b,
.post-body strong {
    font-weight: bolder;
}

.post-body small {
    font-size: 80%;
}

.post-body sub,
.post-body sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

.post-body sub {
    bottom: -.25em;
}

.post-body sup {
    top: -.5em;
}

.post-body hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
    border: 0;
    border-top: 1px solid #eee;
    margin: 2rem 0;
}

.post-body abbr[title] {
    border-block-end: none;
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted;
}

.post-body pre {
    font-family: monospace, monospace;
    font-size: 1em;
    white-space: pre-wrap;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 3px;
}

.post-body code,
.post-body kbd,
.post-body samp {
    font-family: monospace, monospace;
    font-size: 1em;
}

/* 图片与多媒体 */
.post-body img {
    border-style: none;
    height: auto;
    max-width: 100%;
    display: block;
    margin: 0rem auto;
}

.post-body figcaption {
    color: #333;
    font-size: 16px;
    font-style: italic;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    margin-top: 0.5rem;
}

.post-body dd, .post-body dl, .post-body dt,
.post-body li, .post-body ol, .post-body ul {
    margin-block-end: 0;
    margin-block-start: 0;
}

.post-body ul, .post-body ol {
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.post-body ul {
    list-style-type: disc;
}

.post-body ol {
    list-style-type: decimal;
}

.post-body table {
    background-color: transparent;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: .9em;
    margin-block-end: 15px;
    width: 100%;
}

.post-body table td,
.post-body table th {
    border: 1px solid hsla(0, 0%, 50%, .502);
    line-height: 1.5;
    padding: 15px;
    vertical-align: top;
}

.post-body table th {
    font-weight: 700;
}

.post-body table tbody > tr:nth-child(odd) > td,
.post-body table tbody > tr:nth-child(odd) > th {
    background-color: hsla(0, 0%, 50%, .071);
}

.post-body table tbody tr:hover > td,
.post-body table tbody tr:hover > th {
    background-color: hsla(0, 0%, 50%, .102);
}

@media print {
    .post-body {
        color: #000 !important;
    }

    .post-body a, .post-body a:visited {
        text-decoration: underline;
    }

    .post-body a[href]:after {
        content: " (" attr(href) ")";
    }

    .post-body pre, .post-body blockquote {
        border: 1px solid #ccc;
        break-inside: avoid;
    }

    .post-body img {
        break-inside: avoid;
    }
}

.post-page-layout {
    padding-top: 40px;
    padding-bottom: 60px;
}

.post-detail-card {
    background: #fff;
    border-radius: 8px;
}

.post-header {
    margin-bottom: 30px;
}

.post-title {
    font-size: 1.3rem !important;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px !important;
}

.post-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}

.post-body {
    padding: 0 10px;
    line-height: 1.8;
    color: #333;
}

.post-body strong {
    font-weight: 700;
}

.sidebar-date {
    font-size: 12px;
    color: #bbb;
    margin-top: 5px;
}

.sidebar-article {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
}

.sidebar-article:last-child {
    border-bottom: none;
}

/* 文章底部导航样式 */
.post-navigation {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee; /* 添加一条分割线 */
}

.nav-links {
    display: flex;
    flex-direction: column; /* 手机端上下排列 */
    gap: 40px;
}

.nav-previous, .nav-next {
    font-size: 15px;
    line-height: 1.4;
}

.nav-label {
    color: #888;
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
}

.post-navigation a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.post-navigation a:hover {
    color: #c36; /* 悬停颜色 */
}

@media (min-width: 768px) {
    .nav-links {
        flex-direction: row;
        justify-content: space-between;
    }

    .nav-previous, .nav-next {
        max-width: 48%; /* 防止标题过长重叠 */
    }

    .nav-next {
        text-align: right;
    }
}

@media (max-width: 992px) {
    .post-page-layout {
        flex-direction: column;
    }

    .right-sidebar {
        margin-top: 40px;
        width: 100%;
    }
}

/* 修改所有段落样式 */
.post-body p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 1.2rem;
    margin-top: 1.2rem;
}

.post-body div {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 1.2rem;
    margin-top: 1.2rem;
}

.post-body ol, ul {
    padding-left: 1em;
    line-height: 1.6em;
    margin-top: 1rem!important;
    margin-bottom: 1rem!important;
}

.post-body dd, dl, dt, li {
    line-height: 1.6em;
    margin-top: .3rem;
    margin-bottom: .3rem;
}

.post-body ul ol {
    margin-top: .3rem!important;
    margin-bottom: .3rem!important;
}

.post-body ul ul {

    margin-top: .3rem!important;
    margin-bottom: .3rem!important;
}

.post-body ol ol {

    margin-top: .3rem!important;
    margin-bottom: .3rem!important;
}

.post-body ol ul {
    margin-top: .3rem!important;
    margin-bottom: .3rem!important;
}

.post-body h1, h2, h3, h4, h5, h6 {
    color: inherit;
    font-family: inherit;
    font-weight: 500;
    line-height: 1.6;
    margin-top: 1em!important;
    margin-bottom: 1rem!important;
    color: #000000;
}

.post-body h1 {
    font-size: 1.6rem!important;
    font-weight: 600;
}

.post-body h2 {
    font-size: 1.4rem!important;
    font-weight: 600;
}

.post-body h3 {
    font-size: 1.2rem!important;
    font-weight: 600;
    color: #353234;
}

.post-body h4 {
    font-size: 1rem!important;
}

.post-body img {
    border: 1px solid #CCCCCC;
    border-radius: 5px;
    display: inline;
}

.post-body a {
    text-decoration: none;
    color: #3a56d8;
}

.post-body a:hover {
    text-decoration: underline;
    color: #3a56d8;
}

@media (max-width: 992px) {
    .post-page-layout {
        padding: 20px 4%;
    }
    .post-detail-card {
        padding: 1rem;
        border-radius: 16px;
    }
    .post-header {
        margin-bottom: 20px;
    }
    .post-title {
        font-size: 1.2rem !important;
    }
    .post-meta {
        font-size: 12px;
    }
    .post-body {
        padding: 0;
        font-size: 15px;
    }
    .post-body p {
        font-size: 15px;
        margin-bottom: 1rem;
        margin-top: 1rem;
    }
    .post-body h1 {
        font-size: 1.5rem !important;
    }
    .post-body h2 {
        font-size: 1.3rem !important;
    }
    .post-body h3 {
        font-size: 1.15rem !important;
    }
    .post-body h4 {
        font-size: 1rem !important;
    }
    .post-navigation {
        margin-top: 30px;
        padding-top: 15px;
    }
    .nav-links {
        gap: 20px;
    }
    .nav-previous, .nav-next {
        font-size: 13px;
    }
    .right-sidebar {
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .post-page-layout {
        padding: 15px 3%;
    }
    .post-detail-card {
        padding: 0.8rem;
        border-radius: 12px;
    }
    .post-header {
        margin-bottom: 15px;
    }
    .post-title {
        font-size: 1.1rem !important;
        margin-bottom: 10px !important;
    }
    .post-meta {
        font-size: 11px;
        margin-bottom: 15px;
    }
    .post-body {
        font-size: 14px;
        line-height: 1.7;
    }
    .post-body p {
        font-size: 14px;
        margin-bottom: 0.9rem;
        margin-top: 0.9rem;
    }
    .post-body h1 {
        font-size: 1.4rem !important;
    }
    .post-body h2 {
        font-size: 1.2rem !important;
        margin-top: 1.5rem !important;
        margin-bottom: 0.8rem !important;
    }
    .post-body h3 {
        font-size: 1.05rem !important;
        margin-top: 1.3rem !important;
        margin-bottom: 0.7rem !important;
    }
    .post-body h4 {
        font-size: 0.95rem !important;
    }
    .post-body img {
        border-radius: 8px;
        margin: 1rem auto;
    }
    .post-body table {
        font-size: 12px;
    }
    .post-body table td,
    .post-body table th {
        padding: 8px;
    }
    .post-navigation {
        margin-top: 25px;
        padding-top: 12px;
    }
    .nav-links {
        gap: 15px;
    }
    .nav-previous, .nav-next {
        font-size: 12px;
    }
    .nav-label {
        font-size: 11px;
    }
    .right-sidebar {
        margin-top: 25px;
    }
    .sidebar-card {
        padding: 1rem;
        border-radius: 16px;
    }
    .sidebar-card h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    .sidebar-title {
        font-size: 0.85rem;
    }
    .sidebar-date {
        font-size: 0.65rem;
    }
}