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

:root {
    --bg: #1a1a1a;
    --bg-soft: #222222;
    --bg-card: #2a2a2a;
    --bg-card2: #333333;
    --bg-hover: #3a3a3a;
    --ncm-red: #c62f2f;
    --ncm-red-dk: #a02020;
    --ncm-red-lt: rgba(198,47,47,.15);
    --ncm-red-pale: rgba(198,47,47,.08);
    --ncm-dark: #111111;
    --ncm-bar: #0d0d0d;
    --txt: #e8e8e8;
    --txt2: #bbbbbb;
    --txt3: #777777;
    --bdr: #3a3a3a;
    --bdr2: #444444;
    --bdr-red: rgba(198,47,47,.35);
    --sh1: 0 1px 4px rgba(0,0,0,.35);
    --sh2: 0 3px 12px rgba(0,0,0,.45);
    --sh3: 0 6px 24px rgba(0,0,0,.6);
    --rr: 6px;
    --rr2: 4px;
    --rr3: 8px;
}

html { font-size: 15px; }

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

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

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

/* ===== SITE HEADER ===== */
.ncm-header {
    background: var(--ncm-bar);
    border-bottom: 2px solid var(--ncm-red);
    padding: 9px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,.5);
}

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

.ncm-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.ncm-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.ncm-sitename {
    font-size: 1.38rem;
    font-weight: 900;
    color: var(--ncm-red);
    font-style: normal;
    letter-spacing: -0.4px;
    border-bottom: none;
    text-decoration: none;
}

.ncm-domain-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(198,47,47,.18);
    border: 1px solid var(--bdr-red);
    border-radius: var(--rr2);
    padding: 4px 13px;
}

.ncm-domain-pill .ndp-lbl {
    font-size: 0.66rem;
    color: rgba(255,255,255,.45);
    white-space: nowrap;
}

.ncm-domain-pill .ndp-val {
    font-size: 1.09rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

/* ===== BANNER ===== */
.ncm-banner {
    margin: 4px 0 3px;
    border-radius: var(--rr);
    overflow: hidden;
}
.ncm-banner img { width: 100%; }

/* ===== CATEGORY NAV ===== */
.ncm-nav-box {
    background: var(--bg-card);
    border: 1px solid var(--bdr);
    border-top: 2px solid var(--ncm-red);
    border-radius: var(--rr3);
    overflow: hidden;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.ncm-nav-strip {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--bdr);
    min-height: 38px;
}

.ncm-nav-strip:last-child { border-bottom: none; }

.ncm-zone-tag {
    background: var(--ncm-red);
    color: rgba(255,255,255,.95);
    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(255,255,255,.1);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

.ncm-nav-cells a {
    font-size: .81rem;
    color: var(--txt2);
    padding: 3px 5px;
    border-radius: var(--rr2);
    transition: all .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.ncm-nav-cells a:hover {
    background: var(--ncm-red-lt);
    color: #ff5555;
    border-color: var(--bdr-red);
}

.ncm-nav-cells a.active {
    background: var(--ncm-red);
    color: #fff;
    border-color: var(--ncm-red);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.ncm-search {
    background: var(--bg-card);
    border: 1px solid var(--bdr);
    border-radius: var(--rr);
    padding: 8px 12px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.ncm-search form {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.ncm-search input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--bdr2);
    border-radius: var(--rr2);
    padding: 0 12px;
    font-size: .87rem;
    color: var(--txt);
    background: var(--bg-soft);
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}

.ncm-search input[type="text"]::placeholder { color: var(--txt3); }

.ncm-search input[type="text"]:focus {
    border-color: var(--ncm-red);
    box-shadow: 0 0 0 3px rgba(198,47,47,.18);
}

.ncm-search button {
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: var(--rr2);
    background: var(--bg-card2);
    color: var(--txt2);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
    flex-shrink: 0;
    border: 1px solid var(--bdr2);
}

.ncm-search button:hover {
    background: var(--bg-hover);
    color: var(--txt);
}

.ncm-search button[value="1"] {
    background: var(--ncm-red);
    color: #fff;
    border-color: var(--ncm-red);
    box-shadow: 0 2px 8px rgba(198,47,47,.4);
}
.ncm-search button[value="1"]:hover {
    background: var(--ncm-red-dk);
    box-shadow: none;
}

.ncm-search button[value="2"] {
    background: #8b1a1a;
    color: #fff;
    border-color: #8b1a1a;
}
.ncm-search button[value="2"]:hover { background: #6a1212; }

/* ===== HOT TAGS ===== */
.ncm-hot {
    background: var(--bg-card);
    border: 1px solid var(--bdr);
    border-radius: var(--rr);
    padding: 7px 12px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.ncm-hot h4 {
    font-size: .78rem;
    font-weight: 700;
    color: var(--ncm-red);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ncm-hot h4::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--ncm-red);
    border-radius: 50%;
}

.ncm-tagset {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ncm-tagset .nt {
    display: inline-block;
    background: var(--bg-card2);
    color: var(--txt2);
    border: 1px solid var(--bdr2);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .75rem;
    text-decoration: none;
    transition: all .15s;
}

.ncm-tagset .nt:hover {
    background: var(--ncm-red);
    color: #fff;
    border-color: var(--ncm-red);
    box-shadow: 0 2px 8px rgba(198,47,47,.35);
}

/* ===== CONTENT SECTION ===== */
.ncm-block {
    background: var(--bg-card);
    border: 1px solid var(--bdr);
    border-radius: var(--rr3);
    padding: 12px 12px 9px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.ncm-block-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--bdr);
    position: relative;
}

.ncm-block-hd::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 38px;
    height: 2px;
    background: var(--ncm-red);
    border-radius: 2px;
}

.ncm-block-hd h3 {
    font-size: .97rem;
    font-weight: 800;
    color: var(--txt);
}

.ncm-block-hd h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 14px;
    background: var(--ncm-red);
    border-radius: 2px;
    margin-right: 7px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.ncm-block-hd h3 a { color: var(--txt); }
.ncm-block-hd h3 a:hover { color: #ff5555; }

.ncm-block-hd h4 {
    font-size: .94rem;
    font-weight: 800;
    color: var(--txt);
}

.ncm-block-hd h4::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 14px;
    background: var(--ncm-red);
    border-radius: 2px;
    margin-right: 7px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

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

.ncm-grid li {
    border-radius: var(--rr);
    overflow: hidden;
    border: 1px solid var(--bdr);
    background: var(--bg-card2);
    transition: box-shadow .2s, transform .18s, border-color .18s;
}

.ncm-grid li:hover {
    box-shadow: var(--sh3);
    transform: translateY(-2px);
    border-color: var(--bdr-red);
}

.ncm-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--bg-soft);
    position: relative;
}

.ncm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .28s;
}

.ncm-thumb:hover img { transform: scale(1.05); }

/* play icon overlay */
.ncm-thumb::after {
    content: '▶';
    position: absolute;
    bottom: 6px;
    right: 8px;
    font-size: .7rem;
    color: rgba(255,255,255,.8);
    background: rgba(198,47,47,.7);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 20px;
    text-align: center;
    padding-left: 2px;
    opacity: 0;
    transition: opacity .2s;
}

.ncm-thumb:hover::after { opacity: 1; }

.ncm-caption {
    padding: 5px 7px 7px;
}

.ncm-caption h5 {
    font-size: .77rem;
    font-weight: 500;
    color: var(--txt2);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ncm-caption h5 a { color: var(--txt2); }
.ncm-caption h5 a:hover { color: #ff5555; }

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

.ncm-pgn-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.ncm-pgn-list a.np {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--bg-card);
    border: 1px solid var(--bdr2);
    border-radius: var(--rr2);
    font-size: .83rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .15s;
}

.ncm-pgn-list a.np:hover {
    background: var(--ncm-red-lt);
    border-color: var(--bdr-red);
    color: #ff5555;
}

.ncm-pgn-list a.np-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--ncm-red);
    border: 1px solid var(--ncm-red);
    border-radius: var(--rr2);
    font-size: .83rem;
    font-weight: 800;
    color: #fff;
    cursor: default;
    box-shadow: 0 2px 8px rgba(198,47,47,.4);
}

/* ===== FOOTER ===== */
.ncm-flink {
    background: var(--bg-card);
    border: 1px solid var(--bdr);
    border-radius: var(--rr);
    padding: 9px 12px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.ncm-flink-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ncm-flink-list dd { display: inline; }

.ncm-flink-list a {
    display: inline-block;
    font-size: .76rem;
    color: var(--txt3);
    padding: 2px 9px;
    border-radius: 3px;
    border: 1px solid var(--bdr);
    background: var(--bg-card2);
    text-decoration: none;
    transition: all .15s;
}

.ncm-flink-list a:hover {
    color: #ff5555;
    border-color: var(--bdr-red);
    background: var(--ncm-red-pale);
}

.ncm-foot {
    text-align: center;
    padding: 8px 0 14px;
    color: var(--txt3);
    font-size: .75rem;
}

/* ===== DETAIL PAGES ===== */
.ncm-post-hd {
    line-height: 1.8;
    text-align: center;
    padding: 12px 15px;
    font-size: .97rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--bg-card);
    border: 1px solid var(--bdr);
    border-left: 4px solid var(--ncm-red);
    border-radius: var(--rr);
    box-shadow: var(--sh1);
    color: var(--txt);
}

.ncm-post-hd a {
    color: var(--ncm-red);
    font-weight: 800;
    margin-right: 6px;
}

.ncm-post-body {
    font-size: .89rem;
    line-height: 1.95;
    padding: 14px 17px;
    background: var(--bg-card);
    border: 1px solid var(--bdr);
    border-radius: var(--rr);
    box-shadow: var(--sh1);
    margin: 4px 0;
    color: var(--txt2);
}

.ncm-snap {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.ncm-snap picture,
.ncm-snap img {
    width: 100%;
    height: auto;
    border-radius: var(--rr2);
    display: block;
}

/* ===== DL BUTTONS ===== */
.ncm-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.ncm-act-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: var(--ncm-red);
    color: #fff;
    border: none;
    border-radius: var(--rr2);
    font-size: .89rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(198,47,47,.4);
}

.ncm-act-btn:hover {
    background: var(--ncm-red-dk);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(198,47,47,.5);
}

.ncm-dl-note {
    text-align: center;
    padding: 6px;
    font-size: .81rem;
}

.ncm-dl-note a { color: var(--ncm-red); font-weight: 600; }
.ncm-dl-note a:hover { color: #ff5555; }

/* ===== SHARE ===== */
.ncm-share {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--bg-card2);
    border: 1px solid var(--bdr);
    border-radius: var(--rr);
    padding: 8px 12px;
    margin: 4px 0;
    flex-wrap: wrap;
}

.ncm-share .ns-lbl { font-size: .76rem; color: var(--txt3); white-space: nowrap; }
.ncm-share .ns-url { font-size: .78rem; color: var(--txt2); flex: 1; min-width: 0; word-break: break-all; }

.ncm-share .ns-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 13px;
    background: var(--ncm-red);
    color: #fff;
    border: none;
    border-radius: var(--rr2);
    font-size: .79rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(198,47,47,.35);
}

.ncm-share .ns-btn:hover {
    background: var(--ncm-red-dk);
    box-shadow: none;
}

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

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

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

    .ncm-sitename { font-size: 1.06rem; }
    .ncm-domain-pill .ndp-val { font-size: .93rem; }

    .ncm-nav-strip { align-items: stretch; }

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

    .ncm-nav-cells {
        width: 85%;
        flex: 1;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 2px;
        padding: 4px 4px;
        align-items: center;
    }

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

    /* Search: single row, no wrap */
    .ncm-search form {
        flex-wrap: nowrap;
        gap: 4px;
    }

    .ncm-search input[type="text"] {
        height: 34px;
        font-size: .77rem;
        padding: 0 8px;
    }

    .ncm-search button {
        height: 34px;
        padding: 0 7px;
        font-size: .72rem;
    }

    /* Film grid: 2 columns */
    .ncm-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .ncm-thumb { aspect-ratio: 600 / 350; }
    .ncm-caption h5 { font-size: .71rem; }
    .ncm-block { padding: 8px 8px 6px; }
    .ncm-act-btn { padding: 9px 14px; font-size: .84rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .ncm-zone-tag { font-size: 10px; }
    .ncm-nav-cells a { font-size: 13px; }
}

@media (max-width: 380px) {
    .ncm-zone-tag { font-size: 10px; }
    .ncm-nav-cells a { font-size: 12px; }
    .ncm-search button { padding: 0 5px; font-size: .67rem; }
}
