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

:root {
    --bg: #ffffff;
    --bg-soft: #f9f9f7;
    --bg-muted: #f2f2ef;
    --bg-card: #ffffff;
    --orange: #f07800;
    --orange-dk: #d46500;
    --orange-lt: #fff8f0;
    --orange2: #ff8c00;
    --amber: #e8920a;
    --brown: #5c3d1e;
    --dark: #1a1a1a;
    --dark2: #333333;
    --mid: #666666;
    --txt: #1a1a1a;
    --txt2: #555555;
    --txt3: #999999;
    --border: #e8e8e4;
    --border2: #d4d4ce;
    --border-lt: #f0f0ec;
    --shadow1: 0 1px 3px rgba(0,0,0,.06);
    --shadow2: 0 3px 10px rgba(0,0,0,.10);
    --shadow3: 0 6px 20px rgba(0,0,0,.14);
    --radius: 6px;
    --radius2: 4px;
    --radius3: 20px;
}

html { font-size: 15px; }

body {
    background: var(--bg-soft);
    color: var(--txt);
    font-family: 'PingFang TC','Noto Sans TC','Microsoft JhengHei','Hiragino Sans GB',Arial,sans-serif;
    line-height: 1.65;
}

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

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

/* ===== SITE HEADER ===== */
.px-header {
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    padding: 11px 0;
    box-shadow: var(--shadow1);
}

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

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

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

/* Pixnet-style: bold orange with subtle underline tagline */
.px-site-name {
    font-size: 1.42rem;
    font-weight: 900;
    color: var(--orange);
    font-style: normal;
    letter-spacing: -.3px;
    text-decoration: none;
    border-bottom: none;
    line-height: 1;
}

.px-domain-tag {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: var(--orange);
    border-radius: var(--radius3);
    padding: 5px 15px;
    box-shadow: 0 2px 8px rgba(240,120,0,.25);
}

.px-domain-tag .pt-tip {
    font-size: 0.66rem;
    color: rgba(255,255,255,.72);
    white-space: nowrap;
    letter-spacing: .4px;
}

.px-domain-tag .pt-url {
    font-size: 1.08rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    letter-spacing: .2px;
}

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

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

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

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

.px-zone-lbl {
    background: var(--bg-muted);
    color: var(--txt3);
    font-size: .66rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    width: 62px;
    min-width: 62px;
    border-right: 1px solid var(--border);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

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

.px-zone-links a:hover {
    background: var(--orange-lt);
    color: var(--orange);
    border-color: #fdd0a0;
}

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

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

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

.px-search-card input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 37px;
    border: 1px solid var(--border2);
    border-radius: var(--radius3);
    padding: 0 15px;
    font-size: .86rem;
    color: var(--txt);
    background: var(--bg-soft);
    outline: none;
    transition: border-color .18s, box-shadow .18s;
    font-family: inherit;
}

.px-search-card input[type="text"]:focus {
    border-color: var(--orange);
    background: var(--bg);
    box-shadow: 0 0 0 3px rgba(240,120,0,.10);
}

.px-search-card button {
    height: 37px;
    padding: 0 13px;
    border: none;
    border-radius: var(--radius3);
    background: var(--dark2);
    color: #fff;
    font-size: .79rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .16s, transform .12s;
    flex-shrink: 0;
    font-family: inherit;
}

.px-search-card button:hover { background: var(--dark); transform: translateY(-1px); }

.px-search-card button[value="1"] {
    background: var(--orange);
}
.px-search-card button[value="1"]:hover { background: var(--orange-dk); }

.px-search-card button[value="2"] {
    background: var(--amber);
    color: #fff;
}
.px-search-card button[value="2"]:hover { background: #c87a06; }

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

.px-hot-card h4 {
    font-size: .74rem;
    font-weight: 700;
    color: var(--dark2);
    margin-bottom: 6px;
    padding-left: 8px;
    border-left: 3px solid var(--orange);
}

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

.px-tag-row .px-tag {
    display: inline-block;
    background: var(--bg-soft);
    color: var(--txt2);
    border: 1px solid var(--border);
    border-radius: var(--radius3);
    padding: 3px 12px;
    font-size: .74rem;
    text-decoration: none;
    transition: all .16s;
    font-weight: 500;
}

.px-tag-row .px-tag:hover {
    background: var(--orange-lt);
    color: var(--orange);
    border-color: #fdd0a0;
    transform: translateY(-1px);
}

/* ===== CONTENT SECTION ===== */
.px-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 13px 13px 10px;
    margin: 5px 0;
    box-shadow: var(--shadow1);
}

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

.px-sec-hd::before {
    content: '✦';
    color: var(--orange);
    font-size: .75rem;
    margin-right: 6px;
    flex-shrink: 0;
}

.px-sec-hd h3 {
    font-size: .97rem;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
}

.px-sec-hd h3 a { color: var(--dark); }
.px-sec-hd h3 a:hover { color: var(--orange); }

.px-sec-hd h4 {
    font-size: .95rem;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
}

.px-sec-hd h4::before {
    content: '✦';
    color: var(--orange);
    font-size: .75rem;
    margin-right: 6px;
}

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

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

.px-grid li:hover {
    box-shadow: var(--shadow3);
    transform: translateY(-3px);
}

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

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

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

.px-caption {
    padding: 6px 8px 8px;
    border-top: 1px solid var(--border-lt);
}

.px-caption h5 {
    font-size: .78rem;
    font-weight: 600;
    color: var(--txt);
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.px-caption h5 a { color: var(--txt); }
.px-caption h5 a:hover { color: var(--orange); }

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

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

.px-pager-row a.pp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--bg);
    border: 1px solid var(--border2);
    border-radius: var(--radius2);
    font-size: .82rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .16s;
    font-weight: 500;
}

.px-pager-row a.pp-btn:hover {
    background: var(--orange-lt);
    border-color: var(--orange);
    color: var(--orange);
}

.px-pager-row a.pp-btn-on {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--orange);
    border: 1px solid var(--orange);
    border-radius: var(--radius2);
    font-size: .82rem;
    font-weight: 800;
    color: #fff;
    cursor: default;
    box-shadow: 0 2px 8px rgba(240,120,0,.3);
}

/* ===== FOOTER ===== */
.px-flink-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 13px;
    margin: 5px 0;
    box-shadow: var(--shadow1);
}

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

.px-flinks dd { display: inline; }

.px-flinks a {
    display: inline-block;
    font-size: .73rem;
    color: var(--txt3);
    padding: 2px 10px;
    border-radius: var(--radius3);
    border: 1px solid var(--border);
    background: var(--bg-soft);
    text-decoration: none;
    transition: all .16s;
}

.px-flinks a:hover {
    color: var(--orange);
    border-color: #fdd0a0;
    background: var(--orange-lt);
}

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

/* ===== DETAIL PAGES ===== */
.px-dtl-title {
    line-height: 1.8;
    text-align: center;
    padding: 13px 16px;
    font-size: .97rem;
    margin: 5px 0;
    word-break: break-all;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 3px solid var(--orange);
    border-radius: var(--radius);
    box-shadow: var(--shadow1);
}

.px-dtl-title a {
    color: var(--orange);
    font-weight: 700;
    margin-right: 6px;
    font-size: .82rem;
}

.px-dtl-info {
    font-size: .9rem;
    line-height: 2;
    padding: 15px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow1);
    margin: 5px 0;
    color: var(--txt2);
}

.px-preview-box {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.px-preview-box picture,
.px-preview-box img {
    width: 100%;
    height: auto;
    border-radius: var(--radius2);
    display: block;
}

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

.px-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: var(--radius3);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .14s, box-shadow .18s;
    text-decoration: none;
    font-family: inherit;
    box-shadow: 0 2px 10px rgba(240,120,0,.28);
}

.px-dl-btn:hover {
    background: var(--orange-dk);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(240,120,0,.4);
}

.px-cli-hint {
    text-align: center;
    padding: 7px;
    font-size: .82rem;
}

.px-cli-hint a { color: var(--brown); font-weight: 600; }
.px-cli-hint a:hover { color: var(--orange); }

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

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

.px-share-bar .ps-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: var(--radius3);
    font-size: .79rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .16s, transform .12s;
    flex-shrink: 0;
    font-family: inherit;
}

.px-share-bar .ps-btn:hover {
    background: var(--orange-dk);
    transform: translateY(-1px);
}

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

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

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

    .px-site-name { font-size: 1.12rem; }
    .px-domain-tag .pt-url { font-size: .9rem; }

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

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

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

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

    /* Search: one row, no wrap */
    .px-search-card form {
        flex-wrap: nowrap;
        gap: 3px;
    }

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

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

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

    .px-thumb { aspect-ratio: 600 / 350; }
    .px-caption h5 { font-size: .72rem; }
    .px-section { padding: 10px 10px 8px; }
    .px-dl-btn { padding: 9px 16px; font-size: .84rem; }
}

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

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