/**
 * 文章详情页样式 - zixun.css
 * 星际网络资讯详情页专用样式
 * 技术栈：原生CSS
 * 响应式断点：768px(平板), 1024px(桌面), 1440px(大屏)
 */

/* ============================================
   1. 基础重置与工具类
   ============================================ */

.zixun-page {
    min-height: 100vh;
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

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

.zixun-page img {
    max-width: 100%;
    height: auto;
    display: block;
}

.zixun-page a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.zixun-page ul,
.zixun-page ol {
    list-style: none;
}

/* ============================================
   2. 页面容器与布局
   ============================================ */

.zixun__wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px 60px;
}

/* 大屏桌面 */
@media screen and (min-width: 1440px) {
    .zixun__wrapper {
        max-width: 1400px;
        padding: 30px 24px 80px;
    }
}

/* 平板 */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .zixun__wrapper {
        max-width: 100%;
        padding: 24px 20px 50px;
    }
}

/* 移动端 */
@media screen and (max-width: 767px) {
    .zixun__wrapper {
        padding: 16px 12px 40px;
    }
}

/* ============================================
   3. 面包屑导航
   ============================================ */

.zixun__breadcrumb {
    margin-bottom: 24px;
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
}

.zixun__breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.zixun__breadcrumb-item {
    display: flex;
    align-items: center;
}

.zixun__breadcrumb-link {
    color: #666;
    transition: color 0.2s ease;
}

.zixun__breadcrumb-link:hover {
    color: #1890ff;
}

.zixun__breadcrumb-separator {
    margin: 0 8px;
    color: #ccc;
    font-size: 12px;
}

.zixun__breadcrumb-current {
    color: #999;
}

/* 移动端面包屑 */
@media screen and (max-width: 767px) {
    .zixun__breadcrumb {
        margin-bottom: 16px;
        padding: 8px 0;
    }

    .zixun__breadcrumb-list {
        font-size: 13px;
    }

    .zixun__breadcrumb-separator {
        margin: 0 4px;
    }
}

/* ============================================
   4. 文章头部区域
   ============================================ */

.zixun__header {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.zixun__title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 20px;
}

.zixun__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.zixun__meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
}

.zixun__meta-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    opacity: 0.7;
}

.zixun__meta-author {
    color: #1890ff;
    font-weight: 500;
}

.zixun__meta-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 平板头部 */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .zixun__header {
        padding: 28px;
    }

    .zixun__title {
        font-size: 26px;
    }
}

/* 移动端头部 */
@media screen and (max-width: 767px) {
    .zixun__header {
        padding: 20px 16px;
        margin-bottom: 16px;
        border-radius: 8px;
    }

    .zixun__title {
        font-size: 22px;
        margin-bottom: 16px;
    }

    .zixun__meta {
        gap: 12px;
        padding-top: 16px;
    }

    .zixun__meta-item {
        font-size: 13px;
    }
}

/* ============================================
   5. 文章主体内容区域
   ============================================ */

.zixun__main {
    display: block;
}

.zixun__content-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* 大屏桌面 */
@media screen and (min-width: 1440px) {
    .zixun__content-wrapper {
        padding: 48px;
    }
}

/* 平板 */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .zixun__content-wrapper {
        padding: 32px;
    }
}

/* 移动端 */
@media screen and (max-width: 767px) {
    .zixun__content-wrapper {
        padding: 20px 16px;
        border-radius: 8px;
    }
}

/* ============================================
   6. 富文本内容样式
   ============================================ */

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

.zixun__article p {
    margin-bottom: 1.5em;
    text-align: justify;
}

.zixun__article h2,
.zixun__article h3,
.zixun__article h4 {
    font-weight: 600;
    color: #1a1a1a;
    margin: 2em 0 1em;
    line-height: 1.4;
}

.zixun__article h2 {
    font-size: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #1890ff;
}

.zixun__article h3 {
    font-size: 20px;
}

.zixun__article h4 {
    font-size: 18px;
}

/* .zixun__article strong {
    font-weight: 600;
    color: #1a1a1a;
} */

.zixun__article a {
    color: #1890ff;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.zixun__article a:hover {
    border-bottom-color: #1890ff;
}

/* 图片样式 */
.zixun__article img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.zixun__article figure {
    margin: 1.5em 0;
}

.zixun__article figcaption {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

/* 列表样式 */
.zixun__article ul,
.zixun__article ol {
    margin: 1.5em 0;
    padding-left: 2em;
}

.zixun__article ul {
    list-style: disc;
}

.zixun__article ol {
    list-style: decimal;
}

.zixun__article li {
    margin-bottom: 0.5em;
}

.zixun__article li>ul,
.zixun__article li>ol {
    margin: 0.5em 0;
}

/* 引用块 */
.zixun__article blockquote {
    margin: 1.5em 0;
    padding: 16px 20px;
    background: #f6f8fa;
    border-left: 4px solid #1890ff;
    border-radius: 0 8px 8px 0;
    color: #555;
    font-style: italic;
}

.zixun__article blockquote p:last-child {
    margin-bottom: 0;
}

/* 代码块 */
.zixun__article code {
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;
    font-size: 0.9em;
    padding: 2px 6px;
    background: #f1f3f4;
    border-radius: 4px;
    color: #d73a49;
}

.zixun__article pre {
    margin: 1.5em 0;
    padding: 16px 20px;
    background: #1e1e1e;
    border-radius: 8px;
    overflow-x: auto;
}

.zixun__article pre code {
    background: transparent;
    color: #d4d4d4;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* 表格样式 */
.zixun__article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 14px;
}

.zixun__article th,
.zixun__article td {
    padding: 12px 16px;
    border: 1px solid #e8e8e8;
    text-align: left;
}

.zixun__article th {
    background: #f6f8fa;
    font-weight: 600;
    color: #1a1a1a;
}

.zixun__article tr:nth-child(even) {
    background: #fafafa;
}

/* 分割线 */
.zixun__article hr {
    margin: 2em 0;
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #e8e8e8, transparent);
}

/* 移动端富文本 */
@media screen and (max-width: 767px) {
    .zixun__article {
        font-size: 15px;
        line-height: 1.75;
    }

    .zixun__article h2 {
        font-size: 20px;
    }

    .zixun__article h3 {
        font-size: 18px;
    }

    .zixun__article h4 {
        font-size: 16px;
    }

    .zixun__article pre {
        padding: 12px 16px;
        margin-left: -16px;
        margin-right: -16px;
        border-radius: 0;
    }

    .zixun__article th,
    .zixun__article td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .zixun__article blockquote {
        padding: 12px 16px;
        margin-left: -16px;
        margin-right: -16px;
        border-radius: 0;
    }
}

/* ============================================
   7. 关键词标签
   ============================================ */

.zixun__tags {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.zixun__tags-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.zixun__tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.zixun__tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #f0f7ff;
    color: #1890ff;
    font-size: 13px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.zixun__tag:hover {
    background: #1890ff;
    color: #fff;
}

/* 移动端标签 */
@media screen and (max-width: 767px) {
    .zixun__tags {
        margin-top: 32px;
        padding-top: 20px;
    }

    .zixun__tag {
        padding: 5px 12px;
        font-size: 12px;
    }
}

/* ============================================
   8. 上一篇/下一篇导航
   ============================================ */

.zixun__nav {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.zixun__nav-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.zixun__nav-item {
    padding: 16px 20px;
    background: #fafafa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.zixun__nav-item:hover {
    background: #fcf3e3;
}

.zixun__nav-item--next {
    text-align: right;
}

.zixun__nav-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.zixun__nav-title {
    font-size: 15px;
    color: #333;
    font-weight: 500;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.zixun__nav-item:hover .zixun__nav-title {
    color: #E8941F;
}

.zixun__nav-empty {
    color: #999;
    font-size: 14px;
}

/* 移动端导航 */
@media screen and (max-width: 767px) {
    .zixun__nav {
        margin-top: 24px;
        padding-top: 20px;
    }

    .zixun__nav-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .zixun__nav-item {
        padding: 14px 16px;
    }

    .zixun__nav-item--next {
        text-align: left;
    }

    .zixun__nav-title {
        font-size: 14px;
    }
}



/* ============================================
   10. 分享按钮
   ============================================ */

.zixun__share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.zixun__share-label {
    font-size: 14px;
    color: #666;
}

.zixun__share-list {
    display: flex;
    gap: 10px;
}

.zixun__share-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f5f5f5;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.zixun__share-btn svg {
    width: 18px;
    height: 18px;
    fill: #666;
    transition: fill 0.2s ease;
}

.zixun__share-btn:hover {
    transform: translateY(-2px);
}

.zixun__share-btn--weixin:hover {
    background: #07c160;
}

.zixun__share-btn--weixin:hover svg {
    fill: #fff;
}

.zixun__share-btn--weibo:hover {
    background: #ff8200;
}

.zixun__share-btn--weibo:hover svg {
    fill: #fff;
}

.zixun__share-btn--qq:hover {
    background: #12b7f5;
}

.zixun__share-btn--qq:hover svg {
    fill: #fff;
}

/* ============================================
   11. 动画效果
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.zixun__header,
.zixun__content-wrapper {
    animation: fadeInUp 0.6s ease forwards;
}

.zixun__content-wrapper {
    animation-delay: 0.1s;
}

/* 图片懒加载占位 */
.zixun__article img[data-src] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ============================================
    12. 打印样式
   ============================================ */

@media print {

    .zixun__share,
    .zixun__nav,
    .zixun__tags {
        display: none;
    }

    .zixun__content-wrapper {
        box-shadow: none;
        padding: 0;
    }

    .zixun__article a {
        color: #000;
        text-decoration: underline;
    }
}

/* ============================================
   13. 无障碍支持
   ============================================ */

@media (prefers-reduced-motion: reduce) {

    .zixun__header,
    .zixun__content-wrapper {
        animation: none;
    }

    .zixun__article img[data-src] {
        animation: none;
    }

    .zixun__share-btn,
    .zixun__tag,
    .zixun__nav-item {
        transition: none;
    }
}

/* 焦点样式 */
.zixun__breadcrumb-link:focus,
.zixun__tag:focus,
.zixun__nav-item:focus,
.zixun__share-btn:focus {
    outline: 2px solid #1890ff;
    outline-offset: 2px;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .zixun__article h2 {
        border-bottom-width: 3px;
    }

    .zixun__tag {
        border: 1px solid currentColor;
    }
}

/* ============================================
   14. 灯箱样式
   ============================================ */

.zixun__lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.zixun__lightbox--active {
    opacity: 1;
    visibility: visible;
}

.zixun__lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.zixun__lightbox-img {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.zixun__lightbox--active .zixun__lightbox-img {
    transform: scale(1);
}

.zixun__lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 10;
}

.zixun__lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   15. 阅读进度条
   ============================================ */

.zixun__progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(24, 144, 255, 0.1);
    z-index: 9998;
}

.zixun__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #E8941F, #FF8C42);
    width: 0%;
    transition: width 0.1s linear;
}

/* ============================================
   16. 代码复制按钮
   ============================================ */

.zixun__code-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ccc;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.zixun__code-copy:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.zixun__code-copy--success {
    background: #52c41a;
    border-color: #52c41a;
    color: #fff;
}

/* ============================================
   17. 表格包装容器
   ============================================ */

.zixun__table-wrapper {
    overflow-x: auto;
    margin: 1.5em 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.zixun__table-wrapper table {
    margin: 0;
}

/* 移动端表格 */
@media screen and (max-width: 767px) {
    .zixun__table-wrapper {
        margin-left: -16px;
        margin-right: -16px;
        border-radius: 0;
    }
}

/* ============================================
   18. 图片加载状态
   ============================================ */

.zixun__img--loaded {
    animation: none;
}

.zixun__img--error {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.zixun__img--error::after {
    content: '图片加载失败';
    color: #999;
    font-size: 14px;
}