/**
 * 视频页面（列表 + 详情）
 * 左右布局：左侧内容，右侧公共栏（热门视频 / 帮助入口）
 * 复用全站 CSS 变量与容器宽度
 */
/* ============================================================
   共用：容器与面包屑
   ============================================================ */
.video-list-main,
.video-detail-main {
    padding: clamp(28px, 4vw, 48px) 0 clamp(48px, 6vw, 80px);
    background: var(--c-bg, #fff);
    min-height: 50vh;
}
.container-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.video-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: start;
    margin-top: 20px;
}
.video-main-col {
    min-width: 0;
}
/* ============================================================
   右侧公共栏
   ============================================================ */
.video-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}
.video-side-card {
    padding: 16px;
    border: 1px solid var(--c-line, #e2e8f0);
    border-radius: 10px;
    background: var(--c-bg-card, #fff);
}
.video-side-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.video-side-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-text, #1e293b);
    line-height: 1.4;
}
.video-side-more {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--c-text-3, #94a3b8);
    text-decoration: none;
    transition: color 0.15s ease;
}
.video-side-more:hover {
    color: var(--c-accent, #2563eb);
}
.video-side-empty {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--c-text-3, #94a3b8);
}
.video-side-hot-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.video-side-hot {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: inherit;
    text-decoration: none;
}
.video-side-hot-cover {
    position: relative;
    flex-shrink: 0;
    width: 96px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    background: #0f172a;
}
.video-side-hot-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.video-side-hot:hover .video-side-hot-cover img {
    transform: scale(1.05);
}
.video-side-hot-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.35);
}
.video-side-hot-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.video-side-hot-title {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--c-text, #1e293b);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}
.video-side-hot:hover .video-side-hot-title {
    color: var(--c-accent, #2563eb);
}
.video-side-hot-meta {
    font-size: 0.72rem;
    color: var(--c-text-3, #94a3b8);
}
.video-side-hot-meta i {
    margin-right: 3px;
    opacity: 0.7;
}
.video-side-help-desc {
    margin: 0 0 14px;
    font-size: 0.8125rem;
    line-height: 1.7;
    color: var(--c-text-2, #475569);
}
.video-side-help-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.video-side-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border: 1px solid var(--c-line, #e2e8f0);
    border-radius: 6px;
    background: var(--c-bg-soft, #f8fafc);
    color: var(--c-text-2, #475569);
    font-size: 0.78rem;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.video-side-btn:hover {
    border-color: var(--c-accent, #2563eb);
    color: var(--c-accent, #2563eb);
}
.video-side-btn--primary {
    border-color: transparent;
    background: linear-gradient(180deg, var(--c-action, #2563eb) 0%, var(--c-action-hover, #1d4ed8) 100%);
    color: #fff;
}
.video-side-btn--primary:hover {
    color: #fff;
    filter: brightness(1.05);
}
/* ============================================================
   列表页
   ============================================================ */
.video-list-hero {
    margin: 0 0 24px;
}
.video-list-heading {
    font-size: clamp(1.375rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--c-text, #1e293b);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}
.video-list-sub {
    font-size: 0.9375rem;
    color: var(--c-text-3, #64748b);
    margin: 0;
}
.video-list-count {
    margin-left: 10px;
    font-size: 0.8125rem;
    color: var(--c-text-3, #94a3b8);
}
.video-empty {
    padding: 60px 0;
    text-align: center;
    color: var(--c-text-3, #94a3b8);
    font-size: 0.9375rem;
}
.video-row-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.video-row {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 20px;
    padding: 16px;
    border: 1px solid var(--c-line, #e2e8f0);
    border-radius: 12px;
    background: var(--c-bg-card, #fff);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.video-row:hover {
    transform: translateY(-2px);
    border-color: var(--c-accent, #2563eb);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}
.video-row-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: #0f172a;
}
.video-row-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.video-row:hover .video-row-cover img {
    transform: scale(1.04);
}
.video-row-cover-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.2);
}
.video-row-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.12);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.video-row:hover .video-row-play {
    opacity: 1;
}
.video-row-play i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.125rem;
    backdrop-filter: blur(4px);
}
.video-row-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 2px 2px 2px 0;
}
.video-row-title {
    margin: 0 0 8px;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--c-text, #1e293b);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-row:hover .video-row-title {
    color: var(--c-accent, #2563eb);
}
.video-row-desc {
    margin: 0 0 12px;
    font-size: 0.85rem;
    line-height: 1.75;
    color: var(--c-text-2, #475569);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-row-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: auto;
    padding-top: 4px;
    font-size: 0.75rem;
    color: var(--c-text-3, #94a3b8);
}
.video-row-meta i {
    margin-right: 4px;
    opacity: 0.7;
}
/* 分页 */
.video-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.video-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    font-size: 0.8125rem;
    color: var(--c-text-2, #475569);
    border: 1px solid var(--c-line, #e2e8f0);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.video-page-btn:hover {
    border-color: var(--c-accent, #2563eb);
    color: var(--c-accent, #2563eb);
}
.video-page-btn.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}
.video-page-nums {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}
.video-page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    font-size: 0.8125rem;
    color: var(--c-text-2, #475569);
    border: 1px solid var(--c-line, #e2e8f0);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.video-page-num:hover {
    border-color: var(--c-accent, #2563eb);
    color: var(--c-accent, #2563eb);
}
.video-page-num.is-current {
    background: var(--c-accent, #2563eb);
    border-color: var(--c-accent, #2563eb);
    color: #fff;
    font-weight: 600;
}
.video-page-ellipsis {
    padding: 0 4px;
    color: var(--c-text-3, #94a3b8);
}
/* ============================================================
   详情页
   ============================================================ */
.video-detail-player-wrap {
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}
/* 播放器盒子贴合录屏里的网站窗口区域（1920x1080 录屏，上下各约 134px 是桌面壁纸带，
 * 窗口区域为 y 133-946、左右铺满，按 1920/813 居中裁掉壁纸带） */
.video-detail-player {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: auto 1920 / 813;
    object-fit: cover;
    object-position: center;
    background: #000;
}
/* 全屏时恢复完整画面，避免把录屏内容裁掉 */
.video-detail-player:fullscreen,
.video-detail-player:-webkit-full-screen {
    aspect-ratio: auto;
    object-fit: contain;
}
.video-detail-player--missing {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
}
.video-detail-player--missing i {
    margin-right: 6px;
}
/* 详情信息区 */
.video-detail-body {
    padding: 18px 0 4px;
}
.video-detail-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--c-text, #1e293b);
    margin: 0 0 10px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.video-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    font-size: 0.8125rem;
    color: var(--c-text-3, #94a3b8);
    margin-bottom: 14px;
}
.video-detail-meta i {
    margin-right: 4px;
    opacity: 0.7;
}
.video-detail-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--c-primary-soft, #eff6ff);
    color: var(--c-accent, #2563eb);
    font-size: 0.72rem;
}
.video-detail-badge i {
    margin-right: 4px;
    opacity: 1;
}
.video-detail-desc-box {
    margin-top: 4px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--c-bg-soft, #f8fafc);
}
.video-detail-desc {
    font-size: 0.9rem;
    color: var(--c-text-2, #475569);
    line-height: 1.85;
    margin: 0;
}
.video-detail-desc-wrap {
    overflow: hidden;
    line-height: 1.85;
    transition: max-height 0.3s ease;
}
.video-detail-desc-toggle {
    display: inline-block;
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.84rem;
    color: var(--c-accent, #2563eb);
    cursor: pointer;
}
.video-detail-desc-toggle:hover {
    text-decoration: underline;
}
.video-detail-desc a {
    color: var(--c-accent, #2563eb);
    text-decoration: none;
    word-break: break-all;
}
.video-detail-desc a:hover {
    text-decoration: underline;
}
.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0 14px;
    margin-top: 14px;
    font-size: 0.78rem;
    max-height: 1.6em;
    overflow: hidden;
}
.video-tag {
    flex: 0 0 auto;
    color: var(--c-text-3, #94a3b8);
    font-size: 0.78rem;
    line-height: 1.6;
    white-space: nowrap;
}
/* ============================================================
   评论
   ============================================================ */
.video-comments {
    margin-top: 32px;
    padding-top: 24px;
}
.video-comments-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.video-comments-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--c-text, #1e293b);
}
.video-comments-count {
    margin-left: 4px;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--c-text-3, #94a3b8);
}
.video-comment-compose {
    position: relative;
    margin-bottom: 20px;
}
.video-comment-form {
    padding: 12px 14px;
    border: 1px solid var(--c-line, #e2e8f0);
    border-radius: 10px;
    background: var(--c-bg-card, #fff);
    transition: border-color 0.15s ease;
}
.video-comment-form:focus-within {
    border-color: var(--c-line-strong, #cbd5e1);
}
.video-comment-compose.is-guest .video-comment-form {
    pointer-events: none;
    user-select: none;
}
.video-comment-textarea {
    display: block;
    width: 100%;
    min-height: 76px;
    padding: 2px;
    border: none;
    background: transparent;
    color: var(--c-text, #1e293b);
    font-size: 0.875rem;
    line-height: 1.7;
    font-family: inherit;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}
.video-comment-textarea:disabled {
    color: var(--c-text-3, #94a3b8);
}
.video-comment-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--c-line, #e2e8f0);
}
.video-comment-hint {
    font-size: 0.75rem;
    color: var(--c-text-3, #94a3b8);
}
.video-comment-submit {
    padding: 8px 18px;
    border: 1px solid var(--c-action-hover, #1d4ed8);
    border-radius: 8px;
    background: linear-gradient(180deg, var(--c-action, #2563eb) 0%, var(--c-action-hover, #1d4ed8) 100%);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease, opacity 0.15s ease;
}
.video-comment-submit:hover:not(:disabled) {
    filter: brightness(1.05);
}
.video-comment-submit:disabled,
.video-comment-submit.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.video-comments .show-comment-list {
    margin-top: 4px;
}
.video-comments .show-comment-item {
    padding: 16px 0;
}
.video-comments .show-comment-text {
    font-size: 0.85rem;
    line-height: 1.75;
}
.video-comments .show-comment-empty {
    padding: 28px 0 12px;
}
/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1080px) {
    .video-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 24px;
    }
    .video-row {
        grid-template-columns: 260px minmax(0, 1fr);
    }
}
@media (max-width: 991px) {
    .video-layout {
        grid-template-columns: 1fr;
    }
    .video-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 768px) {
    .video-row {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 14px;
        padding: 12px;
    }
    .video-row-title {
        font-size: 1rem;
    }
    .video-row-desc {
        -webkit-line-clamp: 2;
    }
}
@media (max-width: 640px) {
    .video-sidebar {
        grid-template-columns: 1fr;
    }
    .video-row {
        grid-template-columns: 1fr;
    }
    .video-row-cover {
        width: 100%;
    }
    .video-row-body {
        padding: 0 2px 2px;
    }
    .video-row-meta {
        margin-top: 4px;
    }
    .video-detail-body {
        padding-top: 16px;
    }
    .video-detail-desc-box {
        padding: 12px 14px;
    }
    .video-comment-form-actions {
        align-items: flex-start;
        flex-direction: column;
    }
    .video-comment-submit {
        width: 100%;
    }
}
/* 面包屑：最后一项（当前视频标题）不加粗，字号略放大保持可读 */
.breadcrumb-nav > span:not(.breadcrumb-sep),
html:not(.io-dark-mode) .breadcrumb-nav span:not(.breadcrumb-sep) {
    font-weight: 400;
}
.breadcrumb-nav {
    font-size: 0.875rem;
}
/* ============================================================
   深色模式
   ============================================================ */
html.io-dark-mode .video-list-main,
html.io-dark-mode .video-detail-main {
    background: var(--c-bg, #0b1220);
}
html.io-dark-mode .video-row,
html.io-dark-mode .video-side-card,
html.io-dark-mode .video-comment-form {
    background: var(--c-bg-card, #1a2e47);
    border-color: var(--c-line, rgba(185, 203, 226, 0.16));
}
html.io-dark-mode .video-row:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
html.io-dark-mode .video-row-cover,
html.io-dark-mode .video-side-hot-cover {
    background: #0b1220;
}
html.io-dark-mode .video-detail-player-wrap {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
html.io-dark-mode .video-detail-desc-box,
html.io-dark-mode .video-tag,
html.io-dark-mode .video-side-btn {
    background: rgba(0, 0, 0, 0.2);
    border-color: var(--c-line, rgba(185, 203, 226, 0.16));
}
html.io-dark-mode .video-detail-badge {
    background: rgba(37, 99, 235, 0.16);
    color: #93c5fd;
}
html.io-dark-mode .video-tag {
    color: var(--c-text-2, #cbd5e1);
}
html.io-dark-mode .video-comment-textarea {
    color: var(--c-text, #e2e8f0);
}
