/* =============================================
   FILM SITE TEMPLATE - DARK EDITORIAL THEME
   ============================================= */

:root {
    --clr-bg: #0d0d0d;
    --clr-surface: #161616;
    --clr-surface2: #1e1e1e;
    --clr-border: #2a2a2a;
    --clr-accent: #e8a020;
    --clr-accent2: #c0392b;
    --clr-text: #e8e8e8;
    --clr-text-muted: #888888;
    --clr-text-dim: #555555;
    --clr-hover: #f0b030;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --gap-xs: 6px;
    --gap-sm: 10px;
    --gap-md: 16px;
    --gap-lg: 24px;
    --transition: 0.2s ease;
}

*, *::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: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--clr-text);
    text-decoration: none;
    transition: color var(--transition);
}

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

ul, ol {
    list-style: none;
}

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

/* =============================================
   LAYOUT
   ============================================= */

.wrap-outer {
    width: 100%;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 12px;
}

.content {
    width: 100%;
}

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

/* =============================================
   HEADER / BRANDING
   ============================================= */

.site-header {
    background: #0a0a0a;
    border-bottom: 2px solid var(--clr-accent);
    padding: 10px 0;
    margin-bottom: 8px;
}

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

.header-branding {
    display: flex;
    align-items: baseline;
    gap: 18px;
    flex-wrap: wrap;
}

.site-title-link {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}

.site-nm {
    font-size: 22px;
    font-weight: 900;
    color: var(--clr-accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
    line-height: 1;
}

.site-nm:hover {
    color: var(--clr-hover);
}

.latest-domain-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.domain-badge {
    font-size: 11px;
    background: var(--clr-accent2);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.domain-val {
    font-size: 15px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* =============================================
   BANNER AD ZONE
   ============================================= */

.banner-zone {
    margin: 6px 0;
}

.banner-zone .container {
    padding: 0 12px;
}

/* =============================================
   NAVIGATION
   ============================================= */

.nav-wrapper {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    margin: 6px 0;
    overflow: hidden;
}

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

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

.nav-zone-label {
    font-size: 10px;
    color: var(--clr-text-dim);
    background: #111;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: horizontal-tb;
    white-space: nowrap;
    letter-spacing: 1px;
    border-right: 1px solid var(--clr-border);
    flex-shrink: 0;
    text-align: center;
}

.nav-links-row {
    display: flex;
    flex-wrap: wrap;
    flex: 1;
    align-items: stretch;
}

.nav-links-row a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    color: var(--clr-text-muted);
    font-size: 13px;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    border-right: 1px solid var(--clr-border);
    white-space: nowrap;
    text-align: center;
}

.nav-links-row a:last-child {
    border-right: none;
}

.nav-links-row a:hover {
    background: var(--clr-surface2);
    color: var(--clr-accent);
}

.nav-links-row a.active {
    background: var(--clr-accent);
    color: #000;
    font-weight: 700;
}

/* =============================================
   SEARCH BAR
   ============================================= */

.search-wrapper {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin: 6px 0;
}

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

.search-form input[type="text"] {
    flex: 1;
    min-width: 180px;
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    color: var(--clr-text);
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition);
}

.search-form input[type="text"]:focus {
    border-color: var(--clr-accent);
}

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

.search-form button {
    background: var(--clr-accent);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}

.search-form button:hover {
    background: var(--clr-hover);
}

/* =============================================
   HOT SEARCH TAGS
   ============================================= */

.hot-tags-block {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    margin: 6px 0;
}

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

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

.tag-item {
    display: inline-block;
    padding: 4px 10px;
    background: var(--clr-surface2);
    border: 1px solid var(--clr-border);
    border-radius: 3px;
    font-size: 12px;
    color: var(--clr-text-muted);
    transition: all var(--transition);
    white-space: nowrap;
}

.tag-item:hover {
    background: var(--clr-accent);
    border-color: var(--clr-accent);
    color: #000;
}

/* =============================================
   SECTION HEADINGS
   ============================================= */

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

.section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0 8px;
    border-bottom: 2px solid var(--clr-border);
    margin-bottom: 12px;
}

.section-head-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--clr-text);
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 10px;
}

.section-head-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: var(--clr-accent);
    border-radius: 2px;
}

.section-head-title a {
    color: inherit;
}

.section-head-title a:hover {
    color: var(--clr-accent);
}

/* =============================================
   FILM GRID / THUMBNAILS
   ============================================= */

.film-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    list-style: none;
}

.film-grid li {
    position: relative;
}

.film-thumb {
    display: block;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--clr-surface2);
}

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

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

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

.film-thumb::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    pointer-events: none;
}

.film-meta {
    padding: 6px 2px 2px;
}

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

.film-meta h5 a {
    color: inherit;
}

.film-meta h5 a:hover {
    color: var(--clr-accent);
}

/* =============================================
   PAGINATION
   ============================================= */

.pagination-wrap {
    margin: 20px 0 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.pg-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    color: var(--clr-text-muted);
    font-size: 13px;
    transition: all var(--transition);
}

.pg-link:hover {
    background: var(--clr-accent);
    border-color: var(--clr-accent);
    color: #000;
}

.pg-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    background: var(--clr-accent);
    border: 1px solid var(--clr-accent);
    border-radius: var(--radius-sm);
    color: #000;
    font-size: 13px;
    font-weight: 700;
}

/* =============================================
   TORRENT / VIDEO DETAIL PAGE
   ============================================= */

.detail-title-bar {
    line-height: 1.7;
    text-align: center;
    padding: 16px 20px;
    font-size: 17px;
    margin: 10px 0;
    word-break: break-all;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-left: 4px solid var(--clr-accent);
    border-radius: var(--radius-md);
}

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

.detail-info-panel {
    font-size: 15px;
    line-height: 1.9;
    padding: 20px 24px;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    margin: 8px 0;
}

/* TORRENT CAPTURE */
.capture-gallery {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.capture-gallery picture {
    display: block;
    width: 100%;
}

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

/* DOWNLOAD BUTTONS */
.dl-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 16px 0;
}

.dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: var(--clr-accent);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    text-decoration: none;
}

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

.dl-btn-outline {
    background: transparent;
    border: 2px solid var(--clr-accent);
    color: var(--clr-accent);
}

.dl-btn-outline:hover {
    background: var(--clr-accent);
    color: #000;
}

.dl-client-hint {
    text-align: center;
    padding: 12px;
}

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

/* =============================================
   SHARE SECTION
   ============================================= */

.share-panel {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-lbl {
    font-size: 12px;
    color: var(--clr-text-dim);
    white-space: nowrap;
    flex-shrink: 0;
}

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

.share-copy-btn {
    background: var(--clr-surface2);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    color: var(--clr-text-muted);
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.share-copy-btn:hover {
    background: var(--clr-accent);
    border-color: var(--clr-accent);
    color: #000;
}

/* =============================================
   FOOTER
   ============================================= */

.friendlinks-block {
    margin: 8px 0;
    padding: 12px 0;
    border-top: 1px solid var(--clr-border);
}

.friendlinks-block .section-head-title {
    font-size: 14px;
}

.friend-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.friend-links-list dl {
    display: contents;
}

.friend-links-list dd {
    display: inline;
}

.friend-links-list a {
    display: inline-block;
    padding: 4px 10px;
    background: var(--clr-surface2);
    border: 1px solid var(--clr-border);
    border-radius: 3px;
    font-size: 12px;
    color: var(--clr-text-muted);
    transition: all var(--transition);
}

.friend-links-list a:hover {
    background: var(--clr-surface);
    border-color: var(--clr-accent);
    color: var(--clr-accent);
}

.site-footer {
    background: #080808;
    border-top: 1px solid var(--clr-border);
    padding: 16px 0;
    margin-top: 10px;
}

.footer-copy {
    text-align: center;
    font-size: 12px;
    color: var(--clr-text-dim);
    line-height: 1.8;
}

/* =============================================
   HIDDEN HELPERS
   ============================================= */

.hide-mobile { display: block; }
.hide-pc { display: none; }

/* =============================================
   RESPONSIVE - TABLET & MOBILE
   ============================================= */

@media (max-width: 1024px) {
    .film-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .site-nm {
        font-size: 17px;
    }

    .domain-val {
        font-size: 13px;
    }

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

    .film-meta h5 {
        font-size: 11px;
    }

    .nav-zone-label {
        font-size: 10px;
        width: 15%;
        flex-shrink: 0;
        padding: 0 2px;
        word-break: break-all;
        text-align: center;
        line-height: 1.3;
    }

    .nav-links-row {
        width: 85%;
        flex: none;
        display: flex;
        flex-wrap: wrap;
    }

    .nav-links-row a {
        width: 25%;
        flex-basis: 25%;
        font-size: 12px;
        padding: 6px 2px;
    }

    .hide-mobile { display: none !important; }
    .hide-pc { display: block !important; }

    .detail-info-panel {
        padding: 14px 16px;
        font-size: 14px;
    }

    .dl-buttons {
        gap: 8px;
    }

    .dl-btn {
        padding: 9px 16px;
        font-size: 13px;
    }

    .search-form {
        flex-wrap: nowrap;
    }

    .search-form input[type="text"] {
        min-width: 0;
        flex-shrink: 1;
    }

    .search-form button {
        flex-shrink: 0;
        padding: 8px 8px;
        font-size: 12px;
    }
}

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

@media (min-width: 768px) {
    .nav-links-row {
        flex: 1;
        display: flex;
        flex-wrap: nowrap;
    }

    .nav-links-row a {
        flex: 1;
        font-size: 13px;
    }

    .nav-zone-label {
        min-width: 60px;
        font-size: 11px;
    }
}

/* =============================================
   UTILITY
   ============================================= */

.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 14px; }
