/* Cloudflare Orange - Video Portal Template */

:root {
    --orange: #f6821f;
    --orange-dark: #d96a10;
    --orange-deep: #b85500;
    --orange-light: #fef3e8;
    --white: #ffffff;
    --bg-root: #f8f8f8;
    --bg-panel: #ffffff;
    --bg-card: #fafafa;
    --text-main: #1a1a1a;
    --text-sub: #404040;
    --text-muted: #767676;
    --border: #e8e8e8;
    --shadow: rgba(0,0,0,0.06);
    --shadow-lg: rgba(0,0,0,0.18);
    --grad-orange: linear-gradient(135deg, #f6821f 0%, #d96a10 100%);
    --grad-hover: linear-gradient(135deg, #ff9a3c 0%, #f6821f 100%);
    --rd: 6px;
    --rd-sm: 4px;
    --rd-lg: 10px;
    --ease: all 0.2s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    background: var(--bg-root);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== HEADER - NOT sticky ===== */
.pg-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 9px 0;
    box-shadow: 0 1px 6px var(--shadow);
}

.pg-header-inner { display: flex; align-items: center; justify-content: center; }

.pg-branding {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: nowrap;
    justify-content: center;
}

.pg-logo-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--ease);
}

.pg-logo-link:hover { opacity: 0.85; }

.pg-logo-shape {
    width: 38px;
    height: 38px;
    background: var(--grad-orange);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    color: #fff;
    font-weight: 900;
    font-style: italic;
}

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

.pg-domain-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--orange-light);
    border: 1.5px solid var(--orange);
    border-radius: 20px;
    padding: 5px 14px;
    flex-shrink: 0;
}

.pg-domain-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--orange);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.pg-domain-val {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

/* ===== WRAPPER ===== */
.pg-wrap { max-width: 1080px; margin: 0 auto; padding: 0 14px; }
.pg-row { padding: 7px 0; }

/* ===== BANNER ===== */
.pg-banner { width: 100%; margin: 4px 0; overflow: hidden; line-height: 0; }
.pg-banner img { width: 100%; display: block; }

/* ===== NAVIGATION ===== */
.pg-navboard {
    background: var(--bg-panel);
    border-radius: var(--rd-lg);
    overflow: hidden;
    margin-bottom: 7px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow);
}

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

.pg-navrow:last-child { border-bottom: none; }

.pg-zone-lbl {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
    width: 10%;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 5px;
    flex-shrink: 0;
    background: var(--grad-orange);
}

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

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

.pg-navlinks a:hover { background: var(--orange); color: #fff; border-color: var(--orange); }
.pg-navlinks a.active { background: var(--orange); color: #fff; border-color: var(--orange); font-weight: 700; }

/* ===== SEARCH ===== */
.pg-searchbox {
    background: var(--bg-panel);
    border-radius: var(--rd-lg);
    padding: 10px 12px;
    margin-bottom: 7px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow);
}

#pgsf { display: flex; gap: 6px; flex-wrap: nowrap; align-items: center; }

#pgsf input[type="text"] {
    flex: 1;
    min-width: 80px;
    padding: 9px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--rd-sm);
    background: var(--bg-root);
    color: var(--text-main);
    font-size: 14px;
    transition: var(--ease);
    outline: none;
}

#pgsf input[type="text"]:focus {
    border-color: var(--orange);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(246,130,31,0.12);
}

#pgsf input[type="text"]::placeholder { color: var(--text-muted); }

#pgsf button {
    padding: 9px 15px;
    border: none;
    border-radius: var(--rd-sm);
    background: var(--grad-orange);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

#pgsf button:hover { background: var(--grad-hover); box-shadow: 0 3px 10px rgba(246,130,31,0.35); }

/* ===== TAG CLOUD ===== */
.pg-tagpool {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 9px 12px;
    background: var(--bg-panel);
    border-radius: var(--rd-lg);
    margin-bottom: 7px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow);
}

.pg-taglink {
    padding: 4px 12px;
    background: var(--orange-light);
    border-radius: 20px;
    color: var(--orange-dark);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: var(--ease);
    border: 1px solid rgba(246,130,31,0.25);
}

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

/* ===== CONTENT BLOCKS ===== */
.pg-block { margin-bottom: 10px; }

.pg-block-inner {
    background: var(--bg-panel);
    border-radius: var(--rd-lg);
    border: 1px solid var(--border);
    padding: 14px;
    box-shadow: 0 2px 8px var(--shadow);
}

.pg-block-hd {
    margin-bottom: 12px;
    padding-bottom: 9px;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.pg-block-hd::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 36px;
    height: 2px;
    background: var(--grad-orange);
    border-radius: 2px;
}

.pg-block-ttl { font-size: 18px; font-weight: 700; color: var(--text-main); margin: 0; letter-spacing: -0.2px; }
.pg-block-ttl a { color: var(--text-main); text-decoration: none; transition: var(--ease); }
.pg-block-ttl a:hover { color: var(--orange); }

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

.pg-filmgrid li { position: relative; }

.pg-filmthumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--rd);
    aspect-ratio: 600 / 350;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

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

.pg-filmthumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(246,130,31,0.55) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.pg-filmthumb:hover::after { opacity: 1; }
.pg-filmthumb:hover img { transform: scale(1.06); }
.pg-filmthumb:hover { border-color: var(--orange); box-shadow: 0 4px 16px rgba(246,130,31,0.25); }

.pg-filmlabel { padding: 6px 0 3px; }
.pg-filmlabel h5 { margin: 0; font-size: 13px; font-weight: 500; line-height: 1.4; }

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

.pg-filmlabel h5 a:hover { color: var(--orange); }

/* ===== VIDEO PLAYER ===== */
.pg-player {
    width: 100%;
    height: 620px;
    max-height: 620px;
    background: #000;
    border-radius: var(--rd-lg);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 6px 24px var(--shadow-lg);
    position: relative;
}

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

.MacPlayer { background: #000; border-radius: var(--rd-lg); overflow: hidden; margin-bottom: 12px; box-shadow: 0 6px 20px var(--shadow-lg); }

/* ===== TORRENT PREVIEW ===== */
.pg-capture { width: 100%; margin-top: 10px; }
.pg-capture img, .pg-capture .img_item img { width: 100%; height: auto; border-radius: var(--rd-sm); border: 1px solid var(--border); display: block; }
.pg-capture .img_item { width: 100%; }

/* ===== DOWNLOAD BUTTONS ===== */
.pg-dlrow {
    text-align: center;
    padding: 14px;
    background: var(--orange-light);
    border-radius: var(--rd-lg);
    margin: 12px 0;
    border: 1px solid rgba(246,130,31,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.down_btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--grad-orange);
    color: #fff;
    text-decoration: none;
    border-radius: var(--rd-sm);
    font-weight: 700;
    font-size: 14px;
    transition: var(--ease);
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
}

.down_btn:hover { background: var(--grad-hover); box-shadow: 0 4px 14px rgba(246,130,31,0.4); }

/* ===== SHARE SECTION ===== */
.share-section {
    background: var(--orange-light);
    border-radius: var(--rd-lg);
    padding: 14px;
    margin: 12px 0;
    border: 1px solid rgba(246,130,31,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-url-display {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--rd-sm);
    padding: 9px 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

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

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

.share-copy-btn {
    padding: 9px 16px;
    background: var(--grad-orange);
    color: #fff;
    border: none;
    border-radius: var(--rd-sm);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.share-copy-btn:hover { background: var(--grad-hover); box-shadow: 0 3px 10px rgba(246,130,31,0.35); }
.share-icon { font-size: 15px; }

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

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

.a_page_info { background: #fff; color: var(--text-main); border: 1px solid var(--border); }
.a_page_info:hover { background: var(--orange); border-color: var(--orange); color: #fff; }
.page_info_focus { background: var(--grad-orange); color: #fff; border: 1px solid var(--orange-dark); cursor: default; }

/* ===== FOOTER ===== */
.pg-footer {
    padding: 20px 0;
    text-align: center;
    border-top: 3px solid var(--orange);
    margin-top: 16px;
    background: var(--white);
}

.pg-footer p { margin: 6px 0; color: var(--text-muted); font-size: 12px; }
.pg-footer a { color: var(--text-muted); text-decoration: none; transition: var(--ease); }
.pg-footer a:hover { color: var(--orange); }

/* ===== FRIEND LINKS ===== */
.pg-flinks { padding: 10px 12px; background: var(--bg-panel); border-radius: var(--rd-lg); border: 1px solid var(--border); }
.pg-flinks dl { margin: 0; }
.pg-flinks dd { display: inline-block; margin: 3px 4px; }
.pg-flinks a { color: var(--text-muted); text-decoration: none; transition: var(--ease); font-size: 13px; }
.pg-flinks a:hover { color: var(--orange); }

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

/* ===== TABLET / MOBILE ===== */
@media (max-width: 768px) {
    .pg-wrap { padding: 0 8px; }
    .pg-row { padding: 5px 0; }
    .pg-site-name { font-size: 19px; }
    .pg-branding { gap: 12px; }
    .pg-logo-shape { width: 32px; height: 32px; font-size: 16px; }
    .pg-domain-pill { padding: 4px 10px; gap: 6px; }
    .pg-domain-label { font-size: 10px; }
    .pg-domain-val { font-size: 15px; }

    /* Mobile nav: 15% label, 85% links, 4 per row */
    .pg-navrow { display: flex; align-items: stretch; }
    .pg-zone-lbl { width: 15%; font-size: 10px; padding: 7px 2px; text-align: center; }
    .pg-navlinks { width: 85%; gap: 4px; padding: 7px 4px; }
    .pg-navlinks a {
        font-size: 13px;
        padding: 4px 2px;
        text-align: center;
        width: calc((100% - 12px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    /* Search all on one line */
    #pgsf { flex-wrap: nowrap; gap: 5px; }
    #pgsf input[type="text"] { min-width: 80px; padding: 8px 9px; font-size: 13px; }
    #pgsf button { padding: 8px 9px; font-size: 12px; }

    /* Film: 2 cols */
    .pg-filmgrid { grid-template-columns: repeat(2, 1fr); gap: 9px; }

    .pg-player { height: 56.25vw; max-height: 380px; margin-bottom: 10px; }
    .pg-block-ttl { font-size: 15px; }
    .pg-taglink { font-size: 11px; padding: 3px 9px; }
    .down_btn { padding: 9px 13px; font-size: 13px; }
    .pg-dlrow { padding: 10px 8px; gap: 7px; flex-wrap: nowrap; }
    .share-section { padding: 9px; gap: 7px; flex-wrap: nowrap; }
    .share-url-display { padding: 7px 9px; flex: 1; min-width: 0; }
    .share-label { font-size: 11px; }
    .share-url { font-size: 10px; }
    .share-copy-btn { padding: 8px 10px; font-size: 12px; flex-shrink: 0; }
    .page_info_div { gap: 4px; padding: 12px 0; }
    .a_page_info, .page_info_focus { padding: 6px 10px; font-size: 12px; min-width: 30px; }
    .nomob { display: none !important; }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 480px) {
    .pg-branding { gap: 8px; }
    .pg-site-name { font-size: 17px; }
    .pg-logo-shape { width: 28px; height: 28px; font-size: 14px; }
    .pg-domain-val { font-size: 13px; }
    .pg-domain-label { font-size: 9px; }

    .pg-zone-lbl { width: 15%; font-size: 10px; padding: 5px 2px; }
    .pg-navlinks { width: 85%; gap: 3px; padding: 5px 3px; }
    .pg-navlinks a { font-size: 12px; padding: 3px 1px; width: calc((100% - 9px) / 4); }

    #pgsf input[type="text"] { min-width: 60px; padding: 7px 7px; font-size: 12px; }
    #pgsf button { padding: 7px 7px; font-size: 11px; }

    .pg-filmgrid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
    .pg-filmlabel h5 { font-size: 12px; }
    .pg-block-ttl { font-size: 14px; }
    .down_btn { padding: 8px 9px; font-size: 12px; }
    .pg-dlrow { padding: 8px 4px; gap: 5px; }
    .share-section { padding: 7px; gap: 5px; flex-wrap: nowrap; }
    .share-url-display { padding: 6px 7px; }
    .share-label { font-size: 10px; }
    .share-url { font-size: 10px; }
    .share-copy-btn { padding: 7px 8px; font-size: 11px; }
}

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

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