/* 公共组件样式 - 视频卡片、面包屑、分页等共享组件 */

/* ========================================
   1. 视频卡片组件 (Video Card Component)
   ======================================== */

/* 视频卡片容器 */
.myui-vodbox-content,
.vod-item,
.video-card {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.myui-vodbox-content:hover,
.vod-item:hover,
.video-card:hover {
    transform: translateY(-5px);
}

/* 卡片图片容器 */
.card-img,
.vod-pic,
.video-pic {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.card-img img,
.vod-pic img,
.video-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.myui-vodbox-content:hover .card-img img,
.vod-item:hover .vod-pic img,
.video-card:hover .video-pic img {
    transform: scale(1.05);
}

/* 左上角标签 */
.top-left-tag,
.video-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
}

.top-left-tag .tag-label,
.video-badge {
    background: #d32f2f;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

/* 底部信息栏 */
.bottom-info-bar,
.video-stats {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

/* 左下角观看人数 */
.bottom-left-info,
.video-stats .left-info {
    display: flex;
    align-items: center;
    gap: 4px;
    color: white;
    font-size: 12px;
}

.bottom-left-info svg,
.video-stats .left-info svg {
    flex-shrink: 0;
}

/* 右下角评分 */
.bottom-right-score,
.video-stats .right-score {
    display: flex;
    align-items: center;
}

.bottom-right-score .big-score,
.video-stats .right-score {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    line-height: 1;
}

/* 卡片底部渐变 */
.card-img::after,
.vod-pic::after,
.video-pic::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

/* 卡片标题和元数据 */
.card-info .title,
.video-title {
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
    color: #fff;
}

.card-info .role,
.video-meta {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 白色主题下的卡片颜色 */
[data-theme="light"] .card-info .title,
[data-theme="light"] .video-title {
    color: #000;
}

[data-theme="light"] .card-info .role,
[data-theme="light"] .video-meta {
    color: rgba(0,0,0,0.6);
}


/* ========================================
   2. 面包屑导航 (Breadcrumb)
   ======================================== */

.breadcrumb {
    padding: 15px 0;
    margin-top: 10px;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--primary-color, #ff6b6b);
}

.breadcrumb .separator {
    margin: 0 4px;
    color: rgba(255,255,255,0.4);
}

.breadcrumb span:not(.separator) {
    color: rgba(255,255,255,0.9);
}

/* 白色主题下的面包屑 */
[data-theme="light"] .breadcrumb {
    color: rgba(0,0,0,0.6);
}

[data-theme="light"] .breadcrumb a {
    color: rgba(0,0,0,0.8);
}

[data-theme="light"] .breadcrumb a:hover {
    color: var(--primary-color, #ff6b6b);
}

[data-theme="light"] .breadcrumb .separator {
    color: rgba(0,0,0,0.4);
}

[data-theme="light"] .breadcrumb span:not(.separator) {
    color: rgba(0,0,0,0.9);
}


/* ========================================
   3. 分页组件 (Pagination)
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
}

.pagination a,
.pagination span {
    padding: 8px 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.pagination a:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--primary-color, #ff6b6b);
}

.pagination .active {
    background: var(--primary-color, #ff6b6b);
    color: white;
}

/* 白色主题下的分页 */
[data-theme="light"] .pagination a,
[data-theme="light"] .pagination span {
    background: rgba(0,0,0,0.08);
    color: rgba(0,0,0,0.8);
}

[data-theme="light"] .pagination a:hover {
    background: rgba(0,0,0,0.15);
}

[data-theme="light"] .pagination .active {
    background: var(--primary-color, #ff6b6b);
    color: white;
}


/* ========================================
   4. 容器和布局 (Container & Layout)
   ======================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}


/* ========================================
   5. 响应式布局 - 移动端 (Mobile)
   ======================================== */

@media screen and (max-width: 768px) {
    .container {
        padding: 0 18px;
    }

    /* 视频卡片 - 移动端每行3个 */
    .myui-vodbox-content,
    .vod-item,
    .video-card {
        width: calc(33.333% - 7px);
        flex-shrink: 0;
    }

    .card-img,
    .vod-pic,
    .video-pic {
        padding-top: 140%;
    }

    .card-img img,
    .vod-pic img,
    .video-pic img {
        position: absolute;
        top: 0;
        left: 0;
    }

    /* 移动端卡片元素尺寸优化 */
    .top-left-tag .tag-label,
    .video-badge {
        font-size: 11px;
        padding: 3px 8px;
    }

    .bottom-info-bar,
    .video-stats {
        bottom: 6px;
        left: 6px;
        right: 6px;
    }

    .bottom-left-info,
    .video-stats .left-info {
        font-size: 11px;
    }

    .bottom-left-info svg,
    .video-stats .left-info svg {
        width: 12px;
        height: 12px;
    }

    .bottom-right-score .big-score,
    .video-stats .right-score {
        font-size: 18px;
    }

    .card-info .title,
    .video-title {
        font-size: 13px;
    }

    .card-info .role,
    .video-meta {
        font-size: 11px;
    }

    /* 面包屑 */
    .breadcrumb {
        font-size: 12px;
        padding: 6px 0;
    }

    /* 分页 */
    .pagination {
        gap: 6px;
        padding: 15px 0;
        flex-wrap: wrap;
    }

    .pagination a,
    .pagination span {
        padding: 6px 12px;
        font-size: 13px;
    }
}


/* ========================================
   6. 响应式布局 - 平板 (Tablet)
   ======================================== */

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    /* 视频卡片 - 平板每行4个 */
    .myui-vodbox-content,
    .vod-item,
    .video-card {
        width: calc(25% - 12px);
    }

    .card-img,
    .vod-pic,
    .video-pic {
        padding-top: 140%;
    }

    .card-img img,
    .vod-pic img,
    .video-pic img {
        position: absolute;
        top: 0;
        left: 0;
    }
}


/* ========================================
   7. 响应式布局 - 桌面 (Desktop)
   ======================================== */

@media screen and (min-width: 1025px) {
    .container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 30px;
    }

    /* 视频卡片 - 桌面每行6个 */
    .myui-vodbox-content,
    .vod-item,
    .video-card {
        width: calc(16.666% - 13px);
    }

    .card-img,
    .vod-pic,
    .video-pic {
        padding-top: 140%;
    }

    .card-img img,
    .vod-pic img,
    .video-pic img {
        position: absolute;
        top: 0;
        left: 0;
    }
}


/* ========================================
   8. 触摸设备优化 (Touch Devices)
   ======================================== */

@media (hover: none) {
    .myui-vodbox-content:active,
    .vod-item:active,
    .video-card:active {
        transform: scale(0.98);
    }

    .pagination a:active {
        transform: scale(0.95);
    }
}


/* ========================================
   9. 图片加载优化 (Image Loading)
   ======================================== */

.card-img,
.vod-pic,
.video-pic {
    position: relative;
    overflow: hidden;
}

.card-img img,
.vod-pic img,
.video-pic img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}
