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

:root {
    --snow: #ffffff;
    --page: #f5f6fa;
    --card: #ffffff;
    --lifted: #f8f9fc;
    --txblue: #1672ec;
    --txblue-dk: #1158c4;
    --txblue-lt: rgba(22,114,236,.08);
    --txblue-mid: #3a86ef;
    --txred: #e3001e;
    --ink: #111111;
    --body: #333333;
    --dim: #666666;
    --muted: #999999;
    --ghost: #c8c8c8;
    --line: #e8e8ee;
    --line2: #d8d8e0;
    --e1: 0 1px 4px rgba(22,114,236,.06);
    --e2: 0 3px 12px rgba(22,114,236,.09);
    --e3: 0 7px 24px rgba(22,114,236,.13);
    --rx: 6px;
    --rx2: 4px;
    --rx3: 10px;
}

html { font-size: 15px; }

body {
    background: var(--page);
    color: var(--ink);
    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(--txblue); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.tx-cf::after { content: ''; display: table; clear: both; }

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

/* ===== SITE HEADER ===== */
.tx-header {
    background: var(--snow);
    border-bottom: 2px solid var(--txblue);
    padding: 9px 0;
    box-shadow: var(--e1);
}

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

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

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

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

.tx-domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--txblue-lt);
    border: 1px solid rgba(22,114,236,.2);
    border-radius: var(--rx2);
    padding: 4px 12px;
}

.tx-domain-badge .tdb-hint {
    font-size: .67rem;
    color: var(--muted);
    white-space: nowrap;
}

.tx-domain-badge .tdb-val {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--txblue);
    white-space: nowrap;
}

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

/* ===== CATEGORY NAV ===== */
.tx-navboard {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--rx3);
    overflow: hidden;
    margin: 3px 0;
    box-shadow: var(--e1);
}

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

.tx-navrow:last-child { border-bottom: none; }

.tx-zone-mark {
    background: var(--txblue);
    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(255,255,255,.12);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

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

.tx-catlinks a:hover {
    background: var(--txblue-lt);
    color: var(--txblue);
    border-color: rgba(22,114,236,.18);
}

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

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

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

.tx-searchbar input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--line2);
    border-radius: var(--rx2);
    padding: 0 13px;
    font-size: .86rem;
    color: var(--ink);
    background: var(--page);
    outline: none;
    transition: border-color .18s, background .18s;
}

.tx-searchbar input[type="text"]::placeholder { color: var(--ghost); }
.tx-searchbar input[type="text"]:focus {
    border-color: var(--txblue);
    background: var(--snow);
}

.tx-searchbar button {
    height: 36px;
    padding: 0 13px;
    border: none;
    border-radius: var(--rx2);
    background: var(--body);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}

.tx-searchbar button:hover { background: var(--ink); }

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

.tx-searchbar button[value="2"] {
    background: var(--txred);
    color: #fff;
    font-weight: 700;
}
.tx-searchbar button[value="2"]:hover { background: #b8001a; }

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

.tx-hotzone h4 {
    font-size: .74rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 5px;
    letter-spacing: .4px;
}

.tx-hotzone h4 strong { color: var(--txblue); }

.tx-tagstrip {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tx-tagstrip .txtag {
    display: inline-block;
    background: var(--lifted);
    color: var(--dim);
    border: 1px solid var(--line2);
    border-radius: var(--rx2);
    padding: 2px 9px;
    font-size: .73rem;
    text-decoration: none;
    transition: all .15s;
}

.tx-tagstrip .txtag:hover {
    background: var(--txblue-lt);
    color: var(--txblue);
    border-color: rgba(22,114,236,.22);
}

/* ===== CONTENT SECTION ===== */
.tx-section {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--rx3);
    padding: 12px 12px 10px;
    margin: 3px 0;
    box-shadow: var(--e1);
}

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

.tx-sect-hd::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 36px;
    height: 2px;
    background: var(--txblue);
    border-radius: 2px;
}

.tx-sect-hd h3 {
    font-size: .96rem;
    font-weight: 800;
    color: var(--ink);
}

.tx-sect-hd h3 a { color: var(--ink); }
.tx-sect-hd h3 a:hover { color: var(--txblue); }

.tx-sect-hd h4 {
    font-size: .94rem;
    font-weight: 800;
    color: var(--ink);
}

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

.tx-filmgrid li {
    border-radius: var(--rx);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--lifted);
    transition: box-shadow .2s, border-color .2s, transform .2s;
}

.tx-filmgrid li:hover {
    box-shadow: var(--e3);
    border-color: rgba(22,114,236,.3);
    transform: translateY(-2px);
}

.tx-coverwrap {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: #e8eef8;
    position: relative;
}

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

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

.tx-coverfoot {
    padding: 5px 7px 7px;
}

.tx-coverfoot h5 {
    font-size: .75rem;
    font-weight: 400;
    color: var(--dim);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tx-coverfoot h5 a { color: var(--dim); }
.tx-coverfoot h5 a:hover { color: var(--txblue); }

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

.tx-pgbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.tx-pgbar a.txpg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--card);
    border: 1.5px solid var(--line2);
    border-radius: var(--rx2);
    font-size: .82rem;
    color: var(--dim);
    text-decoration: none;
    transition: all .15s;
}

.tx-pgbar a.txpg:hover {
    background: var(--txblue-lt);
    border-color: var(--txblue);
    color: var(--txblue);
}

.tx-pgbar a.txpg-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--txblue);
    border: 1.5px solid var(--txblue);
    border-radius: var(--rx2);
    font-size: .82rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.tx-flinks {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--rx);
    padding: 8px 12px;
    margin: 3px 0;
    box-shadow: var(--e1);
}

.tx-flink-dl {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tx-flink-dl dd { display: inline; }

.tx-flink-dl a {
    display: inline-block;
    font-size: .74rem;
    color: var(--ghost);
    padding: 2px 9px;
    border-radius: var(--rx2);
    border: 1px solid var(--line);
    background: var(--page);
    text-decoration: none;
    transition: all .15s;
}

.tx-flink-dl a:hover { color: var(--txblue); border-color: rgba(22,114,236,.28); }

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

/* ===== DETAIL PAGES ===== */
.tx-detail-ttl {
    line-height: 1.8;
    text-align: center;
    padding: 11px 14px;
    font-size: .96rem;
    margin: 3px 0;
    word-break: break-all;
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--txblue);
    border-radius: var(--rx);
    box-shadow: var(--e1);
    color: var(--ink);
}

.tx-detail-ttl a {
    color: var(--txblue);
    font-weight: 700;
    margin-right: 6px;
}

.tx-detail-body {
    font-size: .88rem;
    line-height: 2;
    padding: 13px 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--rx);
    box-shadow: var(--e1);
    margin: 3px 0;
    color: var(--dim);
}

.tx-previewpic {
    display: block;
    width: 100%;
    margin-top: 9px;
}

.tx-previewpic picture,
.tx-previewpic img {
    width: 100%;
    height: auto;
    border-radius: var(--rx2);
    display: block;
}

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

.tx-actbtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--txblue);
    color: #fff;
    border: none;
    border-radius: var(--rx2);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .15s;
    text-decoration: none;
    letter-spacing: .2px;
}

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

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

.tx-clinenote a { color: var(--muted); font-weight: 600; }
.tx-clinenote a:hover { color: var(--txblue); }

/* ===== SHARE ===== */
.tx-shareline {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--lifted);
    border: 1px solid var(--line);
    border-radius: var(--rx);
    padding: 7px 12px;
    margin: 3px 0;
    flex-wrap: wrap;
}

.tx-shareline .tsl-lbl { font-size: .73rem; color: var(--ghost); white-space: nowrap; }
.tx-shareline .tsl-url { font-size: .76rem; color: var(--dim); flex: 1; min-width: 0; word-break: break-all; }

.tx-shareline .tsl-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--txblue);
    color: #fff;
    border: none;
    border-radius: var(--rx2);
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}

.tx-shareline .tsl-copy:hover { background: var(--txblue-dk); }

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

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

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

    .tx-sitename { font-size: 1.06rem; }
    .tx-domain-badge .tdb-val { font-size: .9rem; }

    .tx-navrow { align-items: stretch; }

    .tx-zone-mark {
        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;
    }

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

    .tx-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 */
    .tx-searchbar form {
        flex-wrap: nowrap;
        gap: 3px;
    }

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

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

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

    .tx-coverwrap { aspect-ratio: 600 / 350; }
    .tx-coverfoot h5 { font-size: .7rem; }
    .tx-section { padding: 8px 8px 6px; }
    .tx-actbtn { padding: 9px 16px; font-size: .84rem; }
}

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

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