:root {
    --bg-body: #111111;
    --bg-surface: #1c1c1c;
    --bg-card: #1c1c1c;
    --bg-topbar: #ffffff;
    --bg-navbar: #d0021b;
    --bg-search: #0a0a0a;
    --clr-border: #2e2e2e;
    --clr-border-lt: #e0e0e0;
    --clr-red: #d0021b;
    --clr-red-dk: #a80016;
    --clr-text: #e8e8e8;
    --clr-text-dk: #1a1a1a;
    --clr-muted: #888888;
    --clr-heading: #ffffff;
    --clr-heading-dk: #111111;
    --clr-white: #ffffff;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 14px;
    --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-red); text-decoration: none; transition: color .18s; }
a:hover { color: var(--clr-red-dk); }

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

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

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

.blk { margin: 5px 0; }

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

.site-topbar .gutter {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.brand-wordmark {
    color: var(--clr-heading-dk);
    font-size: 1.22rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    display: inline-flex;
    align-items: center;
}
.brand-wordmark:hover { color: var(--clr-red); }

.topbar-sep {
    width: 1px;
    height: 20px;
    background: #cccccc;
    flex-shrink: 0;
}

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

.domain-lbl {
    font-size: 11px;
    color: #888;
    background: #f2f2f2;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    padding: 1px 7px;
    flex-shrink: 0;
}

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

/* ===================== RED NAV BAR ===================== */
.red-navbar {
    background: var(--bg-navbar);
    padding: 0;
}

.cat-group {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(0,0,0,0.12);
}
.cat-group:last-child { border-bottom: none; }

.cat-zone-lbl {
    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.55);
    background: rgba(0,0,0,0.15);
    border-right: 1px solid rgba(0,0,0,0.12);
    text-align: center;
    padding: 3px 2px;
    word-break: break-all;
    line-height: 1.3;
    flex-shrink: 0;
}

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

.cat-links a {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    font-weight: 600;
    padding: 5px 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;
    letter-spacing: 0.01em;
}
.cat-links a:hover,
.cat-links a.active {
    background: rgba(0,0,0,0.28);
    color: var(--clr-white);
}

/* ===================== SEARCH ZONE ===================== */
.search-stripe {
    background: var(--bg-search);
    border-bottom: 2px solid var(--clr-red);
    padding: 8px 0;
}

.search-stripe-form {
    display: flex;
    gap: 6px;
    align-items: center;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: var(--radius-pill);
    padding: 5px 8px;
}

.search-stripe-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-stripe-form input[type="text"]::placeholder { color: #555; }

.search-stripe-form button {
    background: var(--clr-red);
    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-stripe-form button:hover { background: var(--clr-red-dk); }

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

.trending-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--clr-heading);
    margin-bottom: 5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

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

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

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

.media-panel {
    background: var(--bg-surface);
    border: 1px solid var(--clr-border);
    border-top: 3px solid var(--clr-red);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

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

.panel-hd h3, .panel-hd h4 {
    font-size: 14px;
    font-weight: 900;
    color: var(--clr-heading);
    margin: 0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.panel-hd a { color: var(--clr-heading); text-decoration: none; }
.panel-hd a:hover { color: var(--clr-red); }

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

.pic-grid li { position: relative; }

.pic-thumb {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #2a2a2a;
    border: 1px solid var(--clr-border);
    transition: opacity .18s, transform .18s;
    aspect-ratio: 600 / 350;
    position: relative;
}
.pic-thumb:hover {
    opacity: 0.88;
    transform: translateY(-2px);
}

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

.pic-meta { margin-top: 5px; }
.pic-meta 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;
}
.pic-meta h5 a { color: #ccc; text-decoration: none; }
.pic-meta h5 a:hover { color: #fff; }

/* ===================== DETAIL PAGE ===================== */
.detail-topbar {
    line-height: 1.8;
    text-align: center;
    padding: 14px 18px;
    font-size: 16px;
    margin: 8px 0;
    word-break: break-all;
    background: #000;
    border: 1px solid var(--clr-border);
    border-top: 4px solid var(--clr-red);
    border-radius: var(--radius-md);
    color: #fff;
}

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

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

.dl-link {
    display: inline-block;
    padding: 9px 24px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid var(--clr-red);
    background: var(--clr-red);
    color: #fff;
    transition: background .16s, color .16s, transform .14s;
    text-decoration: none;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.dl-link:hover {
    background: transparent;
    color: var(--clr-red);
    transform: translateY(-1px);
}

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

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

.clip-url {
    flex: 1;
    font-size: 12px;
    color: #aaa;
    word-break: break-all;
    min-width: 0;
}

.share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--clr-red);
    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;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.share-copy-btn:hover { background: var(--clr-red-dk); }

/* ===================== PAGINATION ===================== */
.pgn-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: #1c1c1c;
    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-red);
    color: #fff;
    border-color: var(--clr-red);
}

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

/* ===================== LINKS / FOOTER ===================== */
.flinks-zone {
    background: #161616;
    border-top: 1px solid var(--clr-border);
    padding: 7px 0;
}

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

.flinks-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;
}
.flinks-list a:hover {
    color: var(--clr-red);
    border-color: var(--clr-red);
    background: rgba(208,2,27,0.08);
}

.site-floor {
    background: #000;
    padding: 12px 0;
    text-align: center;
    margin-top: 5px;
    border-top: 2px solid var(--clr-red);
}
.site-floor p { font-size: 12px; color: #444; line-height: 1.8; }

/* ===================== PC NAV OVERRIDE ===================== */
@media (min-width: 769px) {
    .cat-zone-lbl {
        width: auto;
        min-width: 54px;
        max-width: 82px;
        font-size: 12px;
        color: rgba(255,255,255,0.7);
        padding: 5px 10px;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }
    .cat-links a {
        flex: 1 1 auto;
        font-size: 13px;
        padding: 5px 12px;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }
    .cat-group { border-bottom: 1px solid rgba(0,0,0,0.1); }
}

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

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

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