:root {
    --bg-body: #f0eef8;
    --bg-surface: #f7f5fc;
    --bg-card: #ffffff;
    --bg-topbar: #ffffff;
    --bg-navbar: #2d1b69;
    --bg-navbar-lt: #3d2880;
    --clr-border: #dcd8ee;
    --clr-border-lt: #ede9f8;
    --clr-purple: #5c2d8e;
    --clr-purple-dk: #3d1b6e;
    --clr-magenta: #c020a0;
    --clr-magenta-lt: #d030b0;
    --clr-violet: #7c3aed;
    --clr-text: #1e1040;
    --clr-text-lt: #3d2d6e;
    --clr-muted: #8878b8;
    --clr-heading: #1a0e3c;
    --clr-white: #ffffff;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --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.6;
}

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

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

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

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

.unit { margin: 5px 0; }

/* ===================== SITE HEADER ===================== */
.site-cap {
    background: var(--bg-topbar);
    border-bottom: 2px solid var(--clr-border-lt);
    padding: 10px 0;
    box-shadow: 0 1px 8px rgba(92,45,142,0.07);
}

.site-cap .shell {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.identity-name {
    color: var(--clr-heading);
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
}
.identity-name:hover { color: var(--clr-violet); }

.cap-vline {
    width: 1px;
    height: 20px;
    background: var(--clr-border);
    flex-shrink: 0;
}

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

.domain-chip {
    font-size: 11px;
    color: var(--clr-muted);
    background: var(--bg-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    padding: 1px 7px;
    flex-shrink: 0;
}

.domain-addr {
    font-size: 1.1rem;
    color: var(--clr-magenta);
    font-weight: 800;
    letter-spacing: 0.03em;
}

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

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

.nav-zone-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 15%;
    max-width: 66px;
    min-width: 42px;
    font-size: 10px;
    color: rgba(255,255,255,0.42);
    background: rgba(0,0,0,0.15);
    border-right: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    padding: 3px 2px;
    word-break: break-all;
    line-height: 1.3;
    flex-shrink: 0;
}

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

.nav-tab-row a {
    color: rgba(255,255,255,0.86);
    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-tab-row a:hover,
.nav-tab-row a.active {
    background: var(--clr-magenta);
    color: var(--clr-white);
    font-weight: 700;
}

/* ===================== SEARCH ZONE ===================== */
.query-bar {
    background: var(--bg-navbar-lt);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 8px 0;
}

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

.query-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;
}
.query-form input[type="text"]::placeholder { color: rgba(255,255,255,0.42); }

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

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

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

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

.buzz-tags a {
    display: inline-block;
    background: var(--bg-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-pill);
    padding: 3px 12px;
    font-size: 12px;
    color: var(--clr-text-lt);
    transition: all .16s;
    text-decoration: none;
}
.buzz-tags a:hover {
    background: var(--clr-magenta);
    border-color: var(--clr-magenta);
    color: #fff;
    font-weight: 600;
}

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

/* ===================== MODULE ===================== */
.section-unit { margin: 5px 0; }

.content-tile {
    background: var(--bg-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    box-shadow: 0 2px 10px rgba(92,45,142,0.06);
}

.tile-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 8px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--clr-border-lt);
}

.tile-head h3, .tile-head h4 {
    font-size: 14px;
    font-weight: 800;
    color: var(--clr-heading);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tile-head h3::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--clr-magenta);
    border-radius: 50%;
    flex-shrink: 0;
}

.tile-head a { color: var(--clr-heading); }
.tile-head a:hover { color: var(--clr-violet); }

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

.thumb-grid li { position: relative; }

.thumb-img {
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--clr-border);
    transition: box-shadow .18s, transform .18s;
    aspect-ratio: 600 / 350;
    position: relative;
}
.thumb-img:hover {
    box-shadow: 0 6px 22px rgba(124,58,237,0.2);
    transform: translateY(-2px);
}

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

.thumb-desc { margin-top: 5px; }
.thumb-desc 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;
}
.thumb-desc h5 a { color: var(--clr-text-lt); text-decoration: none; }
.thumb-desc h5 a:hover { color: var(--clr-violet); }

/* ===================== DETAIL PAGE ===================== */
.detail-banner {
    line-height: 1.8;
    text-align: center;
    padding: 14px 18px;
    font-size: 16px;
    margin: 8px 0;
    word-break: break-all;
    background: linear-gradient(135deg, var(--bg-navbar) 0%, #5a2090 100%);
    border-radius: var(--radius-lg);
    color: #fff;
}

.detail-banner a {
    color: #e8b0ff;
    font-weight: 700;
    margin-right: 8px;
    text-decoration: none;
}

.detail-specs {
    font-size: 14px;
    line-height: 1.9;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--clr-border);
    border-left: 4px solid var(--clr-violet);
    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 ===================== */
.grab-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
}

.grab-btn {
    display: inline-block;
    padding: 9px 24px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: var(--clr-magenta);
    color: #fff;
    transition: background .18s, transform .14s;
    text-decoration: none;
}
.grab-btn:hover {
    background: var(--clr-violet);
    color: #fff;
    transform: translateY(-1px);
}

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

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

.lp-url {
    flex: 1;
    font-size: 12px;
    color: var(--clr-violet);
    word-break: break-all;
    min-width: 0;
}

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

/* ===================== PAGINATION ===================== */
.pages-row {
    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-pill);
    background: var(--bg-card);
    border: 1px solid var(--clr-border);
    color: var(--clr-text-lt);
    font-size: 13px;
    text-decoration: none;
    transition: all .16s;
}
.a_page_info:hover {
    background: var(--clr-violet);
    color: #fff;
    border-color: var(--clr-violet);
}

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

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

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

.ext-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;
}
.ext-links-dl a:hover {
    color: var(--clr-violet);
    border-color: var(--clr-violet);
    background: rgba(124,58,237,0.07);
}

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

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

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

@media (min-width: 480px) and (max-width: 768px) {
    .nav-tab-row a { font-size: 14px; }
    .nav-zone-tag { font-size: 10px; }
}

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