/* 首页专用样式 */

/* 横向滚动推荐 */
.horizontal-scroll {
    margin-bottom: 40px;
}

.scroll-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;  /* iOS 惯性滚动 */
    scrollbar-width: none;              /* Firefox */
    -ms-overflow-style: none;           /* IE/旧Edge */
}

/* 隐藏滚动条但保留滚动功能 */
.scroll-container::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.scroll-item {
    flex: 0 0 150px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.item-pic {
    position: relative;
    width: 150px;
    height: 220px;
    overflow: hidden;
    background-color: #ddd;
    border-radius: 4px;
}

.item-pic a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.item-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s;
    animation: shimmer 1.5s infinite;
    background: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
    background-size: 1200px 100%;
}

.item-pic img.loaded {
    opacity: 1;
    animation: none;
    background: none;
}

.item-pic:hover img {
    opacity: 0.9;
}

/* 更新状态标签 */
.item-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #ff6b6b;
    color: #fff;
    padding: 4px 8px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
}

.item-info {
    padding: 0;
}

.item-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    line-height: 1.4;
}

.item-meta {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* 栏目标题 */
h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 30px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #0066cc;
    display: inline-block;
}

h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 30px 0 20px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #0066cc;
}

/* 影视列表 */
.vod-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.vod-item {
    transition: transform 0.3s, box-shadow 0.3s;
}

.vod-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vod-pic {
    position: relative;
    width: 100%;
    padding-bottom: 150%; /* 2:3 宽高比 */
    overflow: hidden;
    background-color: #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.vod-pic img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s;
    animation: shimmer 1.5s infinite;
    background: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
    background-size: 1200px 100%;
}

.vod-pic img.loaded {
    opacity: 1;
    animation: none;
    background: none;
}

.vod-pic .placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    opacity: 1;
    transition: opacity 0.3s;
}

.vod-pic img.loaded ~ .placeholder {
    opacity: 0;
}

.vod-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.vod-item a:hover .vod-name {
    color: #0066cc;
}

.vod-meta {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 更多链接 */
.more-link {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background-color: #0066cc;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.more-link:hover {
    background-color: #004499;
    text-decoration: none;
}

/* 分类入口 */
.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.category-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.category-btn:hover {
    background-color: #0066cc;
    color: #fff;
    border-color: #0066cc;
    text-decoration: none;
}

/* 排行榜 */
.rank-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.rank-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0066cc;
}

.rank-list {
    list-style: none;
    padding: 0;
}

.rank-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rank-list li:last-child {
    border-bottom: none;
}

.rank-list a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s;
}

.rank-list a:hover {
    color: #0066cc;
    text-decoration: underline;
}

.rank-meta {
    color: #999;
    font-size: 12px;
    margin-left: 10px;
    white-space: nowrap;
}

/* 加载动画 */
@keyframes shimmer {
    0% {
        background-position: -1200px 0;
    }
    100% {
        background-position: 1200px 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .scroll-item {
        flex: 0 0 110px;
        min-width: 110px;
    }

    .item-pic {
        width: 110px;
        height: 160px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 18px;
    }

    .vod-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }

    .category-buttons {
        gap: 8px;
    }

    .category-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .rank-container {
        grid-template-columns: 1fr;
    }
}



.scroll-container.dragging {
    cursor: grabbing;
    user-select: none;
}

