/* 视频详情页面专用样式 - f-video-detail_5.css */

/* 深色模式下的card背景色增强 - 确保与body背景有明显区分 */
[data-bs-theme="dark"] .card {
    background-color: #2d3748 !important; /* 比body背景(#111827)更亮的灰蓝色 */
    border: 1px solid #4a5568 !important;
}

/* 深色模式下的list-group-item背景色 */
[data-bs-theme="dark"] .list-group-item {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
}

/* 深色模式下的嵌套card背景色 - 关联视频内的小卡片 */
[data-bs-theme="dark"] .card-body .card {
    background-color: #374151 !important;
    border: 1px solid #4b5563 !important;
}

/* 视频封面容器 - 移除播放按钮 */
.video-cover-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    overflow: hidden;
}

.video-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* 视频标题 */
.video-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
}

/* 交互按钮内联样式 */
.interaction-buttons-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.interaction-buttons-inline .btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.5rem;
}

.interaction-buttons-inline .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.4rem;
}

/* 平台按钮样式 */
.platform-buttons .btn {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.platform-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 视频元信息 - 紧凑样式 */
.meta-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem; /* 从 0.5rem 改为 0.25rem */
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.125rem 0; /* 添加内边距使内容更紧凑 */
}

.meta-item i {
    color: var(--brand-color);
}

/* 视频元信息容器紧凑间距 */
.video-meta .row {
    --bs-gutter-y: 0.25rem; /* 减小行间距 */
}

/* 标签和合集区域 */
.tags-section, .collection-section {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.tags-section .btn,
.collection-section .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    transition: all 0.3s ease;
}

/* 统一footer按钮样式 */
.card-footer .btn,
.recommended-footer .btn,
.related-tags .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Card头部居中和紧凑样式 */
.card-header {
    text-align: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, rgba(var(--brand-color-rgb), 0.05) 100%);
    border-bottom: 1px solid var(--border-color);
}

.card-header h5, 
.card-header h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

[data-bs-theme="dark"] .card-header {
    background: linear-gradient(135deg, var(--dark-color) 0%, rgba(var(--brand-color-rgb), 0.1) 100%);
}

/* 视频正文内容 - Markdown渲染样式 */
.video-content {
    line-height: 1.8;
    color: var(--text-primary);
}

.video-content h1, .video-content h2, .video-content h3,
.video-content h4, .video-content h5, .video-content h6 {
    color: var(--brand-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.video-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    border-bottom: 2px solid var(--brand-color);
    padding-bottom: 0.5rem;
}

.video-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

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

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

.video-content a {
    color: var(--brand-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.3s ease;
}

.video-content a:hover {
    border-bottom-color: var(--brand-color);
}

.video-content strong {
    font-weight: 700;
    color: var(--text-primary);
}

.video-content code {
    background: var(--bg-light);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    color: var(--text-primary);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

[data-bs-theme="dark"] .video-content code {
    background: var(--dark-color);
}

.video-content blockquote {
    border-left: 4px solid var(--brand-color);
    margin: 1rem 0;
    padding-left: 1rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* 评论区域 */
.comment-form {
    background: var(--bg-light);
    border-radius: 0.5rem;
    padding: 1rem;
}

[data-bs-theme="dark"] .comment-form {
    background: var(--dark-color);
}

.comment-form textarea {
    resize: vertical;
    min-height: 100px;
    border: 1px solid var(--border-color);
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* 嵌套回复样式 */
.comment-replies {
    border-left: 2px solid var(--border-color);
    padding-left: 0.75rem;
}

.reply-item {
    background: var(--bg-light);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
}

.reply-item:last-child {
    margin-bottom: 0;
}

[data-bs-theme="dark"] .reply-item {
    background: var(--dark-color);
}

.reply-item .comment-avatar img {
    width: 32px;
    height: 32px;
}

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

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-text {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.comment-actions {
    display: flex;
    gap: 0.75rem;
}

.comment-actions .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* 精致的分页样式 */
.custom-pagination {
    background: var(--bg-light);
    border-radius: 2rem;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 0 auto;
    width: fit-content;
}

[data-bs-theme="dark"] .custom-pagination {
    background: var(--dark-color);
    box-shadow: 0 2px 8px rgba(255,255,255,0.1);
}

.pagination-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.pagination-btn:hover:not(:disabled):not([disabled]) {
    transform: scale(1.1);
    background: var(--brand-color);
    border-color: var(--brand-color);
    color: white;
    text-decoration: none;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-page {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.pagination-page:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    text-decoration: none;
}

.pagination-page.active {
    background: var(--brand-color);
    border-color: var(--brand-color);
    color: white;
}

.pagination-dots {
    color: var(--text-secondary);
    padding: 0 0.5rem;
}

/* 公告模块 */
.announcement-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.announcement-item:last-child {
    border-bottom: none;
}

.announcement-title a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.announcement-title a:hover {
    color: var(--brand-color);
}

.announcement-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 0.5rem;
}

/* 关联视频模块增强边界样式 */
.related-video-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.related-video-item:hover {
    background-color: var(--bg-light);
    transform: translateY(-2px);
    border-color: var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

[data-bs-theme="dark"] .related-video-item:hover {
    background-color: var(--dark-color);
    box-shadow: 0 4px 12px rgba(255,255,255,0.1);
}

.related-thumbnail {
    width: 100px;
    height: 56px;
    border-radius: 0.375rem;
    object-fit: cover;
    flex-shrink: 0;
}

.related-info {
    flex: 1;
    min-width: 0;
}

.related-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-info small {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

.related-tags {
    margin-top: 0.5rem;
}

.related-tags .badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.4rem;
    background: rgba(var(--brand-color-rgb), 0.1);
    color: var(--brand-color);
    border: 1px solid rgba(var(--brand-color-rgb), 0.2);
}

/* 新的关联视频卡片样式 - 增强边界 */
.card-body .card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.card-body .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: var(--brand-color) !important;
}

[data-bs-theme="dark"] .card-body .card:hover {
    box-shadow: 0 4px 12px rgba(255,255,255,0.1);
}

/* 视频缩略图容器 - 保持比例和居中 */
.video-thumbnail-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9; /* 使用16:9比例 */
    overflow: hidden;
    border-radius: 0.375rem;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 改为contain以显示完整图片 */
    object-position: center;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover {
    transform: scale(1.05);
}

/* 确保图片填满容器 */
.object-fit-cover {
    object-fit: cover;
}

/* 左侧图片垂直居中 */
.col-5.d-flex.align-items-center {
    display: flex !important;
    align-items: center !important;
}

/* 关联视频按钮样式 - 放大 */
.card-body .btn-outline-primary,
.card-body .btn-outline-secondary,
.card-body .btn-outline-success,
.card-body .btn-outline-info,
.card-body .btn-outline-warning,
.card-body .btn-outline-danger,
.card-body .btn-outline-dark {
    font-size: 0.7rem; /* 从 0.65rem 增加到 0.7rem */
    padding: 0.25rem 0.5rem; /* 从 0.2rem 0.4rem 增加到 0.25rem 0.5rem */
    transition: all 0.3s ease;
}

.card-body .btn:hover {
    transform: scale(1.05);
}

/* 推荐视频区域 - 增强边界 */
.recommended-item {
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 2px solid var(--border-color) !important; /* 增强边界 */
    background: var(--card-bg);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.recommended-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-color: var(--brand-color) !important;
}

[data-bs-theme="dark"] .recommended-item:hover {
    box-shadow: 0 8px 24px rgba(255,255,255,0.1);
}

.recommended-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.recommended-item:hover .recommended-thumbnail {
    transform: scale(1.02);
}

.recommended-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommended-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0.5rem 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* 从 3 行增加到 4 行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommended-footer {
    margin-top: auto;
    padding: 0.75rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

[data-bs-theme="dark"] .recommended-footer {
    background: var(--dark-color);
}

.recommended-tags {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.recommended-tags .badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.75rem;
}

/* 推荐视频footer按钮放大 */
.recommended-footer .btn {
    font-size: 0.8rem !important; /* 从 0.75rem 增加到 0.8rem */
    padding: 0.375rem 0.75rem !important; /* 从 0.25rem 0.5rem 增加 */
}

.bg-outline-primary { background: transparent; color: var(--bs-primary); border: 1px solid var(--bs-primary); }
.bg-outline-secondary { background: transparent; color: var(--bs-secondary); border: 1px solid var(--bs-secondary); }
.bg-outline-success { background: transparent; color: var(--bs-success); border: 1px solid var(--bs-success); }
.bg-outline-danger { background: transparent; color: var(--bs-danger); border: 1px solid var(--bs-danger); }
.bg-outline-warning { background: transparent; color: var(--bs-warning); border: 1px solid var(--bs-warning); }
.bg-outline-info { background: transparent; color: var(--bs-info); border: 1px solid var(--bs-info); }
.bg-outline-dark { background: transparent; color: var(--bs-dark); border: 1px solid var(--bs-dark); }

/* 响应式设计 */
@media (max-width: 992px) {
    .video-title {
        font-size: 1.4rem;
    }
    
    .interaction-buttons-inline {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .interaction-buttons-inline .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.4rem;
    }
    
    .related-thumbnail {
        width: 80px;
        height: 45px;
    }
    
    .related-title {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .video-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .interaction-buttons-inline {
        margin-top: 1rem;
        align-self: stretch;
        justify-content: space-around;
    }
    
    .platform-buttons .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem;
    }
    
    .meta-item {
        font-size: 0.8rem;
    }
    
    .comment-item {
        gap: 0.75rem;
    }
    
    .comment-avatar img {
        width: 32px;
        height: 32px;
    }
    
    .related-video-item {
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .related-thumbnail {
        width: 70px;
        height: 39px;
    }
    
    .related-title {
        font-size: 0.8rem;
    }
    
    .recommended-title {
        font-size: 0.8rem;
    }
    
    .recommended-desc {
        font-size: 0.75rem;
    }
    
    .custom-pagination {
        padding: 0.5rem 1rem;
    }
    
    .pagination-pages {
        gap: 0.25rem;
    }
    
    .pagination-page {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .d-flex.justify-content-between.align-items-start {
        flex-direction: column;
        align-items: stretch;
    }
    
    .interaction-buttons-inline {
        margin-top: 1rem;
        justify-content: space-around;
    }
    
    .platform-buttons .row {
        margin: 0 -0.25rem;
    }
    
    .platform-buttons .col-4 {
        padding: 0 0.25rem;
    }
    
    .tags-section, .collection-section {
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .comment-form .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .comment-form .btn {
        align-self: stretch;
        justify-content: center;
    }
    
    .comment-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .custom-pagination {
        padding: 0.5rem;
    }
    
    .pagination-pages {
        gap: 0.125rem;
    }
    
    .announcement-desc {
        font-size: 0.8rem;
    }
    
    .related-info small {
        font-size: 0.7rem;
    }
}