/**
 * 视频列表 / 播放页样式。
 * 列表：桌面 4 列，移动端 2 列（只保留标题）。
 */

/* ============================== 列表 ============================== */

.novel-frame-video-list {
    padding: 16px 18px;
}

.novel-frame-video-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.novel-frame-video-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.novel-frame-video-card-item {
    display: flex;
    min-width: 0;
}

.novel-frame-video-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    background: var(--main-bg-color, #fff);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(17, 24, 39, .06), 0 2px 10px rgba(17, 24, 39, .05);
    transition: transform .28s ease, box-shadow .28s ease;
}

.novel-frame-video-card:hover,
.novel-frame-video-card:focus {
    color: inherit;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(208, 92, 4, .16);
}

.novel-frame-video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
}

.novel-frame-video-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.novel-frame-video-card:hover .novel-frame-video-thumb img {
    transform: scale(1.05);
}

.novel-frame-video-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: rgba(255, 255, 255, .55);
    font-size: 30px;
    background: linear-gradient(135deg, #1f2937, #111827);
}

.novel-frame-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    pointer-events: none;
}

.novel-frame-video-play i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 15px;
    background: rgba(0, 0, 0, .42);
    border: 1px solid rgba(255, 255, 255, .38);
    transition: background .2s ease;
}

.novel-frame-video-card:hover .novel-frame-video-play i {
    background: rgba(208, 92, 4, .82);
}

.novel-frame-video-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    line-height: 1.6;
    color: #fff;
    backdrop-filter: blur(4px);
}

.novel-frame-video-badge--vip {
    background: rgba(180, 120, 20, .86);
}

.novel-frame-video-badge--paid {
    background: rgba(214, 69, 69, .86);
}

.novel-frame-video-count {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    line-height: 1.6;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(4px);
}

.novel-frame-video-info {
    padding: 10px 12px 12px;
}

.novel-frame-video-name {
    margin: 0;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--main-text-color, #1f2937);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.novel-frame-video-desc {
    margin: 6px 0 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--muted-2-color, rgba(17, 24, 39, .55));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================== 播放页 ============================== */

.novel-frame-video-single {
    padding-top: 16px;
}

.novel-frame-video-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr);
    overflow: hidden;
    margin-bottom: 16px;
    padding: 0;
}

.novel-frame-video-stage {
    min-width: 0;
    background: #0b0f17;
}

.novel-frame-video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.novel-frame-video-el {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
}

.novel-frame-video-message {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: 80%;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: #fff;
    background: rgba(0, 0, 0, .72);
    text-align: center;
}

.novel-frame-video-locked {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
}

.novel-frame-video-locked img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px) brightness(.72);
    transform: scale(1.04);
}

.novel-frame-video-locked-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .15), rgba(0, 0, 0, .55));
}

.novel-frame-video-locked-icon,
.novel-frame-video-locked-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
}

.novel-frame-video-locked-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    font-size: 20px;
    background: rgba(0, 0, 0, .45);
    border: 1px solid rgba(255, 255, 255, .4);
}

.novel-frame-video-locked-text {
    font-size: 14px;
    letter-spacing: .5px;
}

.novel-frame-video-aside {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 18px 20px;
}

.novel-frame-video-title {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.45;
    font-weight: 600;
    color: var(--main-text-color, #1f2937);
    word-break: break-word;
}

.novel-frame-video-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12.5px;
    color: var(--muted-2-color, rgba(17, 24, 39, .55));
}

.novel-frame-video-meta-tag {
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 11.5px;
    line-height: 1.7;
}

.novel-frame-video-meta-tag.is-free {
    color: #0a7d4f;
    background: rgba(10, 125, 79, .1);
}

.novel-frame-video-meta-tag.is-vip {
    color: #a86a05;
    background: rgba(196, 129, 12, .12);
}

.novel-frame-video-meta-tag.is-paid {
    color: #c23b3b;
    background: rgba(194, 59, 59, .1);
}

.novel-frame-video-now {
    margin: 14px 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #d05c04;
}

.novel-frame-video-lines {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 10px;
}

.novel-frame-video-line {
    padding: 6px 12px;
    border: 1px solid rgba(17, 24, 39, .12);
    border-radius: 999px;
    background: transparent;
    font-size: 12.5px;
    line-height: 1.4;
    color: inherit;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.novel-frame-video-line:hover {
    border-color: rgba(208, 92, 4, .45);
    color: #d05c04;
}

.novel-frame-video-line.is-active {
    border-color: #d05c04;
    background: rgba(208, 92, 4, .08);
    color: #d05c04;
    font-weight: 600;
}

.novel-frame-video-episodes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
}

.novel-frame-video-episode {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid rgba(17, 24, 39, .1);
    border-radius: 8px;
    background: rgba(17, 24, 39, .025);
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    color: inherit;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.novel-frame-video-episode:hover {
    border-color: rgba(208, 92, 4, .45);
    color: #d05c04;
}

.novel-frame-video-episode.is-active {
    border-color: #d05c04;
    background: rgba(208, 92, 4, .08);
    color: #d05c04;
    font-weight: 600;
}

.novel-frame-video-paywall {
    margin-top: 18px;
    padding: 22px 16px;
    border-radius: 10px;
    background: rgba(17, 24, 39, .025);
    text-align: center;
}

.novel-frame-video-empty {
    margin-top: 18px;
    padding: 22px 16px;
    border-radius: 10px;
    background: rgba(17, 24, 39, .025);
    font-size: 13.5px;
    color: var(--muted-2-color, rgba(17, 24, 39, .55));
    text-align: center;
}

.novel-frame-video-paywall-icon i {
    font-size: 22px;
    color: var(--muted-2-color, rgba(17, 24, 39, .5));
}

.novel-frame-video-paywall-msg {
    margin: 10px 0 14px;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--main-text-color, #374151);
}

.novel-frame-video-paywall-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.novel-frame-video-content {
    margin-bottom: 16px;
    padding: 18px;
    line-height: 1.9;
}

/* ============================== 响应式 ============================== */

@media (max-width: 1199px) {
    .novel-frame-video-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .novel-frame-video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .novel-frame-video-hero {
        grid-template-columns: 1fr;
    }

    .novel-frame-video-episodes {
        max-height: none;
    }
}

@media (max-width: 560px) {
    .novel-frame-video-list {
        padding: 10px;
    }

    .novel-frame-video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .novel-frame-video-info {
        padding: 8px 9px 10px;
    }

    .novel-frame-video-name {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    /* 移动端只保留标题 */
    .novel-frame-video-desc,
    .novel-frame-video-count,
    .novel-frame-video-badge {
        display: none;
    }

    .novel-frame-video-aside {
        padding: 14px 15px;
    }

    .novel-frame-video-title {
        font-size: 17px;
    }
}

/* ============================== 暗色主题 ============================== */

body.dark-theme .novel-frame-video-card {
    background: var(--main-bg-color, #23282d);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

body.dark-theme .novel-frame-video-name {
    color: var(--main-text-color, #e5e7eb);
}

body.dark-theme .novel-frame-video-desc,
body.dark-theme .novel-frame-video-meta {
    color: var(--muted-2-color, rgba(229, 231, 235, .55));
}

body.dark-theme .novel-frame-video-episode {
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .04);
}

body.dark-theme .novel-frame-video-line {
    border-color: rgba(255, 255, 255, .14);
}

body.dark-theme .novel-frame-video-line.is-active {
    border-color: #ff984a;
    background: rgba(255, 152, 74, .12);
    color: #ff984a;
}

body.dark-theme .novel-frame-video-episode.is-active {
    border-color: #ff984a;
    background: rgba(255, 152, 74, .12);
    color: #ff984a;
}

body.dark-theme .novel-frame-video-paywall {
    background: rgba(255, 255, 255, .04);
}

body.dark-theme .novel-frame-video-paywall-msg {
    color: var(--main-text-color, #e5e7eb);
}

/* 详情页：阅读量 + 收藏 / 点赞 操作行（按钮外观复用父主题全局 .action，这里只负责布局与阅读量文字） */
.novel-frame-video-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.novel-frame-video-actions .novel-frame-video-views {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--muted-2-color, rgba(17, 24, 39, .55));
}
.novel-frame-video-actions .action {
    font-size: 13px;
}
body.dark-theme .novel-frame-video-actions .novel-frame-video-views {
    color: var(--muted-2-color, rgba(229, 231, 235, .55));
}

/* 卡片：阅读量 */
.novel-frame-video-card-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted-2-color, rgba(17, 24, 39, .55));
}
body.dark-theme .novel-frame-video-card-views {
    color: var(--muted-2-color, rgba(229, 231, 235, .55));
}
