/* ===== Root Variables ===== */
:root {
    --brand: #FF4500;
    --brand-dark: #CC3700;
    --brand-light: #FF6534;
    --surface: #FFFFFF;
    --surface-alt: #F6F7F8;
    --surface-card: #FFFFFF;
    --border: #EDEFF1;
    --text-main: #1C1C1C;
    --text-muted: #878A8C;
    --text-link: #0079D3;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.10);
    --radius: 6px;
    --radius-lg: 10px;
    --max-width: 1200px;
    --gap: 12px;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--surface-alt);
    color: var(--text-main);
    font-family: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ===== Layout ===== */
.wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

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

/* ===== Site Header ===== */
.site-topbar {
    background: var(--surface);
    border-bottom: 2px solid var(--brand);
}

.site-topbar .wrap {
    display: flex;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 16px;
}

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

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

.site-logo-link:hover { text-decoration: none; }

.site-title-text {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--brand);
    letter-spacing: -0.5px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
}

.domain-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    white-space: nowrap;
}

.domain-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.domain-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--brand);
}

/* ===== Banner / Ad slot ===== */
.banner-slot {
    width: 100%;
    overflow: hidden;
}

.banner-slot img {
    width: 100%;
    display: block;
}

/* ===== Category Navigation ===== */
.nav-panel {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin: 8px 0;
}

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

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

.zone-label {
    background: var(--brand);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    writing-mode: horizontal-tb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    min-width: 15%;
    text-align: center;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    line-height: 1.3;
    word-break: break-all;
}

.zone-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding: 6px 8px;
    flex: 1;
}

.zone-links a {
    font-size: 12px;
    color: var(--text-main);
    text-decoration: none;
    padding: 5px 8px;
    border-radius: var(--radius);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    flex: 0 0 25%;
    text-align: center;
}

.zone-links a:hover {
    background: var(--surface-alt);
    color: var(--brand);
    text-decoration: none;
}

.zone-links a.active {
    background: var(--brand);
    color: #fff;
    font-weight: 700;
}

/* ===== Search Bar ===== */
.search-wrap {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 14px 16px;
    margin: 8px 0;
}

#search-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

#search-form input[type="text"] {
    flex: 1;
    min-width: 160px;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    outline: none;
    background: var(--surface-alt);
    color: var(--text-main);
    transition: border-color 0.15s;
}

#search-form input[type="text"]:focus {
    border-color: var(--brand);
    background: #fff;
}

#search-form button {
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    background: var(--brand);
    color: #fff;
}

#search-form button:hover {
    background: var(--brand-dark);
}

/* ===== Hot Search Tags ===== */
.hotlist-panel {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 12px 16px;
    margin: 8px 0;
}

.hotlist-panel h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.tags-row a {
    display: inline-block;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tags-row a:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    text-decoration: none;
}

/* ===== Section Heading ===== */
.module-block {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    margin: 8px 0;
}

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

.module-head h3,
.module-head h4 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

.module-head h3 a,
.module-head h4 a {
    color: var(--text-main);
    text-decoration: none;
}

.module-head h3 a:hover,
.module-head h4 a:hover {
    color: var(--brand);
    text-decoration: none;
}

.module-count {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 8px;
}

/* ===== Film Grid ===== */
.film-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
    list-style: none;
    padding: 0;
    margin: 0;
}

.film-grid li {
    background: var(--surface-alt);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.film-grid li:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.film-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: #e0e0e0;
}

.film-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.film-grid li:hover .film-thumb img {
    transform: scale(1.04);
}

.film-info {
    padding: 6px 8px 8px;
}

.film-info h5 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.film-info h5 a {
    color: var(--text-main);
    text-decoration: none;
}

.film-info h5 a:hover {
    color: var(--brand);
    text-decoration: none;
}

/* ===== Detail Page: Title ===== */
.detail-title-bar {
    line-height: 1.8;
    text-align: center;
    padding: 16px 20px;
    font-size: 17px;
    margin: 12px 0;
    word-break: break-all;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--brand);
}

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

/* ===== Detail Info Block ===== */
.detail-info-block {
    font-size: 15px;
    line-height: 1.9;
    padding: 20px 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin: 8px 0;
}

/* ===== Capture Grid (torrent preview) ===== */
.capture-stage {
    margin-top: 12px;
}

.capture-stage picture img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    display: block;
}

/* ===== Download Buttons ===== */
.dl-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 22px;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.dl-btn:hover {
    background: var(--brand-dark);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* ===== BT Client Link ===== */
.client-hint {
    text-align: center;
    padding: 10px 0;
}

.client-hint a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
}

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

/* ===== Share Section ===== */
.share-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--surface-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 12px 16px;
    margin: 8px 0;
}

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

.share-url-val {
    flex: 1;
    font-size: 13px;
    color: var(--text-main);
    word-break: break-all;
}

.share-copy-action {
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s;
}

.share-copy-action:hover { background: var(--brand-dark); }

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

.pg-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.pg-link:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    text-decoration: none;
}

.pg-current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 700;
}

/* ===== Friend Links ===== */
.friendlinks-panel {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 12px 16px;
    margin: 8px 0;
}

.friendlinks-panel h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    border-bottom: 2px solid var(--brand);
    padding-bottom: 6px;
}

.fl-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fl-list dl { display: contents; }

.fl-list dd {
    display: inline;
    margin: 0;
}

.fl-list a {
    display: inline-block;
    font-size: 13px;
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    text-decoration: none;
    transition: color 0.12s, border-color 0.12s;
}

.fl-list a:hover {
    color: var(--brand);
    border-color: var(--brand);
    text-decoration: none;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--surface);
    border-top: 2px solid var(--border);
    padding: 16px 0;
    margin-top: 8px;
}

.footer-copy {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== Utility ===== */
.clearfix::after { content: ''; display: table; clear: both; }

/* ===== Responsive ===== */
@media (max-width: 768px) {

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

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

    .zone-links {
        padding: 4px 4px;
    }

    .zone-links a {
        font-size: 12px;
        padding: 4px 4px;
        flex: 0 0 25%;
    }

    .detail-title-bar {
        font-size: 15px;
        padding: 12px 14px;
    }

    #search-form input[type="text"] {
        min-width: 120px;
    }

    #search-form button {
        padding: 8px 12px;
        font-size: 13px;
    }
}

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

@media (min-width: 769px) {
    .zone-label {
        font-size: 13px;
        min-width: auto;
        padding: 0 16px;
        writing-mode: horizontal-tb;
    }

    .zone-links {
        padding: 6px 12px;
    }

    .zone-links a {
        font-size: 14px;
        flex: 1;
        padding: 6px 4px;
    }
}

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

@media (min-width: 769px) {
    .only-mobile { display: none !important; }
}
