:root {
    --bg-body: #f0f1f8;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-hero: linear-gradient(145deg, #1a1a6e 0%, #2e2ea8 30%, #4040c8 55%, #5a3fb5 80%, #7b3fa0 100%);
    --bg-nav: #22226a;
    --bg-nav-dk: #18185a;
    --clr-border: #e0e2f0;
    --clr-primary: #3636b8;
    --clr-primary-lt: #4545cc;
    --clr-accent: #ff4f1f;
    --clr-accent-lt: #ff6b42;
    --clr-text: #1a1a2e;
    --clr-muted: #6b6b9a;
    --clr-heading: #0f0f28;
    --clr-nav-text: rgba(255,255,255,0.88);
    --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-primary); text-decoration: none; transition: color .18s; }
a:hover { color: var(--clr-accent); }

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

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

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

.row { margin: 5px 0; }

/* ===================== SITE HEADER ===================== */
.site-head {
    background: var(--bg-hero);
    padding: 10px 0;
    position: relative;
    overflow: hidden;
}

.site-head::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 55%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.06) 0%, transparent 65%);
    pointer-events: none;
}

.site-head .frame {
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 1;
}

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

.brand-title-link {
    color: var(--clr-white);
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
}
.brand-title-link:hover { color: var(--clr-accent-lt); }

.head-sep {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
}

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

.domain-label {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 4px;
    padding: 1px 7px;
    flex-shrink: 0;
}

.domain-value {
    font-size: 1.1rem;
    color: #ffb347;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* ===================== NAV ZONE ===================== */
.nav-zone {
    background: var(--bg-nav);
    border-bottom: 2px solid rgba(255,79,31,0.4);
    padding: 4px 0;
}

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

.nav-cat-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 15%;
    max-width: 68px;
    min-width: 44px;
    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.08);
    text-align: center;
    padding: 3px 2px;
    word-break: break-all;
    line-height: 1.3;
    flex-shrink: 0;
}

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

.nav-entries a {
    color: var(--clr-nav-text);
    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-entries a:hover,
.nav-entries a.active {
    background: var(--clr-accent);
    color: var(--clr-white);
    font-weight: 700;
}

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

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

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

.search-belt-form button {
    background: var(--clr-accent);
    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;
}
.search-belt-form button:hover { background: var(--clr-accent-lt); }

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

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

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

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

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

/* ===================== MODULE ===================== */
.mod-row { margin: 5px 0; }

.mod-card {
    background: var(--bg-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    box-shadow: 0 1px 6px rgba(50,50,180,0.06);
}

.mod-title-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 8px;
    padding-bottom: 7px;
    border-bottom: 2px solid #eeeef8;
}

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

.mod-title-bar h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--clr-accent);
    border-radius: 3px;
}

.mod-title-bar a { color: var(--clr-heading); }
.mod-title-bar a:hover { color: var(--clr-primary); }

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

.item-grid li { position: relative; }

.item-cover {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #e6e6f2;
    border: 1px solid var(--clr-border);
    transition: box-shadow .2s, transform .18s;
    aspect-ratio: 600 / 350;
    position: relative;
}
.item-cover:hover {
    box-shadow: 0 6px 20px rgba(54,54,184,0.18);
    transform: translateY(-2px);
}

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

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

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

.detail-heading::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: var(--clr-accent);
}

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

.detail-specs {
    font-size: 14px;
    line-height: 1.9;
    padding: 14px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--clr-border);
    border-top: 3px solid var(--clr-primary);
    border-radius: var(--radius-md);
    margin: 6px 0;
}

.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 ===================== */
.action-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
}

.action-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-accent);
    color: #fff;
    transition: background .18s, transform .14s;
    text-decoration: none;
}
.action-btn:hover {
    background: #cc3300;
    color: #fff;
    transform: translateY(-1px);
}

/* ===================== SHARE BOX ===================== */
.share-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #f0f0fb;
    border: 1px solid #d0d0ee;
    border-radius: var(--radius-md);
    padding: 8px 14px;
    margin: 8px 0;
}

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

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

.share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--clr-primary);
    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 .18s;
    font-family: inherit;
}
.share-copy-btn:hover { background: var(--clr-primary-lt); }

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

.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-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

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

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

.foot-links-list 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;
}
.foot-links-list a:hover {
    color: var(--clr-primary);
    border-color: var(--clr-primary);
    background: #eeeef9;
}

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

/* ===================== PC NAV OVERRIDE ===================== */
@media (min-width: 769px) {
    .nav-cat-tag {
        width: auto;
        min-width: 56px;
        max-width: 84px;
        font-size: 13px;
        color: rgba(255,255,255,0.62);
        padding: 5px 10px;
    }
    .nav-entries a { flex: 1 1 auto; font-size: 14px; padding: 5px 12px; }
}

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

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

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