/* =============================================
   FILM SITE TEMPLATE - CRIMSON RED & WHITE
   ============================================= */

:root {
    --clr-bg: #f7f7f7;
    --clr-surface: #ffffff;
    --clr-surface2: #fafafa;
    --clr-surface3: #f2f2f2;
    --clr-red: #c8102e;
    --clr-red2: #a50d25;
    --clr-red3: #e01030;
    --clr-red-lt: #fdecea;
    --clr-red-pale: #fff5f5;
    --clr-border: #e8e8e8;
    --clr-border2: #d5d5d5;
    --clr-text: #1a1a1a;
    --clr-text-muted: #555555;
    --clr-text-dim: #999999;
    --clr-text-inv: #ffffff;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 24px;
    --tr: 0.17s 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(--tr); }
a:hover { color: var(--clr-red); }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

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

.page-wrap { 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
   ============================================= */

.top-bar {
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    padding: 9px 0;
    margin-bottom: 5px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.top-bar .container { display: flex; align-items: center; }

.hd-row { display: flex; align-items: center; flex-wrap: wrap; }

.hd-link {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    text-decoration: none;
}

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

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

.domain-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.domain-label {
    font-size: 10px;
    background: var(--clr-red);
    color: #fff;
    padding: 2px 8px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

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

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

.promo-area { margin: 5px 0; }
.promo-area .container { padding: 0 12px; }

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

.site-nav {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    margin: 5px 0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

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

.zone-nm {
    font-size: 10px;
    color: var(--clr-text-dim);
    background: var(--clr-surface3);
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
    border-right: 1px solid var(--clr-border);
    flex-shrink: 0;
    text-align: center;
    line-height: 1.3;
    word-break: break-all;
}

.cat-group {
    display: flex;
    flex-wrap: wrap;
    flex: 1;
    align-items: stretch;
}

.cat-group 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(--tr), color var(--tr);
    border-right: 1px solid var(--clr-border);
    white-space: nowrap;
    text-align: center;
}

.cat-group a:last-child { border-right: none; }

.cat-group a:hover {
    background: var(--clr-red-lt);
    color: var(--clr-red);
}

.cat-group a.active {
    background: var(--clr-red);
    color: #fff;
    font-weight: 700;
}

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

.qry-wrap {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 9px 14px;
    margin: 5px 0;
}

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

.qry-form input[type="text"] {
    flex: 1;
    min-width: 180px;
    background: var(--clr-surface3);
    border: 1px solid var(--clr-border2);
    border-radius: var(--radius-lg);
    color: var(--clr-text);
    padding: 8px 14px;
    font-size: 13px;
    outline: none;
    transition: border-color var(--tr), box-shadow var(--tr);
}

.qry-form input[type="text"]:focus {
    border-color: var(--clr-red);
    box-shadow: 0 0 0 3px rgba(200,16,46,0.1);
    background: #fff;
}

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

.qry-form button {
    background: var(--clr-red);
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--tr), transform var(--tr);
    white-space: nowrap;
}

.qry-form button:hover {
    background: var(--clr-red2);
    transform: translateY(-1px);
}

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

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

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

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

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

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

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

.sect-block { margin: 6px 0; }

.sect-top {
    display: flex;
    align-items: center;
    padding: 8px 0 7px;
    border-bottom: 2px solid var(--clr-border);
    margin-bottom: 10px;
    position: relative;
}

.sect-top::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--clr-red);
    border-radius: 2px;
}

.sect-label {
    font-size: 15px;
    font-weight: 800;
    color: var(--clr-text);
    letter-spacing: 0.3px;
    padding-left: 10px;
    position: relative;
}

.sect-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 15px;
    background: var(--clr-red);
    border-radius: 2px;
}

.sect-label a { color: inherit; }
.sect-label a:hover { color: var(--clr-red); }

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

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

.film-grid li { position: relative; }

.film-thumb {
    display: block;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--clr-surface3);
    border: 1px solid var(--clr-border);
    transition: box-shadow var(--tr), transform var(--tr);
}

.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;
}

.film-thumb:hover {
    box-shadow: 0 6px 20px rgba(200,16,46,0.15);
    transform: translateY(-2px);
}

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

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

.film-desc { padding: 5px 2px 2px; }

.film-desc 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-desc h5 a { color: inherit; }
.film-desc h5 a:hover { color: var(--clr-red); }

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

.page-nav {
    margin: 16px 0 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.page-btn {
    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-border2);
    border-radius: var(--radius-md);
    color: var(--clr-text-muted);
    font-size: 13px;
    transition: all var(--tr);
}

.page-btn:hover {
    background: var(--clr-red);
    border-color: var(--clr-red);
    color: #fff;
}

.page-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    background: var(--clr-red);
    border: 1px solid var(--clr-red);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

/* =============================================
   DETAIL PAGE
   ============================================= */

.detail-title {
    line-height: 1.7;
    text-align: center;
    padding: 14px 20px;
    font-size: 17px;
    margin: 7px 0;
    word-break: break-all;
    background: var(--clr-red);
    border-radius: var(--radius-md);
    color: #fff;
}

.detail-title .cat-lnk {
    color: rgba(255,255,255,0.85);
    font-weight: 700;
    margin-right: 8px;
    text-decoration: none;
    transition: color var(--tr);
}

.detail-title .cat-lnk:hover { color: #fff; }

.detail-body {
    font-size: 15px;
    line-height: 2;
    padding: 18px 22px;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    margin: 6px 0;
}

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

.img-preview picture {
    display: block;
    width: 100%;
}

.img-preview picture img,
.img-preview img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
    border: 1px solid var(--clr-border);
}

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

.dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 26px;
    background: var(--clr-red);
    color: #fff;
    border: 2px solid var(--clr-red);
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--tr);
    text-decoration: none;
    letter-spacing: 0.3px;
}

.dl-btn:hover {
    background: var(--clr-red2);
    border-color: var(--clr-red2);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(200,16,46,0.3);
}

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

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

.client-note { text-align: center; padding: 10px; }
.client-note a { color: var(--clr-red); font-weight: 600; font-size: 13px; }

/* =============================================
   SHARE PANEL
   ============================================= */

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

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

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

.share-btn {
    background: var(--clr-red);
    border: none;
    border-radius: var(--radius-lg);
    color: #fff;
    padding: 6px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--tr);
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 600;
}

.share-btn:hover {
    background: var(--clr-red2);
    transform: translateY(-1px);
}

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

.friends-sect {
    margin: 6px 0;
    padding: 10px 0;
    border-top: 1px solid var(--clr-border2);
}

.friends-links { display: flex; flex-wrap: wrap; gap: 7px; }
.friends-links dl { display: contents; }
.friends-links dd { display: inline; }

.friends-links a {
    display: inline-block;
    padding: 3px 12px;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    font-size: 12px;
    color: var(--clr-text-muted);
    transition: all var(--tr);
}

.friends-links a:hover {
    background: var(--clr-red-lt);
    border-color: var(--clr-red);
    color: var(--clr-red);
}

.site-foot {
    background: var(--clr-red);
    padding: 14px 0;
    margin-top: 8px;
}

.foot-copy {
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    line-height: 1.8;
}

/* =============================================
   VISIBILITY HELPERS
   ============================================= */

.hide-mob { display: block; }
.hide-desk { display: none; }

/* =============================================
   RESPONSIVE
   ============================================= */

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

@media (max-width: 768px) {
    .site-nm { font-size: 16px; }
    .domain-url { font-size: 13px; }

    .film-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
    .film-desc h5 { font-size: 11px; }

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

    .cat-group {
        width: 85%;
        flex: none;
        display: flex;
        flex-wrap: wrap;
    }

    .cat-group a {
        width: 25%;
        flex-basis: 25%;
        font-size: 12px;
        padding: 6px 2px;
    }

    .hide-mob { display: none !important; }
    .hide-desk { display: block !important; }

    .qry-form { flex-wrap: nowrap; }
    .qry-form input[type="text"] { min-width: 0; flex: 1; }
    .qry-form button { padding: 8px 8px; font-size: 12px; flex-shrink: 0; }

    .detail-body { padding: 12px 14px; font-size: 14px; }
}

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

@media (min-width: 768px) {
    .cat-group { flex: 1; display: flex; flex-wrap: nowrap; }
    .cat-group a { flex: 1; font-size: 13px; }
    .zone-nm { min-width: 60px; font-size: 11px; }
}
