/* 首页特定样式 (Index Page Specific Styles) */

/* 移动端body padding调整 - 为双层导航腾出空间 */
@media screen and (max-width: 768px) {
    body#index {
        padding-top: 110px !important;
    }
}

/* ========================================
   1. 基础布局
   ======================================== */

body {
    background-color: var(--basic-bg, #191919);
    color: var(--font-color, #fff);
}

/* ========================================
   2. 视频列表容器
   ======================================== */

/* 确保滑动功能正常工作 */
.myui-vodbox-item .content .card-box {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.myui-vodbox-item .content .card-box::-webkit-scrollbar {
    display: none;
}

/* 确保hover效果能够超出边界 */
.myui-vodbox-item .content {
    overflow: visible !important;
}

/* 为hover效果添加z-index */
.myui-vodbox-content:hover .content-card {
    z-index: 10;
}

/* ========================================
   3. 轮播图区块
   ======================================== */

.banner-box {
    margin: 0 -10px;
    border-radius: 12px;
    overflow: hidden;
}

.banner .swiper-slide {
    height: 45vh;
    min-height: 280px;
    max-height: 400px;
}

.m-slide-btn-box {
    padding: 12px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.m-detail-box .title {
    font-size: 15px;
    margin-bottom: 6px;
    font-weight: 600;
}

.m-detail-box .tags {
    font-size: 12px;
    margin-bottom: 5px;
}

.m-detail-box .content {
    font-size: 12px;
    line-height: 1.5;
    opacity: 0.9;
}

/* ========================================
   4. 视频卡片信息区域
   ======================================== */

.card-info {
    padding: 8px 5px 0;
}

.card-info .title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-info .role {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   5. 分类标题优化
   ======================================== */

.myui-vodbox .top .title {
    font-size: 17px;
    font-weight: 600;
}

.myui-vodbox .top .right {
    font-size: 12px;
}

/* ========================================
   6. 项目间距
   ======================================== */

.item {
    margin-bottom: 25px;
}

/* ========================================
   7. 推荐区域隐藏（移动端）
   ======================================== */

@media screen and (max-width: 768px) {
    .shoutu-recommend {
        display: none !important;
    }
}

/* ========================================
   8. 响应式优化 - 移动端
   ======================================== */

@media screen and (max-width: 768px) {
    /* 轮播图优化 */
    .banner-box {
        margin: 0 -10px;
        border-radius: 12px;
        overflow: hidden;
    }

    .banner .swiper-slide {
        height: 45vh;
        min-height: 280px;
        max-height: 400px;
    }

    .m-slide-btn-box {
        padding: 12px 15px;
        background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    }

    .m-detail-box .title {
        font-size: 15px;
        margin-bottom: 6px;
        font-weight: 600;
    }

    .m-detail-box .tags {
        font-size: 12px;
        margin-bottom: 5px;
    }

    .m-detail-box .content {
        font-size: 12px;
        line-height: 1.5;
        opacity: 0.9;
    }

    /* 视频卡片优化 */
    .myui-vodbox-content {
        min-width: 140px !important;
        max-width: 160px !important;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .card-img {
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }

    .card-info {
        padding: 6px 2px 4px !important;
    }

    .card-info .title {
        font-size: 13px;
        line-height: 1.3;
        margin-bottom: 3px;
        font-weight: 500;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .card-info .role {
        font-size: 11px;
        margin-top: 0;
        opacity: 0.7;
        line-height: 1.3;
        overflow: visible;
        white-space: normal;
        display: block;
    }

    /* 分类标题优化 */
    .myui-vodbox .top .title {
        font-size: 17px;
        font-weight: 600;
    }

    .myui-vodbox .top .right {
        font-size: 12px;
    }

    /* 容器边距优化 */
    .container {
        padding: 0 12px;
    }

    .item {
        margin-bottom: 25px;
    }
}

/* ========================================
   9. 响应式优化 - 平板
   ======================================== */

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .myui-vodbox-content {
        min-width: 160px !important;
        max-width: 180px !important;
    }

    .container {
        padding: 0 20px;
    }
}

/* ========================================
   10. 响应式优化 - 大屏
   ======================================== */

@media screen and (min-width: 1025px) {
    .myui-vodbox-content {
        min-width: 180px !important;
        max-width: 200px !important;
    }

    .container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 30px;
    }
}

/* ========================================
   11. 卡片布局优化（按屏幕尺寸）
   ======================================== */

.myui-vodbox-content {
    position: relative;
    margin-bottom: 30px;
}

.content-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (min-width: 1025px) {
    .myui-vodbox-content {
        min-width: calc(16.666% - 20px) !important;
        width: calc(16.666% - 20px) !important;
        padding-top: 24%;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .myui-vodbox-content {
        min-width: calc(25% - 20px) !important;
        width: calc(25% - 20px) !important;
        padding-top: 36%;
    }
}

@media (max-width: 768px) {
    .myui-vodbox-content {
        min-width: calc(33.333% - 15px) !important;
        max-width: calc(33.333% - 15px) !important;
        padding-top: 51%;
        margin: 0 5px;
        margin-bottom: 20px;
    }

    .card-info .title {
        font-size: 13px;
    }

    .card-info .role {
        font-size: 11px;
    }
}

/* ========================================
   12. 点击反馈优化
   ======================================== */

.myui-vodbox-content {
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

/* ========================================
   13. 触摸设备优化
   ======================================== */

@media (hover: none) {
    .myui-vodbox-content:active .content-card {
        transform: scale(0.98);
        transition: transform 0.2s;
    }
}
