:root {
    --clr-primary: #f5c200;
    --clr-primary-dark: #e0a800;
    --clr-accent: #2979ff;
    --clr-accent2: #ff5722;
    --clr-bg: #0d1b2a;
    --clr-bg2: #13243a;
    --clr-bg3: #1a2f47;
    --clr-surface: #192d44;
    --clr-border: #253d5a;
    --clr-text: #e8eef4;
    --clr-text-muted: #8ba3be;
    --clr-heading: #f5c200;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow: 0 4px 20px rgba(0,0,0,0.4);
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--clr-bg);
    color: var(--clr-text);
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--clr-primary); }

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

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

.wrap-outer + .wrap-outer { margin-top: 8px; }

.section-block { margin-bottom: 8px; }

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

/* ========== SITE HEADER / BRAND ========== */
.site-topbar {
    background: linear-gradient(90deg, #f5c200 0%, #ffdd57 60%, #f5c200 100%);
    padding: 0;
    border-bottom: 3px solid var(--clr-accent2);
    box-shadow: 0 3px 12px rgba(245,194,0,0.35);
}

.site-topbar .wrap-outer {
    display: flex;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 18px;
}

.brand-name-link {
    font-size: 22px;
    font-weight: 900;
    color: #1a1a1a;
    letter-spacing: -0.5px;
    white-space: nowrap;
    text-decoration: none;
}

.brand-name-link:hover { color: var(--clr-accent); }

.brand-domain-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.12);
    border-radius: 20px;
    padding: 3px 12px;
    flex-shrink: 0;
}

.badge-label {
    font-size: 11px;
    color: #4a3800;
    white-space: nowrap;
    font-weight: 600;
}

.badge-domain {
    font-size: 15px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: 0.3px;
}

/* ========== BANNER AD ZONE ========== */
.zone-banner { margin: 6px 0; }
.zone-banner img { border-radius: var(--radius-md); }

/* ========== NAV CATEGORIES ========== */
.nav-wrap {
    background: var(--clr-bg2);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 6px 0;
}

.nav-section-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--clr-border);
}

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

.nav-zone-tag {
    background: var(--clr-primary);
    color: #1a1a1a;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    min-width: 52px;
    width: 15%;
    flex-shrink: 0;
    text-align: center;
    line-height: 1.3;
    word-break: break-all;
    white-space: normal;
}

.nav-links-row {
    display: flex;
    flex-wrap: wrap;
    flex: 1;
    padding: 4px 6px;
    gap: 4px;
}

.nav-links-row a {
    color: var(--clr-text);
    font-size: 13px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
}

.nav-links-row a:hover,
.nav-links-row a.active {
    background: var(--clr-primary);
    color: #1a1a1a;
    font-weight: 700;
}

/* ========== SEARCH BAR ========== */
.searchbar-wrap {
    background: var(--clr-bg2);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin: 6px 0;
}

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

.searchbar-wrap input[type="text"] {
    flex: 1;
    min-width: 0;
    background: var(--clr-bg3);
    border: 1.5px solid var(--clr-border);
    border-radius: var(--radius-sm);
    color: var(--clr-text);
    font-size: 14px;
    padding: 7px 12px;
    outline: none;
    transition: border-color 0.2s;
}

.searchbar-wrap input[type="text"]:focus { border-color: var(--clr-primary); }

.searchbar-wrap button {
    background: var(--clr-primary);
    color: #1a1a1a;
    border: none;
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s, transform 0.1s;
    flex-shrink: 0;
}

.searchbar-wrap button:hover {
    background: var(--clr-primary-dark);
    transform: translateY(-1px);
}

/* ========== HOT TAGS ========== */
.hotsearch-block {
    background: var(--clr-bg2);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin: 6px 0;
}

.hotsearch-block h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--clr-primary);
    margin-bottom: 8px;
}

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

.tag-grid a {
    display: inline-block;
    background: var(--clr-bg3);
    border: 1px solid var(--clr-border);
    color: var(--clr-text-muted);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    transition: all 0.18s;
}

.tag-grid a:hover {
    background: var(--clr-primary);
    color: #1a1a1a;
    border-color: var(--clr-primary);
    font-weight: 600;
}

/* ========== SECTION HEADING ========== */
.section-heading-bar {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    border-left: 4px solid var(--clr-primary);
    padding-left: 10px;
}

.section-heading-bar h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--clr-heading);
    letter-spacing: 0.3px;
}

.section-heading-bar h3 a {
    color: inherit;
}

.section-heading-bar h3 a:hover { color: var(--clr-accent); }

.section-heading-bar h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--clr-heading);
}

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

.video-card-grid li { position: relative; }

.thumb-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--clr-bg3);
    aspect-ratio: 600 / 350;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    /* 防止子图片撑破容器 */
    max-width: 100%;
}

.thumb-link:hover { transform: translateY(-3px); }

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

.thumb-link:hover img { transform: scale(1.05); }

.vcard-info { padding: 5px 2px 2px; }

.vcard-info h5 {
    font-size: 12px;
    color: var(--clr-text);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 500;
}

.vcard-info h5 a:hover { color: var(--clr-primary); }

/* ========== CONTENT SECTION BLOCK ========== */
.content-section {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 14px;
    margin-bottom: 8px;
}

/* ========== PAGE TITLE BAR ========== */
.page-title-bar {
    background: var(--clr-bg2);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    word-break: break-all;
}

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

/* ========== TORRENT DETAIL ========== */
.torrent-meta-box {
    background: var(--clr-bg2);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    font-size: 15px;
    line-height: 1.9;
    margin-bottom: 8px;
}

.torrent-capture-grid picture,
.torrent-capture-grid img {
    width: 100%;
    display: block;
    border-radius: var(--radius-md);
    margin-top: 8px;
}

/* ========== DOWNLOAD BUTTONS ========== */
.dl-btns-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.dl-btn {
    display: inline-block;
    background: var(--clr-primary);
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 800;
    padding: 10px 24px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: background 0.18s, transform 0.12s;
    box-shadow: 0 4px 12px rgba(245,194,0,0.3);
}

.dl-btn:hover {
    background: var(--clr-primary-dark);
    transform: translateY(-2px);
    color: #1a1a1a;
}

/* ========== BT CLIENT LINK ========== */
.bt-client-row {
    text-align: center;
    padding: 10px;
    font-size: 14px;
}

.bt-client-row a {
    color: var(--clr-accent);
    font-weight: 600;
}

.bt-client-row a:hover { text-decoration: underline; }

/* ========== SHARE SECTION ========== */
.share-panel {
    background: var(--clr-bg2);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.share-url-row {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}

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

.share-url-text {
    font-size: 12px;
    color: var(--clr-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-copy-btn {
    background: var(--clr-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.18s;
    flex-shrink: 0;
}

.share-copy-btn:hover { background: #1565c0; }

/* ========== VIDEO PLAYER ========== */
.player-wrap {
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 8px;
}

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

.paging-row a,
.paging-row .pg-cur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.18s;
}

.paging-row a {
    background: var(--clr-bg2);
    border: 1px solid var(--clr-border);
    color: var(--clr-text);
}

.paging-row a:hover {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    color: #1a1a1a;
}

.paging-row .pg-cur {
    background: var(--clr-primary);
    color: #1a1a1a;
    border: 1px solid var(--clr-primary);
}

/* ========== FOOTER ========== */
.footer-links-block {
    background: var(--clr-bg2);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin: 6px 0;
}

.footer-links-block dl { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-links-block dd { margin: 0; }

.footer-link-item {
    display: inline-block;
    padding: 3px 10px;
    background: var(--clr-bg3);
    border: 1px solid var(--clr-border);
    border-radius: 20px;
    color: var(--clr-text-muted);
    font-size: 13px;
    transition: all 0.18s;
}

.footer-link-item:hover {
    background: var(--clr-primary);
    color: #1a1a1a;
    border-color: var(--clr-primary);
}

.footer-copyright {
    text-align: center;
    padding: 14px 0 10px;
    font-size: 12px;
    color: var(--clr-text-muted);
    border-top: 1px solid var(--clr-border);
    margin-top: 6px;
}

/* ========== VIDEO LIST: COUNT BADGE ========== */
.count-badge {
    font-size: 0.75em;
    font-weight: 400;
    color: var(--clr-text-muted);
    margin-left: 8px;
}

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

/* ========== RESPONSIVE ========== */
@media (max-width: 960px) {
    .video-card-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .video-card-grid li { min-width: 0; overflow: hidden; }
    .hide-mobile { display: none !important; }
    .hide-pc { display: block !important; }
}

@media (max-width: 960px) {
    .nav-zone-tag { font-size: 10px; width: 15%; min-width: 40px; padding: 4px 2px; }
    .nav-links-row { width: 85%; }
    .nav-links-row a { font-size: 12px; padding: 3px 5px; }
}

@media (max-width: 640px) {
    .nav-links-row { display: grid; grid-template-columns: repeat(4, 1fr); }
    .nav-links-row a { font-size: 12px; text-align: center; }
    .brand-name-link { font-size: 18px; }
    .badge-domain { font-size: 13px; }
}

@media (min-width: 641px) and (max-width: 960px) {
    .nav-links-row { display: grid; grid-template-columns: repeat(4, 1fr); }
    .nav-links-row a { font-size: 13px; text-align: center; }
}

@media (min-width: 961px) {
    .nav-zone-tag { font-size: 13px; width: auto; min-width: 70px; padding: 6px 10px; }
    .nav-links-row { display: flex; flex-wrap: nowrap; }
    .nav-links-row a { flex: 1; text-align: center; }
    .video-card-grid { grid-template-columns: repeat(4, 1fr); }
}
