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

:root {
    --bg: #ffffff;
    --bg-soft: #f0f0f0;
    --bg-muted: #e2e2e2;
    --ink: #1a1a1a;
    --ink2: #111111;
    --ink3: #222222;
    --red: #d00000;
    --red-dk: #a50000;
    --red-lt: #fff2f2;
    --blue: #1464a0;
    --blue-dk: #0d4a7a;
    --blue-lt: #e8f2fa;
    --txt: #1a1a1a;
    --txt2: #3a3a3a;
    --txt3: #888888;
    --bdr: #d8d8d8;
    --bdr2: #c4c4c4;
    --sh1: 0 1px 3px rgba(0,0,0,.08);
    --sh2: 0 2px 8px rgba(0,0,0,.11);
    --sh3: 0 4px 18px rgba(0,0,0,.16);
    --rr: 4px;
    --rr2: 3px;
    --rr3: 5px;
}

html { font-size: 15px; }

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

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

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

/* ===== SITE HEADER ===== */
.global-header {
    background: var(--ink2);
    border-bottom: 3px solid var(--red);
    padding: 8px 0;
}

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

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

.gh-logotype {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.gh-title {
    font-size: 1.38rem;
    font-weight: 900;
    color: #ffffff;
    font-style: normal;
    letter-spacing: -0.5px;
    border-bottom: none;
    text-decoration: none;
    text-transform: uppercase;
}

.gh-title em {
    color: var(--red);
    font-style: normal;
}

.domain-ticker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--rr2);
    padding: 4px 12px;
}

.domain-ticker .tk-caption {
    font-size: 0.67rem;
    color: rgba(255,255,255,.5);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.domain-ticker .tk-value {
    font-size: 1.07rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

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

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

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

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

.cat-label {
    background: var(--ink2);
    color: rgba(255,255,255,.75);
    font-size: .67rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 2px;
    width: 62px;
    min-width: 62px;
    border-right: 2px solid var(--red);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
    text-transform: uppercase;
}

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

.cat-entries 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;
}

.cat-entries a:hover {
    background: var(--red-lt);
    color: var(--red);
    border-color: #f0b0b0;
}

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

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

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

.query-bar 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 .15s;
}

.query-bar input[type="text"]:focus {
    border-color: var(--red);
    background: var(--bg);
}

.query-bar button {
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: var(--rr2);
    background: var(--ink2);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.query-bar button:hover { background: var(--ink3); }

.query-bar button[value="1"] {
    background: var(--red);
    color: #fff;
}
.query-bar button[value="1"]:hover { background: var(--red-dk); }

.query-bar button[value="2"] {
    background: var(--blue);
    color: #fff;
}
.query-bar button[value="2"]:hover { background: var(--blue-dk); }

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

.trending-bar h4 {
    font-size: .78rem;
    font-weight: 800;
    color: var(--ink2);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.tag-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag-strip .ts-tag {
    display: inline-block;
    background: var(--bg-soft);
    color: var(--txt2);
    border: 1px solid var(--bdr2);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all .15s;
}

.tag-strip .ts-tag:hover {
    background: var(--red-lt);
    color: var(--red);
    border-color: #f0b0b0;
}

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

.module-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--bg-muted);
    position: relative;
}

.module-head::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 40px;
    height: 2px;
    background: var(--red);
    border-radius: 2px;
}

.module-head h3 {
    font-size: .97rem;
    font-weight: 900;
    color: var(--ink2);
    text-transform: uppercase;
    letter-spacing: .3px;
}

.module-head h3 a { color: var(--ink2); }
.module-head h3 a:hover { color: var(--red); }

.module-head h4 {
    font-size: .94rem;
    font-weight: 900;
    color: var(--ink2);
    text-transform: uppercase;
}

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

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

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

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

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

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

.card-body {
    padding: 5px 7px 6px;
    border-top: 2px solid var(--red);
}

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

.card-body h5 a { color: var(--txt); }
.card-body h5 a:hover { color: var(--red); }

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

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

.turn-controls a.tc-pg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--bg);
    border: 1.5px solid var(--bdr2);
    border-radius: var(--rr2);
    font-size: .83rem;
    font-weight: 600;
    color: var(--txt2);
    text-decoration: none;
    transition: all .15s;
}

.turn-controls a.tc-pg:hover {
    background: var(--red-lt);
    border-color: var(--red);
    color: var(--red);
}

.turn-controls a.tc-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--red);
    border: 1.5px solid var(--red);
    border-radius: var(--rr2);
    font-size: .83rem;
    font-weight: 800;
    color: #fff;
    cursor: default;
}

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

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

.partner-list dd { display: inline; }

.partner-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-soft);
    text-decoration: none;
    transition: all .15s;
}

.partner-list a:hover { color: var(--red); border-color: var(--red); }

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

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

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

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

.screencap-wrap {
    display: block;
    width: 100%;
    margin-top: 10px;
}

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

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

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: var(--ink2);
    color: #fff;
    border: none;
    border-radius: var(--rr2);
    font-size: .89rem;
    font-weight: 800;
    cursor: pointer;
    transition: background .18s, transform .14s;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.cta-button:hover {
    background: var(--red);
    color: #fff;
    transform: translateY(-1px);
}

.app-hint {
    text-align: center;
    padding: 6px;
    font-size: .81rem;
}

.app-hint a { color: var(--blue); font-weight: 700; }
.app-hint a:hover { color: var(--blue-dk); }

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

.share-dock .sd-label { font-size: .76rem; color: var(--txt3); white-space: nowrap; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.share-dock .sd-link { font-size: .78rem; color: var(--txt2); flex: 1; min-width: 0; word-break: break-all; }

.share-dock .sd-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 13px;
    background: var(--ink2);
    color: #fff;
    border: none;
    border-radius: var(--rr2);
    font-size: .79rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
    text-transform: uppercase;
}

.share-dock .sd-btn:hover { background: var(--red); }

/* ===== VIS HELPERS ===== */
.desk-only { display: block; }
.mobi-only { display: none; }

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

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

    .gh-title { font-size: 1.06rem; }
    .domain-ticker .tk-value { font-size: .93rem; }

    .cat-strip { align-items: stretch; }

    .cat-label {
        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;
    }

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

    .cat-entries 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 */
    .query-bar form {
        flex-wrap: nowrap;
        gap: 4px;
    }

    .query-bar input[type="text"] {
        height: 34px;
        font-size: .77rem;
        padding: 0 7px;
    }

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

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

    .card-img { aspect-ratio: 600 / 350; }
    .card-body h5 { font-size: .71rem; }
    .content-module { padding: 8px 8px 6px; }
    .cta-button { padding: 9px 13px; font-size: .83rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .cat-label { font-size: 10px; }
    .cat-entries a { font-size: 13px; }
}

@media (max-width: 380px) {
    .cat-label { font-size: 10px; }
    .cat-entries a { font-size: 12px; }
    .query-bar button { padding: 0 5px; font-size: .67rem; }
}
