/* Portal Theme — Blue & Orange Edition */

:root {
    --oz: #ff6600;
    --oz-dk: #e05500;
    --oz-lt: #ff8833;
    --bl: #2176c7;
    --bl-dk: #155fa0;
    --bl-lt: #3d8fd8;
    --bg-root: #f0f2f5;
    --bg-panel: #ffffff;
    --bg-panel2: #f7f9fc;
    --bg-topbar: #2176c7;
    --txt-main: #333333;
    --txt-sub: #666666;
    --txt-light: #999999;
    --bdr: #dde3ea;
    --bdr-lt: #eaeff5;
    --sh: rgba(0, 0, 0, 0.06);
    --sh2: rgba(33, 118, 199, 0.18);
    --rad: 4px;
    --rad2: 2px;
    --ease: all 0.18s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', sans-serif;
    background: var(--bg-root);
    color: var(--txt-main);
    line-height: 1.5;
    font-size: 14px;
    overflow-x: hidden;
}

/* ================================================
   TOP BAR — NOT fixed/sticky
   ================================================ */
.topbar {
    background: var(--bg-topbar);
    border-bottom: 3px solid var(--oz);
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.brand-logo {
    text-decoration: none;
    display: inline-block;
}

.brand-logo:hover .brand-text { opacity: 0.9; }

.brand-text {
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 1px;
    text-shadow: 1px 2px 4px rgba(0,0,0,0.3);
    display: inline-block;
    padding-bottom: 2px;
    border-bottom: 2px solid var(--oz);
}

.addr-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 3px;
    padding: 4px 12px;
}

.addr-lbl {
    font-size: 11px;
    font-weight: 700;
    color: #ffe082;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.addr-val {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

/* ================================================
   LAYOUT WRAPPER
   ================================================ */
.gw {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 14px;
}

.gs {
    padding: 10px 0;
}

/* ================================================
   CATEGORY NAV
   ================================================ */
.cnav-wrap {
    background: var(--bg-panel);
    border: 1px solid var(--bdr);
    border-top: 3px solid var(--bl);
    border-radius: 0 0 var(--rad) var(--rad);
    margin-bottom: 10px;
    box-shadow: 0 1px 4px var(--sh);
    overflow: hidden;
}

.cnav-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--bdr-lt);
}

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

.cnav-zone {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: var(--bl);
    white-space: normal;
    word-break: break-all;
    width: 10%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 3px;
    flex-shrink: 0;
    line-height: 1.2;
    border-right: 2px solid var(--oz);
}

.cnav-links {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 7px 10px;
    align-items: center;
}

.cnav-links a {
    display: inline-block;
    color: var(--txt-sub);
    text-decoration: none;
    padding: 4px 6px;
    border-radius: var(--rad2);
    transition: var(--ease);
    background: var(--bg-panel2);
    border: 1px solid var(--bdr);
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    width: calc((100% - 28px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.cnav-links a:hover,
.cnav-links a.active {
    background: var(--oz);
    color: #fff;
    border-color: var(--oz-dk);
    font-weight: 700;
}

/* ================================================
   SEARCH
   ================================================ */
.qbox {
    background: var(--bg-panel);
    border: 1px solid var(--bdr);
    border-radius: var(--rad);
    padding: 10px 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px var(--sh);
}

.qbox form {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
}

.qbox input[type="text"] {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid var(--bdr);
    border-radius: var(--rad2);
    background: var(--bg-root);
    color: var(--txt-main);
    font-size: 14px;
    transition: var(--ease);
    outline: none;
}

.qbox input[type="text"]:focus {
    border-color: var(--bl);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(33,118,199,0.12);
}

.qbox input[type="text"]::placeholder { color: var(--txt-light); }

.qbox button {
    padding: 8px 14px;
    border: none;
    border-radius: var(--rad2);
    background: var(--bl);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

.qbox button:hover {
    background: var(--oz);
    box-shadow: 0 3px 8px var(--sh2);
}

/* ================================================
   HOT SEARCH TAGS
   ================================================ */
.htags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 9px 12px;
    background: var(--bg-panel);
    border: 1px solid var(--bdr);
    border-radius: var(--rad);
    margin-bottom: 10px;
    box-shadow: 0 1px 4px var(--sh);
}

.htag-item {
    padding: 3px 11px;
    background: var(--bg-root);
    border-radius: 2px;
    color: var(--txt-sub);
    text-decoration: none;
    font-size: 12px;
    transition: var(--ease);
    border: 1px solid var(--bdr);
    line-height: 1.7;
}

.htag-item:hover {
    background: var(--oz);
    color: #fff;
    border-color: var(--oz);
}

/* ================================================
   CONTENT SECTIONS
   ================================================ */
.vsec {
    background: var(--bg-panel);
    border: 1px solid var(--bdr);
    border-radius: var(--rad);
    margin-bottom: 12px;
    box-shadow: 0 1px 4px var(--sh);
    overflow: hidden;
}

.vsec-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    background: var(--bg-panel2);
    border-bottom: 2px solid var(--bdr);
    min-height: 40px;
}

.vsec-ttl {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: var(--txt-main);
    display: flex;
    align-items: center;
    gap: 7px;
}

.vsec-ttl::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: var(--oz);
    border-radius: 1px;
    flex-shrink: 0;
}

.vsec-ttl a {
    color: var(--txt-main);
    text-decoration: none;
    transition: var(--ease);
}

.vsec-ttl a:hover { color: var(--oz); }

.vsec-body {
    padding: 12px;
}

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

.pgrid > li {
    animation: popIn 0.4s ease both;
}

.pgrid > li:nth-child(1) { animation-delay: 0.03s; }
.pgrid > li:nth-child(2) { animation-delay: 0.06s; }
.pgrid > li:nth-child(3) { animation-delay: 0.09s; }
.pgrid > li:nth-child(4) { animation-delay: 0.12s; }
.pgrid > li:nth-child(5) { animation-delay: 0.15s; }
.pgrid > li:nth-child(6) { animation-delay: 0.18s; }
.pgrid > li:nth-child(7) { animation-delay: 0.21s; }
.pgrid > li:nth-child(8) { animation-delay: 0.24s; }

@keyframes popIn {
    from { opacity: 0; transform: scale(0.97) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.thumb-lnk {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--rad2);
    aspect-ratio: 600 / 350;
    background: var(--bg-root);
    border: 1px solid var(--bdr);
    transition: var(--ease);
}

.thumb-lnk img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.thumb-lnk::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.thumb-lnk:hover {
    border-color: var(--oz);
    box-shadow: 0 4px 12px rgba(255,102,0,0.2);
}

.thumb-lnk:hover img { transform: scale(1.05); }
.thumb-lnk:hover::after { opacity: 1; }

.item-info {
    padding: 6px 0 2px;
}

.item-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
}

.item-info h5 a {
    color: var(--txt-main);
    text-decoration: none;
    transition: var(--ease);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-info h5 a:hover { color: var(--oz); }

/* ================================================
   VIDEO PLAYER
   ================================================ */
.video-container {
    width: 100%;
    height: 600px;
    max-height: 600px;
    margin-bottom: 14px;
    background: #111;
    border-radius: var(--rad);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    position: relative;
}

.video-container iframe,
.video-container video,
.video-container #video-container {
    width: 100%;
    height: 100%;
    border: none;
}

.MacPlayer {
    background: #111;
    border-radius: var(--rad);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

/* ================================================
   TORRENT PREVIEW
   ================================================ */
.capture-zone picture,
.capture-zone img,
.capture-zone .img_item,
.capture-zone .img_item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--rad2);
    border: 1px solid var(--bdr);
}

/* ================================================
   ACTION BUTTONS
   ================================================ */
.act-bar {
    text-align: center;
    padding: 14px 12px;
    background: var(--bg-panel);
    border: 1px solid var(--bdr);
    border-radius: var(--rad);
    margin: 12px 0;
    box-shadow: 0 1px 4px var(--sh);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.actbtn {
    display: inline-block;
    padding: 9px 22px;
    background: var(--oz);
    color: #fff;
    text-decoration: none;
    border-radius: var(--rad2);
    font-weight: 700;
    font-size: 14px;
    transition: var(--ease);
    border: none;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.actbtn:hover {
    background: var(--oz-dk);
    box-shadow: 0 4px 12px rgba(255,102,0,0.3);
    transform: translateY(-1px);
}

.actbtn:active { transform: translateY(0); }

/* ================================================
   SHARE STRIP
   ================================================ */
.share-strip {
    background: var(--bg-panel);
    border: 1px solid var(--bdr);
    border-radius: var(--rad);
    padding: 12px 14px;
    margin: 12px 0;
    box-shadow: 0 1px 4px var(--sh);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.url-preview {
    background: var(--bg-root);
    border: 1px solid var(--bdr);
    border-radius: var(--rad2);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.url-lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--bl);
    white-space: nowrap;
    flex-shrink: 0;
}

.url-txt {
    font-size: 12px;
    color: var(--txt-sub);
    word-break: break-all;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cpybtn {
    padding: 8px 18px;
    background: var(--bl);
    color: #fff;
    border: none;
    border-radius: var(--rad2);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.cpybtn:hover {
    background: var(--oz);
    box-shadow: 0 3px 10px rgba(255,102,0,0.25);
}

.cpy-ico { font-size: 15px; }

/* ================================================
   DETAIL TITLE BAR
   ================================================ */
.dtl-ttl-bar {
    line-height: 1.7;
    text-align: center;
    padding: 14px 18px;
    font-size: 16px;
    margin: 12px 0;
    word-break: break-all;
    background: var(--bg-panel);
    border: 1px solid var(--bdr);
    border-left: 4px solid var(--oz);
    border-radius: var(--rad);
    box-shadow: 0 1px 4px var(--sh);
}

.dtl-ttl-bar a {
    color: var(--oz);
    text-decoration: none;
    font-weight: 700;
    margin-right: 6px;
    transition: var(--ease);
}

.dtl-ttl-bar a:hover { color: var(--oz-dk); }
.dtl-ttl-bar b { color: var(--txt-main); }

/* ================================================
   DETAIL INFO BLOCK
   ================================================ */
.dtl-info {
    font-size: 14px;
    line-height: 1.9;
    padding: 18px 20px;
    background: var(--bg-panel);
    border: 1px solid var(--bdr);
    border-radius: var(--rad);
    margin: 12px 0;
    box-shadow: 0 1px 4px var(--sh);
}

/* ================================================
   PAGINATION
   ================================================ */
.pgr {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    padding: 16px 0;
}

.pgr-btn,
.pgr-cur {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--rad2);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ease);
    min-width: 34px;
    text-align: center;
    font-weight: 500;
    line-height: 1.5;
}

.pgr-btn {
    background: var(--bg-panel);
    color: var(--txt-main);
    border: 1px solid var(--bdr);
}

.pgr-btn:hover {
    background: var(--oz);
    border-color: var(--oz);
    color: #fff;
}

.pgr-cur {
    background: var(--oz);
    color: #fff;
    border: 1px solid var(--oz-dk);
    cursor: default;
    font-weight: 700;
}

/* ================================================
   FOOTER
   ================================================ */
.ftr {
    padding: 20px 0;
    text-align: center;
    border-top: 2px solid var(--bdr);
    margin-top: 20px;
    background: var(--bg-panel);
}

.ftr-copy p {
    margin: 5px 0;
    color: var(--txt-light);
    font-size: 12px;
    line-height: 1.8;
}

.ftr-copy a {
    color: var(--txt-light);
    text-decoration: none;
    transition: var(--ease);
}

.ftr-copy a:hover { color: var(--oz); }

.fl-area {
    padding: 10px 12px;
    background: var(--bg-panel);
    border: 1px solid var(--bdr);
    border-radius: var(--rad);
}

.fl-area dl { margin: 0; }
.fl-area dd { display: inline-block; margin: 3px 5px; }

.fl-area a {
    color: var(--txt-sub);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ease);
}

.fl-area a:hover { color: var(--oz); }

/* ================================================
   UTILITIES
   ================================================ */
.dsk-only { display: block; }
.mob-only  { display: block; }

.clrfix::after {
    content: '';
    display: table;
    clear: both;
}

img[data-original] { background: var(--bg-root); }

/* ================================================
   RESPONSIVE — ≤768px
   ================================================ */
@media (max-width: 768px) {

    .gw { padding: 0 8px; }

    .topbar { border-bottom-width: 2px; }

    .topbar-inner {
        gap: 8px;
        padding: 8px 0;
    }

    .brand-text { font-size: 19px; }

    .addr-badge { padding: 3px 9px; gap: 5px; }
    .addr-lbl { font-size: 10px; }
    .addr-val { font-size: 13px; }

    .gs { padding: 7px 0; }

    /* NAV mobile: zone 15%, links 85%, 4 per row */
    .cnav-zone {
        width: 15%;
        font-size: 10px;
        padding: 6px 2px;
        word-break: break-all;
        line-height: 1.2;
    }

    .cnav-links {
        width: 85%;
        gap: 3px;
        padding: 6px 5px;
    }

    .cnav-links a {
        font-size: 14px;
        padding: 4px 2px;
        width: calc((100% - 9px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    /* GRID: 2 columns */
    .pgrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
    }

    .thumb-lnk:hover { transform: none; }
    .item-info h5 { font-size: 12px; }
    .vsec-ttl { font-size: 15px; }

    .vsec-body { padding: 9px; }
    .vsec-hdr { padding: 0 10px; min-height: 36px; }

    .video-container {
        height: 56.25vw;
        max-height: 360px;
        margin-bottom: 10px;
    }

    .qbox { padding: 8px; }

    .qbox input[type="text"] {
        padding: 7px 10px;
        font-size: 13px;
        min-width: 80px;
    }

    .qbox button { padding: 7px 10px; font-size: 12px; }

    .htags { padding: 7px 9px; gap: 5px; }
    .htag-item { padding: 3px 9px; font-size: 12px; }

    .act-bar { padding: 10px 6px; gap: 7px; }
    .actbtn { padding: 8px 14px; font-size: 12px; }

    .share-strip { padding: 9px 10px; gap: 7px; flex-wrap: nowrap; }
    .url-preview { padding: 7px 9px; gap: 6px; }
    .url-lbl { font-size: 10px; }
    .url-txt { font-size: 11px; }
    .cpybtn { padding: 8px 11px; font-size: 12px; }

    .pgr { padding: 12px 0; gap: 3px; }
    .pgr-btn, .pgr-cur { padding: 5px 10px; font-size: 12px; min-width: 30px; }

    .dtl-ttl-bar { font-size: 14px; padding: 12px 12px; }
    .dtl-info { padding: 13px 14px; font-size: 13px; }

    .ftr { padding: 14px 0; margin-top: 14px; }

    .dsk-only { display: none !important; }
}

/* ================================================
   RESPONSIVE — ≤480px
   ================================================ */
@media (max-width: 480px) {

    .topbar-inner { padding: 7px 0; gap: 6px; }
    .brand-text { font-size: 17px; }

    /* small phone: zone 15%, links 12px min */
    .cnav-zone { width: 15%; font-size: 10px; padding: 5px 1px; }
    .cnav-links { width: 85%; gap: 2px; padding: 5px 3px; }
    .cnav-links a {
        font-size: 12px;
        padding: 3px 1px;
        width: calc((100% - 6px) / 4);
    }

    .pgrid { gap: 7px; }

    .video-container {
        height: 56.25vw;
        max-height: 260px;
    }

    .act-bar { padding: 9px 3px; gap: 5px; flex-wrap: nowrap; }
    .actbtn { padding: 7px 10px; font-size: 11px; }

    .share-strip { padding: 7px 7px; gap: 5px; flex-wrap: nowrap; }
    .cpybtn { padding: 7px 9px; font-size: 11px; }
    .cpy-ico { font-size: 13px; }
    .dtl-info { padding: 10px 11px; font-size: 13px; }
}

@media (min-width: 769px) {
    .mob-only { display: none !important; }
}
