/* 骨架屏样式 */
.skeleton {
    position: relative;
    background: #f0f0f0;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 基础布局样式 */
.sections-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 20px;
    padding: 15px;
}

.section-block {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.section-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.section-block:first-child {
    padding-top: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

/* 卡片样式 */
.item-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.item-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.item-poster {
    position: relative;
    width: 100%;
    padding-top: 140%;
    background: #f5f5f5;
    overflow: hidden;
}

.item-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
}

.item-poster img.loaded {
    opacity: 1;
}

.item-info {
    padding: 12px;
    text-align: center;
}

.item-info h3 {
    font-size: 14px;
    color: #333;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

/* 响应式布局优化 */
@media screen and (max-width: 768px) {
    .sections-container {
        padding: 10px;
        margin-top: 15px;
    }

    .section-block {
        padding: 10px 5px;
    }

    .section-header {
        margin-bottom: 10px;
    }

    .section-header h2 {
        font-size: 16px;
    }

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

    .item-card {
        margin: 0;
    }

    .item-info {
        padding: 6px 4px;
    }

    .item-info h3 {
        font-size: 12px;
        line-height: 1.3;
    }

    .item-poster {
        padding-top: 135%;
    }
}

/* 超小屏幕优化 */
@media screen and (max-width: 390px) {
    .sections-container {
        padding: 8px;
    }

    .section-block {
        padding: 8px 4px;
    }

    .item-grid {
        gap: 6px;
    }

    .item-info {
        padding: 4px 2px;
    }

    .item-info h3 {
        font-size: 11px;
    }
}
