:root {
    --video-ink: var(--color-ink);
    --video-muted: var(--color-muted);
    --video-line: var(--color-line);
    --video-paper: var(--color-surface);
    --video-accent: var(--color-primary);
    --video-accent-soft: var(--color-primary-soft);
    --video-stage: #1c2422;
}

.video-page {
    min-height: calc(100vh - var(--site-header-h, 64px));
    background: var(--color-page);
    color: var(--video-ink);
    padding-bottom: 64px;
    font-family: var(--font-sans);
}

.video-hero {
    padding: 16px 0 4px;
    text-align: left;
}

.video-hero-compact {
    padding: 16px 0 8px;
    text-align: left;
}

.video-brand {
    margin: 0 0 6px;
    font-size: var(--fs-tiny);
    color: var(--video-accent);
    font-weight: 600;
}

.video-brand a {
    color: inherit;
}

.video-hero-title {
    margin: 0 0 6px;
    font-size: var(--fs-h1, clamp(1.6rem, 3vw, 2rem));
    font-weight: 700;
}

.video-hero-desc {
    margin: 0 0 18px;
    color: var(--video-muted);
    font-size: var(--fs-aux);
    line-height: var(--lh-aux, 1.6);
}

.video-hero-actions,
.video-detail-actions,
.video-play-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.video-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--video-accent);
    text-decoration: none;
    font-size: var(--fs-aux);
    font-weight: 600;
    cursor: pointer;
    background: var(--video-accent);
    color: #fff;
}

.video-btn-primary {
    background: var(--video-accent);
    color: #fff;
}

.video-btn-ghost {
    background: transparent;
    color: var(--video-accent);
}

.video-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.video-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    margin: 20px 0 24px;
}

.video-search {
    display: inline-flex;
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--video-line);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.video-search input {
    flex: 1;
    border: 0;
    padding: 7px 12px;
    outline: none;
    background: transparent;
}

.video-search button {
    border: 0;
    border-left: 1px solid var(--video-line);
    background: var(--color-surface, #fff);
    color: var(--color-text, var(--video-ink));
    padding: 0 14px;
    font-weight: 600;
    cursor: pointer;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--list-gap, 16px);
}

.video-card {
    display: block;
    background: var(--video-paper);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--video-line);
    color: inherit;
    text-decoration: none !important;
    box-shadow: var(--shadow-card);
    transition: transform var(--duration, 0.2s) var(--ease, ease),
                box-shadow var(--duration, 0.2s) var(--ease, ease),
                border-color var(--duration, 0.2s) var(--ease, ease);
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(195, 122, 103, 0.28);
    color: inherit;
    text-decoration: none !important;
}

.video-card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--video-accent-soft) center/cover no-repeat;
}

.video-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 26px;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.28));
    opacity: 0.75;
    transition: opacity .2s;
}

.video-card:hover .video-card-play {
    opacity: 1;
}

.video-card-badge {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: rgba(28, 36, 34, 0.78);
    color: #fff;
    font-size: 12px;
    z-index: 1;
}

.video-card-body {
    padding: 12px 14px 14px;
}

.video-card-body h2 {
    margin: 0 0 6px;
    font-size: var(--fs-title, 1.05rem);
    line-height: var(--lh-title, 1.35);
    font-weight: 650;
    color: var(--video-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-card-meta {
    margin: 0;
    font-size: var(--fs-tiny, 12px);
    color: var(--video-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.video-card-author {
    display: inline-block;
    margin-top: 6px;
    font-size: var(--fs-tiny, 12px);
    color: var(--video-accent);
}

.video-empty,
.video-pager {
    text-align: center;
    margin-top: 28px;
    color: var(--video-muted);
}

.video-empty {
    padding: 56px 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed var(--video-line);
    border-radius: var(--radius-lg);
}

.video-empty a {
    color: var(--video-accent);
}

.video-detail-head {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
}

.video-detail-head::before,
.video-detail-head::after {
    content: none !important;
    display: none !important;
}

.video-detail-cover {
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    background: var(--video-accent-soft) center/cover no-repeat;
    border: 1px solid var(--video-line);
}

.video-meta-line {
    color: var(--video-muted);
    font-size: 14px;
}

.video-meta-line a {
    color: var(--video-accent);
}

.video-engage {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 28px;
}

.video-engage-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--video-line);
    background: #fff;
    color: var(--video-ink);
    cursor: pointer;
}

.video-engage-btn.is-on {
    border-color: var(--video-accent);
    color: var(--video-accent);
    background: var(--video-accent-soft);
}

.video-ep-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.video-ep-item {
    display: grid;
    grid-template-columns: 88px 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--video-line);
    border-radius: var(--radius-md);
    color: inherit;
    text-decoration: none;
}

.video-ep-item:hover {
    border-color: var(--video-accent);
    color: inherit;
    text-decoration: none;
}

.video-ep-no {
    font-size: 13px;
    color: var(--video-accent);
    font-weight: 600;
}

.video-ep-item em {
    font-style: normal;
    color: var(--video-muted);
    font-size: 13px;
}

.video-ep-item i {
    color: var(--video-accent);
    font-size: 18px;
}

.video-play-page {
    background: var(--color-page, #f4f7f8);
    min-height: calc(100vh - var(--site-header-h, 64px));
    padding: 20px 0 56px;
}

.video-play-shell {
    margin-left: auto;
    margin-right: auto;
}

.video-play-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}

.video-play-layout::before,
.video-play-layout::after {
    content: none !important;
    display: none !important;
}

.video-play-main {
    min-width: 0;
}

.video-stage {
    position: relative;
    width: 100%;
    background: #0a1416;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    box-shadow: 0 16px 40px rgba(15, 28, 31, 0.22);
}

.video-el {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: contain;
}

/* 隐藏 Chrome/Edge 原生控件「更多」三点菜单 */
.video-el::-webkit-media-controls-overflow-button,
.video-el::-internal-media-controls-overflow-button {
    display: none !important;
}

.video-danmaku-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
}

.video-dm {
    position: absolute;
    white-space: nowrap;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
    will-change: transform, left;
    line-height: 1.2;
}

.video-dm.is-scroll {
    animation: video-dm-scroll linear forwards;
}

@keyframes video-dm-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-100% - 100vw)); }
}

.video-danmaku-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--video-line);
}

.video-danmaku-bar input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1px solid var(--video-line);
    border-radius: 6px;
    padding: 0 12px;
    background: #fff;
}

.video-danmaku-bar select {
    flex: 0 0 auto;
    height: 36px;
    border: 1px solid var(--video-line);
    border-radius: 6px;
    padding: 0 8px;
    background: #fff;
}

.video-danmaku-bar input[type="color"] {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 2px;
    border: 1px solid var(--video-line);
    border-radius: 6px;
    background: #fff;
}

.video-dm-send {
    flex: 0 0 auto;
    height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: 6px;
    background: var(--video-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
}

.video-dm-send:hover {
    background: var(--color-primary-hover, var(--video-accent));
}

.video-dm-send:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.video-play-meta {
    margin-top: 18px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--video-line);
    border-radius: 10px;
    color: var(--video-ink);
}

.video-play-meta .video-brand {
    margin-bottom: 6px;
}

.video-play-meta h1 {
    margin: 0 0 8px;
    font-size: 1.35rem;
    line-height: 1.35;
}

.video-play-desc {
    margin: 0 0 10px;
    color: var(--video-muted);
    line-height: 1.6;
}

.video-play-meta .video-meta-line {
    margin: 0 0 14px;
}

.video-play-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.video-play-toolbar .video-engage {
    margin: 0;
}

.video-play-side {
    position: sticky;
    top: calc(var(--site-header-h, 64px) + 12px);
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--video-line);
    padding: 14px;
    max-height: calc(100vh - var(--site-header-h, 64px) - 40px);
    overflow: auto;
}

.video-play-side h2 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.video-ep-side {
    list-style: none;
    margin: 0;
    padding: 0;
}

.video-ep-side-item {
    display: block;
    padding: 10px;
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
    margin-bottom: 4px;
}

.video-ep-side-item span {
    display: block;
    font-size: 12px;
    color: var(--video-muted);
}

.video-ep-side-item strong {
    font-size: 14px;
}

.video-ep-side-item.is-active,
.video-ep-side-item:hover {
    background: var(--video-accent-soft);
    color: inherit;
    text-decoration: none;
}

.video-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.video-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--video-line);
}

@media (max-width: 992px) {
    .video-play-layout {
        grid-template-columns: 1fr;
    }

    .video-play-side {
        position: static;
        max-height: none;
    }
}

@media (max-width: 900px) {
    .video-detail-head {
        grid-template-columns: 1fr;
    }

    .video-ep-item {
        grid-template-columns: 1fr auto;
    }

    .video-ep-item .video-ep-no,
    .video-ep-item i {
        display: none;
    }
}

@media (max-width: 640px) {
    .video-danmaku-bar {
        flex-wrap: wrap;
    }

    .video-danmaku-bar input[type="text"] {
        flex: 1 1 100%;
        order: 3;
    }

    .video-dm-send {
        margin-left: auto;
    }

    .video-play-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}
