/* Dark Cinematic Video Portal - Premium Design */

:root {
    --pk: #ff3d5a;
    --pk-deep: #cc1f3a;
    --bl: #1a8cff;
    --gd: #ffb300;
    --surface: #0d1117;
    --surface2: #161b22;
    --surface3: #21262d;
    --surface4: #30363d;
    --txt-main: #e6edf3;
    --txt-sub: #8b949e;
    --txt-dim: #6e7681;
    --border-c: #30363d;
    --border-light: #21262d;
    --glow: rgba(255, 61, 90, 0.25);
    --glow-b: rgba(26, 140, 255, 0.2);
    --grad-fire: linear-gradient(135deg, #ff3d5a 0%, #ff6b35 100%);
    --grad-cool: linear-gradient(135deg, #1a8cff 0%, #8b5cf6 100%);
    --rd: 6px;
    --rd-sm: 4px;
    --rd-lg: 10px;
    --ease: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    background: var(--surface);
    color: var(--txt-main);
    line-height: 1.5;
    font-size: 14px;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 300px;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 61, 90, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ===== HEADER ===== */
.site-header {
    background: rgba(13, 17, 23, 0.95);
    border-bottom: 1px solid var(--border-c);
    padding: 10px 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hd-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

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

.logo-link:hover .brand-title {
    opacity: 0.85;
}

.brand-title {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: var(--grad-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--ease);
    text-decoration: none;
    border-bottom: none;
    display: inline-block;
}

.brand-sep {
    width: 1px;
    height: 24px;
    background: var(--border-c);
    flex-shrink: 0;
}

.domain-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: var(--surface3);
    border: 1px solid var(--border-c);
    border-radius: 20px;
}

.domain-tag {
    font-size: 10px;
    font-weight: 600;
    color: var(--pk);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.domain-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--txt-main);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* ===== CONTAINER ===== */
.wrapper {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 14px;
    position: relative;
    z-index: 1;
}

.sect {
    padding: 10px 0;
}

/* ===== NAV SECTION ===== */
.nav-block {
    background: var(--surface2);
    border: 1px solid var(--border-c);
    border-radius: var(--rd-lg);
    overflow: hidden;
    margin-bottom: 10px;
}

.nav-strip {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border-light);
}

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

.zone-tag {
    font-weight: 700;
    font-size: 13px;
    color: var(--txt-sub);
    white-space: nowrap;
    width: 9%;
    min-width: 52px;
    text-align: center;
    border-right: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 4px;
    flex-shrink: 0;
    background: var(--surface3);
}

.zone-items {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 9px 8px;
    align-items: center;
}

.zone-items a {
    display: inline-block;
    color: var(--txt-sub);
    text-decoration: none;
    padding: 5px 0;
    border-radius: var(--rd-sm);
    transition: var(--ease);
    background: var(--surface3);
    border: 1px solid var(--border-c);
    white-space: nowrap;
    text-align: center;
    /* PC端：8个链接均分，减去7个gap(5px)后 */
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
    font-size: 13px;
}

.zone-items a:hover {
    background: var(--pk);
    color: #fff;
    border-color: var(--pk);
    box-shadow: 0 2px 10px var(--glow);
}

.zone-items a.active {
    background: var(--grad-fire);
    color: #fff;
    border-color: var(--pk);
    box-shadow: 0 2px 10px var(--glow);
    font-weight: 600;
}

/* ===== SEARCH ===== */
.qr-box {
    background: var(--surface2);
    border: 1px solid var(--border-c);
    border-radius: var(--rd-lg);
    padding: 12px;
    margin-bottom: 10px;
}

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

.qr-form input[type="text"] {
    flex: 1;
    min-width: 120px;
    padding: 9px 13px;
    border: 1px solid var(--border-c);
    border-radius: var(--rd);
    background: var(--surface3);
    color: var(--txt-main);
    font-size: 14px;
    transition: var(--ease);
    outline: none;
}

.qr-form input[type="text"]:focus {
    border-color: var(--pk);
    box-shadow: 0 0 0 3px rgba(255, 61, 90, 0.12);
    background: var(--surface);
}

.qr-form input[type="text"]::placeholder {
    color: var(--txt-dim);
}

.qr-form button {
    padding: 9px 14px;
    border: none;
    border-radius: var(--rd);
    background: var(--grad-fire);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

.qr-form button:hover {
    box-shadow: 0 4px 14px var(--glow);
    transform: translateY(-1px);
}

.qr-form button:active {
    transform: translateY(0);
}

/* ===== TAG CLOUD ===== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    padding: 12px;
    background: var(--surface2);
    border: 1px solid var(--border-c);
    border-radius: var(--rd-lg);
    margin-bottom: 10px;
}

.tag-pill {
    padding: 5px 12px;
    background: var(--surface3);
    border-radius: 14px;
    color: var(--txt-sub);
    text-decoration: none;
    font-size: 12px;
    transition: var(--ease);
    border: 1px solid var(--border-c);
}

.tag-pill:hover {
    background: var(--pk);
    color: #fff;
    border-color: var(--pk);
    box-shadow: 0 2px 8px var(--glow);
}

/* ===== SECTION BLOCK ===== */
.media-block {
    margin-bottom: 16px;
}

.media-block-inner {
    /* inner wrapper */
}

.block-head {
    margin-bottom: 12px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--border-c);
    position: relative;
}

.block-head::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--grad-fire);
    border-radius: 1px;
}

.block-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--txt-main);
    letter-spacing: -0.2px;
}

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

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

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

.media-grid li {
    position: relative;
    animation: riseUp 0.5s ease backwards;
}

.media-grid li:nth-child(1) { animation-delay: 0.04s; }
.media-grid li:nth-child(2) { animation-delay: 0.08s; }
.media-grid li:nth-child(3) { animation-delay: 0.12s; }
.media-grid li:nth-child(4) { animation-delay: 0.16s; }
.media-grid li:nth-child(5) { animation-delay: 0.20s; }
.media-grid li:nth-child(6) { animation-delay: 0.24s; }
.media-grid li:nth-child(7) { animation-delay: 0.28s; }
.media-grid li:nth-child(8) { animation-delay: 0.32s; }

@keyframes riseUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.thumb-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--rd);
    aspect-ratio: 600 / 350;
    background: var(--surface3);
    border: 1px solid var(--border-c);
}

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

.thumb-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.thumb-link::after {
    content: '▶';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: 42px; height: 42px;
    background: rgba(255, 61, 90, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
    line-height: 42px;
    text-align: center;
    text-indent: 3px;
}

.thumb-link:hover img {
    transform: scale(1.07);
}

.thumb-link:hover::before,
.thumb-link:hover::after {
    opacity: 1;
}

.thumb-link:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

.media-caption {
    padding: 8px 0 4px;
}

.media-caption h5 {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.media-caption h5 a {
    color: var(--txt-sub);
    text-decoration: none;
    transition: var(--ease);
}

.media-caption h5 a:hover {
    color: var(--pk);
}

/* ===== TORRENT DETAIL ===== */
.item-header-bar {
    line-height: 1.7;
    text-align: center;
    padding: 16px 20px;
    font-size: 17px;
    margin: 14px 0;
    word-break: break-all;
    background: var(--surface2);
    border: 1px solid var(--border-c);
    border-radius: var(--rd-lg);
}

.item-header-bar a {
    color: var(--pk);
    text-decoration: none;
    font-weight: 600;
    margin-right: 8px;
}

.item-header-bar b {
    color: var(--txt-main);
}

.meta-panel {
    font-size: 15px;
    line-height: 1.9;
    padding: 20px 22px;
    background: var(--surface2);
    border: 1px solid var(--border-c);
    border-radius: var(--rd-lg);
    margin: 14px 0;
    color: var(--txt-sub);
}

.meta-panel b, .meta-panel strong {
    color: var(--txt-main);
}

.torrent-capture-grid {
    margin-top: 12px;
}

.torrent-capture-grid picture img,
.torrent-capture-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--rd);
}

.torrent-capture-grid picture {
    display: block;
    width: 100%;
}

/* ===== DOWNLOAD BUTTONS ===== */
.dl-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 10px;
    margin: 14px 0;
    background: var(--surface2);
    border: 1px solid var(--border-c);
    border-radius: var(--rd-lg);
}

.dl-btn {
    display: inline-block;
    padding: 11px 22px;
    border: none;
    border-radius: var(--rd);
    background: var(--grad-fire);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--ease);
    text-decoration: none;
    letter-spacing: 0.3px;
}

.dl-btn:hover {
    box-shadow: 0 5px 18px var(--glow);
    transform: translateY(-2px);
}

.dl-btn:active {
    transform: translateY(0);
}

/* ===== SHARE SECTION ===== */
.share-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--surface2);
    border: 1px solid var(--border-c);
    border-radius: var(--rd-lg);
    margin: 14px 0;
    flex-wrap: nowrap;
}

.share-url-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    background: var(--surface3);
    border: 1px solid var(--border-c);
    border-radius: var(--rd);
    overflow: hidden;
}

.share-lbl {
    font-size: 12px;
    font-weight: 600;
    color: var(--pk);
    white-space: nowrap;
    flex-shrink: 0;
}

.share-addr {
    font-size: 12px;
    color: var(--txt-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border: none;
    border-radius: var(--rd);
    background: var(--grad-cool);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

.share-btn:hover {
    box-shadow: 0 4px 14px var(--glow-b);
    transform: translateY(-1px);
}

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

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

.pg-link,
.pg-cur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 13px;
    border-radius: var(--rd-sm);
    font-size: 13px;
    transition: var(--ease);
    min-width: 36px;
    text-align: center;
    border: 1px solid var(--border-c);
}

.pg-link {
    background: var(--surface2);
    color: var(--txt-main);
    text-decoration: none;
}

.pg-link:hover {
    background: var(--pk);
    border-color: var(--pk);
    color: #fff;
    box-shadow: 0 2px 8px var(--glow);
}

.pg-cur {
    background: var(--grad-fire);
    color: #fff;
    border-color: var(--pk);
    cursor: default;
    font-weight: 700;
}

/* ===== FOOTER ===== */
.site-footer {
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--border-c);
    margin-top: 24px;
    background: var(--surface2);
}

.site-footer p {
    margin: 6px 0;
    color: var(--txt-dim);
    font-size: 12px;
}

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

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

/* ===== FRIENDLY LINKS ===== */
.links-box {
    padding: 12px;
    background: var(--surface2);
    border: 1px solid var(--border-c);
    border-radius: var(--rd-lg);
}

.links-box dl {
    margin: 0;
}

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

.links-box a {
    color: var(--txt-dim);
    text-decoration: none;
    transition: var(--ease);
    font-size: 13px;
    padding: 2px 4px;
}

.links-box a:hover {
    color: var(--pk);
}

.links-box a.pd5 {
    padding: 3px 6px;
}

/* ===== VIDEO PLAYER ===== */
.player-wrap {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: var(--rd-lg);
    overflow: hidden;
    margin: 14px 0;
    border: 1px solid var(--border-c);
}

.video-box {
    position: relative;
    width: 100%;
    padding-top: 58.33%;
    background: #000;
}

.video-box iframe,
.video-box video,
.video-box embed {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* ===== CLIENT DOWNLOAD HINTS ===== */
.client-hint-pc,
.client-hint-mob {
    text-align: center;
    padding: 14px 20px;
}

.client-hint-pc a,
.client-hint-mob a {
    color: var(--bl);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.client-hint-pc a:hover,
.client-hint-mob a:hover {
    color: var(--pk);
}

/* ===== HIDE UTILS ===== */
.show-pc {
    display: block;
}

.show-mob {
    display: block;
}

@media (max-width: 768px) {
    .show-pc {
        display: none !important;
    }
}

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

/* ===== CLEARFIX ===== */
.cf::after {
    content: "";
    display: table;
    clear: both;
}

/* ===== LOADING PLACEHOLDER ===== */
img[data-original] {
    background: var(--surface3);
}

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

    .site-header {
        padding: 8px 0;
    }

    .hd-inner {
        gap: 12px;
    }

    .brand-title {
        font-size: 22px;
    }

    .domain-badge {
        padding: 4px 10px;
        gap: 6px;
    }

    .domain-tag {
        font-size: 10px;
    }

    .domain-val {
        font-size: 14px;
    }

    .sect {
        padding: 8px 0;
    }

    /* Nav mobile: left 15%, right 85% */
    .nav-strip {
        display: flex;
        align-items: stretch;
    }

    .zone-tag {
        width: 15%;
        min-width: 0;
        font-size: 10px;
        padding: 6px 2px;
        /* 竖排显示4个汉字，确保全部可见 */
        writing-mode: vertical-lr;
        text-orientation: mixed;
        letter-spacing: 2px;
        white-space: nowrap;
        line-height: 1;
        word-break: normal;
    }

    .zone-items {
        width: 85%;
        flex: none;
        gap: 4px;
        padding: 6px 4px;
    }

    .zone-items a {
        font-size: 12px;
        padding: 4px 2px;
        /* 移动端每行4个，减去3个gap(4px) */
        width: calc((100% - 12px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

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

    .media-caption h5 {
        font-size: 12px;
    }

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

    .media-block {
        margin-bottom: 12px;
    }

    .tag-cloud {
        gap: 6px;
    }

    .tag-pill {
        font-size: 11px;
        padding: 4px 10px;
    }

    .dl-btns {
        gap: 8px;
        padding: 12px 8px;
    }

    .dl-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .share-panel {
        flex-wrap: nowrap;
        padding: 10px;
        gap: 8px;
    }

    .share-url-box {
        padding: 6px 10px;
    }

    .share-lbl {
        font-size: 11px;
    }

    .share-addr {
        font-size: 10px;
    }

    .share-btn {
        padding: 8px 11px;
        font-size: 12px;
    }

    .pager-row {
        gap: 5px;
    }

    .pg-link,
    .pg-cur {
        padding: 6px 11px;
        font-size: 12px;
        min-width: 32px;
    }

    .site-footer {
        padding: 16px 0;
        margin-top: 18px;
    }

    .item-header-bar {
        font-size: 15px;
        padding: 13px 14px;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 7px 0;
    }

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

    .domain-badge {
        padding: 3px 8px;
        gap: 5px;
    }

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

    .domain-val {
        font-size: 13px;
    }

    .zone-tag {
        width: 15%;
        min-width: 0;
        font-size: 10px;
        padding: 5px 1px;
        writing-mode: vertical-lr;
        text-orientation: mixed;
        letter-spacing: 2px;
        white-space: nowrap;
        line-height: 1;
    }

    .zone-items {
        width: 85%;
        flex: none;
        gap: 3px;
        padding: 5px 3px;
    }

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

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

    .qr-form button {
        padding: 8px 9px;
        font-size: 12px;
    }

    .media-grid {
        gap: 8px;
    }

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

    .dl-btns {
        padding: 10px 6px;
        gap: 6px;
    }

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

    .share-panel {
        padding: 8px;
        gap: 6px;
    }

    .share-btn {
        padding: 7px 10px;
        font-size: 11px;
    }

    .share-ico {
        font-size: 13px;
    }
}

/* Large screen: ensure 4 columns */
@media (min-width: 769px) {
    .media-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
