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

:root {
    --bg: #ffffff;
    --bg-soft: #f6f6f6;
    --bg-muted: #ececec;
    --bg-card: #ffffff;
    --topbar: #1a1a1a;
    --red: #d92b2b;
    --red-dk: #b51e1e;
    --red-lt: #fff5f5;
    --red-bd: #f5a0a0;
    --red-pill: #e03030;
    --txt: #111111;
    --txt2: #2d2d2d;
    --txt3: #666666;
    --txt4: #999999;
    --border: #e0e0e0;
    --border2: #cccccc;
    --sh1: 0 1px 3px rgba(0,0,0,.07);
    --sh2: 0 3px 12px rgba(0,0,0,.11);
    --r: 4px;
    --r2: 3px;
    --r3: 6px;
    --pill: 50px;
}

html { font-size: 15px; }

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

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

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

/* ===== SITE HEADER ===== */
.ap-hd {
    background: var(--topbar);
    padding: 9px 0;
    border-bottom: 3px solid var(--red);
}

.ap-hd .ap-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

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

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

.ap-sitename {
    font-size: 1.28rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: .2px;
    border-bottom: none;
    text-decoration: none;
    font-style: normal;
}

.ap-domain-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--red);
    border: 1px solid var(--red-dk);
    border-radius: var(--pill);
    padding: 3px 13px;
}

.ap-domain-tag .adt-lbl {
    font-size: 0.66rem;
    color: rgba(255,255,255,.65);
    white-space: nowrap;
}

.ap-domain-tag .adt-url {
    font-size: 1.10rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    letter-spacing: .1px;
}

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

/* ===== CATEGORY NAV ===== */
.ap-nav {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

.ap-nav-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
    min-height: 36px;
}

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

.ap-zone-lbl {
    background: var(--topbar);
    color: #ffffff;
    font-size: .71rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    width: 62px;
    min-width: 62px;
    border-right: 3px solid var(--red);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .2px;
    flex-shrink: 0;
}

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

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

.ap-zone-links a:hover {
    background: var(--red-lt);
    color: var(--red-dk);
    border-color: var(--red-bd);
}

.ap-zone-links a.active {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.ap-search {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 7px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

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

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

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

.ap-search input[type="text"]:focus {
    border-color: var(--red);
    background: var(--bg);
    box-shadow: 0 0 0 2px rgba(217,43,43,.1);
}

.ap-search button {
    height: 35px;
    padding: 0 12px;
    border: none;
    border-radius: var(--pill);
    background: var(--bg-muted);
    color: var(--txt2);
    font-size: .81rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
    flex-shrink: 0;
}

.ap-search button:hover { background: var(--border2); color: var(--txt); }

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

.ap-search button[value="2"] {
    background: var(--topbar);
    color: #fff;
    font-weight: 600;
}
.ap-search button[value="2"]:hover { background: #333; }

/* ===== HOT TAGS ===== */
.ap-hot {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 6px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

.ap-hot h4 {
    font-size: .77rem;
    font-weight: 700;
    color: var(--txt3);
    margin-bottom: 5px;
}

.ap-kwds {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ap-kwds .ap-kwd {
    display: inline-block;
    background: var(--bg-soft);
    color: var(--txt3);
    border: 1px solid var(--border);
    border-radius: var(--pill);
    padding: 2px 10px;
    font-size: .75rem;
    text-decoration: none;
    transition: all .15s;
}

.ap-kwds .ap-kwd:hover {
    background: var(--red-lt);
    color: var(--red-dk);
    border-color: var(--red-bd);
}

/* ===== CONTENT SECTION ===== */
.ap-sect {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r3);
    padding: 12px 12px 10px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.ap-sect-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 3px solid var(--topbar);
    position: relative;
}

.ap-sect-hd::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 42px;
    height: 3px;
    background: var(--red);
}

.ap-sect-hd h3 {
    font-size: .97rem;
    font-weight: 900;
    color: var(--txt);
    letter-spacing: .1px;
    text-transform: none;
}

.ap-sect-hd h3 a { color: var(--txt); }
.ap-sect-hd h3 a:hover { color: var(--red-dk); }

.ap-sect-hd h4 {
    font-size: .94rem;
    font-weight: 900;
    color: var(--txt);
}

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

.ap-grid li {
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    transition: box-shadow .18s, transform .18s;
}

.ap-grid li:hover {
    box-shadow: var(--sh2);
    transform: translateY(-2px);
}

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

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

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

.ap-cap {
    padding: 5px 7px 7px;
    border-top: 2px solid var(--red);
}

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

.ap-cap h5 a { color: var(--txt2); }
.ap-cap h5 a:hover { color: var(--red-dk); }

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

.ap-pager-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.ap-pager-btns a.apb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--bg);
    border: 1px solid var(--border2);
    border-radius: var(--r2);
    font-size: .83rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .15s;
}

.ap-pager-btns a.apb:hover {
    background: var(--red-lt);
    border-color: var(--red-bd);
    color: var(--red-dk);
}

.ap-pager-btns a.apb-on {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--red);
    border: 1px solid var(--red);
    border-radius: var(--r2);
    font-size: .83rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.ap-foot {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 8px 12px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.ap-flinks {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ap-flinks dd { display: inline; }

.ap-flinks a {
    display: inline-block;
    font-size: .76rem;
    color: var(--txt3);
    padding: 2px 9px;
    border-radius: var(--r2);
    border: 1px solid var(--border);
    background: var(--bg-soft);
    text-decoration: none;
    transition: all .15s;
}

.ap-flinks a:hover { color: var(--red-dk); border-color: var(--red-bd); }

.ap-copy {
    text-align: center;
    padding: 7px 0 12px;
    color: var(--txt4);
    font-size: .74rem;
}

/* ===== DETAIL PAGES ===== */
.ap-dtl-title {
    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(--border);
    border-left: 4px solid var(--red);
    border-radius: var(--r);
    box-shadow: var(--sh1);
}

.ap-dtl-title a {
    color: var(--red);
    font-weight: 700;
    margin-right: 6px;
}

.ap-dtl-body {
    font-size: .9rem;
    line-height: 2;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--sh1);
    margin: 4px 0;
    color: var(--txt2);
}

.ap-pic-zone {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.ap-pic-zone picture,
.ap-pic-zone img {
    width: 100%;
    height: auto;
    border-radius: var(--r2);
    display: block;
}

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

.ap-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: var(--red-pill);
    color: #fff;
    border: none;
    border-radius: var(--pill);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
    text-decoration: none;
    letter-spacing: .2px;
}

.ap-dl-btn:hover {
    background: var(--red-dk);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(217,43,43,.28);
}

.ap-cli-tip {
    text-align: center;
    padding: 6px;
    font-size: .81rem;
}

.ap-cli-tip a { color: var(--topbar); font-weight: 600; }
.ap-cli-tip a:hover { color: var(--red-dk); }

/* ===== SHARE ===== */
.ap-share {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 7px 12px;
    margin: 4px 0;
    flex-wrap: wrap;
}

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

.ap-share .aps-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--topbar);
    color: #fff;
    border: none;
    border-radius: var(--pill);
    font-size: .79rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0;
}

.ap-share .aps-btn:hover { background: var(--red); }

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

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

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

    .ap-sitename { font-size: 1.05rem; }
    .ap-domain-tag .adt-url { font-size: .95rem; }

    .ap-nav-row { align-items: stretch; }

    .ap-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;
    }

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

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

    .ap-search form {
        flex-wrap: nowrap;
        gap: 4px;
    }

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

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

    .ap-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }

    .ap-thumb { aspect-ratio: 600 / 350; }
    .ap-cap h5 { font-size: .71rem; }
    .ap-sect { padding: 9px 9px 7px; }
    .ap-dl-btn { padding: 9px 16px; font-size: .83rem; }
}

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

@media (max-width: 380px) {
    .ap-zone-lbl { font-size: 10px; }
    .ap-zone-links a { font-size: 12px; }
    .ap-search button { padding: 0 5px; font-size: .66rem; }
}
