.video-detail {
    max-width: 1200px;
    margin: 0 auto;
}

.video-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.meta-info {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    color: #666;
}

.video-player {
    /* 基础样式 */
    position: relative;
    width: 100%;
    max-width: 1200px;
    /* 最大宽度限制 */
    margin: 2rem auto;
    /* 上下2rem，水平居中 */
    background: #000;
    border-radius: 8px;
    /* 16:9 = 9/16 = 0.5625 */
    height: 500px;
    overflow: hidden;
}

#player-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-loading-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #888;
    font-size: 14px;
    pointer-events: none;
}

.now-playing-label {
    font-size: 0.95rem;
    color: #666;
    margin-top: 0.35rem;
}

/* 视频元素 */
.video-player video,
.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .video-player {
        margin: 1rem auto;
        border-radius: 0;
        height: 250px;
    }
}

video {
    width: 100%;
    height: auto;
    display: block;
}

.video-description {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-videos {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.video-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
}

/* 缩略图容器 */
.card-thumb {
    position: relative;
    aspect-ratio: 16/9;
}

.card-thumb img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* 卡片信息 */
.card-info {
    padding: 1rem;
}

.card-info h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.9rem;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .related-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .related-videos {
        margin-top: 2rem;
        padding-top: 1.25rem;
    }

    .related-videos h2 {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }

    /* 移动端：两列等宽，窄屏也保持 2 列 */
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem 0.65rem;
        margin-top: 1rem;
    }

    .related-videos .card-thumb img {
        height: 180%;
        display: block;
        object-fit: fill;
    }

    .card-info {
        padding: 0.5rem 0.4rem 0.55rem;
    }

    .card-info h3 {
        font-size: 0.8rem;
        line-height: 1.35;
        margin-bottom: 0.35rem;
    }

    .meta {
        font-size: 0.68rem;
        flex-wrap: wrap;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.15rem;
    }

    .duration {
        font-size: 0.7rem;
        padding: 2px 5px;
        bottom: 6px;
        right: 6px;
    }
}

@media (max-width: 480px) {
    .related-grid {
        gap: 0.65rem 0.5rem;
    }

    .card-info h3 {
        font-size: 0.96rem;
    }

    .video-card {
        max-width: none;
        margin: 0;
    }
}

/* 播放源列表 */
.source-section {
    margin: 2rem 0;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.source-list {
    display: grid;
    gap: 2rem;
}

.source-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}

.source-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.source-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.source-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.episode-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.episode-item {
    display: flex;
    flex-direction: column;
    padding: 0.8rem 1.2rem;
    border: 1px solid #eee;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    min-width: 120px;
}

.episode-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 2px 8px rgba(63, 143, 95, 0.2);
}

/* 激活状态样式 */
.episode-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    position: relative;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(63, 143, 95, 0.3);
}

.episode-item.active span {

    color: #fff;
}

/* 激活状态指示器 */
.episode-item.active::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    animation: active-indicator 0.3s ease;
}

@keyframes active-indicator {
    from {
        width: 30%;
        opacity: 0;
    }

    to {
        width: 60%;
        opacity: 1;
    }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .episode-item.active {
        transform: none;
        box-shadow: 0 2px 6px rgba(63, 143, 95, 0.2);
    }

    .episode-item.active::after {
        bottom: -3px;
        height: 2px;
    }
}

.episode-num {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.3rem;
    text-align: center;
}

.episode-title {
    font-size: 0.9em;
    color: #666;
}

@media (max-width: 768px) {
    .source-section {
        padding: 1rem;
    }

    .episode-item {
        flex: 1 1 45%;
        text-align: center;
        padding: 0.8rem;
    }

    .episode-list {
        gap: 0.8rem;
    }
}

.meta-container {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* 左侧封面样式 */
.video-cover {
    flex: 0 0 300px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 2/3;
}

.cover-mask {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.play-count {
    color: white;
    font-size: 0.9em;
}

/* 右侧信息区域 */
.video-info {
    flex: 1;
    min-width: 0;
}

.video-title {
    color: var(--primary-color);
    margin: 0 0 1.5rem;
    font-size: 2em;
}

/* 信息网格布局 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-label {
    color: #666;
    flex-shrink: 0;
}

/* 标签样式 */
.tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(63, 143, 95, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* 评分样式 */
.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    color: #ffc107;
    font-size: 1.1em;
}

/* 响应式布局 */
@media (max-width: 1024px) {
    .meta-container {
        flex-direction: column;
    }

    .video-cover {
        flex: none;
        width: 60%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }

    .video-title {
        font-size: 1.4rem;
        text-align: center;
    }
}