/* CinePortal - Cloudflare-inspired Light Theme */

:root {
    --cf-orange: #f6821f;
    --cf-orange-dark: #d96a10;
    --cf-orange-light: #fef0e4;
    --cf-orange-mid: #fad9b8;
    --cf-red: #e84027;
    --cf-text: #1a1a1a;
    --cf-text-muted: #4a4a4a;
    --cf-text-faint: #8a8a8a;
    --cf-bg: #ffffff;
    --cf-bg-soft: #f8f9fa;
    --cf-bg-warm: #fdf6ef;
    --cf-border: #e8e8e8;
    --cf-border-warm: #f0dcc8;
    --cf-shadow: rgba(0, 0, 0, 0.07);
    --cf-shadow-md: rgba(0, 0, 0, 0.13);
    --cf-shadow-lg: rgba(246, 130, 31, 0.22);
    --cf-gradient: linear-gradient(135deg, #f6821f 0%, #e84027 100%);
    --radius: 6px;
    --radius-sm: 4px;
    --radius-lg: 10px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --trans: all 0.22s var(--ease);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--cf-bg);
    color: var(--cf-text);
    line-height: 1.55;
    font-size: 14px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
.portal-header {
    background: var(--cf-bg);
    border-bottom: 2px solid var(--cf-border);
    padding: 10px 0;
}

.hdr-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.brand-anchor {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: var(--cf-gradient);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    flex-shrink: 0;
}

.brand-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--cf-text);
    letter-spacing: -0.3px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
}

.brand-anchor:hover .brand-text {
    color: var(--cf-orange);
}

.hdr-sep {
    width: 1px;
    height: 20px;
    background: var(--cf-border);
    flex-shrink: 0;
}

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

.domain-badge {
    font-size: 10px;
    font-weight: 700;
    color: var(--cf-orange);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: var(--cf-orange-light);
    border: 1px solid var(--cf-orange-mid);
    padding: 2px 8px;
    border-radius: 3px;
}

.domain-val {
    font-size: 19px;
    font-weight: 700;
    color: var(--cf-text);
    font-family: 'SF Mono', 'Courier New', monospace;
    letter-spacing: 0.2px;
}

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

.blk {
    padding: 8px 0;
}

/* ===== NAVIGATION ===== */
.cat-panel {
    background: var(--cf-bg);
    border: 1px solid var(--cf-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px var(--cf-shadow);
}

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

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

.zone-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--cf-orange);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: 10%;
    text-align: center;
    border-right: 1px solid var(--cf-border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 5px;
    flex-shrink: 0;
    background: var(--cf-bg-warm);
}

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

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

.zone-anchors a:hover {
    background: var(--cf-orange);
    color: #fff;
    border-color: var(--cf-orange);
    box-shadow: 0 2px 8px var(--cf-shadow-lg);
}

.zone-anchors a.active {
    background: var(--cf-orange);
    color: #fff;
    border-color: var(--cf-orange);
    font-weight: 700;
    box-shadow: 0 2px 8px var(--cf-shadow-lg);
}

/* ===== SEARCH ===== */
.qry-bar {
    background: var(--cf-bg-warm);
    border-radius: var(--radius-lg);
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--cf-border-warm);
}

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

.qry-bar input[type="text"] {
    flex: 1;
    min-width: 100px;
    padding: 10px 16px;
    border: 1px solid var(--cf-border);
    border-radius: 4px;
    background: var(--cf-bg);
    color: var(--cf-text);
    font-size: 14px;
    transition: var(--trans);
    outline: none;
}

.qry-bar input[type="text"]:focus {
    border-color: var(--cf-orange);
    box-shadow: 0 0 0 3px rgba(246,130,31,0.15);
}

.qry-bar input[type="text"]::placeholder {
    color: var(--cf-text-faint);
}

.qry-bar button {
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    background: var(--cf-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--trans);
    white-space: nowrap;
    flex-shrink: 0;
}

.qry-bar button:hover {
    filter: brightness(1.08);
    box-shadow: 0 3px 12px var(--cf-shadow-lg);
}

/* ===== KEYWORD TAGS ===== */
.kw-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    padding: 12px;
    background: var(--cf-bg);
    border-radius: var(--radius-lg);
    margin-bottom: 8px;
    border: 1px solid var(--cf-border);
}

.kw-tag {
    padding: 5px 14px;
    background: var(--cf-bg-soft);
    border-radius: 3px;
    color: var(--cf-text-muted);
    text-decoration: none;
    font-size: 12px;
    transition: var(--trans);
    border: 1px solid var(--cf-border);
}

.kw-tag:hover {
    background: var(--cf-orange);
    color: #fff;
    border-color: var(--cf-orange);
}

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

.sec-head {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--cf-border);
    position: relative;
}

.sec-head::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 52px;
    height: 2px;
    background: var(--cf-gradient);
}

.sec-title {
    font-size: 19px;
    font-weight: 700;
    margin: 0;
    color: var(--cf-text);
}

.sec-title a {
    color: var(--cf-text);
    text-decoration: none;
    transition: var(--trans);
}

.sec-title a:hover {
    color: var(--cf-orange);
}

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

.film-grid li {
    animation: popIn 0.45s ease backwards;
}

.film-grid li:nth-child(1) { animation-delay: 0.03s; }
.film-grid li:nth-child(2) { animation-delay: 0.06s; }
.film-grid li:nth-child(3) { animation-delay: 0.09s; }
.film-grid li:nth-child(4) { animation-delay: 0.12s; }
.film-grid li:nth-child(5) { animation-delay: 0.15s; }
.film-grid li:nth-child(6) { animation-delay: 0.18s; }
.film-grid li:nth-child(7) { animation-delay: 0.21s; }
.film-grid li:nth-child(8) { animation-delay: 0.24s; }

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

.film-cover {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 600 / 350;
    background: var(--cf-bg-soft);
    border: 1px solid var(--cf-border);
    transition: var(--trans);
}

.film-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.38s var(--ease);
}

.film-cover::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: rgba(255,255,255,0.95);
    background: rgba(246,130,31,0.6);
    opacity: 0;
    transition: opacity 0.22s ease;
    z-index: 2;
}

.film-cover:hover {
    border-color: var(--cf-orange);
    box-shadow: 0 4px 18px var(--cf-shadow-lg);
}

.film-cover:hover img {
    transform: scale(1.05);
}

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

.film-info {
    padding: 7px 0 3px;
}

.film-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.film-info h5 a {
    color: var(--cf-text-muted);
    text-decoration: none;
    transition: var(--trans);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.film-info h5 a:hover {
    color: var(--cf-orange);
}

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

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

.MacPlayer {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
}

/* ===== TORRENT CAPTURE ===== */
.preview-frame {}

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

.preview-frame .img_item {
    width: 100%;
}

/* ===== DOWNLOAD BUTTONS ===== */
.action-strip {
    text-align: center;
    padding: 16px;
    background: var(--cf-bg-warm);
    border-radius: var(--radius-lg);
    margin: 12px 0;
    border: 1px solid var(--cf-border-warm);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
}

.act-btn {
    display: inline-block;
    padding: 11px 24px;
    background: var(--cf-gradient);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    transition: var(--trans);
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    letter-spacing: 0.2px;
}

.act-btn:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 16px var(--cf-shadow-lg);
    transform: translateY(-1px);
}

/* ===== SHARE SECTION ===== */
.url-share {
    background: var(--cf-bg-soft);
    border-radius: var(--radius-lg);
    padding: 15px;
    margin: 12px 0;
    border: 1px solid var(--cf-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.url-display {
    background: var(--cf-bg);
    border: 1px solid var(--cf-border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

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

.url-text {
    font-size: 12px;
    color: var(--cf-text-muted);
    font-family: 'SF Mono', 'Courier New', monospace;
    word-break: break-all;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.url-copy-btn {
    padding: 10px 20px;
    background: var(--cf-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--trans);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.url-copy-btn:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 14px var(--cf-shadow-lg);
}

.ico-clip { font-size: 15px; }

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

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

.pg-btn {
    background: var(--cf-bg);
    color: var(--cf-text-muted);
    border: 1px solid var(--cf-border);
}

.pg-btn:hover {
    background: var(--cf-orange);
    border-color: var(--cf-orange);
    color: #fff;
}

.pg-current {
    background: var(--cf-gradient);
    color: #fff;
    border: 1px solid var(--cf-orange);
    cursor: default;
}

/* ===== FOOTER LINKS ===== */
.fl-box {
    padding: 12px;
    background: var(--cf-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--cf-border);
}

.fl-box dl { margin: 0; }

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

.fl-box a {
    color: var(--cf-text-faint);
    text-decoration: none;
    font-size: 13px;
    transition: var(--trans);
}

.fl-box a:hover {
    color: var(--cf-orange);
}

/* ===== SITE FOOTER ===== */
.ft-foot {
    padding: 22px 0;
    text-align: center;
    border-top: 2px solid var(--cf-border);
    margin-top: 20px;
    background: var(--cf-bg-soft);
}

.ft-foot p {
    margin: 6px 0;
    color: var(--cf-text-faint);
    font-size: 13px;
}

.ft-foot a {
    color: var(--cf-text-faint);
    text-decoration: none;
    transition: var(--trans);
}

.ft-foot a:hover {
    color: var(--cf-orange);
}

/* ===== UTILITIES ===== */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.only-desktop { display: block; }
.only-mobile { display: block; }

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

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

img[data-original] {
    background: var(--cf-bg-soft);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .pg-wrap { padding: 0 9px; }
    .blk { padding: 6px 0; }
    .hdr-inner { gap: 10px; }
    .brand-text { font-size: 18px; }
    .domain-val { font-size: 16px; }

    .player-shell {
        height: 56.25vw;
        max-height: 400px;
        margin-bottom: 10px;
    }

    .cat-row { align-items: stretch; }

    .zone-label {
        width: 15%;
        font-size: 10px;
        padding: 8px 3px;
    }

    .zone-anchors {
        width: 85%;
        font-size: 12px;
        gap: 4px;
        padding: 7px 5px;
    }

    .zone-anchors a {
        font-size: 12px;
        padding: 5px 2px;
        width: calc((100% - 12px) / 4);
    }

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

    .sec-title { font-size: 16px; }

    .qry-bar { padding: 10px; }

    .qry-bar input[type="text"] {
        padding: 9px 12px;
        font-size: 13px;
        min-width: 80px;
    }

    .qry-bar button {
        padding: 9px 12px;
        font-size: 12px;
    }

    .action-strip {
        padding: 12px 8px;
        gap: 8px;
        margin: 10px 0;
    }

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

    .url-share {
        padding: 11px;
        margin: 10px 0;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .url-display { padding: 9px 10px; gap: 7px; }
    .url-text { font-size: 11px; }
    .url-label { font-size: 11px; }

    .url-copy-btn { padding: 9px 11px; font-size: 12px; }

    .pg-nav { padding: 13px 0; gap: 4px; }
    .pg-btn, .pg-current { padding: 7px 11px; font-size: 12px; min-width: 32px; }

    .vid-section { margin-bottom: 10px; }
    .kw-tags { padding: 10px; gap: 6px; margin-bottom: 7px; }
    .kw-tag { padding: 4px 11px; font-size: 12px; }

    .ft-foot { padding: 16px 0; margin-top: 16px; }
}

@media (max-width: 480px) {
    .brand-text { font-size: 16px; }
    .brand-icon { width: 26px; height: 26px; font-size: 13px; }
    .hdr-sep { height: 16px; }
    .domain-badge { font-size: 9px; }
    .domain-val { font-size: 15px; }

    .zone-label {
        width: 15%;
        font-size: 10px;
        padding: 7px 2px;
    }

    .zone-anchors {
        width: 85%;
        font-size: 12px;
        gap: 3px;
        padding: 6px 4px;
    }

    .zone-anchors a {
        font-size: 12px;
        padding: 4px 2px;
        width: calc((100% - 9px) / 4);
    }

    .player-shell { max-height: 300px; margin-bottom: 8px; }

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

    .film-info h5 { font-size: 12px; }
    .sec-title { font-size: 15px; }

    .act-btn { padding: 8px 10px; font-size: 12px; }
    .url-share { padding: 9px; gap: 5px; }
    .url-copy-btn { padding: 8px 9px; font-size: 11px; }
    .ico-clip { font-size: 13px; }
}
