/* ===== 文章列表页 ===== */

.articles-main {
    position: relative;
    z-index: 10;
    max-width: 1000px;
    margin: 0 auto;
    padding: 130px 60px 80px;
}

.articles-main h1 {
    font-size: 38px;
    font-weight: 300;
    letter-spacing: 6px;
    text-align: center;
    margin-bottom: 12px;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.articles-main .subtitle {
    text-align: center;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 2px;
    margin-bottom: 60px;
}

/* 列表 */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* 单篇 */
.article-item {
    display: block;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 26px 30px;
    text-decoration: none;
    color: #fff;
    transition: transform 0.3s, border-color 0.3s, background 0.3s, box-shadow 0.3s;
    position: relative;
}

.article-item:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 204, 0, 0.6);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* 头部：日期 + 标签 */
.article-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.article-date {
    font-size: 13px;
    color: rgba(255, 204, 0, 0.85);
    letter-spacing: 1px;
}

.article-tag {
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 6px;
    background: rgba(255, 204, 0, 0.15);
    color: #ffcc00;
    letter-spacing: 1px;
}

/* 标题 */
.article-title {
    font-size: 20px;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #fff;
    transition: color 0.3s;
}

.article-item:hover .article-title {
    color: #ffcc00;
}

/* 摘要 */
.article-excerpt {
    font-size: 14px;
    line-height: 1.8;              /* 每行高 1.8em */
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 16px;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;

    /* 👇 关键：限制最大高度，超过就裁 */
    max-height: calc(1.8em * 3);
}

/* 阅读全文 */
.article-more {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    transition: color 0.3s, transform 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-item:hover .article-more {
    color: #ffcc00;
}

.article-item:hover .article-more i {
    transform: translateX(4px);
}

.article-more i {
    font-size: 11px;
    transition: transform 0.3s;
}

/* ===== 文章详情页 ===== */

.article-detail {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 130px 60px 80px;
}

.back-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 18px;
    letter-spacing: 1px;
    margin-bottom: 24px;
    transition: color 0.3s;
}

.back-link:hover {
    color: #ffcc00;
}

.article-detail h1 {
    font-size: 30px;
    font-weight: 400;
    letter-spacing: 3px;
    line-height: 1.5;
    margin-bottom: 16px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.article-detail .article-meta {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    margin-bottom: 30px;
}

/* ===== 文章内容区：像一张纸 ===== */
.article-content {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 50px 56px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);

    font-size: 17px;
    line-height: 2;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 1px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    color: #ffcc00;
    margin: 32px 0 16px;
    letter-spacing: 2px;
    font-weight: 400;
}

.article-content h2 {
    font-size: 22px;
}

.article-content h3 {
    font-size: 19px;
}

.article-content img {
    display: block;
    max-width: 100%;
    border-radius: 10px;
    margin: 24px auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.article-content a {
    color: #ffcc00;
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

.article-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 15px;
}

.article-content pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 16px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-content pre code {
    background: transparent;
    padding: 0;
}

/* 表格 */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 15px;
}

.article-content th,
.article-content td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 14px;
    text-align: left;
}

.article-content th {
    background: rgba(255, 204, 0, 0.1);
    color: #ffcc00;
}

/* 引用 */
.article-content blockquote {
    border-left: 3px solid #ffcc00;
    padding: 8px 20px;
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 204, 0, 0.05);
    border-radius: 0 8px 8px 0;
}

/* ===== 手机适配 ===== */
@media (max-width: 1024px) {

    .articles-main,
    .article-detail {
        padding: 100px 20px 60px;
    }

    .articles-main h1 {
        font-size: 28px;
        letter-spacing: 4px;
    }

    .articles-main .subtitle {
        margin-bottom: 40px;
    }

    .article-item {
        padding: 20px 22px;
    }

    .article-title {
        font-size: 17px;
    }

    .article-excerpt {
        font-size: 13px;
    }

    .article-detail h1 {
        font-size: 22px;
        letter-spacing: 2px;
    }

    .article-content {
        padding: 30px 24px;
        font-size: 15px;
        line-height: 1.9;
    }
}



/* ===== 图片并排（连续图片段落合并后） ===== */
.article-content .img-row {
    display: flex;
    gap: 16px;
    margin: 24px 0;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.article-content .img-row img {
    flex: 1 1 calc(50% - 8px);
    max-width: calc(50% - 8px);
    width: auto;
    height: auto;
    margin: 0;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    display: block;
}

/* 手机端：图片一行一张 */
@media (max-width: 768px) {
    .article-content .img-row {
        flex-direction: column;
        gap: 12px;
    }

    .article-content .img-row img {
        max-width: 100%;
        flex: 1 1 100%;
    }
}


/* ===== 文章详情页封面（贴边，高度按比例） ===== */
.article-content .article-cover {
    display: block;
    width: calc(100% + 112px);
    max-width: calc(100% + 112px);
    height: auto;
    margin: -50px -56px 32px -56px;
    border-radius: 16px 16px 0 0;
    object-fit: contain;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* 图片并排（连续图片段落合并后） */
.article-content .img-row {
    display: flex;
    gap: 16px;
    margin: 24px 0;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.article-content .img-row img {
    flex: 1 1 calc(50% - 8px);
    max-width: calc(50% - 8px);
    width: auto;
    height: auto;
    margin: 0;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    display: block;
}

/* 手机适配 */
@media (max-width: 1024px) {
    .article-content .article-cover {
        width: calc(100% + 48px);
        max-width: calc(100% + 48px);
        margin: -30px -24px 24px -24px;
        border-radius: 12px 12px 0 0;
    }
}

@media (max-width: 768px) {
    .article-content .img-row {
        flex-direction: column;
        gap: 12px;
    }

    .article-content .img-row img {
        max-width: 100%;
        flex: 1 1 100%;
    }
}

/* ===== 文章详情页：卡片内的返回链接、标题、时间 ===== */
.article-content .back-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 20px;
    transition: color 0.3s;
}

.article-content .back-link:hover {
    color: #ffcc00;
}

.article-content .article-title-h1 {
    font-size: 30px;
    font-weight: 400;
    letter-spacing: 3px;
    line-height: 1.5;
    color: #fff;
    margin-bottom: 12px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.article-content .article-meta {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    margin-bottom: 30px;
}

/* ===== 文章详情页封面（贴边，高度按比例） ===== */
.article-content .article-cover {
    display: block;
    width: calc(100% + 112px);
    max-width: calc(100% + 112px);
    height: auto;
    margin: -50px -56px 24px -56px;
    border-radius: 16px 16px 0 0;
    object-fit: contain;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ===== 图片并排 ===== */
.article-content .img-row {
    display: flex;
    gap: 16px;
    margin: 24px 0;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.article-content .img-row img {
    flex: 1 1 calc(50% - 8px);
    max-width: calc(50% - 8px);
    width: auto;
    height: auto;
    margin: 0;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    display: block;
}

/* ===== 手机适配 ===== */
@media (max-width: 1024px) {
    .article-content .article-title-h1 {
        font-size: 22px;
        letter-spacing: 2px;
    }

    .article-content .article-cover {
        width: calc(100% + 48px);
        max-width: calc(100% + 48px);
        margin: -30px -24px 20px -24px;
        border-radius: 12px 12px 0 0;
    }
}

@media (max-width: 768px) {
    .article-content .img-row {
        flex-direction: column;
        gap: 12px;
    }

    .article-content .img-row img {
        max-width: 100%;
        flex: 1 1 100%;
    }
}
