/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --white: #ffffff;
    --canvas: #f6f6f6;
    --surface: #ffffff;
    --raised: #fafafa;
    --sina-red: #e3170a;
    --sina-red-dk: #b81108;
    --sina-red-lt: rgba(227,23,10,.07);
    --slate: #1c1c1c;
    --body: #333333;
    --sub: #666666;
    --hint: #999999;
    --ghost: #cccccc;
    --border: #e5e5e5;
    --border2: #d8d8d8;
    --e1: 0 1px 3px rgba(0,0,0,.06);
    --e2: 0 2px 10px rgba(0,0,0,.09);
    --e3: 0 5px 20px rgba(0,0,0,.12);
    --cr: 3px;
    --cr2: 2px;
    --cr3: 5px;
}

html { font-size: 15px; }

body {
    background: var(--canvas);
    color: var(--body);
    font-family: 'PingFang SC','Hiragino Sans GB','Microsoft YaHei','Helvetica Neue',Arial,sans-serif;
    line-height: 1.65;
}

a { color: var(--body); text-decoration: none; transition: color .15s; }
a:hover { color: var(--sina-red); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.fc::after { content: ''; display: table; clear: both; }

/* ===== WRAPPER ===== */
.ph-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 14px;
}

/* ===== SITE HEADER ===== */
.ph-masthead {
    background: var(--white);
    border-bottom: 3px solid var(--sina-red);
    padding: 9px 0;
    box-shadow: var(--e1);
}

.ph-masthead .ph-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

.ph-brand-row {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
}

.ph-homelink {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.ph-sitename {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--sina-red);
    font-style: normal;
    letter-spacing: -.2px;
    text-decoration: none;
    border-bottom: none;
}

.ph-domain-strip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--canvas);
    border: 1px solid var(--border2);
    border-radius: var(--cr2);
    padding: 4px 12px;
}

.ph-domain-strip .pds-label {
    font-size: .67rem;
    color: var(--hint);
    white-space: nowrap;
}

.ph-domain-strip .pds-val {
    font-size: 1.07rem;
    font-weight: 800;
    color: var(--sina-red);
    white-space: nowrap;
}

/* ===== BANNER ===== */
.ph-adstrip {
    margin: 4px 0 3px;
}
.ph-adstrip img { border-radius: var(--cr); width: 100%; }

/* ===== CATEGORY NAV ===== */
.ph-navbox {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--cr3);
    overflow: hidden;
    margin: 3px 0;
    box-shadow: var(--e1);
}

.ph-navline {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
    min-height: 38px;
}

.ph-navline:last-child { border-bottom: none; }

.ph-zone-lbl {
    background: var(--sina-red);
    color: rgba(255,255,255,.9);
    font-size: .67rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 2px;
    width: 62px;
    min-width: 62px;
    border-right: 1px solid rgba(0,0,0,.08);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

.ph-catlinks {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    align-items: center;
    padding: 4px 8px;
    gap: 3px;
    flex: 1;
}

.ph-catlinks a {
    font-size: .81rem;
    color: var(--sub);
    padding: 4px 5px;
    border-radius: var(--cr2);
    transition: all .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.ph-catlinks a:hover {
    background: var(--sina-red-lt);
    color: var(--sina-red);
    border-color: rgba(227,23,10,.18);
}

.ph-catlinks a.active {
    background: var(--sina-red);
    color: #fff;
    border-color: var(--sina-red);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.ph-searchbar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--cr3);
    padding: 7px 11px;
    margin: 3px 0;
    box-shadow: var(--e1);
}

.ph-searchbar form {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.ph-searchbar input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 34px;
    border: 1.5px solid var(--border2);
    border-radius: 17px;
    padding: 0 14px;
    font-size: .86rem;
    color: var(--slate);
    background: var(--canvas);
    outline: none;
    transition: border-color .18s;
}

.ph-searchbar input[type="text"]::placeholder { color: var(--ghost); }
.ph-searchbar input[type="text"]:focus {
    border-color: var(--sina-red);
    background: var(--white);
}

.ph-searchbar button {
    height: 34px;
    padding: 0 12px;
    border: none;
    border-radius: var(--cr2);
    background: var(--sub);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}

.ph-searchbar button:hover { background: var(--slate); }

.ph-searchbar button[value="1"] {
    background: var(--sina-red);
    color: #fff;
    font-weight: 700;
}
.ph-searchbar button[value="1"]:hover { background: var(--sina-red-dk); }

.ph-searchbar button[value="2"] {
    background: var(--white);
    color: var(--sina-red);
    font-weight: 700;
    border: 1.5px solid var(--sina-red);
}
.ph-searchbar button[value="2"]:hover { background: var(--sina-red-lt); }

/* ===== HOT TAGS ===== */
.ph-hotzone {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--cr3);
    padding: 6px 11px;
    margin: 3px 0;
    box-shadow: var(--e1);
}

.ph-hotzone h4 {
    font-size: .75rem;
    font-weight: 700;
    color: var(--hint);
    margin-bottom: 5px;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.ph-hotzone h4 strong { color: var(--sina-red); }

.ph-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ph-keywords .pkw {
    display: inline-block;
    background: var(--canvas);
    color: var(--sub);
    border: 1px solid var(--border2);
    border-radius: 14px;
    padding: 2px 10px;
    font-size: .73rem;
    text-decoration: none;
    transition: all .15s;
}

.ph-keywords .pkw:hover {
    background: var(--sina-red-lt);
    color: var(--sina-red);
    border-color: rgba(227,23,10,.22);
}

/* ===== CONTENT SECTION ===== */
.ph-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--cr3);
    padding: 11px 11px 9px;
    margin: 3px 0;
    box-shadow: var(--e1);
}

.ph-panel-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.ph-panel-hd::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 44px;
    height: 2px;
    background: var(--sina-red);
    border-radius: 2px;
}

.ph-panel-hd h3 {
    font-size: .96rem;
    font-weight: 700;
    color: var(--slate);
    letter-spacing: -.1px;
}

.ph-panel-hd h3 a { color: var(--slate); }
.ph-panel-hd h3 a:hover { color: var(--sina-red); }

.ph-panel-hd h4 {
    font-size: .94rem;
    font-weight: 700;
    color: var(--slate);
}

/* ===== FILM GRID ===== */
.ph-filmrow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ph-filmrow li {
    border-radius: var(--cr);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--raised);
    transition: box-shadow .2s, border-color .2s;
}

.ph-filmrow li:hover {
    box-shadow: var(--e3);
    border-color: var(--sina-red);
}

.ph-coverwrap {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--canvas);
}

.ph-coverwrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.ph-coverwrap:hover img { transform: scale(1.04); }

.ph-covertext {
    padding: 5px 7px 7px;
}

.ph-covertext h5 {
    font-size: .75rem;
    font-weight: 400;
    color: var(--sub);
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ph-covertext h5 a { color: var(--sub); }
.ph-covertext h5 a:hover { color: var(--sina-red); }

/* ===== PAGINATION ===== */
.ph-pager {
    margin: 12px 0 5px;
    display: flex;
    justify-content: center;
}

.ph-pager-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
    justify-content: center;
}

.ph-pager-inner a.php {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--surface);
    border: 1.5px solid var(--border2);
    border-radius: var(--cr2);
    font-size: .81rem;
    color: var(--sub);
    text-decoration: none;
    transition: all .15s;
}

.ph-pager-inner a.php:hover {
    background: var(--sina-red-lt);
    border-color: var(--sina-red);
    color: var(--sina-red);
}

.ph-pager-inner a.php-cur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--sina-red);
    border: 1.5px solid var(--sina-red);
    border-radius: var(--cr2);
    font-size: .81rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.ph-friendlinks {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--cr);
    padding: 8px 12px;
    margin: 3px 0;
    box-shadow: var(--e1);
}

.ph-flinkrow {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ph-flinkrow dd { display: inline; }

.ph-flinkrow a {
    display: inline-block;
    font-size: .74rem;
    color: var(--ghost);
    padding: 2px 8px;
    border-radius: var(--cr2);
    border: 1px solid var(--border);
    background: var(--canvas);
    text-decoration: none;
    transition: all .15s;
}

.ph-flinkrow a:hover { color: var(--sina-red); border-color: rgba(227,23,10,.28); }

.ph-foot-copy {
    text-align: center;
    padding: 7px 0 13px;
    color: var(--ghost);
    font-size: .73rem;
}

/* ===== DETAIL PAGES ===== */
.ph-ttl-bar {
    line-height: 1.8;
    text-align: center;
    padding: 11px 14px;
    font-size: .96rem;
    margin: 3px 0;
    word-break: break-all;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--sina-red);
    border-radius: var(--cr);
    box-shadow: var(--e1);
    color: var(--slate);
}

.ph-ttl-bar a {
    color: var(--sina-red);
    font-weight: 700;
    margin-right: 6px;
}

.ph-spec-box {
    font-size: .88rem;
    line-height: 2;
    padding: 13px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--cr);
    box-shadow: var(--e1);
    margin: 3px 0;
    color: var(--sub);
}

.ph-imgpreview {
    display: block;
    width: 100%;
    margin-top: 9px;
}

.ph-imgpreview picture,
.ph-imgpreview img {
    width: 100%;
    height: auto;
    border-radius: var(--cr2);
    display: block;
}

/* ===== DL BUTTONS ===== */
.ph-actrow {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
    margin: 11px 0;
}

.ph-actbtn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 22px;
    background: var(--sina-red);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .15s;
    text-decoration: none;
    letter-spacing: .2px;
}

.ph-actbtn:hover {
    background: var(--sina-red-dk);
    color: #fff;
    transform: translateY(-1px);
}

.ph-clientnote {
    text-align: center;
    padding: 6px;
    font-size: .8rem;
}

.ph-clientnote a { color: var(--hint); font-weight: 600; }
.ph-clientnote a:hover { color: var(--sina-red); }

/* ===== SHARE ===== */
.ph-sharerow {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: var(--cr);
    padding: 7px 12px;
    margin: 3px 0;
    flex-wrap: wrap;
}

.ph-sharerow .psr-lbl { font-size: .73rem; color: var(--ghost); white-space: nowrap; }
.ph-sharerow .psr-url { font-size: .76rem; color: var(--sub); flex: 1; min-width: 0; word-break: break-all; }

.ph-sharerow .psr-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 13px;
    background: var(--sina-red);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}

.ph-sharerow .psr-btn:hover { background: var(--sina-red-dk); }

/* ===== VIS HELPERS ===== */
.vis-pc { display: block; }
.vis-mb { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .ph-filmrow { grid-template-columns: repeat(2, 1fr); gap: 7px; }
    .vis-pc { display: none; }
    .vis-mb { display: block; }
}

@media (max-width: 768px) {
    html { font-size: 14px; }

    .ph-sitename { font-size: 1.06rem; }
    .ph-domain-strip .pds-val { font-size: .9rem; }

    .ph-navline { align-items: stretch; }

    .ph-zone-lbl {
        width: 15%;
        min-width: 15%;
        max-width: 15%;
        font-size: 10px;
        padding: 4px 2px;
        letter-spacing: 0;
        line-height: 1.4;
        word-break: break-all;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ph-catlinks {
        width: 85%;
        flex: 1;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
        padding: 4px 4px;
        align-items: center;
    }

    .ph-catlinks a {
        font-size: 12px;
        padding: 5px 2px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    /* Search: NO wrap, all in one row */
    .ph-searchbar form {
        flex-wrap: nowrap;
        gap: 3px;
    }

    .ph-searchbar input[type="text"] {
        height: 32px;
        font-size: .77rem;
        padding: 0 9px;
    }

    .ph-searchbar button {
        height: 32px;
        padding: 0 6px;
        font-size: .72rem;
    }

    .ph-filmrow {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .ph-coverwrap { aspect-ratio: 600 / 350; }
    .ph-covertext h5 { font-size: .7rem; }
    .ph-panel { padding: 8px 8px 6px; }
    .ph-actbtn { padding: 8px 16px; font-size: .82rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .ph-zone-lbl { font-size: 10px; }
    .ph-catlinks a { font-size: 13px; }
}

@media (max-width: 380px) {
    .ph-zone-lbl { font-size: 10px; }
    .ph-catlinks a { font-size: 12px; }
    .ph-searchbar button { padding: 0 4px; font-size: .66rem; }
}
