/*
 * 视频列表页面样式文件
 * 包含视频列表页面的布局和样式
 */

/* 全局样式 */
* {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 推荐视频区域 */
.recommended-videos {
    padding: 160px 0 60px;
    background-color: white;
    height: 1080px;
}

.video-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 3em;
    font-weight: 400;
    margin-top: 30px;
    color: #222;
}

.section-title a:hover {
    transition: all 0.2s ease;
}

.video-main {
    display: flex;
    gap: 30px;
    margin-top: 15px;
}

.video-player {
    flex: 1;
    min-width: 60%;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-left: -3px;
}
.by-line {
    background: url(../images/by-line.png);
    background-size: contain;
    width: 100%;
    height: 12px;
    position: absolute;
    bottom: -12px; 
    z-index: 1;
}
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button.small {
    width: 40px;
    height: 40px;
}

.play-icon {
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 30px solid white;
    margin-left: 5px;
}

.play-button.small .play-icon {
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 15px solid white;
    margin-left: 3px;
}

.video-info {
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}
.video-info p {
    background: rgba(0, 0, 0, .5);
    color: #fff;
    padding: 20px 30px;
    font-size: 18px;
    max-height: 170px;
    margin-top: 560px;
}
.video-sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-item-thumbnail {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.video-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    line-height: 1.4;
}

/* 更多视频区域 */
/* 通栏滑块容器 */
.video-slider-wrapper {
    position: relative;
    margin-bottom: 40px;
}

/* 横向滚动轨道 */
.video-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 4px;
    /* 隐藏滚动条 */
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE/Edge */
}
.video-grid::-webkit-scrollbar {
    display: none;                  /* Chrome/Safari */
}

/* 每个卡片固定宽度，不压缩 */
.video-grid-item {
    flex: 0 0 320px;                /* 固定宽度，可按需改 260/300 */
    background-color: rgba(0,0,0,.4);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.video-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.video-grid-item .video-item-thumbnail {
    height: 200px;                  /* 缩略图高度可按需调 */
    position: relative;
}
.video-grid-item .video-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video-grid-item .video-item-title {
    padding: 12px 14px;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-item-title {
    position: absolute;
    bottom: 0;
    background: rgba(0,0,0,.6);
    width: 100%;
}

/* 左右箭头按钮 */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.slider-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #fff;
}
.slider-prev { left: 17%; }
.slider-next { right: 17%; }

/* 窄屏把箭头贴边 */
@media (max-width: 768px) {
    .slider-prev { left: 8px; }
    .slider-next { right: 8px; }
    .video-grid-item { flex: 0 0 240px; }
}
/* videolistR页面补充样式ST */
.hero-video {
    width: 100%;
}
.video-player {
    position: relative;
    width: 100%;
    height: 560px;          /* ← 必须设高度，否则视频高度为0就不显示了 */
    background: #000;       /* 加载时黑底，不会闪白 */
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;             /* 视频在最底层 */
    cursor: pointer;
}

/* 进度条 */
.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.3);
    z-index: 20;
    cursor: pointer;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: #fff;
    transition: width 0.1s linear;
}

/* 时间 */
.progress-time {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 13px;
    color: #fff;
    z-index: 20;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
    pointer-events: none;   /* 不挡点击 */
}

/* 白色圆形透明播放按钮 */
.video-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;            /* 按钮在视频上方 */
    text-align: center;
    pointer-events: none;   /* 容器不挡视频点击 */
}
.play-button {
    display: flex;
    pointer-events: auto;    
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    border: 2px solid rgba(255,255,255,0.8);
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-button:hover {
    background: rgba(255,255,255,0.4);
    /* 用阴影代替放大，位置不动 */
    box-shadow: 0 0 20px rgba(255,255,255,0.5);
}
.play-icon {
    font-size: 28px;
    color: #fff;
    margin-left: 4px;
}
/* videolistR页面补充样式ED */
.more-videos {
    background: rgba(0,0,0,.3);
}
/* 响应式设计 */
@media (max-width: 768px) {
    .video-main {
        flex-direction: column;
    }
    
    .video-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .video-item {
        min-width: 200px;
    }
    
    .video-thumbnail {
        height: 300px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
}