/* =========================================================
   NewCloud Cinema Layer — 桌面全宽 + 电影海报高级感
   叠在 style.css 之上；手机仍可用底栏，桌面铺满
   ========================================================= */

:root {
    --bg-base: #06070b;
    --bg-surface: #0b0d14;
    --bg-elevated: #12151f;
    --bg-card: #161a26;
    --bg-easy: #1c2233;
    --primary: #e11d48;
    --primary-dark: #be123c;
    --accent: #f59e0b;
    --gold: #fbbf24;
    --text-main: #f4f4f5;
    --text-secondary: #d4d4d8;
    --text-muted: #71717a;
    --border-subtle: rgba(255, 255, 255, 0.07);
    --cinema-glow: 0 20px 60px rgba(0, 0, 0, 0.55);
    --content-max: 1280px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

html {
    font-family: "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    width: 100%;
    height: auto;
    overflow-x: clip;
    overflow-y: auto;
}

body {
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(225, 29, 72, 0.12), transparent 55%),
        radial-gradient(900px 500px at 90% 0%, rgba(245, 158, 11, 0.08), transparent 50%),
        var(--bg-base);
    color: var(--text-main);
    width: 100%;
    height: auto;
    min-height: 100vh;
    overflow-x: clip;
    overflow-y: auto;
    position: relative;
}

/* 全站隐藏滚动条（电脑+手机），保留滚动 */
html,
body,
* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
    background: transparent;
}

/* 取消手机壳：桌面全铺（勿锁 touch-action，否则触控板/部分桌面滑不动） */
#app {
    max-width: none !important;
    width: 100%;
    margin: 0;
    min-height: 100vh;
    height: auto;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.md-topbar-left {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
}

.md-hist-btn {
    display: none;
    width: 28px;
    height: 40px;
    margin: 0;
    padding: 0 2px 0 0;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none;
    color: #fff;
    cursor: pointer;
    flex: 0 0 auto;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}
.md-hist-btn:hover,
.md-hist-btn:focus,
.md-hist-btn:active {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    color: rgba(255,255,255,0.78);
}
.md-back-chevron {
    display: block;
    width: 12px;
    height: 24px;
    flex: 0 0 auto;
}

/* ===== 顶栏：列表等随页滚动；详情/播放钉顶 ===== */
.md-chrome {
    position: relative;
    top: auto;
    z-index: 300;
    background: rgba(6, 7, 11, 0.92);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
body.page-detail .md-chrome,
body.page-play .md-chrome {
    position: sticky;
    top: 0;
    background: rgba(6, 7, 11, 0.88);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.md-topbar {
    height: 64px;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.md-logo {
    font-size: 20px;
    letter-spacing: 0.5px;
    font-weight: 800;
}
.md-logo i {
    color: var(--primary);
    filter: drop-shadow(0 0 10px rgba(225, 29, 72, 0.55));
}

.md-desktop-nav {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: 28px;
    flex: 1;
}
.md-desktop-nav a {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    transition: 0.2s;
}
.md-desktop-nav a:hover { color: #fff; background: rgba(255,255,255,0.05); }
.md-desktop-nav a.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(225,29,72,0.9), rgba(190,18,60,0.85));
    box-shadow: 0 8px 24px rgba(225, 29, 72, 0.25);
}

.md-search-pill {
    display: none;
    align-items: center;
    gap: 8px;
    min-width: 220px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    font-size: 13px;
}
.md-search-pill input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 13px;
    min-width: 0;
}
.md-search-pill input::placeholder { color: var(--text-muted); }

.md-tabs {
    display: none; /* 桌面用顶部导航；手机再显示 */
    max-width: var(--content-max);
    margin: 0 auto;
    border-bottom: 0;
}
.md-tabs-inner { padding: 0 16px; }

.container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 20px 24px 48px;
}

/* ===== 首页电影海报 Hero 轮播 ===== */
.hero-banner {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0 0 28px;
    border-radius: 0;
    overflow: hidden;
    isolation: isolate;
}
.hero-banner-inner {
    position: relative;
    max-width: var(--content-max);
    margin: 0 auto;
    min-height: clamp(280px, 42vw, 480px);
    display: flex;
    align-items: stretch;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}
.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    filter: blur(18px) saturate(1.25) brightness(0.45);
    transform: scale(1.12);
}
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6,7,11,0.95) 0%, rgba(6,7,11,0.55) 42%, rgba(6,7,11,0.25) 70%, rgba(6,7,11,0.7) 100%),
        linear-gradient(0deg, rgba(6,7,11,0.95) 0%, transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 28px;
    align-items: center;
    padding: 36px 24px;
    width: 100%;
}

.hero-poster {
    width: 180px;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--cinema-glow), 0 0 0 1px rgba(255,255,255,0.08);
    position: relative;
}
.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.08) saturate(1.12);
}
.hero-poster::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.45));
    pointer-events: none;
}

.hero-meta { min-width: 0; max-width: 560px; }
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 10px;
}
.hero-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 12px;
    text-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.hero-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.hero-chip {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
}
.hero-chip.score {
    color: var(--gold);
    border-color: rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.1);
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
}
.hero-btn.primary {
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #fff;
    box-shadow: 0 12px 30px rgba(225, 29, 72, 0.35);
}
.hero-btn.ghost {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    color: #fff;
}

.hero-dots {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    padding: 0;
}
.hero-dot.active {
    width: 22px;
    border-radius: 999px;
    background: var(--primary);
}

.hero-banner-shell {
    margin: 0 0 28px;
    width: 100%;
    background: #05060a;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* ===== 分区标题更电影感 ===== */
.section-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.3px;
}
.section-title::before {
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    box-shadow: 0 0 12px rgba(225,29,72,0.5);
}
.view-more:hover { color: var(--primary); }

/* ===== 海报网格：桌面多列 + 滤镜 ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px 14px;
}

.video-item {
    transition: transform 0.25s var(--transition-smooth);
}
.video-item:hover { transform: translateY(-4px); }

.video-item .aspect-ratio {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    overflow: hidden;
}
.video-item .easy-image img {
    filter: contrast(1.06) saturate(1.1) brightness(0.96);
    transition: transform 0.45s ease, filter 0.35s ease;
}
.video-item:hover .easy-image img {
    transform: scale(1.06);
    filter: contrast(1.12) saturate(1.18) brightness(1);
}
.video-item .overlay {
    background:
        linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.75) 100%),
        radial-gradient(120% 80% at 50% 120%, rgba(225,29,72,0.18), transparent 55%);
}
.video-item .flag {
    background: linear-gradient(135deg, #e11d48, #be123c);
    font-weight: 600;
    letter-spacing: 0.2px;
}
.video-item .title {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}
.video-item .times {
    opacity: 0.9;
    font-weight: 500;
}

/* 骨架与卡片兼容 */
.skeleton-card { border-radius: 12px; }

/* ===== 底栏：仅手机 ===== */
.mobile-tabbar {
    display: none;
    left: 0;
    transform: none;
    max-width: none;
    width: 100%;
    background: rgba(8, 9, 14, 0.94);
    backdrop-filter: blur(16px);
}

.back-to-top {
    right: 24px;
    bottom: 28px;
    border-color: rgba(225, 29, 72, 0.4);
}
.back-to-top i { color: var(--primary); }

.site-footer {
    max-width: var(--content-max);
    margin: 24px auto 0;
    padding: 28px 24px 40px;
}
.footer-brand i { color: var(--primary); }

/* 播放器 / 详情强调色跟随 cinema */
.btn-play {
    background: linear-gradient(135deg, #e11d48, #be123c);
    box-shadow: 0 10px 28px rgba(225, 29, 72, 0.3);
}
.detail-tag {
    background: rgba(225, 29, 72, 0.12);
    color: #fb7185;
}
.ep-btn.active, .ep-btn:hover {
    background: var(--primary);
}
.page-btn.active { background: var(--primary); }
.filter-item.active { background: var(--primary); }

.vp-big-play i,
.vp-progress-played,
.vp-progress-thumb,
.vp-spinner {
    border-top-color: var(--primary);
}
.vp-big-play i {
    background: rgba(225, 29, 72, 0.75) !important;
    box-shadow: 0 4px 24px rgba(225, 29, 72, 0.4) !important;
}
.vp-progress-played { background: var(--primary) !important; }
.vp-progress-thumb { background: var(--primary) !important; }

/* ===== 响应式 ===== */
@media (max-width: 1200px) {
    .grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 992px) {
    .grid { grid-template-columns: repeat(4, 1fr); }
    .hero-content { grid-template-columns: 140px 1fr; }
    .hero-poster { width: 140px; }
}
@media (max-width: 768px) {
    /* 仅手机：限制整页左右拖，仍允许上下滚 */
    html, body {
        overflow-x: hidden;
        overscroll-behavior-x: none;
        touch-action: pan-y;
    }
    #app { touch-action: pan-y; }
    .md-tabs,
    .md-tabs-inner,
    .filter-scroll {
        touch-action: pan-x;
    }

    .md-topbar { height: 52px; padding: 0 10px 0 6px; }
    .md-desktop-nav, .md-search-pill { display: none !important; }
    .md-hist-btn { display: inline-flex; }
    .md-logo { font-size: 15px; }
    .md-logo span, .md-logo { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .md-tabs { display: block; height: 42px; }
    .md-tab.active { color: var(--primary); }
    .mobile-tabbar { display: block; }
    .container { padding: 12px 12px 88px; }
    .hero-banner-shell { margin: 0 0 16px; }
    .hero-content {
        grid-template-columns: 1fr;
        padding: 28px 16px 40px;
        text-align: left;
    }
    .hero-poster { display: none; }
    .hero-title { font-size: 26px; }
    .grid { grid-template-columns: repeat(3, 1fr); gap: 12px 8px; }
    .back-to-top { bottom: 76px; right: 14px; }
    .site-footer { padding-bottom: 88px; }
}
@media (max-width: 480px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 769px) {
    .md-desktop-nav { display: flex; }
    .md-search-pill { display: flex; }
    .md-icon-btn { display: none; }
    .md-tabs { display: none !important; }
    .mobile-tabbar { display: none !important; }
    .play-m-back,
    .play-m-panel,
    .play-m-meta { display: none !important; }
}

/* ===== 手机播放页：顶区钉顶直达播 ===== */
.play-m-back {
    display: none;
}
.play-ep-block { margin-bottom: 48px; }
.play-ep-block .block-title {
    display: flex;
    align-items: center;
    gap: 6px;
}
.play-ep-all {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    padding: 4px 0;
    -webkit-tap-highlight-color: transparent;
}
.play-ep-all:active { color: var(--primary); }

.play-sheet-mask {
    position: fixed;
    inset: 0;
    z-index: 400;
    background: rgba(0,0,0,0.55);
}
/* 默认手机：底部半屏 */
.play-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 410;
    max-height: min(72vh, 560px);
    width: 100%;
    background: #12161d;
    border-radius: 16px 16px 0 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.45);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.play-sheet-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    flex: 0 0 auto;
    position: relative;
}
.play-sheet-hd.centered {
    justify-content: center;
}
.play-sheet-hd h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
}
.play-sheet-hd.centered h3 {
    color: var(--text-secondary);
    font-weight: 500;
}
.play-sheet-close {
    margin: 0;
    padding: 0;
    width: auto;
    height: auto;
    min-width: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(255,255,255,0.72);
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}
.play-sheet-close:hover,
.play-sheet-close:active {
    background: transparent !important;
    color: #fff;
}
.play-sheet-bd {
    padding: 4px 0 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.play-sheet.is-ep .play-sheet-bd {
    padding: 4px 16px 20px;
}
.play-source-item {
    width: 100%;
    display: block;
    padding: 14px 20px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    border-radius: 0;
    background: transparent;
    color: #fff;
    text-align: left;
    cursor: pointer;
}
.play-source-item:last-child { border-bottom: 0; }
.play-source-item.active .play-source-name {
    color: var(--primary);
}
.play-source-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.play-source-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}
.play-source-meta {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

/* 电脑端：页面居中弹窗 */
@media (min-width: 769px) {
    .play-sheet {
        left: 50%;
        right: auto;
        top: 50%;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: min(440px, calc(100vw - 48px));
        max-height: min(70vh, 520px);
        border-radius: 14px;
        border: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 16px 48px rgba(0,0,0,0.55);
        padding-bottom: 8px;
    }
    .play-sheet-hd {
        padding: 18px 20px 12px;
    }
    .play-sheet-close {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    body.page-play .md-chrome,
    body.page-play .mobile-tabbar,
    body.page-play .site-footer,
    body.page-play .back-to-top,
    body.page-play .play-desktop-only {
        display: none !important;
    }
    body.page-play .container.play-page {
        padding: 0 0 28px;
        max-width: none;
    }
    body.page-play .play-stage {
        position: sticky;
        top: 0;
        z-index: 260;
        background: #000;
    }
    body.page-play .player-wrap {
        margin: 0;
        border-radius: 0;
        width: 100%;
        aspect-ratio: 16 / 9;
        max-height: 56vw;
        min-height: 200px;
    }
    body.page-play .play-m-back {
        display: inline-flex;
        position: absolute;
        top: max(10px, env(safe-area-inset-top, 0px));
        left: 8px;
        z-index: 40;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        border: 0;
        background: transparent;
        color: #fff;
        padding: 0;
        -webkit-appearance: none;
        appearance: none;
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
        filter: drop-shadow(0 1px 2px rgba(0,0,0,0.55));
    }
    body.page-play .play-m-back .md-back-chevron {
        width: 12px;
        height: 24px;
    }
    body.page-play .play-m-panel {
        padding: 14px 14px 6px;
    }
    body.page-play .play-m-title-row {
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }
    body.page-play .play-m-title {
        flex: 1;
        margin: 0;
        font-size: 18px;
        font-weight: 700;
        line-height: 1.35;
        color: #fff;
    }
    body.page-play .play-m-intro {
        flex: 0 0 auto;
        margin-top: 4px;
        font-size: 12px;
        color: var(--text-muted);
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
    }
    body.page-play .play-m-tip {
        margin: 8px 0 0;
        font-size: 12px;
        color: var(--text-muted);
        line-height: 1.5;
    }
    body.page-play .play-m-actions {
        display: flex;
        justify-content: space-around;
        gap: 8px;
        margin: 16px 0 8px;
        padding: 4px 0 8px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    body.page-play .play-m-act {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        border: 0;
        background: transparent;
        color: var(--text-secondary);
        font-size: 11px;
        padding: 6px 4px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    body.page-play .play-m-act i { font-size: 22px; color: #fff; }
    body.page-play .play-m-act.on i { color: var(--primary); }
    body.page-play .play-m-act:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }
    body.page-play .play-ep-block {
        padding: 8px 14px 0;
        margin-bottom: 20px;
    }
    body.page-play .play-ep-block .ep-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    body.page-play .play-m-meta {
        padding: 8px 14px 24px;
    }
    body.page-play .play-m-sec-label {
        text-align: center;
        font-size: 12px;
        color: var(--primary);
        letter-spacing: 0.12em;
        margin: 8px 0 16px;
        opacity: 0.9;
    }
    body.page-play .play-m-sec {
        margin-bottom: 18px;
    }
    body.page-play .play-m-sec h4 {
        margin: 0 0 10px;
        font-size: 14px;
        font-weight: 700;
        color: #fff;
        padding-left: 8px;
        border-left: 3px solid var(--primary);
    }
    body.page-play .play-m-sec p {
        margin: 0 0 8px;
        font-size: 13px;
        color: var(--text-secondary);
        line-height: 1.65;
    }
    body.page-play .play-m-kv {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 12px;
        font-size: 13px;
        color: var(--text-secondary);
    }
    body.page-play .play-m-kv em {
        display: inline-block;
        min-width: 2.5em;
        margin-right: 6px;
        font-style: normal;
        color: var(--text-muted);
    }
}
