
/* 诗集详情页样式 */
.collection-detail-page.collection-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* 诗集头部 */
.collection-detail-page .collection-header {
    text-align: center;
    padding: 1.5rem 1rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, #faf8f5 0%, #f5f0e8 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.collection-detail-page .collection-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #C04851, transparent);
}

.collection-detail-page .collection-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: #2C2C2C;
    letter-spacing: 0.12em;
    margin-bottom: 0.5rem;
}

.collection-detail-page .collection-desc {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.8;
    max-width: 600px;
    margin: 0.5rem auto 0;
    letter-spacing: 0.04em;
}

.collection-detail-page .collection-meta {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: #999;
    letter-spacing: 0.06em;
}

.collection-detail-page .collection-meta span {
    color: #C04851;
    font-weight: 600;
}

/* 分类导航 */
.collection-detail-page .category-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.collection-detail-page .category-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 1rem;
    font-family: var(--font-serif);
    font-size: 0.875rem;
    color: #004B50;
    background: linear-gradient(135deg, #f8fafa 0%, #f0f5f5 100%);
    border: 1px solid rgba(0, 75, 80, 0.1);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.04em;
}

.collection-detail-page .category-tag:hover {
    color: #C04851;
    background: linear-gradient(135deg, #fff5f5 0%, #fef0f0 100%);
    border-color: rgba(192, 72, 81, 0.2);
}

.collection-detail-page .category-count {
    font-size: 0.6875rem;
    color: #aaa;
    margin-left: 0.375rem;
    padding-left: 0.375rem;
    border-left: 1px solid rgba(0, 75, 80, 0.15);
}

.collection-detail-page .category-tag:hover .category-count {
    border-left-color: rgba(192, 72, 81, 0.2);
}

/* 分类区块 */
.collection-detail-page .category-section {
    margin-bottom: 1rem;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    /* 分类锚点（#cat-*）跳转时避开 52px sticky 导航 */
    scroll-margin-top: 64px;
}

.collection-detail-page .category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #faf8f5 0%, #f8f5f0 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.collection-detail-page .category-title {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    color: #2C2C2C;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.collection-detail-page .category-title::before {
    content: "◇";
    color: #C04851;
    font-size: 0.75rem;
}

.collection-detail-page .category-count-badge {
    font-size: 0.6875rem;
    color: #888;
    background: rgba(0, 0, 0, 0.04);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    letter-spacing: 0.02em;
}

/* 诗词列表 */
.collection-detail-page .poem-list {
    padding: 0.875rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    line-height: 2;
}

.collection-detail-page .poem-item {
    display: inline;
}

.collection-detail-page .poem-title {
    font-family: var(--font-serif);
    font-size: 0.875rem;
    color: #2C2C2C;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: color 0.25s ease;
    white-space: normal;
}

.collection-detail-page .poem-title:hover {
    color: #C04851;
}

.collection-detail-page .poem-author {
    font-size: 0.75rem;
    color: #999;
    letter-spacing: 0.02em;
}

/* 无分类时的列表 */
.collection-detail-page .poem-list-simple {
    padding: 1rem;
    column-count: 3;
    column-gap: 1.5rem;
}

.collection-detail-page .poem-list-simple .poem-item {
    display: block;
    padding: 0.25rem 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.04);
}

/* 分页样式（学段专题真分页） */
.collection-detail-page .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.collection-detail-page .page-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.9375rem;
    font-family: var(--font-serif);
    color: #2C2C2C;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.collection-detail-page .page-nav svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.collection-detail-page .page-nav:hover:not([disabled]) {
    color: #C04851;
    border-color: #C04851;
    background: rgba(192, 72, 81, 0.04);
}

.collection-detail-page .page-nav[disabled] {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

/* 空状态 */
.collection-detail-page .empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #999;
}

.collection-detail-page .empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.collection-detail-page .empty-state-text {
    font-size: 0.9375rem;
    letter-spacing: 0.04em;
}

/* 响应式 */
@media (max-width: 768px) {
    .collection-detail-page.collection-container {
        padding: 1rem;
    }

    .collection-detail-page .collection-header {
        padding: 1.25rem 1rem;
    }

    .collection-detail-page .collection-title {
        font-size: 1.375rem;
    }

    .collection-detail-page .collection-desc {
        font-size: 0.8125rem;
    }

    .collection-detail-page .category-nav {
        padding: 0.625rem;
        gap: 0.375rem;
    }

    .collection-detail-page .category-tag {
        padding: 0.25rem 0.75rem;
        font-size: 0.8125rem;
    }

    .collection-detail-page .category-header {
        padding: 0.625rem 0.875rem;
    }

    .collection-detail-page .category-title {
        font-size: 0.9375rem;
    }

    .collection-detail-page .poem-list {
        padding: 0.75rem 0.875rem;
        gap: 0.25rem 0.75rem;
    }

    .collection-detail-page .poem-list-simple {
        column-count: 2;
        padding: 0.75rem 0.875rem;
    }
}

@media (max-width: 480px) {
    .collection-detail-page .poem-list-simple {
        column-count: 1;
    }
}

/* Keep the original grouped directory, with readable titles and wrapping. */
.collection-detail-page .category-section { padding: 0; border: 1px solid rgba(0,0,0,.06); border-radius: 8px; margin-bottom: 20px; }
.collection-detail-page .category-title { margin: 0; }
.collection-detail-page .poem-list { padding: 16px 20px; gap: 8px 24px; }
.collection-detail-page .poem-item { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.collection-detail-page .poem-title { font-size: 16px; line-height: 1.9; }
.collection-detail-page .poem-author { font-size: 13px; color: #737373; }
.collection-detail-page .poem-list-simple { display: block; background: #fff; border-radius: 8px; padding: 16px 20px; }
.collection-detail-page .poem-list-simple .poem-item { break-inside: avoid; padding: 8px 0; }
.collection-detail-page a:focus-visible { outline: 2px solid #C04851; outline-offset: 3px; border-radius: 3px; }
.collection-detail-page .category-tag { min-height: 40px; }
@media (max-width: 768px) {
    .collection-detail-page.collection-container { padding: 16px; }
    .collection-detail-page .poem-list { padding: 12px 16px; gap: 4px 20px; }
    .collection-detail-page .poem-item { display: block; width: 100%; }
    .collection-detail-page .poem-title { display: inline-block; padding: 7px 0; }
    .collection-detail-page .poem-list-simple { padding: 12px 16px; }
    .collection-detail-page .poem-list-simple .poem-item { padding: 2px 0; }
    .collection-detail-page .category-tag { min-height: 44px; }
}
/* Align grouped entries instead of inheriting the global single-column list. */
.collection-detail-page .poem-list:not(.poem-list-simple) { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.collection-detail-page .poem-list .poem-item { width: auto; }
@media (max-width: 768px) {
    .collection-detail-page .poem-list:not(.poem-list-simple) { grid-template-columns: minmax(0,1fr); }
}
