/* =============== 分类列表页面 =============== */

body {
    background-color: #121212;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
}

/* =============== 页面容器 =============== */
.category-page {
    width: 100%;
    min-height: 100vh;
    padding: 40px 50px 60px;
}

/* =============== 标题 =============== */
.category-title {
    font-family: 'Lalezar', cursive;
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 24px;
}

/* =============== Grid 列表 =============== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

/* =============== 卡片 =============== */
.category-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-card__poster {
    position: relative;
    width: 100%;
    aspect-ratio: 7 / 10;
    border-radius: 8px;
    overflow: hidden;
    background: #1a1a2e;
}

.category-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.category-card:hover .category-card__poster img {
    transform: scale(1.08);
}

/* 黑色遮罩 */
.category-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 5;
    pointer-events: none;
}

.category-card:hover .category-card__overlay {
    opacity: 1;
}

/* 播放按钮 */
.category-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ff4463;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 10;
    pointer-events: none;
}

.category-card__play i {
    font-size: 22px;
    color: #fff;
    margin-left: 3px;
}

.category-card:hover .category-card__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* 占位背景 - 使用伪元素实现放大效果 */
.category-card__poster--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.category-card__poster--placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    transition: transform 0.3s ease;
    z-index: 0;
}

.category-card__poster--placeholder span {
    position: relative;
    z-index: 1;
}

.category-card:hover .category-card__poster--placeholder::before {
    transform: scale(1.08);
}

/* =============== 加载更多区域 =============== */
.load-more-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    min-height: 100px;
}

.load-more-container.is-hidden {
    display: none;
}

.load-more-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ff4463;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.load-more-text {
    margin-top: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.no-more-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

.no-more-data.is-hidden {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =============== 错误状态 =============== */
.load-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    gap: 16px;
}

.load-error.is-hidden {
    display: none;
}

.retry-btn {
    padding: 10px 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: transparent;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.retry-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* =============== 手机端适配 =============== */
@media (max-width: 767px) {
    .category-page {
        padding: 24px 10px 40px;
    }

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

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .category-card__poster {
        border-radius: 6px;
    }

    .category-card__overlay,
    .category-card__play {
        display: none;
    }
}
