/* ===== ROOT VARIABLES ===== */
:root {
    --primary: #1a4a8a;
    --primary-dark: #0f3166;
    --accent: #e8192c;
    --accent-hover: #b5101e;
    --bg-page: #f2f5f9;
    --bg-white: #ffffff;
    --bg-nav: #1c2b3a;
    --bg-subnav: #f0f3f7;
    --bg-card: #ffffff;
    --bg-panel: #edf1f7;
    --gradient-btn: linear-gradient(135deg, #1a4a8a 0%, #0f3166 100%);
    --gradient-accent: linear-gradient(135deg, #e8192c 0%, #b5101e 100%);
    --text-primary: #1a1f2e;
    --text-secondary: #4a5568;
    --text-muted: #8a95a8;
    --border-color: #d8e0ed;
    --border-light: #eaeff7;
    --shadow-sm: 0 1px 4px rgba(26,42,80,0.07);
    --shadow-md: 0 4px 16px rgba(26,42,80,0.11);
    --shadow-hover: 0 8px 22px rgba(26,42,80,0.16);
    --radius: 6px;
    --radius-lg: 10px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg-page);
    color: var(--text-primary);
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.18s;
}

a:hover { color: var(--accent); }

ul, ol { list-style: none; padding: 0; margin: 0; }

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

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

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

.content { width: 100%; }

/* ===== SITE HEADER / BRANDING ===== */
.site-header {
    background: var(--bg-white);
    border-bottom: 2px solid var(--border-color);
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.branding-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

.site-logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.site-title-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.3px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
    display: inline-block;
    line-height: 1;
}

.domain-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #eef3fa;
    border: 1px solid #c0d0e8;
    border-radius: 20px;
    padding: 4px 14px;
}

.domain-tag {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 500;
}

.domain-url-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.3px;
}

/* ===== BANNER ZONE ===== */
.banner-zone {
    width: 100%;
    margin: 5px 0;
    overflow: hidden;
}

/* ===== NAVIGATION ===== */
.nav-section {
    background: var(--bg-nav);
    border-bottom: 3px solid var(--accent);
    padding: 0;
}

.nav-section .container {
    padding-top: 6px;
    padding-bottom: 6px;
}

.nav-table { width: 100%; }

.nav-zone {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(255,255,255,0.055);
    padding: 4px 0;
}

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

.nav-zone-label {
    width: 58px;
    min-width: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
    padding: 4px 3px;
    text-align: center;
    line-height: 1.3;
    margin-right: 10px;
    flex-shrink: 0;
    border-right: 2px solid var(--accent);
}

.nav-zone-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    align-items: center;
}

.nav-zone-links a {
    display: inline-block;
    padding: 4px 11px;
    font-size: 13px;
    color: rgba(255,255,255,0.72);
    border-radius: 3px;
    border: 1px solid transparent;
    transition: all 0.16s;
    white-space: nowrap;
}

.nav-zone-links a:hover {
    color: #fff;
    background: rgba(232, 25, 44, 0.16);
    border-color: rgba(232, 25, 44, 0.3);
}

.nav-zone-links a.active {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 700;
    box-shadow: 0 2px 7px rgba(232,25,44,0.32);
}

/* ===== SEARCH BOX ===== */
.search-wrap {
    padding: 8px 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}

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

.search-form input[type="text"] {
    flex: 1;
    min-width: 180px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 14px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.search-form input[type="text"]::placeholder { color: var(--text-muted); }

.search-form input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26,74,138,0.1);
}

.search-form button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.16s;
}

.search-form button[value="1"],
.search-form button[value="2"] {
    background: var(--gradient-btn);
    color: #fff;
}

.search-form button[value="1"]:hover,
.search-form button[value="2"]:hover {
    background: var(--gradient-accent);
    transform: translateY(-1px);
}

.search-form button:not([value]) {
    background: var(--bg-panel);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.search-form button:not([value]):hover {
    background: #dce5f0;
    color: var(--primary);
}

/* ===== HOT TAGS ===== */
.hot-tags-block {
    padding: 7px 0 5px;
    background: var(--bg-subnav);
    border-bottom: 1px solid var(--border-color);
}

.hot-tags-block h4 {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-weight: 600;
}

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

.tag-grid-item {
    display: inline-block;
    padding: 3px 11px;
    font-size: 12px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-secondary);
    transition: all 0.16s;
}

.tag-grid-item:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ===== SECTION BLOCKS ===== */
.section-block {
    margin: 8px 0;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 14px 14px 16px;
    box-shadow: var(--shadow-sm);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-light);
}

.section-heading-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-heading-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--accent);
    border-radius: 2px;
    flex-shrink: 0;
}

.section-heading-title a { color: var(--text-primary); }
.section-heading-title a:hover { color: var(--accent); }

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

.media-grid li {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.media-grid li:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: #b0c8e0;
}

.media-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--bg-panel);
}

.media-thumb::after {
    content: '';
    display: block;
    padding-top: calc(350 / 600 * 100%);
}

.media-thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.media-grid li:hover .media-thumb img { transform: scale(1.05); }

.media-meta {
    padding: 6px 8px 8px;
    background: var(--bg-white);
}

.media-meta h5 {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.media-meta h5 a { color: inherit; }
.media-meta h5 a:hover { color: var(--accent); }

/* ===== PAGINATION ===== */
.pagination-bar {
    margin-top: 14px;
    text-align: center;
    padding: 8px 0;
}

.pager-wrap {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.pager-link {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--primary);
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    transition: all 0.16s;
}

.pager-link:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pager-current {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--accent);
}

/* ===== DETAIL TITLE BAR ===== */
.detail-title-bar {
    line-height: 1.8;
    text-align: center;
    padding: 14px 20px;
    font-size: 17px;
    margin: 8px 0;
    word-break: break-all;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent);
    box-shadow: var(--shadow-sm);
}

.detail-title-bar .cat-link {
    color: var(--primary);
    font-weight: 700;
    margin-right: 8px;
}

.detail-title-bar .cat-link:hover { color: var(--accent); }

/* ===== TORRENT INFO PANEL ===== */
.torrent-info-panel {
    font-size: 15px;
    line-height: 1.9;
    padding: 18px 22px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--primary);
    margin: 8px 0;
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
}

.torrent-snap-grid { margin-top: 10px; }

.torrent-snap-grid picture {
    display: block;
    width: 100%;
}

.torrent-snap-grid picture img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    display: block;
    border: 1px solid var(--border-light);
}

/* ===== DOWNLOAD BUTTONS ===== */
.dl-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 12px 0;
}

.dl-btn {
    display: inline-block;
    padding: 10px 26px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: var(--gradient-btn);
    color: #fff;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.16s;
    letter-spacing: 0.5px;
}

.dl-btn:hover {
    background: var(--gradient-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: #fff;
}

.client-hint {
    text-align: center;
    padding: 7px 0;
}

.client-hint a {
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
}

.client-hint a:hover { color: var(--accent); }

/* ===== SHARE PANEL ===== */
.share-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 11px 16px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

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

.share-url-text {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
    word-break: break-all;
    min-width: 120px;
}

.share-copy-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: var(--primary);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.16s;
    white-space: nowrap;
}

.share-copy-button:hover { background: var(--accent); }

/* ===== FOOTER LINKS ===== */
.footer-links-section {
    padding: 8px 0 5px;
    border-top: 1px solid var(--border-color);
    margin-top: 6px;
}

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

.flink-list dd { margin: 0; }

.flink-list a {
    display: inline-block;
    padding: 3px 11px;
    font-size: 12px;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
    border-radius: 3px;
    background: var(--bg-white);
    transition: all 0.16s;
}

.flink-list a:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: #eef3fa;
}

/* ===== FOOTER COPYRIGHT ===== */
.site-footer-bar {
    padding: 10px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-white);
}

.site-footer-bar p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.8;
}

/* ===== UTILITY ===== */
.hide-mobile { display: block; }
.hide-pc { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
    .hide-pc { display: block; }

    .site-title-text { font-size: 16px; }
    .domain-url-text { font-size: 14px; }

    .media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }

    .nav-zone-label {
        width: 15%;
        min-width: 0;
        font-size: 10px;
    }

    .nav-zone-links {
        width: 85%;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
    }

    .nav-zone-links a {
        font-size: 12px;
        padding: 4px 2px;
        text-align: center;
    }

    .section-block { padding: 10px 10px 12px; }
    .detail-title-bar { font-size: 15px; padding: 12px 14px; }
    .torrent-info-panel { padding: 12px 14px; font-size: 14px; }
    .share-panel { flex-direction: column; align-items: flex-start; gap: 7px; }
    .dl-btn { padding: 9px 18px; font-size: 14px; }
    .section-heading-title { font-size: 14px; }
}

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

@media (max-width: 480px) {
    .nav-zone-links a { font-size: 12px; padding: 3px 2px; }
    .search-form input[type="text"] { min-width: 110px; font-size: 13px; }
    .search-form button { padding: 7px 9px; font-size: 12px; }
}

/* PC端导航8个栏目等宽铺满 */
@media (min-width: 769px) {
    .nav-zone-links {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 4px;
    }
    .nav-zone-links a { flex: 1; text-align: center; font-size: 13px; }
}
