/* Cinema Green - Video Website Template */

:root {
    --brand: #2d7a2d;
    --brand-dark: #1f5c1f;
    --brand-light: #3a9e3a;
    --accent: #f5a623;
    --accent-hover: #e09000;
    --text-main: #1a1a1a;
    --text-sub: #444444;
    --text-muted: #777777;
    --bg-body: #f2f4f2;
    --bg-panel: #ffffff;
    --bg-tag: #eef4ee;
    --border-line: #d4e0d4;
    --shadow-sm: rgba(0,0,0,0.06);
    --shadow-md: rgba(0,0,0,0.12);
    --radius-lg: 8px;
    --radius-md: 6px;
    --radius-sm: 4px;
    --ease: all 0.25s ease;
    --brand-grad: linear-gradient(135deg, #2d7a2d 0%, #1f5c1f 100%);
}

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

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.55;
    font-size: 14px;
    overflow-x: hidden;
}

/* ===== SITE HEADER (TOP BRANDING) ===== */
.site-topbar {
    background: var(--brand);
    padding: 8px 0;
}

.site-topbar-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
}

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

.site-title-text {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    border-bottom: none;
    font-style: normal;
}

.site-domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 4px;
    padding: 4px 12px;
}

.site-domain-tag {
    font-size: 11px;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    font-weight: 500;
}

.site-domain-val {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    font-family: 'Courier New', monospace;
}

/* ===== LAYOUT ===== */
.wrap {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 14px;
}

.section-block {
    padding: 10px 0;
}

/* ===== CATEGORY NAVIGATION ===== */
.catnav-box {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-line);
    box-shadow: 0 1px 4px var(--shadow-sm);
    margin-bottom: 10px;
}

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

.catrow:last-child {
    border-bottom: none;
}

.catrow-zone {
    width: 10%;
    min-width: 52px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 4px;
    flex-shrink: 0;
    border-right: none;
    line-height: 1.3;
}

.catrow-items {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 10px;
    align-items: center;
}

.catrow-items a {
    display: inline-block;
    color: var(--text-sub);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--radius-sm);
    transition: var(--ease);
    background: var(--bg-tag);
    border: 1px solid var(--border-line);
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.catrow-items a:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.catrow-items a.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    font-weight: 600;
}

/* ===== SEARCH BOX ===== */
.search-panel {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-line);
    box-shadow: 0 1px 4px var(--shadow-sm);
}

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

.search-panel input[type="text"] {
    flex: 1;
    min-width: 120px;
    padding: 9px 13px;
    border: 1px solid var(--border-line);
    border-radius: var(--radius-md);
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 13px;
    outline: none;
    transition: var(--ease);
}

.search-panel input[type="text"]:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(45,122,45,0.15);
}

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

.search-panel button {
    padding: 9px 15px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--brand-grad);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

.search-panel button:hover {
    background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 100%);
    box-shadow: 0 3px 10px var(--shadow-md);
}

/* ===== HOT SEARCH TAGS ===== */
.tags-panel {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-line);
    box-shadow: 0 1px 4px var(--shadow-sm);
    margin-bottom: 10px;
}

.tags-panel .panel-hd {
    padding: 10px 14px 6px;
}

.tags-panel .panel-hd h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0;
}

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

.tag-link {
    padding: 5px 13px;
    background: var(--bg-tag);
    border-radius: 3px;
    color: var(--text-sub);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ease);
    border: 1px solid var(--border-line);
}

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

/* ===== SECTION HEADINGS ===== */
.film-section {
    margin-bottom: 14px;
}

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

.film-section-hd::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--brand);
}

.film-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.film-section-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: var(--ease);
}

.film-section-title a:hover {
    color: var(--brand);
}

/* ===== FILM CARD GRID ===== */
.film-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    list-style: none;
    padding: 0;
}

.film-grid li {
    position: relative;
    animation: fadeUp 0.5s ease backwards;
}

.film-grid li:nth-child(1) { animation-delay: 0.04s; }
.film-grid li:nth-child(2) { animation-delay: 0.08s; }
.film-grid li:nth-child(3) { animation-delay: 0.12s; }
.film-grid li:nth-child(4) { animation-delay: 0.16s; }
.film-grid li:nth-child(5) { animation-delay: 0.20s; }
.film-grid li:nth-child(6) { animation-delay: 0.24s; }
.film-grid li:nth-child(7) { animation-delay: 0.28s; }
.film-grid li:nth-child(8) { animation-delay: 0.32s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.film-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    /* 600:350 aspect ratio */
    aspect-ratio: 600 / 350;
    background: var(--bg-tag);
    border: 1px solid var(--border-line);
}

.film-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.film-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.film-thumb:hover::after {
    opacity: 1;
}

.film-thumb:hover {
    box-shadow: 0 4px 14px var(--shadow-md);
}

.film-meta {
    padding: 7px 0 4px;
}

.film-meta h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-sub);
}

.film-meta h5 a {
    color: var(--text-sub);
    text-decoration: none;
    transition: var(--ease);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* ===== VIDEO PLAYER ===== */
.player-wrap {
    width: 100%;
    height: 640px;
    max-height: 640px;
    margin-bottom: 16px;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 14px var(--shadow-md);
    position: relative;
}

.player-wrap iframe,
.player-wrap video,
.player-wrap #video-container {
    width: 100%;
    height: 100%;
    border: none;
}

.MacPlayer {
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 4px 18px var(--shadow-md);
}

/* ===== TORRENT CAPTURE ===== */
.capture-zone {
    /* no margin/padding needed */
}

.capture-zone img,
.capture-zone .img_item img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-line);
    display: block;
}

.capture-zone .img_item {
    width: 100%;
}

/* ===== DOWNLOAD BUTTONS ===== */
.dl-bar {
    text-align: center;
    padding: 14px;
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    margin: 12px 0;
    border: 1px solid var(--border-line);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.dl-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--brand-grad);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    transition: var(--ease);
    border: 2px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
}

.dl-btn:hover {
    background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 100%);
    box-shadow: 0 4px 12px var(--shadow-md);
}

/* ===== SHARE SECTION ===== */
.link-share {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin: 14px 0;
    border: 1px solid var(--border-line);
    display: flex;
    align-items: center;
    gap: 10px;
}

.link-url-box {
    background: var(--bg-body);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.link-label {
    font-weight: 700;
    font-size: 12px;
    color: var(--brand);
    white-space: nowrap;
    flex-shrink: 0;
}

.link-text {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    word-break: break-all;
    flex: 1;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-copy-btn {
    padding: 10px 20px;
    background: var(--brand-grad);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.link-copy-btn:hover {
    background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 100%);
    box-shadow: 0 3px 10px var(--shadow-md);
}

.link-copy-btn:active {
    transform: scale(0.97);
}

.link-icon {
    font-size: 16px;
}

/* ===== PAGINATION ===== */
.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 18px 0;
}

.pager-link,
.pager-cur {
    display: inline-block;
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--ease);
    min-width: 36px;
    text-align: center;
}

.pager-link {
    background: var(--bg-panel);
    color: var(--text-main);
    border: 1px solid var(--border-line);
}

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

.pager-cur {
    background: var(--brand-grad);
    color: #fff;
    border: 1px solid var(--brand-dark);
    cursor: default;
}

/* ===== FOOTER ===== */
.site-footer {
    padding: 20px 0;
    text-align: center;
    border-top: 2px solid var(--border-line);
    margin-top: 20px;
    background: var(--bg-panel);
}

.site-footer p {
    margin: 6px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--ease);
}

.site-footer a:hover {
    color: var(--brand);
}

/* ===== FRIENDLY LINKS ===== */
.links-box {
    padding: 12px;
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-line);
}

.links-box dl {
    margin: 0;
}

.links-box dd {
    display: inline-block;
    margin: 4px;
}

.links-box a {
    color: var(--brand);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ease);
    padding: 2px 4px;
}

.links-box a:hover {
    color: var(--brand-dark);
    text-decoration: underline;
}

/* ===== DETAIL INFO BLOCK ===== */
.detail-info-block {
    line-height: 1.8;
    text-align: center;
    padding: 16px;
    font-size: 17px;
    margin: 14px 0;
    word-break: break-all;
    background: #eef4ee;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--brand);
}

.detail-info-block a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
    margin-right: 8px;
}

.detail-attrs {
    font-size: 15px;
    line-height: 1.9;
    padding: 20px;
    background: #eef4ee;
    border-radius: var(--radius-lg);
    margin: 12px 0;
    border-left: 4px solid var(--brand-light);
}

/* ===== VISIBILITY HELPERS ===== */
.mob-only {
    display: block;
}

.pc-only {
    display: block;
}

@media (max-width: 768px) {
    .mob-only { display: none !important; }
}

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

/* ===== CLEARFIX ===== */
.cf::after {
    content: "";
    display: table;
    clear: both;
}

/* ===== LAZY LOAD PLACEHOLDER ===== */
img[data-original] {
    background: var(--bg-tag);
}

/* ===== RESPONSIVE: TABLET/MOBILE ===== */
@media (max-width: 900px) {
    .film-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .wrap {
        padding: 0 8px;
    }

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

    /* Nav zone label: 15% wide, 10px font */
    .catrow-zone {
        width: 15%;
        font-size: 10px;
        padding: 7px 3px;
        min-width: 0;
    }

    .catrow-items {
        width: 85%;
        gap: 3px;
        padding: 6px 6px;
    }

    /* Mobile: 4 links per row (8 total = 2 rows), font 12px (small screen) */
    .catrow-items a {
        font-size: 12px;
        padding: 4px 2px;
        width: calc((100% - 9px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    /* Film grid: 2 per row on mobile */
    .film-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
    }

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

    .film-section-title {
        font-size: 16px;
    }

    .film-section {
        margin-bottom: 10px;
    }

    .player-wrap {
        height: 56.25vw;
        max-height: 380px;
        margin-bottom: 12px;
    }

    .search-panel {
        padding: 9px;
    }

    .search-panel input[type="text"] {
        min-width: 90px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .search-panel button {
        padding: 8px 10px;
        font-size: 12px;
    }

    .tag-list {
        gap: 5px;
    }

    .tag-link {
        padding: 4px 10px;
        font-size: 12px;
    }

    .dl-bar {
        padding: 10px 6px;
        gap: 7px;
        flex-wrap: nowrap;
    }

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

    .link-share {
        padding: 10px;
        gap: 7px;
        flex-wrap: nowrap;
    }

    .link-url-box {
        padding: 8px 10px;
        gap: 6px;
        flex: 1;
        min-width: 0;
    }

    .link-label {
        font-size: 11px;
    }

    .link-text {
        font-size: 10px;
    }

    .link-copy-btn {
        padding: 8px 12px;
        font-size: 11px;
        gap: 3px;
        flex-shrink: 0;
    }

    .link-icon {
        font-size: 14px;
    }

    .pager {
        gap: 4px;
        padding: 14px 0;
    }

    .pager-link,
    .pager-cur {
        padding: 6px 11px;
        font-size: 12px;
        min-width: 32px;
    }

    .site-footer {
        padding: 16px 0;
        margin-top: 16px;
    }

    .site-title-text {
        font-size: 20px;
    }

    .site-domain-val {
        font-size: 15px;
    }
}

/* Large mobile (480px - 768px): 14px nav font */
@media (min-width: 481px) and (max-width: 768px) {
    .catrow-items a {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .catrow-zone {
        width: 15%;
        font-size: 10px;
        padding: 6px 2px;
    }

    .catrow-items {
        width: 85%;
        gap: 3px;
        padding: 5px 4px;
    }

    .catrow-items a {
        font-size: 12px;
        padding: 3px 1px;
        width: calc((100% - 9px) / 4);
    }

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

    .player-wrap {
        height: 56.25vw;
        max-height: 280px;
        margin-bottom: 10px;
    }

    .site-title-text {
        font-size: 18px;
    }

    .site-domain-val {
        font-size: 14px;
    }

    .site-domain-tag {
        font-size: 10px;
    }

    .detail-info-block {
        font-size: 15px;
        padding: 12px;
    }

    .dl-bar {
        padding: 8px 4px;
        gap: 5px;
    }

    .dl-btn {
        padding: 8px 10px;
        font-size: 12px;
    }

    .link-share {
        padding: 8px;
        gap: 5px;
    }
}
