/* PortalNews - Sina-Style Navy & White Theme */

:root {
    --clr-navy: #1a2744;
    --clr-navy2: #243258;
    --clr-red: #cc2222;
    --clr-red2: #e02020;
    --clr-blue: #2255aa;
    --clr-blue2: #336bc8;
    --clr-bg: #f2f3f5;
    --clr-bg2: #ffffff;
    --clr-bg3: #f7f8fa;
    --clr-bg4: #eceef2;
    --clr-text: #1a1a1a;
    --clr-text2: #333333;
    --clr-text-muted: #888888;
    --clr-text-light: #aaaaaa;
    --clr-border: #dde0e8;
    --clr-border2: #c8cdd8;
    --clr-shadow: rgba(0, 0, 0, 0.07);
    --clr-shadow-md: rgba(0, 0, 0, 0.12);
    --rnd: 4px;
    --rnd-sm: 3px;
    --rnd-lg: 6px;
    --rnd-xl: 8px;
    --ease: all 0.22s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: var(--clr-bg);
    color: var(--clr-text2);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============================
   TOP BAR / BRAND
============================ */
.site-topbar {
    background: var(--clr-navy);
    padding: 0;
    border-bottom: 2px solid var(--clr-red);
}

.topbar-inner {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    min-height: 44px;
}

.brand-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    padding: 8px 20px 8px 0;
}

.brand-name {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 1px;
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.1);
    border-left: 1px solid rgba(255,255,255,0.18);
    border-right: 1px solid rgba(255,255,255,0.18);
    padding: 0 18px;
}

.badge-tag {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
}

.badge-addr {
    font-size: 17px;
    font-weight: 800;
    color: #ffe066;
    letter-spacing: 0.3px;
}

/* ============================
   WRAP / LAYOUT
============================ */
.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 14px;
}

.section-gap {
    padding: 6px 0;
}

/* ============================
   BANNER ZONE
============================ */
.banner-zone {
    margin: 5px 0;
    overflow: hidden;
    border-radius: var(--rnd);
    border: 1px solid var(--clr-border);
}

/* ============================
   NAV CHANNELS
============================ */
.channel-nav {
    background: var(--clr-navy2);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 7px;
    border: none;
}

.ch-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

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

.ch-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.65);
    white-space: nowrap;
    width: 10%;
    min-width: 52px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 4px;
    flex-shrink: 0;
    background: rgba(0,0,0,0.15);
    font-size: 10px;
}

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

.ch-links a {
    display: inline-block;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 4px 3px;
    border-radius: var(--rnd-sm);
    transition: var(--ease);
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 28px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
    font-size: 13px;
}

.ch-links a:hover {
    background: var(--clr-red);
    color: #fff;
    border-color: var(--clr-red);
    font-weight: 600;
}

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

/* ============================
   SEARCH BOX
============================ */
.search-zone {
    background: var(--clr-bg2);
    border: 1px solid var(--clr-border);
    border-radius: var(--rnd);
    padding: 10px;
    margin-bottom: 7px;
    box-shadow: 0 1px 4px var(--clr-shadow);
}

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

.search-zone input[type="text"] {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid var(--clr-border2);
    border-radius: var(--rnd-sm);
    background: var(--clr-bg3);
    color: var(--clr-text);
    font-size: 14px;
    transition: var(--ease);
    outline: none;
    font-family: inherit;
}

.search-zone input[type="text"]:focus {
    border-color: var(--clr-blue);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(34, 85, 170, 0.1);
}

.search-zone input[type="text"]::placeholder {
    color: var(--clr-text-muted);
}

.search-zone button {
    padding: 8px 14px;
    border: none;
    border-radius: var(--rnd-sm);
    background: var(--clr-navy);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.search-zone button:hover {
    background: var(--clr-red);
}

/* ============================
   HOT TAGS
============================ */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 9px 12px;
    background: var(--clr-bg2);
    border: 1px solid var(--clr-border);
    border-radius: var(--rnd);
    margin-bottom: 7px;
    box-shadow: 0 1px 4px var(--clr-shadow);
}

.tag-item {
    padding: 4px 11px;
    background: var(--clr-bg3);
    border-radius: var(--rnd-sm);
    color: var(--clr-blue);
    text-decoration: none;
    font-size: 12px;
    transition: var(--ease);
    border: 1px solid var(--clr-border);
}

.tag-item:hover {
    background: var(--clr-navy);
    color: #fff;
    border-color: var(--clr-navy);
}

/* ============================
   SECTION BLOCKS
============================ */
.block-wrap {
    margin-bottom: 9px;
}

.block-head {
    margin-bottom: 9px;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--clr-border);
    position: relative;
    display: flex;
    align-items: center;
}

.block-head::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 54px;
    height: 2px;
    background: var(--clr-red);
}

.block-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: var(--clr-navy);
    letter-spacing: 0.3px;
}

.block-title a {
    color: var(--clr-navy);
    text-decoration: none;
    transition: var(--ease);
}

.block-title a:hover {
    color: var(--clr-red);
}

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

.film-grid li {
    position: relative;
    background: var(--clr-bg2);
    border-radius: var(--rnd);
    border: 1px solid var(--clr-border);
    overflow: hidden;
    box-shadow: 0 1px 4px var(--clr-shadow);
    transition: var(--ease);
}

.film-grid li:hover {
    border-color: var(--clr-blue2);
    box-shadow: 0 3px 10px var(--clr-shadow-md);
    transform: translateY(-2px);
}

.film-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 600 / 350;
    background: var(--clr-bg4);
    border-bottom: 1px solid var(--clr-border);
}

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

.film-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 39, 68, 0.65) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 1;
}

.film-thumb:hover::before {
    opacity: 1;
}

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

.film-meta {
    padding: 7px 8px 6px;
}

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

.film-meta h5 a {
    color: var(--clr-text2);
    text-decoration: none;
    transition: var(--ease);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.film-meta h5 a:hover {
    color: var(--clr-red);
}

/* ============================
   VIDEO PLAYER
============================ */
.player-wrapper {
    width: 100%;
    height: 600px;
    max-height: 600px;
    margin-bottom: 12px;
    background: #000;
    border-radius: var(--rnd);
    overflow: hidden;
    box-shadow: 0 4px 16px var(--clr-shadow-md);
    position: relative;
    border: 1px solid var(--clr-border);
}

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

.MacPlayer {
    background: #000;
    border-radius: var(--rnd);
    overflow: hidden;
    margin-bottom: 10px;
}

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

.capture-zone .img_item {
    width: 100%;
}

/* ============================
   DOWNLOAD BUTTONS
============================ */
.dl-bar {
    text-align: center;
    padding: 12px;
    background: var(--clr-bg2);
    border-radius: var(--rnd);
    margin: 10px 0;
    border: 1px solid var(--clr-border);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    box-shadow: 0 1px 4px var(--clr-shadow);
}

.dl-btn {
    display: inline-block;
    padding: 9px 22px;
    background: var(--clr-navy);
    color: #fff;
    text-decoration: none;
    border-radius: var(--rnd-sm);
    font-weight: 600;
    font-size: 14px;
    transition: var(--ease);
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    font-family: inherit;
}

.dl-btn:hover {
    background: var(--clr-red);
    box-shadow: 0 3px 10px rgba(204, 34, 34, 0.25);
}

/* ============================
   SHARE SECTION
============================ */
.link-share {
    background: var(--clr-bg2);
    border-radius: var(--rnd);
    padding: 11px 14px;
    margin: 10px 0;
    border: 1px solid var(--clr-border);
    display: flex;
    align-items: center;
    gap: 9px;
    box-shadow: 0 1px 4px var(--clr-shadow);
}

.url-display {
    background: var(--clr-bg3);
    border: 1px solid var(--clr-border2);
    border-radius: var(--rnd-sm);
    padding: 7px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.url-label {
    font-weight: 700;
    font-size: 12px;
    color: var(--clr-navy);
    white-space: nowrap;
    flex-shrink: 0;
}

.url-text {
    font-size: 12px;
    color: var(--clr-text-muted);
    word-break: break-all;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-link-btn {
    padding: 8px 16px;
    background: var(--clr-navy);
    color: #fff;
    border: none;
    border-radius: var(--rnd-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.copy-link-btn:hover {
    background: var(--clr-red);
}

.ic-copy {
    font-size: 14px;
}

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

.pg-link,
.pg-current {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--rnd-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--ease);
    min-width: 34px;
    text-align: center;
}

.pg-link {
    background: var(--clr-bg2);
    color: var(--clr-text2);
    border: 1px solid var(--clr-border2);
    box-shadow: 0 1px 3px var(--clr-shadow);
}

.pg-link:hover {
    background: var(--clr-navy);
    border-color: var(--clr-navy);
    color: #fff;
}

.pg-current {
    background: var(--clr-red);
    color: #fff;
    border: none;
    cursor: default;
}

/* ============================
   FRIENDLY LINKS / FOOTER
============================ */
.links-block {
    padding: 9px 12px;
    background: var(--clr-bg2);
    border-radius: var(--rnd);
    border: 1px solid var(--clr-border);
    box-shadow: 0 1px 4px var(--clr-shadow);
}

.links-block dl {
    margin: 0;
}

.links-block dd {
    display: inline-block;
    margin: 3px;
}

.links-block a {
    color: var(--clr-blue);
    text-decoration: none;
    transition: var(--ease);
    font-size: 13px;
}

.links-block a:hover {
    color: var(--clr-red);
    text-decoration: underline;
}

.site-footer {
    padding: 16px 0;
    text-align: center;
    border-top: 1px solid var(--clr-border);
    margin-top: 10px;
    background: var(--clr-bg2);
}

.site-footer p {
    margin: 4px 0;
    color: var(--clr-text-muted);
    font-size: 12px;
}

.site-footer a {
    color: var(--clr-text-muted);
    text-decoration: none;
    transition: var(--ease);
}

.site-footer a:hover {
    color: var(--clr-red);
}

/* ============================
   UTILITY
============================ */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.hide-mobile {
    display: block;
}

.hide-pc {
    display: block;
}

img[data-original] {
    background: var(--clr-bg4);
}

/* ============================
   RESPONSIVE <= 768px
============================ */
@media (max-width: 768px) {
    .wrap {
        padding: 0 8px;
    }

    .site-topbar {
        padding: 0;
    }

    .topbar-inner {
        min-height: 40px;
        gap: 0;
    }

    .brand-name {
        font-size: 20px;
    }

    .badge-tag {
        font-size: 9px;
    }

    .badge-addr {
        font-size: 15px;
    }

    .domain-badge {
        padding: 0 12px;
        gap: 5px;
    }

    .brand-link {
        padding: 8px 14px 8px 0;
    }

    .section-gap {
        padding: 5px 0;
    }

    .ch-label {
        width: 15%;
        font-size: 10px;
        padding: 6px 3px;
    }

    .ch-links {
        width: 85%;
        gap: 4px;
        padding: 6px 4px;
    }

    .ch-links a {
        font-size: 12px;
        padding: 4px 2px;
        width: calc((100% - 12px) / 4);
    }

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

    .film-grid li:hover {
        transform: none;
    }

    .player-wrapper {
        height: 56.25vw;
        max-height: 400px;
        margin-bottom: 10px;
    }

    .search-zone {
        padding: 8px;
    }

    .search-zone form {
        gap: 5px;
    }

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

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

    .block-title {
        font-size: 15px;
    }

    .film-meta {
        padding: 5px 6px 5px;
    }

    .film-meta h5 {
        font-size: 12px;
    }

    .block-wrap {
        margin-bottom: 7px;
    }

    .tag-cloud {
        padding: 7px 9px;
        gap: 5px;
    }

    .tag-item {
        padding: 3px 9px;
        font-size: 11px;
    }

    .dl-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .dl-bar {
        padding: 9px 7px;
        margin: 8px 0;
        gap: 7px;
    }

    .link-share {
        padding: 8px 10px;
        margin: 8px 0;
        gap: 7px;
    }

    .url-display {
        padding: 6px 9px;
    }

    .url-label {
        font-size: 11px;
    }

    .url-text {
        font-size: 11px;
    }

    .copy-link-btn {
        padding: 7px 10px;
        font-size: 12px;
    }

    .pager-wrap {
        padding: 10px 0;
        gap: 3px;
    }

    .pg-link,
    .pg-current {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 30px;
    }

    .hide-mobile {
        display: none !important;
    }
}

/* ============================
   LARGE PHONE 480–768px
============================ */
@media (min-width: 480px) and (max-width: 768px) {
    .ch-links a {
        font-size: 14px;
    }

    .ch-label {
        font-size: 10px;
    }
}

/* ============================
   SMALL PHONE <= 479px
============================ */
@media (max-width: 479px) {
    .brand-name {
        font-size: 18px;
    }

    .badge-addr {
        font-size: 14px;
    }

    .ch-label {
        width: 15%;
        font-size: 10px;
        padding: 5px 2px;
    }

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

    .ch-links a {
        font-size: 12px;
        padding: 3px 1px;
        width: calc((100% - 9px) / 4);
    }

    .player-wrapper {
        height: 56.25vw;
        max-height: 300px;
        margin-bottom: 8px;
    }

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

    .dl-bar {
        padding: 7px 5px;
        gap: 5px;
    }

    .dl-btn {
        padding: 7px 11px;
        font-size: 12px;
    }

    .link-share {
        padding: 7px 8px;
        gap: 5px;
    }

    .copy-link-btn {
        padding: 6px 9px;
        font-size: 11px;
    }
}

/* ============================
   PC ONLY
============================ */
@media (min-width: 769px) {
    .hide-pc {
        display: none !important;
    }
}
