/* 视频页面专用样式 */
.video-container {
    background: #1a1a1a;
    min-height: calc(100vh - 200px);
    padding: 20px 0;
}

.video-main {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-bottom: 30px;
}

.video-player-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-player {
    width: 100%;
    background: #000;
    border-radius: 10px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

/* 为不支持aspect-ratio的浏览器提供兼容性 */
@supports not (aspect-ratio: 16/9) {
    .video-player {
        height: 0;
        padding-bottom: 56.25%;
    }
    
    .video-player video,
    .video-player .video-cover,
    .video-player .play-button {
        position: absolute;
        top: 0;
        left: 0;
    }
    
    .video-player video,
    .video-player .video-cover {
        width: 100%;
        height: 100%;
    }
}

.video-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.play-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid #333;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 5px;
}

/* Plyr 播放器样式自定义 */
.plyr {
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.plyr--video {
    background: #000;
    width: 100%;
    height: 100%;
}

.plyr__video-wrapper {
    background: #000;
    width: 100%;
    height: 100%;
}

.plyr__poster {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.video-player .plyr__video-wrapper,
.video-player .plyr__video-embed {
    aspect-ratio: inherit;
}

.video-player.plyr-loaded .play-button,
.video-player.plyr-loaded .video-cover {
    display: none;
}

.video-info {
    margin-bottom: 20px;
    color: #fff;
}

.video-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #ffffff;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    color: #b8c1ec;
    font-size: 14px;
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.author-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.author-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.video-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-like {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn-like:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-dislike {
    background: rgba(255, 255, 255, 0.1);
    color: #b8c1ec;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-favorite {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
}

.video-description {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    color: #fff;
}

.description-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff;
}

.description-content {
    color: #b8c1ec;
    line-height: 1.8;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.tag {
    padding: 5px 12px;
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    border-radius: 15px;
    font-size: 12px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(102, 126, 234, 0.3);
    color: #764ba2;
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-1px);
    text-decoration: none;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #ffffff;
}

.related-video {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 10px;
}

.related-video:hover {
    background: rgba(255, 255, 255, 0.1);
}

.related-video img {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
}

.related-video-info {
    flex: 1;
}

.related-video-title {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-video-meta {
    font-size: 12px;
    color: #b8c1ec;
}

.comments-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
    color: #fff;
}

.comments-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
}

.comment-form {
    margin-bottom: 30px;
}

.comment-input {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
}

.comment-input::placeholder {
    color: #b8c1ec;
}

.comment-submit {
    margin-top: 10px;
    padding: 10px 25px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

.comment {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-username {
    font-weight: 600;
    color: #ffffff;
}

.comment-time {
    font-size: 12px;
    color: #b8c1ec;
}

.comment-text {
    color: #e2e8f0;
    margin-bottom: 10px;
    line-height: 1.6;
}

.comment-actions {
    display: flex;
    gap: 15px;
    font-size: 12px;
}

.comment-action {
    color: #b8c1ec;
    cursor: pointer;
    transition: color 0.3s ease;
}

.comment-action:hover {
    color: #667eea;
}

.comment-replies {
    margin-left: 40px;
    margin-top: 15px;
}

.quality-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.quality-hd { background: #28a745; color: white; }
.quality-fhd { background: #007bff; color: white; }
.quality-4k { background: #6f42c1; color: white; }
.quality-8k { background: #dc3545; color: white; }

/* 响应式设计 */
@media (max-width: 767.98px) {
    .video-main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .video-player {
        aspect-ratio: 16/9;
    }
    
    .video-actions {
        flex-wrap: wrap;
    }
    
    .action-btn {
        flex: 1;
        min-width: 44px;
        min-height: 44px;
        padding: 12px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .video-player {
        aspect-ratio: 16/9;
        border-radius: 8px;
    }
    
    .video-player-section {
        padding: 15px;
    }
    
    .video-title {
        font-size: 20px;
    }
}

@media (min-width: 1400px) {
    .video-player {
        aspect-ratio: 16/9;
        max-height: 70vh;
    }
}
