/* NPM-Inspired Style: Warm Gradient, Bold Typography, Clean White Panels */

:root {
    --grad-start: #cb3837;
    --grad-mid: #e05f2a;
    --grad-end: #f4a633;
    --clr-red: #cb3837;
    --clr-orange: #e05f2a;
    --clr-amber: #f4a633;
    --clr-dark: #1a1a1a;
    --clr-dark2: #2c2c2c;
    --clr-white: #ffffff;
    --clr-bg: #f7f7f7;
    --clr-bg2: #ffffff;
    --clr-bg3: #f0f0f0;
    --clr-border: #e0e0e0;
    --clr-border-light: #ebebeb;
    --clr-text: #1a1a1a;
    --clr-text-muted: #555;
    --clr-text-dim: #999;
    --clr-pill: #ffdd57;
    --clr-pill-text: #1a1a1a;
    --gradient: linear-gradient(135deg, var(--grad-start) 0%, var(--grad-mid) 50%, var(--grad-end) 100%);
    --gradient-h: linear-gradient(90deg, var(--grad-start) 0%, var(--grad-mid) 55%, var(--grad-end) 100%);
    --radius-xs: 3px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 3px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 28px rgba(0,0,0,0.16);
    --ease: cubic-bezier(0.4,0,0.2,1);
    --trans: all 0.22s var(--ease);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.6;
    font-size: 15px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===================== HEADER ===================== */
.site-header {
    background: var(--clr-white);
    border-bottom: 1px solid var(--clr-border);
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
    position: relative;
}

/* Thin gradient top bar */
.site-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gradient-h);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

/* npm-style logotype box */
.brand-logo-box {
    background: var(--clr-dark);
    color: var(--clr-white);
    font-size: 14px;
    font-weight: 900;
    font-style: normal;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    letter-spacing: 1px;
    line-height: 1.4;
    flex-shrink: 0;
}

.brand-title {
    font-size: 24px;
    font-weight: 800;
    font-style: normal;
    color: var(--clr-dark);
    letter-spacing: -0.5px;
    line-height: 1;
    text-decoration: none;
    border-bottom: none;
}

.brand-separator {
    width: 1px;
    height: 28px;
    background: var(--clr-border);
    flex-shrink: 0;
    margin: 0 18px;
}

.domain-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.domain-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--clr-text-muted);
    white-space: nowrap;
    letter-spacing: 0.4px;
}

.domain-val {
    font-family: 'Courier New', 'Lucida Console', monospace;
    font-size: 18px;
    font-weight: 800;
    color: var(--clr-red);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* ===================== LAYOUT ===================== */
.wrapper {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-wrap { padding: 8px 0; }

/* ===================== NAVIGATION ===================== */
.nav-panel {
    background: var(--clr-white);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}

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

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

.zone-tag {
    font-size: 12px;
    font-weight: 800;
    font-style: normal;
    color: var(--clr-white);
    background: var(--gradient);
    white-space: nowrap;
    width: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    flex-shrink: 0;
    text-align: center;
    letter-spacing: 0.2px;
}

.zone-links {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 10px;
    align-items: center;
    background: #fafafa;
}

.zone-links a {
    display: inline-block;
    color: var(--clr-dark2);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--radius-sm);
    transition: var(--trans);
    background: var(--clr-white);
    border: 1px solid var(--clr-border);
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.zone-links a:hover {
    background: var(--clr-red);
    color: var(--clr-white);
    border-color: var(--clr-red);
    box-shadow: 0 2px 8px rgba(203,56,55,0.3);
}

.zone-links a.active {
    background: var(--gradient);
    color: var(--clr-white);
    border-color: var(--clr-red);
    font-weight: 700;
}

/* ===================== SEARCH ===================== */
.search-module {
    background: var(--clr-white);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}

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

.search-module input[type="text"] {
    flex: 1;
    min-width: 60px;
    padding: 9px 14px;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-pill);
    background: var(--clr-bg3);
    color: var(--clr-text);
    font-size: 14px;
    outline: none;
    transition: var(--trans);
    font-family: inherit;
}

.search-module input[type="text"]:focus {
    border-color: var(--clr-red);
    background: var(--clr-white);
    box-shadow: 0 0 0 3px rgba(203,56,55,0.12);
}

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

.search-module button {
    padding: 9px 14px;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--clr-dark);
    color: var(--clr-white);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--trans);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

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

/* ===================== HOT TAGS ===================== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    padding: 10px 12px;
    background: var(--clr-white);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}

.tag-cloud-item {
    padding: 4px 14px;
    background: var(--clr-bg3);
    border-radius: var(--radius-pill);
    color: var(--clr-dark2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--trans);
    border: 1px solid var(--clr-border);
}

.tag-cloud-item:hover {
    background: var(--gradient);
    color: var(--clr-white);
    border-color: var(--clr-red);
    box-shadow: 0 2px 8px rgba(203,56,55,0.25);
}

/* ===================== SECTION HEADINGS ===================== */
.media-block { margin-bottom: 14px; }

.media-block-head {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--clr-border);
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.media-block-head::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 44px;
    height: 2px;
    background: var(--gradient-h);
    border-radius: var(--radius-pill);
}

.media-block-title {
    font-size: 19px;
    font-weight: 800;
    font-style: normal;
    margin: 0;
    color: var(--clr-dark);
    letter-spacing: -0.3px;
}

.media-block-title a {
    color: var(--clr-dark);
    text-decoration: none;
    transition: var(--trans);
}

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

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

.card-grid li { position: relative; }

.card-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    aspect-ratio: 600 / 350;
    background: var(--clr-bg3);
    border: 1px solid var(--clr-border);
    box-shadow: var(--shadow-sm);
}

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

.card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(203,56,55,0.8) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.card-thumb::before {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    color: rgba(255,255,255,0.95);
    font-size: 22px;
    z-index: 2;
    opacity: 0;
    transition: all 0.22s ease;
}

.card-thumb:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-caption { padding: 8px 0; }

.card-caption h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    font-style: normal;
    line-height: 1.4;
}

.card-caption h5 a {
    color: var(--clr-dark2);
    text-decoration: none;
    transition: var(--trans);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-caption h5 a:hover { color: var(--clr-red); }

/* ===================== VIDEO PLAYER ===================== */
.player-wrap {
    width: 100%;
    margin-bottom: 14px;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--clr-border);
}

.player-wrap iframe,
.player-wrap video,
.player-wrap #video-container {
    width: 100%;
    border: none;
    display: block;
}

.MacPlayer {
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--clr-border);
}

/* ===================== DETAIL TITLE ===================== */
.detail-title-bar {
    line-height: 1.7;
    text-align: center;
    padding: 16px 20px;
    font-size: 16px;
    margin: 12px 0;
    word-break: break-all;
    background: var(--clr-white);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.detail-title-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-h);
}

.detail-title-bar a {
    color: var(--clr-red);
    text-decoration: none;
    font-weight: 700;
    margin-right: 8px;
}

/* ===================== TORRENT INFO ===================== */
.torrent-info-box {
    font-size: 15px;
    font-style: normal;
    line-height: 1.9;
    padding: 20px 22px;
    background: var(--clr-white);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    margin: 12px 0;
    color: var(--clr-text);
    box-shadow: var(--shadow-sm);
}

.torrent-preview-wrap { margin-top: 12px; }

.torrent-preview-wrap picture,
.torrent-preview-wrap picture img {
    display: block;
    width: 100%;
}

.torrent-preview-wrap img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--clr-border);
    display: block;
}

/* ===================== DOWNLOAD BUTTONS ===================== */
.btn-group {
    text-align: center;
    padding: 16px 14px;
    background: var(--clr-white);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    margin: 12px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.action-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--clr-amber);
    color: var(--clr-dark);
    text-decoration: none;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: 14px;
    transition: var(--trans);
    margin: 0;
    border: 2px solid var(--clr-amber);
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.2px;
    box-shadow: 0 3px 10px rgba(244,166,51,0.35);
}

.action-btn:hover {
    background: var(--clr-orange);
    border-color: var(--clr-orange);
    color: var(--clr-white);
    box-shadow: 0 4px 14px rgba(224,95,42,0.4);
}

/* ===================== SHARE SECTION ===================== */
.link-share-panel {
    background: var(--clr-white);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
}

.link-display-box {
    background: var(--clr-bg3);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-pill);
    padding: 9px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.link-label-text {
    font-weight: 800;
    font-size: 12px;
    color: var(--clr-red);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.4px;
}

.link-url-text {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--clr-text-muted);
    word-break: break-all;
    flex: 1;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-copy-btn {
    padding: 9px 18px;
    background: var(--clr-dark);
    color: var(--clr-white);
    border: 2px solid var(--clr-dark);
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--trans);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

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

.link-copy-btn:active { transform: scale(0.97); }
.icon-clip { font-size: 15px; }

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

.pg-link {
    display: inline-block;
    padding: 7px 13px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: var(--trans);
    min-width: 36px;
    text-align: center;
    background: var(--clr-white);
    color: var(--clr-dark2);
    border: 1px solid var(--clr-border);
}

.pg-link:hover {
    background: var(--gradient);
    border-color: var(--clr-red);
    color: var(--clr-white);
    box-shadow: 0 2px 8px rgba(203,56,55,0.25);
}

.pg-current {
    background: var(--gradient);
    color: var(--clr-white);
    border: 1px solid var(--clr-red);
    cursor: default;
    box-shadow: 0 2px 8px rgba(203,56,55,0.25);
}

/* ===================== FOOTER ===================== */
.site-footer {
    padding: 20px 0;
    text-align: center;
    margin-top: 18px;
    background: var(--clr-dark);
    border-top: 3px solid var(--clr-border);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-h);
}

.site-footer p {
    margin: 5px 0;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
}

.site-footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: var(--trans);
}

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

.friend-links-wrap {
    padding: 10px 12px;
    background: var(--clr-white);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.friend-links-wrap dl { margin: 0; }
.friend-links-wrap dd { display: inline-block; margin: 3px 6px; }

.friend-links-wrap a {
    color: var(--clr-text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: var(--trans);
}

.friend-links-wrap a:hover { color: var(--clr-red); }

.pd5 { padding: 2px 0; display: inline-block; }

/* ===================== UTILITIES ===================== */
.clearfix::after { content: ""; display: table; clear: both; }
.vis-pc  { display: block; }
.vis-mob { display: block; }
img[data-original] { background: var(--clr-bg3); }

/* ===================== RESPONSIVE MOBILE ===================== */
@media (max-width: 768px) {
    .wrapper { padding: 0 8px; }
    .site-header { padding: 8px 0; }
    .brand-logo-box { font-size: 12px; padding: 2px 6px; }
    .brand-title { font-size: 19px; }
    .brand-separator { height: 20px; margin: 0 12px; }
    .domain-tag { font-size: 10px; }
    .domain-val { font-size: 15px; }
    .section-wrap { padding: 6px 0; }

    /* Nav: zone-tag 15%, links 85%, 4 per row = 2 rows of 4 */
    .nav-zone { display: flex; align-items: stretch; }

    .zone-tag {
        width: 15%;
        font-size: 10px;
        padding: 8px 2px;
        text-align: center;
        letter-spacing: 0;
        line-height: 1.3;
    }

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

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

    /* Search: single row no wrap */
    .search-module { padding: 9px 10px; }
    .search-module form { flex-wrap: nowrap; gap: 5px; }
    .search-module input[type="text"] { min-width: 55px; padding: 8px 10px; font-size: 13px; }
    .search-module button { padding: 8px 9px; font-size: 12px; }

    /* Card grid: 2 per row */
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .card-caption h5 { font-size: 12px; }
    .media-block { margin-bottom: 12px; }
    .media-block-title { font-size: 17px; }
    .tag-cloud { padding: 8px 10px; gap: 5px; }
    .tag-cloud-item { font-size: 12px; padding: 4px 10px; }
    .btn-group { padding: 12px 8px; gap: 8px; }
    .action-btn { padding: 9px 14px; font-size: 13px; }
    .link-share-panel { padding: 10px 10px; gap: 7px; }
    .link-display-box { padding: 8px 10px; }
    .link-label-text { font-size: 11px; }
    .link-url-text { font-size: 10px; }
    .link-copy-btn { padding: 8px 11px; font-size: 12px; }
    .pager-row { gap: 3px; padding: 12px 0; }
    .pg-link { padding: 5px 10px; font-size: 12px; min-width: 32px; }
    .site-footer { padding: 15px 0; margin-top: 14px; }
}

@media (max-width: 480px) {
    .brand-logo-box { font-size: 11px; }
    .brand-title { font-size: 16px; }
    .domain-val { font-size: 13px; }
    .domain-tag { font-size: 9px; }
    .brand-separator { margin: 0 10px; height: 18px; }

    .zone-tag { width: 15%; font-size: 10px; padding: 6px 2px; }
    .zone-links { width: 85%; gap: 3px; padding: 5px 4px; }
    .zone-links a {
        font-size: 12px;
        padding: 4px 1px;
        width: calc((100% - 9px) / 4);
    }

    .search-module input[type="text"] { min-width: 45px; padding: 7px 8px; font-size: 12px; }
    .search-module button { padding: 7px 7px; font-size: 11px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .media-block-title { font-size: 15px; }
    .action-btn { padding: 8px 11px; font-size: 12px; }
}

/* ===================== HIDE UTILITIES ===================== */
@media (max-width: 768px)  { .vis-pc  { display: none !important; } }
@media (min-width: 769px)  { .vis-mob { display: none !important; } }
