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

:root {
    --white: #ffffff;
    --gray-f7: #f7f7f7;
    --gray-f2: #f2f2f2;
    --gray-e8: #e8e8e8;
    --gray-cc: #cccccc;
    --gray-99: #999999;
    --gray-66: #666666;
    --gray-33: #333333;
    --black: #1a1a1a;
    --brand: #e8490f;
    --brand-dk: #c83c0a;
    --brand-lt: #fef3ef;
    --accent: #f0a500;
    --accent-dk: #c88500;
    --divider: #ebebeb;
    --divider2: #d8d8d8;
    --sh1: 0 1px 3px rgba(0,0,0,.06);
    --sh2: 0 2px 8px rgba(0,0,0,.10);
    --sh3: 0 4px 16px rgba(0,0,0,.13);
    --bd: 1px solid var(--divider);
    --rr: 4px;
    --rr2: 2px;
    --rr3: 6px;
}

html { font-size: 15px; }

body {
    background: var(--gray-f7);
    color: var(--black);
    font-family: 'Source Han Sans TC','Noto Sans TC','PingFang TC','PingFang SC','Microsoft JhengHei','Microsoft YaHei',sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

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

/* ===== TOP IDENTITY BAR ===== */
.id-bar {
    background: var(--white);
    border-bottom: 1px solid var(--divider);
    padding: 10px 0;
}

.id-bar .rx-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

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

.id-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border-bottom: none;
}

.id-name {
    font-size: 1.30rem;
    font-weight: 700;
    color: var(--brand);
    font-style: normal;
    letter-spacing: -.3px;
    text-decoration: none;
    border-bottom: none;
}

.id-domain-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-f2);
    border: 1px solid var(--divider2);
    border-radius: 3px;
    padding: 4px 13px;
}

.id-domain-box .dm-note {
    font-size: 0.68rem;
    color: var(--gray-99);
    white-space: nowrap;
}

.id-domain-box .dm-addr {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--gray-33);
    white-space: nowrap;
}

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

/* ===== CATEGORY NAV ===== */
.sect-nav {
    background: var(--white);
    border: var(--bd);
    border-radius: var(--rr);
    overflow: hidden;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

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

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

.nav-area-tag {
    background: var(--gray-33);
    color: rgba(255,255,255,.80);
    font-size: .67rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    width: 60px;
    min-width: 60px;
    border-right: 1px solid rgba(255,255,255,.08);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

.nav-items-zone a {
    font-size: .81rem;
    color: var(--gray-66);
    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;
}

.nav-items-zone a:hover {
    background: var(--brand-lt);
    color: var(--brand);
    border-color: #f5bfac;
}

.nav-items-zone a.active {
    background: var(--brand);
    color: var(--white);
    border-color: var(--brand);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.qry-box {
    background: var(--white);
    border: var(--bd);
    border-radius: var(--rr);
    padding: 8px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

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

.qry-box input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1px solid var(--divider2);
    border-radius: var(--rr2);
    padding: 0 11px;
    font-size: .87rem;
    color: var(--black);
    background: var(--gray-f7);
    outline: none;
    transition: border-color .18s;
}

.qry-box input[type="text"]:focus {
    border-color: var(--brand);
    background: var(--white);
}

.qry-box button {
    height: 36px;
    padding: 0 11px;
    border: none;
    border-radius: var(--rr2);
    background: var(--gray-33);
    color: var(--white);
    font-size: .81rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}

.qry-box button:hover { background: var(--black); }
.qry-box button[value="1"] { background: var(--brand); }
.qry-box button[value="1"]:hover { background: var(--brand-dk); }
.qry-box button[value="2"] { background: var(--accent); }
.qry-box button[value="2"]:hover { background: var(--accent-dk); }

/* ===== HOT TAGS ===== */
.kw-panel {
    background: var(--white);
    border: var(--bd);
    border-radius: var(--rr);
    padding: 7px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

.kw-panel h4 {
    font-size: .78rem;
    font-weight: 700;
    color: var(--gray-33);
    margin-bottom: 5px;
}

.kw-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.kw-tags .kw-item {
    display: inline-block;
    background: var(--gray-f2);
    color: var(--gray-66);
    border: 1px solid var(--divider2);
    border-radius: 2px;
    padding: 2px 9px;
    font-size: .75rem;
    text-decoration: none;
    transition: all .15s;
}

.kw-tags .kw-item:hover {
    background: var(--brand-lt);
    color: var(--brand);
    border-color: #f5bfac;
}

/* ===== CONTENT SECTION ===== */
.rx-sect {
    background: var(--white);
    border: var(--bd);
    border-radius: var(--rr3);
    padding: 13px 13px 10px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.rx-sect-ttl {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--divider);
    position: relative;
}

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

.rx-sect-ttl h3 {
    font-size: .97rem;
    font-weight: 700;
    color: var(--gray-33);
}

.rx-sect-ttl h3 a { color: var(--gray-33); }
.rx-sect-ttl h3 a:hover { color: var(--brand); }

.rx-sect-ttl h4 {
    font-size: .94rem;
    font-weight: 700;
    color: var(--gray-33);
}

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

.item-grid li {
    border-radius: var(--rr);
    overflow: hidden;
    background: var(--gray-f7);
    border: 1px solid var(--divider);
    transition: box-shadow .18s, transform .18s;
}

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

.item-cover {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--gray-e8);
}

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

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

.item-txt {
    padding: 5px 7px 7px;
}

.item-txt h5 {
    font-size: .77rem;
    font-weight: 400;
    color: var(--gray-33);
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.item-txt h5 a { color: var(--gray-33); }
.item-txt h5 a:hover { color: var(--brand); }

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

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

.pager-btns a.pbn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--white);
    border: 1px solid var(--divider2);
    border-radius: var(--rr2);
    font-size: .83rem;
    color: var(--gray-66);
    text-decoration: none;
    transition: all .15s;
}

.pager-btns a.pbn:hover {
    background: var(--brand-lt);
    border-color: var(--brand);
    color: var(--brand);
}

.pager-btns a.pbn-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--brand);
    border: 1px solid var(--brand);
    border-radius: var(--rr2);
    font-size: .83rem;
    font-weight: 700;
    color: var(--white);
    cursor: default;
}

/* ===== FOOTER ===== */
.ftr-links {
    background: var(--white);
    border: var(--bd);
    border-radius: var(--rr);
    padding: 9px 13px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.fl-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.fl-row dd { display: inline; }

.fl-row a {
    display: inline-block;
    font-size: .76rem;
    color: var(--gray-99);
    padding: 2px 9px;
    border-radius: var(--rr2);
    border: 1px solid var(--divider);
    background: var(--gray-f7);
    text-decoration: none;
    transition: all .15s;
}

.fl-row a:hover { color: var(--brand); border-color: var(--brand); }

.cpr-row {
    text-align: center;
    padding: 8px 0 14px;
    color: var(--gray-99);
    font-size: .74rem;
}

/* ===== DETAIL PAGES ===== */
.vd-headline {
    line-height: 1.8;
    text-align: center;
    padding: 12px 15px;
    font-size: .96rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--white);
    border: var(--bd);
    border-left: 3px solid var(--brand);
    border-radius: var(--rr);
    box-shadow: var(--sh1);
}

.vd-headline a {
    color: var(--brand);
    font-weight: 700;
    margin-right: 6px;
}

.vd-specs {
    font-size: .89rem;
    line-height: 2.0;
    padding: 14px 17px;
    background: var(--white);
    border: var(--bd);
    border-radius: var(--rr);
    box-shadow: var(--sh1);
    margin: 4px 0;
}

.cap-frame {
    display: block;
    width: 100%;
    margin-top: 10px;
}

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

/* ===== DOWNLOAD BUTTONS ===== */
.get-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.get-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: var(--gray-33);
    color: var(--white);
    border: none;
    border-radius: var(--rr2);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, transform .13s;
    text-decoration: none;
}

.get-btn:hover {
    background: var(--brand);
    color: var(--white);
    transform: translateY(-1px);
}

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

.app-tip a { color: var(--gray-33); font-weight: 600; }
.app-tip a:hover { color: var(--brand); }

/* ===== SHARE BAR ===== */
.lnk-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--gray-f7);
    border: var(--bd);
    border-radius: var(--rr);
    padding: 8px 13px;
    margin: 4px 0;
    flex-wrap: wrap;
}

.lnk-bar .lnk-caption { font-size: .76rem; color: var(--gray-99); white-space: nowrap; }
.lnk-bar .lnk-val { font-size: .78rem; color: var(--gray-66); flex: 1; min-width: 0; word-break: break-all; }

.lnk-bar .lnk-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 13px;
    background: var(--gray-33);
    color: var(--white);
    border: none;
    border-radius: var(--rr2);
    font-size: .79rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}

.lnk-bar .lnk-copy:hover { background: var(--brand); }

/* ===== VISIBILITY HELPERS ===== */
.vis-pc { display: block; }
.vis-mb { display: none; }

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

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

    .id-name { font-size: 1.05rem; }
    .id-domain-box .dm-addr { font-size: .87rem; }

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

    .nav-area-tag {
        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;
    }

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

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

    .qry-box form {
        flex-wrap: nowrap;
        gap: 4px;
    }

    .qry-box input[type="text"] {
        height: 34px;
        font-size: .78rem;
        padding: 0 7px;
    }

    .qry-box button {
        height: 34px;
        padding: 0 7px;
        font-size: .73rem;
    }

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

    .item-cover { aspect-ratio: 600 / 350; }
    .item-txt h5 { font-size: .72rem; }
    .rx-sect { padding: 9px 9px 7px; }
    .get-btn { padding: 9px 14px; font-size: .83rem; }
}

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

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