/**
 * 分类页面专用样式
 * 仅在分类归档页面加载
 * @package Developer_Starter
 */

/* ========================================
   分类页面头部
   ======================================== */
.category-header {
    padding: 100px 0 60px;
    text-align: center;
}

.category-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.category-breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.category-breadcrumb a:hover {
    color: #fff;
}

.category-breadcrumb .breadcrumb-separator {
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
}

.category-breadcrumb .breadcrumb-current {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-icon {
    display: inline-flex;
    align-items: center;
}

.category-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.category-icon-large {
    display: inline-flex;
    align-items: center;
    font-size: 2.5rem;
    margin-right: 10px;
}

.category-icon-large img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.category-title {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-description {
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.category-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.category-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.category-count svg {
    opacity: 0.7;
}

.category-content {
    padding: 60px 0;
}

/* ========================================
   文章列表容器 - 通用
   ======================================== */
.posts-card,
.posts-grid,
.posts-list,
.posts-magazine {
    display: grid;
    gap: 30px;
}

/* ========================================
   卡片布局
   ======================================== */
.posts-card {
    grid-template-columns: repeat(3, 1fr);
}

.post-item-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.post-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.post-item-card .post-thumb {
    display: block;
    width: 100%;
    overflow: hidden;
}

.post-thumb.is-video-cover {
    position: relative;
}

.post-item-card .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-item-card:hover .post-thumb img {
    transform: scale(1.05);
}

.post-item-card .post-content {
    padding: 20px;
}

.post-item-card .post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #64748b;
}

/* 分类标签 + 视频标签行 */
.post-item-card .post-meta-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 8px;
}

/* 日期 + 作者行 */
.post-item-card .post-meta-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 10px;
}

.post-item-card .post-date {
    font-size: 0.85rem;
    color: #64748b;
}

.post-item-card .post-author {
    color: #64748b;
}

.post-item-card .post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px;
    line-height: 1.4;
}

.post-item-card .post-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s;
}

.post-item-card .post-title a:hover {
    color: var(--color-primary, #2563eb);
}

.post-item-card .post-excerpt {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   列表布局
   ======================================== */
.posts-list {
    grid-template-columns: 1fr;
}

.post-item-list {
    display: flex;
    gap: 30px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.post-item-list:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.post-item-list .post-thumb {
    flex: 0 0 280px;
    overflow: hidden;
}

.post-item-list .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-item-list:hover .post-thumb img {
    transform: scale(1.05);
}

.post-item-list .post-content {
    flex: 1;
    padding: 25px 25px 25px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-item-list .post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #64748b;
}

.post-item-list .post-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 12px;
    line-height: 1.4;
}

.post-item-list .post-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s;
}

.post-item-list .post-title a:hover {
    color: var(--color-primary, #2563eb);
}

.post-item-list .post-excerpt {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0 0 15px;
}

.post-item-list .read-more {
    color: var(--color-primary, #2563eb);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.post-item-list .read-more:hover {
    color: var(--color-primary-dark, #1d4ed8);
}

/* ========================================
   网格布局
   ======================================== */
.posts-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-content-video {
    background: #0b0f14;
    padding-top: 40px;
    padding-bottom: 70px;
}

.category-content-video .container {
    max-width: 1400px;
}

.posts-video {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 16px;
}

.post-item-video {
    position: relative;
}

.post-video-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #111827;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
}

.post-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.post-item-video:hover .post-video-thumb img {
    transform: scale(1.05);
}

.post-video-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.post-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.4) 100%);
    opacity: 0.35;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.post-item-video:hover .post-video-overlay,
.post-thumb.is-video-cover:hover .post-video-overlay {
    opacity: 0.65;
}


.post-video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    /* Hidden by default */
    transition: all 0.3s ease;
    z-index: 5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.post-video-play svg {
    width: 24px;
    height: 24px;
    fill: #333;
    margin-left: 2px;
    display: block;
}

.post-item-video:hover .post-video-play,
.post-thumb.is-video-cover:hover .post-video-play {
    opacity: 1;
    /* Show on hover */
    transform: translate(-50%, -50%) scale(1.1);
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.post-video-corner-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 6;
    display: flex;
    gap: 6px;
    align-items: center;
}

.post-video-corner-badges .post-badge {
    margin-left: 0;
}

.post-video-rating {
    /* position: absolute; Removed for flex layout */
    /* top: 10px; right: 10px; */
    padding: 4px 6px;
    border-radius: 4px;
    background: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);
    /* Rose Red */
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
}

.post-video-hd-badge {
    padding: 3px 6px;
    border-radius: 4px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    /* Amber Gold */
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1;
}

.post-video-tags {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: calc(100% - 20px);
    z-index: 4;
}

.post-video-tag {
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.7rem;
    line-height: 1;
    letter-spacing: 0.01em;
}

.post-video-title {
    margin: 10px 2px 0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-video-title a {
    color: #e5e7eb;
    text-decoration: none;
    transition: color 0.3s;
}

.post-video-title a:hover {
    color: #fff;
}

.category-content-video .ds-pagination a,
.category-content-video .ds-pagination span {
    background: #111827;
    color: #e5e7eb;
    border-color: #1f2937;
}

.category-content-video .ds-pagination a:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.post-item-grid {
    text-align: center;
}

.post-item-grid .post-thumb {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.post-thumb.is-video-cover .post-video-overlay {
    opacity: 0.35;
}



.post-item-card:hover .post-thumb.is-video-cover .post-video-overlay,
.post-item-list:hover .post-thumb.is-video-cover .post-video-overlay,
.post-item-grid:hover .post-thumb.is-video-cover .post-video-overlay {
    opacity: 0.55;
}

.post-item-card:hover .post-thumb.is-video-cover .post-video-play,
.post-item-list:hover .post-thumb.is-video-cover .post-video-play,
.post-item-grid:hover .post-thumb.is-video-cover .post-video-play {
    transform: translate(-50%, -50%) scale(1.04);
}

.post-item-grid .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.post-item-grid:hover .post-thumb img {
    transform: scale(1.05);
}

.post-item-grid .post-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.post-item-grid:hover .post-thumb::after {
    opacity: 1;
}

.post-item-grid .no-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.post-item-grid .post-info {
    text-align: left;
}

.post-item-grid .post-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.4;
}

.post-item-grid .post-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s;
}

.post-item-grid .post-title a:hover {
    color: var(--color-primary, #2563eb);
}

.post-item-grid .post-date,
.post-item-grid .post-author {
    font-size: 0.8rem;
    color: #94a3b8;
}

.post-item-grid .post-meta-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 6px;
}

/* ========================================
   杂志布局
   ======================================== */
.magazine-featured {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.magazine-featured-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.magazine-featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.magazine-featured:hover .magazine-featured-thumb img {
    transform: scale(1.03);
}

.magazine-featured-content {
    padding: 40px 40px 40px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.magazine-featured-content .post-date {
    font-size: 0.9rem;
    color: var(--color-primary, #2563eb);
    font-weight: 500;
    margin-bottom: 15px;
}

.magazine-featured-content .post-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 20px;
    line-height: 1.3;
}

.magazine-featured-content .post-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s;
}

.magazine-featured-content .post-title a:hover {
    color: var(--color-primary, #2563eb);
}

.magazine-featured-content .post-excerpt {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 25px;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--color-primary, #2563eb);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    align-self: flex-start;
}

.read-more-btn:hover {
    background: var(--color-primary-dark, #1d4ed8);
    transform: translateX(5px);
}

.posts-magazine {
    grid-template-columns: repeat(3, 1fr);
}

/* ========================================
   分类标签样式
   ======================================== */
.post-category-tag {
    display: inline-block;
    padding: 3px 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-right: 8px;
}

.post-category-tag:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    transform: translateY(-1px);
}

/* ========================================
   视频标签
   ======================================== */
.post-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.post-badge-video {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    padding: 3px 8px;
    border-radius: 20px;
}

.post-badge-video svg {
    width: 12px;
    height: 12px;
}

.post-badge-app {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    padding: 3px 8px;
    border-radius: 20px;
}

.post-badge-free {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    padding: 3px 8px;
    border-radius: 20px;
}

.post-badge-vip {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    padding: 3px 8px;
    border-radius: 20px;
}

.post-badge-album {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: #fff;
    padding: 3px 8px;
    border-radius: 20px;
}

/* ========================================
   无文章提示
   ======================================== */
.no-posts {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
}

.no-posts svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-posts p {
    font-size: 1.1rem;
    margin: 0;
}

/* ========================================
   分页样式
   ======================================== */
.ds-pagination {
    margin-top: 50px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.ds-pagination ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.ds-pagination li {
    display: inline-flex;
}

.ds-pagination a,
.ds-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    gap: 6px;
}

.ds-pagination a:hover {
    background: var(--color-primary, #2563eb);
    color: #fff;
    border-color: var(--color-primary, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.25);
}

.ds-pagination .current {
    background: var(--color-primary, #2563eb);
    color: #fff;
    border-color: var(--color-primary, #2563eb);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.25);
}

.ds-pagination .dots {
    background: transparent;
    border: none;
    color: #94a3b8;
    min-width: auto;
    padding: 0 8px;
}

/* ========================================
   暗黑模式
   ======================================== */
html.dark-mode .post-item-card,
html.dark-mode .post-item-list,
html.dark-mode .magazine-featured {
    background: var(--dm-bg-card, #1e293b);
}

html.dark-mode .post-video-title a {
    color: var(--dm-text, #e2e8f0);
}

html.dark-mode .post-video-title a:hover {
    color: var(--color-primary, #2563eb);
}

html.dark-mode .post-item-card .post-title a,
html.dark-mode .post-item-list .post-title a,
html.dark-mode .post-item-grid .post-title a,
html.dark-mode .magazine-featured-content .post-title a {
    color: var(--dm-text, #e2e8f0);
}

html.dark-mode .post-item-card .post-title a:hover,
html.dark-mode .post-item-list .post-title a:hover,
html.dark-mode .post-item-grid .post-title a:hover,
html.dark-mode .magazine-featured-content .post-title a:hover {
    color: var(--color-primary, #2563eb);
}

html.dark-mode .post-item-card .post-excerpt,
html.dark-mode .post-item-list .post-excerpt,
html.dark-mode .magazine-featured-content .post-excerpt {
    color: var(--dm-text-muted, #94a3b8);
}

html.dark-mode .post-item-card .post-date,
html.dark-mode .post-item-card .post-author,
html.dark-mode .post-item-list .post-meta,
html.dark-mode .post-item-grid .post-date,
html.dark-mode .post-item-grid .post-author {
    color: var(--dm-text-muted, #94a3b8);
}

html.dark-mode .post-category-tag {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

html.dark-mode .ds-pagination a,
html.dark-mode .ds-pagination span {
    background: var(--dm-bg-card, #1e293b);
    color: var(--dm-text, #e2e8f0);
    border-color: var(--dm-border, #334155);
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 992px) {
    .category-header {
        padding: 80px 0 50px;
    }

    .category-title {
        font-size: 2rem;
    }

    .posts-card {
        grid-template-columns: repeat(2, 1fr);
    }

    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .magazine-featured {
        grid-template-columns: 1fr;
    }

    .magazine-featured-content {
        padding: 30px;
    }

    .post-item-list {
        flex-direction: column;
    }

    .post-item-list .post-thumb {
        flex: none;
        width: 100%;
    }

    .post-item-list .post-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .category-header {
        padding: 70px 0 40px;
    }

    .category-title {
        font-size: 1.8rem;
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .posts-magazine {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {

    .posts-card,
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .category-title {
        font-size: 1.5rem;
    }
}
