/* Video Portal Template - Coral Rose Light Edition */

:root {
    --pk-main: #e8435a;
    --pk-deep: #c42d44;
    --pk-light: #ff7a8a;
    --pk-pale: #fff0f2;
    --pk-grad: linear-gradient(135deg, #e8435a 0%, #ff8c6b 100%);
    --pk-grad2: linear-gradient(135deg, #ff6b9d 0%, #e8435a 100%);
    --body-bg: #f7f7f9;
    --surface: #ffffff;
    --card-bg: #ffffff;
    --card-hover: #fafafa;
    --border-c: #ebebeb;
    --border-md: #e0e0e0;
    --txt-main: #1a1a1a;
    --txt-sub: #555555;
    --txt-dim: #999999;
    --shadow-s: rgba(0,0,0,0.06);
    --shadow-m: rgba(0,0,0,0.12);
    --shadow-pk: rgba(232,67,90,0.22);
    --radius: 10px;
    --radius-sm: 6px;
    --radius-xs: 4px;
    --ease: all 0.22s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

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

/* ─── Header ─────────────────────────────────── */
.top-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border-c);
    padding: 0.5rem 0;
    box-shadow: 0 1px 6px var(--shadow-s);
}

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

.logo-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
    justify-content: center;
}

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

.logo-text {
    font-size: 24px;
    font-weight: 900;
    background: var(--pk-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
    font-style: normal;
    text-decoration: none;
}

.domain-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--pk-pale);
    border: 1.5px solid #f5b8c0;
    border-radius: 20px;
    flex-shrink: 0;
}

.domain-lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--pk-main);
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.domain-str {
    font-size: 17px;
    font-weight: 800;
    color: var(--pk-deep);
    letter-spacing: 0.2px;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
}

/* ─── Layout ──────────────────────────────────── */
.pg-wrap {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 14px;
}

.pg-sect {
    padding: 8px 0;
}

/* ─── Navigation Panel ────────────────────────── */
.cat-panel {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid var(--border-c);
    box-shadow: 0 1px 5px var(--shadow-s);
}

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

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

.zone-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--surface);
    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(--pk-grad);
    letter-spacing: 0.2px;
}

.cat-links {
    font-size: 13px;
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 8px;
    align-items: center;
    background: var(--surface);
}

.cat-links a {
    display: inline-block;
    color: var(--txt-sub);
    text-decoration: none;
    padding: 5px 3px;
    border-radius: var(--radius-xs);
    transition: var(--ease);
    background: var(--body-bg);
    border: 1px solid var(--border-c);
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.cat-links a:hover {
    background: var(--pk-main);
    color: #fff;
    border-color: var(--pk-main);
    box-shadow: 0 3px 8px var(--shadow-pk);
}

.cat-links a.active {
    background: var(--pk-main);
    color: #fff;
    border-color: var(--pk-main);
    box-shadow: 0 3px 8px var(--shadow-pk);
    font-weight: 600;
}

/* ─── Search ──────────────────────────────────── */
.search-bar {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid var(--border-c);
    box-shadow: 0 1px 5px var(--shadow-s);
}

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

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

.search-bar input[type="text"]:focus {
    border-color: var(--pk-main);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(232,67,90,0.1);
}

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

.search-bar button {
    padding: 9px 14px;
    border: none;
    border-radius: 22px;
    background: var(--pk-grad);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

.search-bar button:hover {
    opacity: 0.88;
    box-shadow: 0 4px 12px var(--shadow-pk);
}

/* ─── Hot Tags ────────────────────────────────── */
.hot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 10px 12px;
    background: var(--surface);
    border-radius: var(--radius);
    margin-bottom: 8px;
    border: 1px solid var(--border-c);
    box-shadow: 0 1px 5px var(--shadow-s);
}

.hot-tag-item {
    padding: 4px 12px;
    background: var(--pk-pale);
    border-radius: 14px;
    color: var(--pk-deep);
    text-decoration: none;
    font-size: 12px;
    transition: var(--ease);
    border: 1px solid #f5c0c8;
}

.hot-tag-item:hover {
    background: var(--pk-grad);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 8px var(--shadow-pk);
}

/* ─── Section Block ───────────────────────────── */
.movie-sect {
    margin-bottom: 16px;
}

.sect-head {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-c);
    position: relative;
}

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

.sect-ttl {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--txt-main);
}

.sect-ttl a {
    color: var(--txt-main);
    text-decoration: none;
    transition: var(--ease);
}

.sect-ttl a:hover {
    color: var(--pk-main);
}

/* ─── Movie Grid ──────────────────────────────── */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    list-style: none;
    padding: 0;
}

.movie-grid li {
    position: relative;
    animation: itemFadeUp 0.45s ease backwards;
}

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

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

.movie-cover {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 600 / 350;
    background: var(--body-bg);
    border: 1px solid var(--border-c);
    box-shadow: 0 1px 5px var(--shadow-s);
}

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

.movie-cover:hover {
    border-color: var(--pk-main);
    box-shadow: 0 5px 16px var(--shadow-pk);
}

.movie-cover:hover img {
    transform: scale(1.06);
}

.movie-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(232,67,90,0.5) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.movie-info {
    padding: 7px 0 2px;
}

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

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

.movie-info h5 a:hover {
    color: var(--pk-main);
}

/* ─── Video Player ────────────────────────────── */
.player-box {
    width: 100%;
    height: 640px;
    max-height: 640px;
    margin-bottom: 16px;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-m);
    position: relative;
}

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

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

/* ─── Torrent Preview ─────────────────────────── */
.cap-preview {
    width: 100%;
}

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

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

/* ─── Download Buttons ────────────────────────── */
.action-btns {
    text-align: center;
    padding: 14px;
    background: var(--surface);
    border-radius: var(--radius);
    margin: 12px 0;
    border: 1px solid var(--border-c);
    box-shadow: 0 1px 5px var(--shadow-s);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

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

.act-btn:hover {
    opacity: 0.88;
    box-shadow: 0 5px 14px var(--shadow-pk);
}

/* ─── Share Section ───────────────────────────── */
.link-share {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 14px;
    margin: 12px 0;
    border: 1px solid var(--border-c);
    box-shadow: 0 1px 5px var(--shadow-s);
    display: flex;
    align-items: center;
    gap: 10px;
}

.url-show {
    background: var(--body-bg);
    border: 1px solid var(--border-c);
    border-radius: 22px;
    padding: 9px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

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

.share-url {
    font-size: 12px;
    color: var(--txt-sub);
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.copy-url-btn {
    padding: 9px 18px;
    background: var(--pk-grad);
    color: #fff;
    border: none;
    border-radius: 22px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.copy-url-btn:hover {
    opacity: 0.88;
    box-shadow: 0 4px 12px var(--shadow-pk);
}

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

.share-icon {
    font-size: 15px;
    line-height: 1;
}

/* ─── 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: 22px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--ease);
    min-width: 36px;
    text-align: center;
}

.a_page_info {
    background: var(--surface);
    color: var(--txt-main);
    border: 1px solid var(--border-md);
}

.a_page_info:hover {
    background: var(--pk-main);
    border-color: var(--pk-main);
    color: #fff;
    box-shadow: 0 3px 8px var(--shadow-pk);
}

.page_info_focus {
    background: var(--pk-grad);
    color: #fff;
    border: 1px solid var(--pk-main);
    cursor: default;
}

/* ─── Footer ──────────────────────────────────── */
.pg-footer {
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--border-c);
    margin-top: 20px;
    background: var(--surface);
}

.pg-footer p {
    margin: 5px 0;
    color: var(--txt-dim);
    font-size: 12px;
}

.pg-footer a {
    color: var(--txt-dim);
    text-decoration: none;
    transition: var(--ease);
}

.pg-footer a:hover {
    color: var(--pk-main);
}

/* ─── Friend Links ────────────────────────────── */
.flinks-wrap {
    padding: 10px 12px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border-c);
}

.flinks-wrap dl { margin: 0; }

.flinks-wrap dd {
    display: inline-block;
    margin: 3px;
}

.flinks-wrap a {
    color: var(--pk-deep);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ease);
}

.flinks-wrap a:hover {
    color: var(--pk-main);
}

/* ─── Utilities ───────────────────────────────── */
.show-pc   { display: block; }
.show-mob  { display: block; }

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

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

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

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

/* ─── Responsive 768px ────────────────────────── */
@media (max-width: 768px) {
    .pg-wrap { padding: 0 8px; }
    .top-bar { padding: 0.4rem 0; }

    .logo-row { gap: 10px; flex-wrap: nowrap; }
    .logo-text { font-size: 19px; }
    .domain-pill { padding: 4px 9px; gap: 5px; }
    .domain-lbl { font-size: 10px; }
    .domain-str { font-size: 15px; }

    .pg-sect { padding: 5px 0; }

    /* mobile nav: zone 15%, links 85%, 4 per row */
    .cat-row { display: flex; align-items: stretch; }

    .zone-name {
        width: 15%;
        font-size: 10px;
        padding: 6px 2px;
        text-align: center;
        word-break: keep-all;
        line-height: 1.4;
    }

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

    .cat-links a {
        padding: 4px 2px;
        font-size: 12px;
        width: calc((100% - 9px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    .search-bar form { flex-wrap: nowrap; gap: 5px; }
    .search-bar input[type="text"] { min-width: 80px; padding: 8px 10px; font-size: 12px; }
    .search-bar button { padding: 8px 9px; font-size: 11px; }

    /* mobile: 2 per row */
    .movie-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
    .movie-info h5 { font-size: 12px; }
    .movie-sect { margin-bottom: 12px; }
    .sect-ttl { font-size: 16px; }

    .hot-tags { padding: 8px 10px; gap: 5px; }
    .hot-tag-item { padding: 4px 10px; font-size: 11px; }

    .action-btns { flex-wrap: nowrap; gap: 6px; padding: 10px 7px; }
    .act-btn { padding: 9px 12px; font-size: 12px; }

    .link-share { padding: 9px; margin: 10px 0; gap: 6px; flex-wrap: nowrap; }
    .url-show { padding: 8px 10px; gap: 5px; flex: 1; min-width: 0; }
    .share-label { font-size: 11px; }
    .share-url { font-size: 10px; }
    .copy-url-btn { padding: 8px 10px; font-size: 11px; flex-shrink: 0; }
    .share-icon { font-size: 13px; }

    .player-box { height: 56.25vw; max-height: 380px; margin-bottom: 12px; }
    .pg-footer { padding: 14px 0; margin-top: 14px; }
    .page_info_div { padding: 10px 0; gap: 4px; }
    .a_page_info, .page_info_focus { padding: 6px 11px; font-size: 12px; min-width: 32px; }
}

/* ─── Responsive 480px ────────────────────────── */
@media (max-width: 480px) {
    .logo-row { gap: 8px; flex-wrap: nowrap; }
    .logo-text { font-size: 17px; }
    .domain-pill { padding: 3px 8px; }
    .domain-lbl { font-size: 9px; }
    .domain-str { font-size: 14px; }

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

    .search-bar input[type="text"] { min-width: 70px; padding: 7px 9px; font-size: 12px; }
    .search-bar button { padding: 7px 8px; font-size: 11px; }

    .movie-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .movie-info h5 { font-size: 12px; }
    .sect-ttl { font-size: 15px; }

    .action-btns { padding: 8px 5px; gap: 5px; }
    .act-btn { padding: 8px 10px; font-size: 12px; }

    .link-share { padding: 7px; gap: 5px; flex-wrap: nowrap; }
    .url-show { padding: 7px 9px; }
    .share-label { font-size: 10px; }
    .share-url { font-size: 10px; }
    .copy-url-btn { padding: 7px 9px; font-size: 11px; }

    .player-box { height: 56.25vw; max-height: 300px; }
}
