:root {
    --pf-bg: #0b0f1a;
    --pf-panel: #121826;
    --pf-panel2: #1a2233;
    --pf-border: #2a3246;
    --pf-text: #f5f7fb;
    --pf-muted: #9aa3b8;
    --pf-red: #e50914
}

* {
    box-sizing: border-box
}

body.pf-body {
    margin: 0;
    background: linear-gradient(180deg, #090d16, var(--pf-bg));
    color: var(--pf-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif
}

a {
    text-decoration: none;
    color: inherit
}

.pf-top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(9, 13, 22, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--pf-border)
}

.pf-top-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px
}

.pf-drawer-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--pf-border);
    background: #161d2d;
    border-radius: 10px;
    display: grid;
    place-items: center;
    cursor: pointer
}

.pf-drawer-btn span {
    display: block;
    width: 14px;
    height: 2px;
    background: #d8dfef;
    border-radius: 2px
}

.pf-logo {
    display: flex;
    align-items: center;
    gap: 10px
}

.pf-logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #1d2334;
    color: var(--pf-red);
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 24px;
    line-height: 1
}

.pf-logo-text {
    font-weight: 800;
    letter-spacing: .04em
}

.pf-search {
    flex: 1;
    display: flex;
    gap: 8px;
    min-width: 220px
}

.pf-search input {
    flex: 1;
    background: #101726;
    border: 1px solid var(--pf-border);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--pf-text)
}

.pf-search button {
    background: #1b2438;
    color: #fff;
    border: 1px solid var(--pf-border);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer
}

.pf-links {
    display: flex;
    gap: 8px
}

.pf-links a {
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--pf-muted)
}

.pf-links a.is-active,
.pf-links a:hover {
    background: #1d2740;
    color: #fff
}

.pf-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px
}

.pf-banner {
    position: relative;
    min-height: 340px;
    background: var(--pf-panel);
    border: 1px solid var(--pf-border);
    border-radius: 16px;
    overflow: hidden
}

.pf-banner-cover {
    position: absolute;
    inset: 0
}

.pf-banner-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.pf-banner-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .2))
}

.pf-banner-content {
    position: relative;
    z-index: 2;
    padding: 26px;
    max-width: 540px
}

.pf-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(229, 9, 20, .18);
    border: 1px solid rgba(229, 9, 20, .45);
    font-size: 12px
}

.pf-banner-content h1 {
    margin: 10px 0 16px;
    font-size: 34px
}

.pf-watch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #111;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700
}

.pf-play-float {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--pf-red);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 12px
}

.pf-banner-list {
    position: absolute;
    right: 18px;
    bottom: 16px;
    display: flex;
    gap: 8px;
    z-index: 2
}

.pf-banner-list a {
    width: 74px;
    height: 42px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, .25)
}

.pf-banner-list a.is-active {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .35) inset
}

.pf-banner-list img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.pf-module {
    background: var(--pf-panel);
    border: 1px solid var(--pf-border);
    border-radius: 14px;
    padding: 12px
}

.pf-module-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px
}

.pf-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--pf-muted)
}

.pf-crumb a {
    color: #d5def7
}

.pf-crumb a:hover {
    color: #fff
}

.pf-module-head h2 {
    margin: 0;
    font-size: 18px
}

.pf-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px
}

.pf-card {
    display: block;
    background: #0f1522;
    border: 1px solid var(--pf-border);
    border-radius: 12px;
    overflow: hidden
}

.pf-thumb {
    position: relative;
    padding-top: 56.25%
}

.pf-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover
}

.pf-thumb span {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(0, 0, 0, .58);
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 999px
}

.pf-card h3 {
    margin: 8px;
    font-size: 13px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 34px
}

.pf-rank {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px
}

.pf-rank a {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 9px;
    border-radius: 10px;
    background: #0f1628;
    border: 1px solid var(--pf-border)
}

.pf-rank em {
    font-style: normal;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #243352;
    color: #c8d3f0;
    display: grid;
    place-items: center;
    font-size: 12px
}

.pf-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.pf-filters a {
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--pf-border);
    background: #16203a;
    color: #d3defa;
    font-size: 13px
}

.pf-history {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px
}

.pf-history a {
    padding: 10px;
    border-radius: 10px;
    background: #111a2e;
    border: 1px solid var(--pf-border);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden
}

.pf-pager {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.pf-pager a,
.pf-pager span {
    padding: 8px 10px;
    border-radius: 9px;
    border: 1px solid var(--pf-border);
    background: #121a2c;
    color: #cfd8ef;
    font-size: 13px
}

.pf-pager a:hover {
    background: #1b2743;
    color: #fff
}

.pf-pager a.is-active {
    background: #2d4578;
    border-color: #466fbe;
    color: #fff
}

.pf-detail {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px
}

.pf-detail-pic {
    border: 1px solid var(--pf-border);
    border-radius: 12px;
    overflow: hidden
}

.pf-meta,
.pf-empty {
    color: var(--pf-muted)
}

.pf-detail-description {
    line-height: 1.85
}

.pf-detail-description-title {
    margin: 0 0 10px;
    font-size: 20px
}

.pf-detail-description-text-title {
    margin: 14px 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: #e3eafc
}

.pf-detail-description-text-content {
    margin: 0;
    color: #c6d2ee;
    font-size: 14px
}

.pf-player-wrap {
    position: relative;
    padding-top: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--pf-border)
}

.pf-player {
    position: absolute;
    inset: 0
}

.pf-lines,
.pf-episodes {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.pf-lines a,
.pf-episodes a {
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--pf-border);
    background: #1a243f;
    color: #d7e1fb;
    font-size: 13px
}

.pf-lines a.is-active,
.pf-episodes a.is-active {
    background: #2d4578;
    border-color: #466fbe;
    color: #fff
}

.pf-footer {
    padding: 16px;
    color: var(--pf-muted);
    text-align: center
}

.pf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 80
}

.pf-drawer {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: min(320px, 90vw);
    background: #0f1525;
    border-right: 1px solid var(--pf-border);
    z-index: 90;
    transform: translateX(-102%);
    transition: transform .22s ease
}

.pf-drawer.is-open {
    transform: translateX(0)
}

.pf-drawer-head {
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--pf-border)
}

.pf-drawer-head button {
    background: #1c2742;
    border: 1px solid var(--pf-border);
    color: #fff;
    border-radius: 8px;
    padding: 6px 10px
}

.pf-drawer-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: auto;
    max-height: calc(100vh - 60px)
}

.pf-drawer-body a {
    padding: 10px;
    border-radius: 10px;
    background: #121c33;
    border: 1px solid var(--pf-border);
    color: #d6e0fa
}

@media (max-width:1100px) {
    .pf-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr))
    }

    .pf-history {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media (max-width:860px) {
    .pf-top-inner {
        flex-wrap: wrap
    }

    .pf-search {
        order: 3;
        width: 100%
    }

    .pf-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }

    .pf-detail {
        grid-template-columns: 1fr
    }
}

@media (max-width:560px) {
    .pf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .pf-banner-content h1 {
        font-size: 26px
    }

    .pf-banner {
        min-height: 280px
    }
}