/* 视频详情页样式 */
.video-detail-section {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.video-detail-container {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}

/* 面包屑导航 */
.video-breadcrumb {
    padding: 1rem 0;
    font-size: 0.85rem;
    color: #999;
}

.video-breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.video-breadcrumb a:hover {
    color: #e0211a;
}

.video-breadcrumb .current {
    color: #333;
}

/* 视频标题 */
.video-detail-header {
    margin-bottom: 2rem;
}

.video-detail-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e2f3e;
    line-height: 1.3;
    margin: 0; text-align: center;
}

/* ========== 竖屏视频播放区域 ========== */
.video-player-wrapper {
    width: 100%;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 竖屏播放器：限制最大宽度，居中显示 */
.portrait-player {
    max-width: 400px;
    margin: 0 auto;
    border-radius: 20px;
    background: #1a1a1a;
}

.video-player {
    width: 100%;
    height: auto;
    display: block;
}

/* 竖屏视频：固定9:16比例 */
.portrait-video {
    aspect-ratio: 9 / 16;
    object-fit: cover;
}

/* 视频元信息 */
.video-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 0 1.5rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 0.85rem;
    color: #888;
}

.meta-item i {
    margin-right: 0.4rem;
    color: #e0211a;
}

/* 视频介绍区域 */
.video-content-wrapper {
    margin-bottom: 2.5rem;
}

.video-content-title {
    margin-bottom: 1.2rem;
}

.video-content-title h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e2f3e;
    margin: 0 0 0.5rem 0;
    display: inline-block;
}

.title-line {
    display: block;
    width: 50px;
    height: 3px;
    background: #e0211a;
}

/* 编辑器内容样式 */
.video-editor-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
}

.video-editor-content p {
    margin-bottom: 1rem;
    text-indent: 2em;
}

.video-editor-content p:last-child {
    margin-bottom: 0;
}

.video-editor-content h1,
.video-editor-content h2,
.video-editor-content h3 {
    margin: 1.2rem 0 0.8rem;
    color: #1e2f3e;
}

.video-editor-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
}

.video-editor-content ul,
.video-editor-content ol {
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.video-editor-content li {
    margin-bottom: 0.5rem;
}

.video-editor-content blockquote {
    margin: 1rem 0;
    padding: 0.8rem 1.5rem;
    background: #f9f9f9;
    border-left: 4px solid #e0211a;
    color: #555;
}

/* 相关视频推荐 */
.related-videos {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.related-title {
    margin-bottom: 1.5rem;
}

.related-title h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e2f3e;
    margin: 0 0 0.5rem 0;
    display: inline-block;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.related-item {
    transition: transform 0.3s ease;
}

.related-item:hover {
    transform: translateY(-3px);
}

.related-link {
    text-decoration: none;
    display: block;
}

/* 推荐视频封面 - 也使用竖屏比例 */
.related-cover {
    position: relative;
    width: 100%;
    padding-bottom: 133%;
    overflow: hidden;
    border-radius: 12px;
    background: #1a1a1a;
}

/* 如果是横屏推荐视频，使用3:2比例，取消下面注释 */
/* .related-cover.landscape-cover {
    padding-bottom: 66.67%;
} */

.related-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-item:hover .related-cover img {
    transform: scale(1.05);
}

.related-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(224,33,26,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.related-play-icon i {
    color: #fff;
    font-size: 0.9rem;
    margin-left: 2px;
}

.related-item:hover .related-play-icon {
    opacity: 1;
}

.related-video-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    margin: 0.6rem 0 0;
    line-height: 1.4;
    text-align: center;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-item:hover .related-video-title {
    color: #e0211a;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .video-detail-title {
        font-size: 1.4rem;
    }

    .related-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .video-content-title h3,
    .related-title h3 {
        font-size: 1.2rem;
    }

    .video-editor-content {
        font-size: 0.9rem;
    }

    .portrait-player {
        max-width: 340px;
    }

    .video-meta {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .video-detail-title {
        font-size: 1.2rem;
    }

    .related-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .video-meta {
        gap: 0.8rem;
    }

    .meta-item {
        font-size: 0.75rem;
    }

    .video-editor-content p {
        text-indent: 1.5em;
    }

    .portrait-player {
        max-width: 280px;
    }
}

/* 外链视频样式 - 当没有视频文件时显示 */
.external-video-wrapper {
    width: 100%;
    background: #1a1a1a;
    border-radius: 20px;
    overflow: hidden;
}

.external-video-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;
}

.external-video-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.external-video-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.external-video-mask:hover {
    background: rgba(0, 0, 0, 0.3);
}

.external-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: #e0211a;
    color: #fff;
    text-decoration: none;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.external-link-btn i {
    font-size: 1rem;
}

.external-link-btn:hover {
    background: #c01a14;
    transform: scale(1.05);
    color: #fff;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .external-link-btn {
        padding: 8px 20px;
        font-size: 0.85rem;
        gap: 8px;
    }

    .external-link-btn i {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .external-link-btn {
        padding: 6px 16px;
        font-size: 0.75rem;
        gap: 6px;
    }
}