/* Community Portal — Deep Crimson & White (Hupu Style) */

:root {
    --crim: #CC1122;
    --crim-dk: #A80E1C;
    --crim-lt: #FFF0F2;
    --crim-bar: #C01020;
    --ink: #1A1A1A;
    --ink-sub: #555555;
    --ink-muted: #999999;
    --ink-light: #CCCCCC;
    --rule: #E4E4E4;
    --rule-lt: #F0F0F0;
    --canvas: #F2F2F2;
    --surface: #FFFFFF;
    --topbar-bg: #CC1122;
    --topbar-active: #E8192C;
    --lift-xs: 0 1px 3px rgba(0,0,0,0.07);
    --lift-sm: 0 2px 8px rgba(0,0,0,0.09);
    --lift-md: 0 4px 16px rgba(0,0,0,0.13);
    --curve: 4px;
    --curve-sm: 3px;
    --ease: all 0.2s ease;
    --cover-ratio: calc(350 / 600 * 100%);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: var(--canvas);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== TOPBAR — deep crimson, NOT sticky ===== */
.siteheader {
    background: var(--topbar-bg);
    /* static — scrolls with page, not fixed/sticky */
}

.siteheader-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.sitename-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    transition: var(--ease);
    background: rgba(0,0,0,0.15);
    border-right: 1px solid rgba(255,255,255,0.12);
}

.sitename-link:hover {
    background: rgba(0,0,0,0.25);
}

.sitename-text {
    font-size: 22px;
    font-weight: 900;
    color: #FFFFFF;
    letter-spacing: 1px;
    line-height: 1;
}

.newaddr-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    padding: 12px 18px;
    font-size: 13px;
    border-right: 1px solid rgba(255,255,255,0.12);
    transition: var(--ease);
}

.newaddr-tag:hover {
    background: rgba(255,255,255,0.25);
}

.newaddr-lbl {
    font-size: 11px;
    opacity: 0.8;
    letter-spacing: 0.3px;
}

.newaddr-val {
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.3px;
}

/* ===== LAYOUT ===== */
.centerbox {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 15px;
}

.vgap {
    padding: 10px 0;
}

/* ===== PROMO STRIP — no margin/padding ===== */
.promostrip { /* intentionally bare */ }

/* ===== CATEGORY NAV BOARD ===== */
.navboard {
    background: var(--surface);
    border-radius: var(--curve);
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: var(--lift-sm);
    border: 1px solid var(--rule);
    border-top: 3px solid var(--crim);
}

.navboard-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--rule-lt);
}

.navboard-row:last-child { border-bottom: none; }

.navboard-zone {
    background: var(--crim);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    width: 9%;
    min-width: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 3px;
    text-align: center;
    flex-shrink: 0;
    border-right: 2px solid rgba(255,255,255,0.15);
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.navboard-links {
    width: 91%;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    padding: 7px 12px;
    gap: 5px;
}

.navboard-links a {
    display: inline-block;
    color: var(--ink-sub);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 5px 0;
    transition: var(--ease);
    white-space: nowrap;
    text-align: center;
    flex-shrink: 0;
    flex-grow: 1;
    border-bottom: 2px solid transparent;
}

.navboard-links a:hover {
    color: var(--crim);
    border-bottom-color: var(--crim);
}

.navboard-links a.active {
    color: var(--crim);
    font-weight: 700;
    border-bottom: 2px solid var(--crim);
    background: var(--crim-lt);
}

/* ===== SEARCH ===== */
.searchform {
    background: var(--surface);
    border-radius: var(--curve);
    padding: 11px 14px;
    margin-bottom: 10px;
    box-shadow: var(--lift-sm);
    border: 1px solid var(--rule);
}

.searchform form {
    display: flex;
    gap: 7px;
    align-items: center;
    flex-wrap: nowrap;
}

.searchform input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 9px 14px;
    border: 1px solid var(--rule);
    border-radius: var(--curve-sm);
    background: var(--canvas);
    color: var(--ink);
    font-size: 14px;
    outline: none;
    transition: var(--ease);
}

.searchform input[type="text"]:focus {
    border-color: var(--crim);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(204,17,34,0.1);
}

.searchform input[type="text"]::placeholder { color: var(--ink-muted); }

.searchform button {
    padding: 9px 15px;
    border: none;
    border-radius: var(--curve-sm);
    background: var(--crim);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.searchform button:hover {
    background: var(--crim-dk);
    box-shadow: var(--lift-xs);
}

/* ===== HOT KEYWORDS ===== */
.kwpanel {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 11px 14px;
    background: var(--surface);
    border-radius: var(--curve);
    border: 1px solid var(--rule);
    margin-bottom: 10px;
    box-shadow: var(--lift-xs);
}

.kwpanel-item {
    padding: 4px 12px;
    background: var(--canvas);
    border-radius: var(--curve-sm);
    color: var(--ink-sub);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ease);
    border: 1px solid var(--rule);
    line-height: 1.6;
}

.kwpanel-item:hover {
    background: var(--crim);
    color: #fff;
    border-color: var(--crim);
}

/* ===== CONTENT SECTION ===== */
.contentrow {
    margin-bottom: 16px;
}

.contentrow-hd {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--rule);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.contentrow-hd::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 44px;
    height: 2px;
    background: var(--crim);
}

.contentrow-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: 0.2px;
}

.contentrow-title a {
    color: var(--ink);
    text-decoration: none;
    transition: var(--ease);
}

.contentrow-title a:hover { color: var(--crim); }

.contentrow-title span {
    font-size: 12px;
    font-weight: 400;
    color: var(--ink-muted);
    margin-left: 8px;
}

/* ===== FILM GRID — PC 4 col, mobile 2 col ===== */
.filmgrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    list-style: none;
    padding: 0;
}

.filmgrid li {
    background: var(--surface);
    border-radius: var(--curve);
    overflow: hidden;
    border: 1px solid var(--rule);
    box-shadow: var(--lift-xs);
    transition: var(--ease);
}

.filmgrid li:hover {
    box-shadow: var(--lift-md);
    transform: translateY(-2px);
    border-color: rgba(204,17,34,0.2);
}

.filmthumb {
    display: block;
    position: relative;
    overflow: hidden;
    background: var(--rule-lt);
    padding-top: var(--cover-ratio);
}

.filmthumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.filmthumb:hover img { transform: scale(1.07); }

.filmthumb::after {
    content: '▶';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 18px;
    color: #fff;
    background: rgba(204,17,34,0.88);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    line-height: 42px;
    text-align: center;
    padding-left: 3px;
    opacity: 0;
    transition: all 0.25s ease;
}

.filmthumb:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.filmcaption {
    padding: 7px 9px;
}

.filmcaption h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.filmcaption h5 a {
    color: var(--ink);
    text-decoration: none;
    transition: var(--ease);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.filmcaption h5 a:hover { color: var(--crim); }

/* ===== DETAIL TITLE BAR ===== */
.itemtitle {
    line-height: 1.8;
    text-align: center;
    padding: 14px 20px;
    font-size: 16px;
    margin: 12px 0;
    word-break: break-all;
    background: var(--surface);
    border-radius: var(--curve);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--crim);
    box-shadow: var(--lift-xs);
}

.itemtitle a {
    color: var(--crim);
    text-decoration: none;
    font-weight: 700;
    margin-right: 8px;
}

/* ===== DETAIL META ===== */
.itemmeta {
    font-size: 14px;
    line-height: 1.95;
    padding: 18px 22px;
    background: var(--surface);
    border-radius: var(--curve);
    margin: 10px 0;
    border: 1px solid var(--rule);
    box-shadow: var(--lift-xs);
    color: var(--ink-sub);
}

.snapframe picture,
.snapframe img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--curve-sm);
    border: 1px solid var(--rule);
    margin-top: 10px;
}

/* ===== ACTION BUTTONS ===== */
.actbtns {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 15px;
    background: var(--surface);
    border-radius: var(--curve);
    margin: 10px 0;
    border: 1px solid var(--rule);
    box-shadow: var(--lift-xs);
    text-align: center;
}

.actbtn {
    display: inline-block;
    padding: 9px 24px;
    background: var(--crim);
    color: #fff;
    text-decoration: none;
    border-radius: var(--curve-sm);
    font-weight: 700;
    font-size: 14px;
    transition: var(--ease);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.actbtn:hover {
    background: var(--crim-dk);
    box-shadow: var(--lift-sm);
    transform: translateY(-1px);
}

/* ===== SHARE STRIP ===== */
.sharestrip {
    background: var(--surface);
    border-radius: var(--curve);
    padding: 11px 14px;
    margin: 10px 0;
    border: 1px solid var(--rule);
    box-shadow: var(--lift-xs);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sharestrip-url {
    background: var(--canvas);
    border: 1px solid var(--rule);
    border-radius: var(--curve-sm);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
}

.sharestrip-lbl {
    font-weight: 700;
    font-size: 12px;
    color: var(--crim);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.sharestrip-href {
    font-size: 12px;
    color: var(--ink-sub);
    font-family: 'Courier New', monospace;
    word-break: break-all;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sharestrip-btn {
    padding: 8px 16px;
    background: var(--crim);
    color: #fff;
    border: none;
    border-radius: var(--curve-sm);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.sharestrip-btn:hover {
    background: var(--crim-dk);
    box-shadow: var(--lift-xs);
}

.clipmark { font-size: 15px; }

/* ===== PAGINATION ===== */
.pagenav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 18px 0;
}

.pagebtn, .pagecur {
    display: inline-block;
    padding: 6px 13px;
    border-radius: var(--curve-sm);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--ease);
    min-width: 34px;
    text-align: center;
}

.pagebtn {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--rule);
}

.pagebtn:hover {
    background: var(--crim);
    border-color: var(--crim);
    color: #fff;
}

.pagecur {
    background: var(--crim);
    color: #fff;
    border: 1px solid var(--crim-dk);
    cursor: default;
}

/* ===== FOOTER ===== */
.sitefoot {
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--rule);
    margin-top: 22px;
    background: var(--surface);
}

.sitefoot p {
    margin: 5px 0;
    color: var(--ink-muted);
    font-size: 12px;
}

.sitefoot a {
    color: var(--ink-muted);
    text-decoration: none;
    transition: var(--ease);
}

.sitefoot a:hover { color: var(--crim); }

/* ===== FRIEND LINKS ===== */
.friendbox {
    padding: 11px 14px;
    background: var(--surface);
    border-radius: var(--curve);
    border: 1px solid var(--rule);
    box-shadow: var(--lift-xs);
}

.friendbox dl { margin: 0; padding: 0; }
.friendbox dd { display: inline-block; margin: 3px; }

.friendbox a {
    color: var(--ink-sub);
    text-decoration: none;
    transition: var(--ease);
    font-size: 13px;
}

.friendbox a:hover { color: var(--crim); }

/* ===== PLAYER ===== */
.MacPlayer {
    background: #000;
    border-radius: var(--curve);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: var(--lift-md);
}

/* ===== UTILITIES ===== */
.clearfix::after { content: ""; display: table; clear: both; }
.pconly  { display: block; }
.mobonly { display: block; }

@media (min-width: 769px) { .mobonly { display: none !important; } }

img[data-original] { background: var(--canvas); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .centerbox { padding: 0 8px; }
    .vgap { padding: 7px 0; }
    .pconly { display: none !important; }

    /* Topbar */
    .siteheader-inner { justify-content: center; }
    .sitename-link { padding: 9px 14px; }
    .sitename-text { font-size: 18px; }
    .newaddr-tag { padding: 9px 12px; }
    .newaddr-val { font-size: 13px; }

    /* Nav — 缩小区域标签，放大栏目字号 */
    .navboard-zone {
        width: 13%;
        min-width: 36px;
        font-size: 11px;
        padding: 4px 2px;
        line-height: 1.2;
    }

    .navboard-links {
        width: 87%;
        flex-wrap: wrap;
        padding: 5px 6px;
        gap: 5px;
    }

    .navboard-links a {
        font-size: 15px;
        font-weight: 600;
        padding: 6px 2px;
        width: calc((100% - 15px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    /* Search */
    .searchform { padding: 8px 10px; }
    .searchform input[type="text"] {
        min-width: 100px;
        padding: 8px 10px;
        font-size: 13px;
    }
    .searchform button { padding: 8px 10px; font-size: 12px; }

    /* Grid: 2 cols */
    .filmgrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
    }

    .filmcaption { padding: 5px 7px; }
    .filmcaption h5 { font-size: 12px; }
    .contentrow-title { font-size: 16px; }

    /* Tags */
    .kwpanel { padding: 9px 10px; gap: 5px; }
    .kwpanel-item { padding: 3px 9px; font-size: 12px; }

    /* Buttons */
    .actbtns { padding: 11px 8px; gap: 7px; }
    .actbtn { padding: 8px 14px; font-size: 13px; }

    /* Share */
    .sharestrip { padding: 9px 10px; gap: 7px; flex-wrap: nowrap; }
    .sharestrip-url { padding: 7px 9px; }
    .sharestrip-lbl { font-size: 11px; }
    .sharestrip-href { font-size: 10px; }
    .sharestrip-btn { padding: 7px 10px; font-size: 12px; flex-shrink: 0; }
    .clipmark { font-size: 13px; }

    /* Pager */
    .pagenav { gap: 4px; }
    .pagebtn, .pagecur { padding: 6px 10px; font-size: 12px; min-width: 30px; }

    /* Footer */
    .sitefoot { padding: 15px 0; margin-top: 14px; }
}

@media (max-width: 480px) {
    .sitename-text { font-size: 16px; }
    .newaddr-tag { padding: 8px 9px; }
    .newaddr-val { font-size: 12px; }
    .newaddr-lbl { display: none; }

    .navboard-zone {
        width: 13%;
        min-width: 32px;
        font-size: 10px;
        padding: 3px 1px;
    }

    .navboard-links {
        width: 87%;
        gap: 4px;
        padding: 4px 4px;
    }

    .navboard-links a {
        font-size: 14px;
        font-weight: 600;
        padding: 5px 1px;
        width: calc((100% - 12px) / 4);
    }

    .searchform input[type="text"] {
        min-width: 80px;
        padding: 7px 8px;
        font-size: 12px;
    }
    .searchform button { padding: 7px 8px; font-size: 11px; }

    .filmgrid { gap: 7px; }
    .contentrow-title { font-size: 14px; }
    .actbtn { padding: 7px 12px; font-size: 12px; }
}
