/* =============================================================
   videos.css - 视频播放板块美化样式
   基础布局(navbar/网格/分页)复用 nines.css / detail.css，
   此处集中处理视频封面、播放按钮动画、骨架屏、播放器与详情页。
   ============================================================= */

:root {
    --video-glow: rgba(83, 162, 22, 0.28);
    --video-teal: rgb(0, 117, 125);
}

/* =============================================================
   一、列表页 - 区块标题
   ============================================================= */
.video-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}
.video-section-head .section-title i {
    margin-right: 10px;
}
.section-sub {
    color: var(--video-teal);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 8px 0 0 2px;
    letter-spacing: 0.5px;
}
.section-sub::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 10px;
}

/* =============================================================
   二、列表页 - 视频卡片
   ============================================================= */
.project-card.video-card {
    cursor: pointer;
    border-radius: 22px;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.project-card.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 40px -14px rgba(0, 117, 125, 0.28);
    border-color: rgba(83, 162, 22, 0.4);
}

/* 封面容器 */
.video-thumb {
    position: relative;
    overflow: hidden;
    background: #0c1f1a;
    aspect-ratio: 16 / 10;
}
.video-card .card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.92;
    transition: transform 0.5s ease, opacity 0.5s ease;
}
.video-card:hover .card-img {
    transform: scale(1.06);
    opacity: 1;
}

/* 底部渐变遮罩，让角标更清晰 */
.video-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(3, 24, 18, 0.65) 100%);
    z-index: 1;
    pointer-events: none;
}

/* 时长角标 */
.duration-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.66);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* 卡片信息区 */
.video-card .card-info {
    padding: 10px 12px 12px;
}
.video-author {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-teal);
    font-size: 0.72rem;
    font-weight: 500;
    margin-bottom: 4px;
}
.video-author i {
    color: var(--primary-green);
    font-size: 0.75rem;
}
.video-card .card-info h4 {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.4;
    color: #1e3a2f;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 1.4em;
}
.video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.72rem;
    color: #7d9a88;
    padding-top: 6px;
    border-top: 1px dashed #e4efe2;
}
.video-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.video-meta i {
    color: var(--primary-green);
}

/* =============================================================
   三、加载骨架屏 / 空态 / 错误
   ============================================================= */
@keyframes shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
.skeleton-card {
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid #eef3ea;
    background: #fff;
}
.sk-thumb,
.sk-line,
.sk-line-short {
    background: linear-gradient(90deg, #eef2ee 25%, #f7faf7 37%, #eef2ee 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
}
.sk-thumb {
    aspect-ratio: 16 / 10;
    display: block;
}
.sk-body {
    padding: 16px;
}
.sk-line {
    height: 14px;
    border-radius: 8px;
    margin-bottom: 10px;
}
.sk-line-short {
    height: 12px;
    border-radius: 8px;
    width: 55%;
}

.empty-state,
.loading-spinner,
.error-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 56px 20px;
    color: #8ba39a;
    font-size: 0.95rem;
}
.icon-bubble {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--gradient-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-bubble i {
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.error-state .icon-bubble i {
    background: linear-gradient(120deg, #e07a5f, #d1495b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* =============================================================
   四、详情页 - 播放器与排版
   ============================================================= */
.video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050b09;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 26px;
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(83, 162, 22, 0.15);
}
.video-player video {
    width: 100%;
    height: 100%;
    display: block;
}
.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 26px;
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(83, 162, 22, 0.15);
}
.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* 详情页 meta 胶囊 */
.detail-meta .meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gradient-bg);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    color: #3d674f;
}
.detail-meta .meta-chip i {
    color: var(--primary-green);
    margin-right: 2px;
}

/* 视频简介块 */
.video-summary {
    margin: 8px 0 24px;
    background: linear-gradient(135deg, rgba(83,162,22,0.06), rgba(0,117,125,0.06));
    border: 1px solid #e4f0dd;
    border-left: 5px solid var(--primary-green);
    border-radius: 20px;
    padding: 20px 24px;
}
.video-summary .summary-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--primary-teal);
    font-size: 0.95rem;
    margin-bottom: 10px;
}
.video-summary .summary-title i {
    color: var(--primary-green);
}
.video-summary p {
    color: #2d4e3c;
    line-height: 1.7;
    font-size: 0.98rem;
}

/* 详情介绍分区 */
.video-detail-section {
    margin-top: 8px;
    padding-top: 26px;
    border-top: 1px dashed #dcebdc;
}
.detail-section-title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-teal);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-green);
}
.detail-section-title i {
    color: var(--primary-green);
}
.video-rich-content {
    color: #26362f;
}
.video-rich-content h3 {
    border-left-color: var(--primary-teal);
}

/* 分页省略号 */
.page-ellipsis {
    color: #a9c0b2;
    padding: 0 4px;
    user-select: none;
}