/* =================================================================
   Cuteen 首页文章卡片 · 左/右文字 + 方形缩略图 交替排版
   白色卡片 / 深色模式自适应 / PC 与移动端适配
   覆盖 vendor.min.css 中的旧版文章列表样式
   ================================================================= */

/* ==================== 文章列表卡片 ==================== */

/* ---------- 卡片容器 ---------- */
#article-list .article {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    position: relative;
    overflow: hidden;
    height: auto;
    min-height: 12.5rem;
    margin-bottom: 1.5rem;
    padding: 1.75rem;
    background-color: #fff;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 1.125rem;
    box-shadow: 0 2px 4px rgba(17, 24, 39, .05), 0 14px 32px -16px rgba(17, 24, 39, .22);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
#article-list .article:hover {
    transform: translateY(-3px);
    border-color: rgba(13, 110, 253, .38);
    box-shadow: 0 8px 18px rgba(17, 24, 39, .07), 0 24px 48px -20px rgba(13, 110, 253, .32);
}

/* ---------- 文字区（默认在左；flex-row-reverse 时在右） ---------- */
#article-list .article-ctx {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .5rem;
    padding: 0;
    /* PC 端文字区顶部对齐，时间/阅读/标签一行整体上移，消除卡片顶部留白 */
    align-self: flex-start;
    margin-top: .375rem;
    color: #1f2937;
    background-color: transparent;
    text-shadow: none;
    letter-spacing: normal;
}

/* ---------- 元信息行（时间 · 阅读 · 分类） ---------- */
/* flex-wrap 保证窄屏时内容自动换行，不与右侧图片重叠 */
#article-list .article-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .25rem .75rem;
    margin-bottom: .15rem;
    font-size: .75rem;
    line-height: 1rem;
    letter-spacing: .04em;
    text-shadow: none;
}
#article-list .article-time,
#article-list .article-views {
    display: inline-flex;
    align-items: center;
    color: #6b7280;
    white-space: nowrap;
}
#article-list .article-vs {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
}
#article-list .article-sort {
    display: inline-flex;
    align-items: center;
    padding: .12rem .62rem;
    font-size: .6875rem;
    color: #0d6efd;
    background: rgba(13, 110, 253, .10);
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    transition: color .25s ease, background-color .25s ease;
}
#article-list .article-sort:hover {
    color: #fff;
    background: #0d6efd;
}

/* ---------- 标题 ---------- */
#article-list .article-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0;
    color: #111827;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .03em;
    text-decoration: none;
    text-shadow: none;
    transition: color .25s ease;
}
#article-list .article-title:hover {
    color: #0d6efd;
}

/* ---------- 摘要 ---------- */
#article-list .article-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0;
    color: #6b7280;
    font-size: .875rem;
    line-height: 1.6;
    text-indent: 0;
    word-break: break-all;
    text-decoration: none;
    text-shadow: none;
    transition: color .25s ease;
}
#article-list .article-description:hover {
    color: #374151;
}

/* ---------- 方形缩略图（默认在右；flex-row-reverse 时在左） ---------- */
#article-list .article-img {
    order: 2;
    flex: 0 0 auto;
    width: 10.5rem;
    height: 10.5rem;
    margin: 0;
    position: relative;
    overflow: hidden;
    border-width: 0;
    border-radius: 1rem;
    clip-path: none;
    box-shadow: 0 6px 16px -6px rgba(17, 24, 39, .30);
    background-color: #e5e7eb;
}
#article-list .article-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform .4s cubic-bezier(0, 0, .2, 1);
}
#article-list .article:hover .article-img img {
    transform: scale(1.07);
}

/* ---------- 图标 ---------- */
#article-list .article .icon {
    width: .875rem;
    height: .875rem;
}

/* ---------- 隐藏旧版全幅背景图（结构兜底） ---------- */
.blur-img {
    display: none !important;
}

/* ==================== 置顶轮播卡片 ==================== */

#post-top {
    margin-bottom: 1.5rem;
}

/* 释放轮播溢出以显示卡片阴影（Bootstrap 自带 ::after clearfix 撑起高度） */
#post-top .carousel-inner {
    overflow: visible;
}

/* 旧版 Cuteen 给 #post-top .carousel-item 固定了 height:14.5rem，
   新卡片布局下会在卡片下方留白并放大高度，改为高度自适应内容 */
#post-top .carousel-item {
    height: auto;
}

#post-top .carousel-caption.top-card {
    position: static;
    right: auto;
    bottom: auto;
    left: auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1.75rem;
    width: 100%;
    padding: 1.75rem;
    color: inherit;
    text-align: left;
    text-decoration: none;
    text-shadow: none;
    background-color: #fff;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 1.125rem;
    box-shadow: 0 2px 4px rgba(17, 24, 39, .05), 0 14px 32px -16px rgba(17, 24, 39, .22);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
#post-top .carousel-caption.top-card:hover {
    color: inherit;
    transform: translateY(-3px);
    border-color: rgba(13, 110, 253, .38);
    box-shadow: 0 8px 18px rgba(17, 24, 39, .07), 0 24px 48px -20px rgba(13, 110, 253, .32);
}

#post-top .top-card-ctx {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
#post-top .top-card-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .375rem .875rem;
    font-size: .75rem;
    line-height: 1rem;
    color: #6b7280;
}
#post-top .top-card-meta {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
#post-top .top-card-pin {
    display: inline-flex;
    align-items: center;
    padding: .14rem .62rem;
    font-size: .6875rem;
    color: #ef4444;
    background: rgba(239, 68, 68, .12);
    border-radius: 999px;
    white-space: nowrap;
}
#post-top .top-card-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0;
    color: #111827;
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: .03em;
}
#post-top .top-card-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0;
    color: #6b7280;
    font-size: .875rem;
    line-height: 1.6;
}
#post-top .top-card-img {
    flex: 0 0 auto;
    width: 10.5rem;
    height: 10.5rem;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 6px 16px -6px rgba(17, 24, 39, .30);
    background-color: #e5e7eb;
}
#post-top .top-card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.001);
    filter: none;
    transition: transform .4s cubic-bezier(0, 0, .2, 1);
}
#post-top .carousel-caption.top-card:hover .top-card-img img {
    transform: scale(1.07);
}
#post-top .top-card .icon {
    width: .875rem;
    height: .875rem;
}

/* ---------- 置顶轮播 · 指示器 ---------- */
#post-top .carousel-indicators {
    position: static;
    margin: .9rem 0 0;
    gap: .4rem;
}
#post-top .carousel-indicators [data-bs-target] {
    width: 1.375rem;
    margin: 0;
    background-color: rgba(17, 24, 39, .22);
    border-radius: .125rem;
    opacity: 1;
}
#post-top .carousel-indicators .active {
    background-color: #0d6efd;
}

/* ---------- 置顶轮播 · 左右箭头 ---------- */
#post-top .carousel-control-prev,
#post-top .carousel-control-next {
    top: 50%;
    bottom: auto;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 2px 10px rgba(17, 24, 39, .18);
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
}
#post-top .carousel-control-prev {
    left: 1rem;
    transform: translateY(-50%);
}
#post-top .carousel-control-next {
    right: 1rem;
    transform: translateY(-50%);
}
#post-top:hover .carousel-control-prev,
#post-top:hover .carousel-control-next {
    opacity: 1;
}
#post-top .carousel-control-prev:hover {
    transform: translate(-2px, -50%);
}
#post-top .carousel-control-next:hover {
    transform: translate(2px, -50%);
}
#post-top .carousel-control-prev-icon,
#post-top .carousel-control-next-icon {
    width: .875rem;
    height: .875rem;
    background-size: 100% 100%;
    filter: none;
}
#post-top .carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23374151'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}
#post-top .carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23374151'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* ==================== 加载更多按钮 ==================== */
.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-width: 11rem;
    padding: .72rem 1.8rem;
    font-size: .9375rem;
    font-weight: 500;
    letter-spacing: .06em;
    color: #fff;
    background: linear-gradient(135deg, #0d6efd, #7b5cff 55%, #b14bf4);
    border: none;
    border-radius: 999px;
    box-shadow: 0 6px 18px -6px rgba(13, 110, 253, .55), inset 0 1px 0 rgba(255, 255, 255, .22);
    cursor: pointer;
    user-select: none;
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.load-more-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 12px 26px -8px rgba(13, 110, 253, .65), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.load-more-btn:active {
    transform: translateY(0) scale(.97);
}
.load-more-btn:disabled {
    color: #6b7280;
    background: rgba(17, 24, 39, .06);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    filter: none;
}
.dark .load-more-btn:disabled {
    color: rgba(255, 255, 255, .5);
    background: rgba(255, 255, 255, .08);
}

/* ==================== 深色模式 ==================== */

.dark #article-list .article {
    background-color: #0c1222;
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .6);
}
.dark #article-list .article:hover {
    border-color: rgba(110, 168, 254, .5);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25), 0 22px 48px -20px rgba(110, 168, 254, .35);
}
.dark #article-list .article-title {
    color: rgba(255, 255, 255, .92);
}
.dark #article-list .article-title:hover {
    color: #6ea8fe;
}
.dark #article-list .article-description {
    color: rgba(255, 255, 255, .55);
}
.dark #article-list .article-description:hover {
    color: rgba(255, 255, 255, .78);
}
.dark #article-list .article-time,
.dark #article-list .article-views {
    color: rgba(255, 255, 255, .55);
}
.dark #article-list .article-sort {
    color: #6ea8fe;
    background: rgba(110, 168, 254, .14);
}
.dark #article-list .article-sort:hover {
    color: #0f172a;
    background: #6ea8fe;
}
.dark #article-list .article-img {
    background-color: #1f2937;
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .55);
}

.dark #post-top .carousel-caption.top-card {
    background-color: #0c1222;
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .6);
}
.dark #post-top .carousel-caption.top-card:hover {
    border-color: rgba(110, 168, 254, .5);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25), 0 22px 48px -20px rgba(110, 168, 254, .35);
}
.dark #post-top .top-card-title {
    color: rgba(255, 255, 255, .92);
}
.dark #post-top .top-card-desc,
.dark #post-top .top-card-info {
    color: rgba(255, 255, 255, .55);
}
.dark #post-top .top-card-pin {
    color: #fca5a5;
    background: rgba(239, 68, 68, .16);
}
.dark #post-top .top-card-img {
    background-color: #1f2937;
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .55);
}
.dark #post-top .carousel-indicators [data-bs-target] {
    background-color: rgba(255, 255, 255, .28);
}
.dark #post-top .carousel-indicators .active {
    background-color: #6ea8fe;
}
.dark #post-top .carousel-control-prev,
.dark #post-top .carousel-control-next {
    background: rgba(31, 41, 55, .85);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
}
.dark #post-top .carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23cbd5e1'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}
.dark #post-top .carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23cbd5e1'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* ==================== 移动端适配 ==================== */

@media (max-width: 575.98px) {
    /* 文章卡片：手机端统一左字右图（覆盖桌面端隔行交替布局）。
       高度对齐置顶卡片：内边距、标题（单行）、摘要字号行高均与置顶卡片一致 */
    #article-list .article {
        flex-direction: row;
        gap: .875rem;
        min-height: 6.5rem;
        margin-bottom: 1.125rem;
        padding: .75rem;
        border-radius: .875rem;
    }
    #article-list .article-ctx {
        gap: .3rem;
        margin-bottom: 0;
    }
    /* 元信息行：时间 + 阅读 + 分类标签 单行排布；nowrap + 省略号兜底，不与图片重叠 */
    #article-list .article-info {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: .25rem .5rem;
        font-size: .6875rem;
        overflow: hidden;
    }
    #article-list .article-time {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }
    #article-list .article-time .date-full,
    #article-list .article-time .date-short {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    #article-list .article-vs {
        flex-shrink: 0;
        gap: .5rem;
    }
    /* 手机端显示分类标签（缩小字号），与时间、阅读同行 */
    #article-list .article-sort {
        flex-shrink: 0;
        padding: .1rem .45rem;
        font-size: .625rem;
    }
    /* 元信息图标缩小，为单行腾出空间 */
    #article-list .article .icon {
        width: .75rem;
        height: .75rem;
    }
    #article-list .article-title {
        font-size: .9375rem;
        line-height: 1.45;
        -webkit-line-clamp: 1;
    }
    #article-list .article-description {
        font-size: .6875rem;
        line-height: 1.45;
    }
    #article-list .article-img {
        width: 5.5rem;
        height: 5.5rem;
        border-radius: .75rem;
    }

    /* 置顶卡片 */
    #post-top {
        margin-bottom: 1.125rem;
    }
    #post-top .carousel-caption.top-card {
        gap: .75rem;
        padding: .75rem .875rem;
        border-radius: .875rem;
    }
    #post-top .top-card-ctx {
        gap: .3rem;
    }
    /* 信息胶囊单行排布；nowrap + overflow 兜底，保证不与右侧图片重叠 */
    #post-top .top-card-info {
        flex-wrap: nowrap;
        gap: .25rem .5rem;
        font-size: .625rem;
        overflow: hidden;
    }
    #post-top .top-card-meta {
        min-width: 0;
    }
    #post-top .top-card-meta .icon {
        flex-shrink: 0;
    }
    #post-top .top-card-pin {
        flex-shrink: 0;
        padding: .1rem .45rem;
        font-size: .625rem;
    }
    /* 日期超宽时省略号兜底，避免挤出图片 */
    #post-top .top-card-meta .date-full,
    #post-top .top-card-meta .date-short {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    /* 标题手机端压缩为单行，配合降高度 */
    #post-top .top-card-title {
        font-size: .9375rem;
        -webkit-line-clamp: 1;
    }
    #post-top .top-card-desc {
        font-size: .6875rem;
        line-height: 1.45;
    }
    #post-top .top-card-img {
        width: 5.5rem;
        height: 5.5rem;
        border-radius: .75rem;
    }
    /* 触屏无 hover，隐藏轮播箭头 */
    #post-top .carousel-control-prev,
    #post-top .carousel-control-next {
        display: none;
    }
}
