/* ========== 文章详情页样式 ========== */
.article-single,
.page-single,
.shuoshuo-detail {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

/* 说说详情页 */
.shuoshuo-detail__card {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

.shuoshuo-detail__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border);
    margin-bottom: 1.5rem;
}

.shuoshuo-detail__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shuoshuo-detail__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.shuoshuo-detail__author {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.shuoshuo-detail__time {
    font-size: 0.9rem;
    color: var(--text-3);
}

.shuoshuo-detail__text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.shuoshuo-detail__images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.shuoshuo-detail__comments {
    margin-top: 2.5rem;
}

/* 分类归档页 */
.archive-category {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem;
}

.archive-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.archive-category__title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.archive-category__title svg {
    flex-shrink: 0;
    color: var(--accent);
}

.archive-category__count {
    font-size: 1rem;
    color: var(--text-3);
}

.archive-category__description {
    margin-bottom: 2.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card-2);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-2);
    line-height: 1.7;
}

.archive-empty {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-3);
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-card);
}

@media (max-width: 768px) {
    .archive-category {
        padding: 1.5rem 1rem;
    }
    
    .archive-category__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .shuoshuo-detail__card {
        padding: 2rem 1.25rem;
    }
    
    .shuoshuo-detail__images {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 文章详情页 */
.article-single,
.page-single {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

.article-single__card,
.page-single__card,
.article-single__comments,
.page-single__comments,
.shuoshuo-detail__card,
.shuoshuo-detail__comments {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.article-single__hero {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.article-single__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-single__container,
.page-single__container {
    max-width: 820px;
    margin: 0 auto;
    padding: 0;
}

.article-single__card,
.page-single__card {
    padding: 3rem 2rem;
}

.article-single__header,
.page-single__header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.article-single__title,
.page-single__title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 1.25rem;
}

.article-single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    font-size: 0.9rem;
}

.article-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-3);
}

.article-meta-item svg {
    flex-shrink: 0;
}

.article-meta-item a {
    color: inherit;
    text-decoration: none;
}

.article-meta-item a:hover {
    color: var(--accent);
}

.article-meta-item--category a {
    color: var(--accent);
    font-weight: 500;
}

.article-single__content,
.page-single__content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
}

.article-single__content > *:first-child,
.page-single__content > *:first-child {
    margin-top: 0;
}

.article-single__content > *:last-child,
.page-single__content > *:last-child {
    margin-bottom: 0;
}

.article-single__content h2,
.page-single__content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.8em;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    color: var(--text);
}

.article-single__content h3,
.page-single__content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.8em;
    color: var(--text);
}

.article-single__content h4,
.page-single__content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.8em;
    color: var(--text);
}

.article-single__content p,
.page-single__content p,
.shuoshuo-detail__text p {
    margin: var(--paragraph-spacing, 1.5em) 0;
}

.article-single__content a,
.page-single__content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.article-single__content mark,
.page-single__content mark,
.shuoshuo-detail__text mark {
    background: transparent !important;
    color: var(--accent);
    padding: 0;
}

.article-single__content a:hover,
.page-single__content a:hover {
    text-decoration-thickness: 2px;
}

.article-single__content img,
.page-single__content img {
    max-width: 100%;
    height: auto;
    margin: 0;
    display: block;
    border-radius: var(--radius-sm);
}

.article-single__content blockquote,
.page-single__content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--accent);
    background: var(--bg-card-2);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-2);
}

.article-single__content pre,
.page-single__content pre {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.9em;
    line-height: 1.6;
}

.article-single__content code,
.page-single__content code {
    padding: 0.2em 0.4em;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.article-single__content pre code,
.page-single__content pre code {
    padding: 0;
    background: transparent;
    border: none;
}

.article-single__content ul,
.article-single__content ol,
.page-single__content ul,
.page-single__content ol {
    margin: 1.2em 0;
    padding-left: 2em;
}

.article-single__content li,
.page-single__content li {
    margin: 0.5em 0;
}

.article-single__content table,
.page-single__content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.95em;
}

.article-single__content th,
.article-single__content td,
.page-single__content th,
.page-single__content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    text-align: left;
}

.article-single__content th,
.page-single__content th {
    background: var(--bg-card-2);
    font-weight: 600;
}

.article-single__content hr,
.page-single__content hr {
    margin: 2.5rem 0;
    border: none;
    border-top: 1px solid var(--border);
}

.article-single__footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.article-single__tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-single__tags svg {
    flex-shrink: 0;
    color: var(--text-3);
}

.article-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-2);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all var(--transition);
}

.article-tag:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.article-single__comments,
.page-single__comments {
    margin-top: 24px;
    padding: 2rem;
}

.shuoshuo-detail__comments {
    max-width: 720px;
    margin: 24px auto 0;
    padding: 2rem;
}

@media (max-width: 768px) {
    .article-single__hero {
        height: 240px;
    }
    
    .article-single__container,
    .page-single__container {
        padding: 0;
    }

    .article-single__card,
    .page-single__card,
    .article-single__comments,
    .page-single__comments,
    .shuoshuo-detail__comments {
        padding: 3rem 2rem;
    }
    
    .article-single__title,
    .page-single__title {
        font-size: 1.5rem;
    }
    
    .article-single__meta {
        gap: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .article-single__content,
    .page-single__content {
        font-size: 1rem;
    }
}
/* 特色标题图：详情页以图片替换文字标题 */
.article-single__header--feature-title,
.page-single__header--feature-title {
    text-align: center;
}

.article-single__feature-title,
.page-single__feature-title {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .article-single__feature-title,
    .page-single__feature-title {
        max-height: 170px;
    }
}

/* Gutenberg 单张图片说明：底部渐变 + 高斯模糊，覆盖在图片下方 */
.article-wrap figure.wp-block-image {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 1.5em;
}
.article-wrap figure.wp-block-image img {
    display: block;
    max-width: 100%;
    height: auto;
}
.article-wrap figure.wp-block-image figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 34px 14px 12px;
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.5;
    text-align: center;
    background: linear-gradient(to top, rgba(8, 10, 18, 0.82), rgba(8, 10, 18, 0.4) 55%, rgba(8, 10, 18, 0));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 相似文章推荐 */
.related-posts {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--bg-card);
}
.related-posts__title {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 12px;
}
.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.related-card {
    position: relative;
    display: block;
    height: 120px;
    overflow: hidden;
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
    background: var(--bg-card-2);
}
.related-card__bg {
    position: absolute;
    inset: -12px;
    background-size: cover;
    background-position: center;
    filter: blur(18px) brightness(0.55);
    transform: scale(1.1);
}
.related-card__cover {
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 74px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
    margin-left: 10px;
}
.related-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.related-card__title {
    position: absolute;
    left: 96px;
    right: 10px;
    bottom: 0;
    padding: 30px 0 10px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
}
.related-posts:empty { display: none; }
@media (max-width: 768px) {
    .related-posts__grid { grid-template-columns: repeat(2, 1fr); }
}

/* 文章底部说明卡片（许可协议） */
.post-extra-comment {
    margin-top: 24px;
    padding: 24px 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--bg-card);
    font-size: 0.85rem;
    color: var(--text-2);
    line-height: 1.6;
}
.post-extra-comment__head {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.post-extra-comment__license a,
.post-extra-comment__origin a {
    color: var(--accent);
    text-decoration: none;
}
.post-extra-comment__origin {
    margin-top: 8px;
    color: var(--text-3);
    font-size: 0.8rem;
}
