:root {
    --bg-body: #f4f4f6;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-topbar: #ffffff;
    --bg-topbar-banner: #eef0f2;
    --bg-navbar: #3b1f7a;
    --bg-navbar-dk: #2a1460;
    --clr-border: #dcdde4;
    --clr-border-lt: #eeeff4;
    --clr-purple: #3b1f7a;
    --clr-purple-lt: #5a3aa0;
    --clr-teal: #1a7db5;
    --clr-teal-lt: #2493d0;
    --clr-gold: #c8860a;
    --clr-text: #1a1a2a;
    --clr-text-md: #3a3a5a;
    --clr-muted: #7a7a9a;
    --clr-heading: #0f0f22;
    --clr-white: #ffffff;
    --radius-xs: 3px;
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 999px;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
    background: var(--bg-body);
    color: var(--clr-text);
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
    line-height: 1.65;
}

a { color: var(--clr-teal); text-decoration: none; transition: color .18s; }
a:hover { color: var(--clr-purple); }

img { max-width: 100%; display: block; }

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

/* ===================== LAYOUT ===================== */
.inner {
    width: 100%;
    padding: 0 14px;
    margin: 0 auto;
    max-width: 1280px;
}

.seg { margin: 5px 0; }

/* ===================== SITE HEADER ===================== */
.site-masthead {
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--clr-border);
    padding: 10px 0;
}

.site-masthead .inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.id-title {
    color: var(--clr-heading);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.25;
}
.id-title:hover { color: var(--clr-purple); }

.masthead-divider {
    width: 1px;
    height: 22px;
    background: var(--clr-border);
    flex-shrink: 0;
}

.masthead-url {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.url-label {
    font-size: 11px;
    color: var(--clr-muted);
    background: var(--bg-topbar-banner);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-xs);
    padding: 1px 7px;
    flex-shrink: 0;
}

.url-value {
    font-size: 1.1rem;
    color: var(--clr-purple);
    font-weight: 700;
    letter-spacing: 0.03em;
}

/* ===================== PURPLE NAV ===================== */
.main-nav {
    background: var(--bg-navbar);
    padding: 4px 0;
}

.nav-seg {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-seg:last-child { border-bottom: none; }

.nav-seg-lbl {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 15%;
    max-width: 64px;
    min-width: 42px;
    font-size: 10px;
    color: rgba(255,255,255,0.38);
    background: rgba(0,0,0,0.14);
    border-right: 1px solid rgba(255,255,255,0.07);
    text-align: center;
    padding: 3px 2px;
    word-break: break-all;
    line-height: 1.3;
    flex-shrink: 0;
}

.nav-seg-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
    padding: 3px 5px;
    gap: 2px;
}

.nav-seg-links a {
    color: rgba(255,255,255,0.88);
    font-size: 13px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background .14s, color .14s;
    white-space: nowrap;
    text-decoration: none;
    flex: 1 1 calc(25% - 4px);
    text-align: center;
    min-width: 0;
}
.nav-seg-links a:hover,
.nav-seg-links a.active {
    background: var(--clr-teal);
    color: var(--clr-white);
    font-weight: 600;
}

/* ===================== SEARCH ZONE ===================== */
.search-row {
    background: var(--bg-navbar-dk);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 8px 0;
}

.search-row-form {
    display: flex;
    gap: 6px;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: var(--radius-pill);
    padding: 5px 8px;
}

.search-row-form input[type="text"] {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 14px;
    padding: 3px 8px;
    min-width: 0;
    font-family: inherit;
}
.search-row-form input[type="text"]::placeholder { color: rgba(255,255,255,0.4); }

.search-row-form button {
    background: var(--clr-teal);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .16s;
    font-family: inherit;
}
.search-row-form button:hover { background: var(--clr-teal-lt); }

/* ===================== HOT SEARCH ===================== */
.trending-row {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--clr-border);
    padding: 7px 0;
}

.trending-hd {
    font-size: 12px;
    font-weight: 700;
    color: var(--clr-heading);
    margin-bottom: 5px;
}

.trend-kw-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    list-style: none;
    padding: 0;
}

.trend-kw-list a {
    display: inline-block;
    background: var(--bg-body);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-pill);
    padding: 3px 12px;
    font-size: 12px;
    color: var(--clr-text-md);
    transition: all .16s;
    text-decoration: none;
}
.trend-kw-list a:hover {
    background: var(--clr-purple);
    border-color: var(--clr-purple);
    color: #fff;
    font-weight: 600;
}

/* ===================== BANNER AREA ===================== */
.hero-strip { overflow: hidden; background: var(--bg-surface); }
.hero-strip img { width: 100%; display: block; }

/* ===================== MODULE ===================== */
.content-seg { margin: 5px 0; }

.module-box {
    background: var(--bg-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    box-shadow: 0 1px 5px rgba(59,31,122,0.05);
}

.module-hd {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--clr-border-lt);
    position: relative;
}

.module-hd::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 36px;
    height: 2px;
    background: var(--clr-purple);
    border-radius: 2px;
}

.module-hd h3, .module-hd h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--clr-heading);
    margin: 0;
    letter-spacing: 0.01em;
}

.module-hd a { color: var(--clr-heading); }
.module-hd a:hover { color: var(--clr-teal); }

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

.media-mosaic li { position: relative; }

.mosaic-cover {
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-body);
    border: 1px solid var(--clr-border);
    transition: box-shadow .2s, transform .18s;
    aspect-ratio: 600 / 350;
    position: relative;
}
.mosaic-cover:hover {
    box-shadow: 0 5px 18px rgba(59,31,122,0.14);
    transform: translateY(-2px);
}

.mosaic-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mosaic-caption { margin-top: 5px; }
.mosaic-caption h5 {
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.mosaic-caption h5 a { color: var(--clr-text-md); text-decoration: none; }
.mosaic-caption h5 a:hover { color: var(--clr-teal); }

/* ===================== DETAIL PAGE ===================== */
.entry-masthead {
    line-height: 1.8;
    text-align: center;
    padding: 14px 18px;
    font-size: 16px;
    margin: 8px 0;
    word-break: break-all;
    background: var(--bg-navbar);
    border-radius: var(--radius-lg);
    color: #fff;
    position: relative;
}

.entry-masthead::before {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 48px; height: 3px;
    background: var(--clr-teal);
    border-radius: 2px;
}

.entry-masthead a {
    color: rgba(255,255,255,0.75);
    font-weight: 600;
    margin-right: 8px;
    text-decoration: none;
}
.entry-masthead a:hover { color: #fff; }

.entry-specs {
    font-size: 14px;
    line-height: 1.9;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--clr-border);
    border-left: 3px solid var(--clr-purple);
    border-radius: var(--radius-md);
    margin: 6px 0;
    color: var(--clr-text);
}

.torrent-capture-grid picture,
.torrent-capture-grid img {
    width: 100%;
    display: block;
    border-radius: var(--radius-sm);
    margin-top: 10px;
    border: 1px solid var(--clr-border);
}

/* ===================== DOWNLOAD BUTTONS ===================== */
.obtain-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
}

.obtain-btn {
    display: inline-block;
    padding: 9px 24px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--clr-purple);
    background: var(--clr-purple);
    color: #fff;
    transition: background .18s, color .16s, transform .14s;
    text-decoration: none;
}
.obtain-btn:hover {
    background: transparent;
    color: var(--clr-purple);
    transform: translateY(-1px);
}

/* ===================== SHARE BOX ===================== */
.url-share-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--bg-topbar-banner);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    margin: 8px 0;
}

.usp-lbl { font-size: 12px; color: var(--clr-muted); white-space: nowrap; }

.usp-val {
    flex: 1;
    font-size: 12px;
    color: var(--clr-teal);
    word-break: break-all;
    min-width: 0;
}

.share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--clr-purple);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .16s;
    font-family: inherit;
}
.share-copy-btn:hover { background: var(--clr-teal); }

/* ===================== PAGINATION ===================== */
.paging-strip {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px 0;
}

.a_page_info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--clr-border);
    color: var(--clr-text-md);
    font-size: 13px;
    text-decoration: none;
    transition: all .16s;
}
.a_page_info:hover {
    background: var(--clr-purple);
    color: #fff;
    border-color: var(--clr-purple);
}

.page_info_focus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    background: var(--clr-purple);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

/* ===================== LINKS / FOOTER ===================== */
.partner-links-zone {
    background: var(--bg-surface);
    border-top: 1px solid var(--clr-border);
    padding: 7px 0;
}

.partner-links-dl { display: flex; flex-wrap: wrap; gap: 7px; }
.partner-links-dl dd { margin: 0; }

.partner-links-dl a {
    display: inline-block;
    font-size: 12px;
    color: var(--clr-muted);
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--clr-border);
    transition: all .16s;
    text-decoration: none;
}
.partner-links-dl a:hover {
    color: var(--clr-teal);
    border-color: var(--clr-teal);
    background: rgba(26,125,181,0.06);
}

.site-bottom {
    background: var(--bg-navbar);
    padding: 12px 0;
    text-align: center;
    margin-top: 5px;
}
.site-bottom p { font-size: 12px; color: rgba(255,255,255,0.38); line-height: 1.8; }

/* ===================== PC NAV OVERRIDE ===================== */
@media (min-width: 769px) {
    .nav-seg-lbl {
        width: auto;
        min-width: 54px;
        max-width: 82px;
        font-size: 12px;
        color: rgba(255,255,255,0.62);
        padding: 5px 10px;
    }
    .nav-seg-links a { flex: 1 1 auto; font-size: 14px; padding: 5px 12px; }
    .nav-seg { border-bottom: 1px solid rgba(255,255,255,0.05); }
}

/* ===================== MOBILE ===================== */
@media (max-width: 768px) {
    .media-mosaic { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .nav-seg-links a { font-size: 12px; padding: 3px 4px; flex: 1 1 calc(25% - 4px); }
}

@media (min-width: 480px) and (max-width: 768px) {
    .nav-seg-links a { font-size: 14px; }
    .nav-seg-lbl { font-size: 10px; }
}

/* ===================== HIDE HELPERS ===================== */
@media (max-width: 640px) { .pc-only { display: none !important; } }
@media (min-width: 641px) { .mob-only { display: none !important; } }
