/* Video Site Template - Light Warm Clean Theme (MS365 Inspired) */

:root {
    --pr: #0f3460;
    --pr-hover: #0a2540;
    --ac: #2563eb;
    --ac-light: #3b82f6;
    --ac-bg: rgba(37,99,235,0.08);
    --bg-page: #f5f0eb;
    --bg-main: #ffffff;
    --bg-card: #ffffff;
    --bg-muted: #f0ebe4;
    --bg-input: #faf7f4;
    --border: #e5ddd5;
    --border-light: #ede8e2;
    --txt: #1a1a2e;
    --txt-sub: #4a4a6a;
    --txt-dim: #8888aa;
    --txt-white: #ffffff;
    --shadow-xs: 0 1px 3px rgba(15,52,96,0.06);
    --shadow-sm: 0 2px 8px rgba(15,52,96,0.08);
    --shadow-md: 0 4px 18px rgba(15,52,96,0.12);
    --shadow-lg: 0 8px 32px rgba(15,52,96,0.16);
    --r-xs: 4px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 20px;
    --r-pill: 999px;
    --ease: all 0.22s ease;
    --max-w: 1080px;
}

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

html { scroll-behavior: smooth; }

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

/* ===================== HEADER ===================== */
.pg-header {
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
    padding: 0.55rem 0;
    box-shadow: var(--shadow-xs);
}

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

.hd-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

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

.hd-sitename {
    font-size: 22px;
    font-weight: 800;
    color: var(--pr);
    letter-spacing: 0.2px;
    line-height: 1;
}

.hd-domain {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: var(--ac-bg);
    border: 1px solid rgba(37,99,235,0.25);
    border-radius: var(--r-pill);
}

.hd-domain-lbl {
    font-size: 10px;
    font-weight: 700;
    color: var(--ac);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

.hd-domain-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--pr);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.2px;
}

/* ===================== LAYOUT ===================== */
.pg-wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 14px;
}

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

/* ===================== NAV BLOCK ===================== */
.nav-panel {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: var(--shadow-xs);
}

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

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

.nav-zone {
    font-size: 13px;
    font-weight: 700;
    color: var(--ac);
    white-space: nowrap;
    width: 10%;
    text-align: center;
    border-right: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 5px;
    flex-shrink: 0;
    background: var(--bg-muted);
    letter-spacing: 0.2px;
}

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

.nav-cats a {
    display: inline-block;
    color: var(--txt-sub);
    text-decoration: none;
    padding: 4px 4px;
    border-radius: var(--r-xs);
    transition: var(--ease);
    background: var(--bg-muted);
    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;
}

.nav-cats a:hover {
    background: var(--ac);
    color: var(--txt-white);
    border-color: var(--ac);
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}

.nav-cats a.active {
    background: var(--pr);
    color: var(--txt-white);
    border-color: var(--pr);
    box-shadow: 0 2px 8px rgba(15,52,96,0.2);
    font-weight: 600;
}

/* ===================== SEARCH ===================== */
.qbox {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 10px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-xs);
}

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

.qbox input[type="text"] {
    flex: 1;
    min-width: 120px;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--bg-input);
    color: var(--txt);
    font-size: 13px;
    transition: var(--ease);
    outline: none;
}

.qbox input[type="text"]:focus {
    border-color: var(--ac);
    background: var(--bg-main);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

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

.qbox button {
    padding: 9px 15px;
    border: none;
    border-radius: var(--r-sm);
    background: var(--pr);
    color: var(--txt-white);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

.qbox button:hover {
    background: var(--ac);
    box-shadow: 0 3px 12px rgba(37,99,235,0.28);
    transform: translateY(-1px);
}

/* ===================== TAG CLOUD ===================== */
.hotwords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 10px 12px;
    background: var(--bg-main);
    border-radius: var(--r-md);
    margin-bottom: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.hw-item {
    padding: 4px 12px;
    background: var(--bg-muted);
    border-radius: var(--r-pill);
    color: var(--txt-sub);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ease);
    border: 1px solid var(--border);
}

.hw-item:hover {
    background: var(--ac);
    color: var(--txt-white);
    border-color: var(--ac);
    box-shadow: 0 2px 8px rgba(37,99,235,0.2);
}

/* ===================== SECTION BLOCKS ===================== */
.ms-block {
    margin-bottom: 14px;
}

.ms-head {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

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

.ms-ttl {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: var(--pr);
}

.ms-ttl a {
    color: var(--pr);
    text-decoration: none;
    transition: var(--ease);
}

.ms-ttl a:hover {
    color: var(--ac);
}

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

.film-grid li {
    animation: risingIn 0.45s 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 risingIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.film-cover {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--r-sm);
    aspect-ratio: 600 / 350;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

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

.film-cover:hover {
    border-color: var(--ac-light);
    box-shadow: var(--shadow-md);
}

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

.film-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,52,96,0.55) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.28s ease;
    pointer-events: none;
}

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

.film-info {
    padding: 6px 0 2px;
}

.film-info h5 {
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.film-info h5 a {
    color: var(--txt-sub);
    text-decoration: none;
    transition: var(--ease);
}

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

/* ===================== VIDEO PLAYER ===================== */
.player-box {
    background: var(--bg-main);
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.video-container {
    position: relative;
    width: 100%;
    height: 480px;
    background: #000;
    overflow: hidden;
}

.video-container iframe,
.video-container video,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* ===================== DETAIL INFO ===================== */
.dt-title-bar {
    line-height: 1.8;
    text-align: center;
    padding: 16px 20px;
    font-size: 16px;
    margin: 12px 0;
    word-break: break-all;
    background: var(--bg-main);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.dt-title-bar a {
    color: var(--ac);
    text-decoration: none;
    font-weight: 600;
    margin-right: 8px;
}

.dt-meta {
    font-size: 14px;
    line-height: 1.9;
    padding: 20px 22px;
    background: var(--bg-main);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    margin: 12px 0;
    box-shadow: var(--shadow-xs);
}

/* ===================== TORRENT CAPTURES ===================== */
.preview-wrap {
    margin-top: 12px;
}

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

.preview-wrap picture img,
.preview-wrap img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--r-xs);
}

/* ===================== DOWNLOAD BUTTONS ===================== */
.btns-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    padding: 16px 12px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.btn-dl {
    display: inline-block;
    padding: 10px 26px;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--ease);
    border: none;
    background: var(--pr);
    color: var(--txt-white);
    letter-spacing: 0.2px;
    box-shadow: var(--shadow-xs);
}

.btn-dl:hover {
    background: var(--ac);
    box-shadow: 0 4px 16px rgba(37,99,235,0.3);
    transform: translateY(-1px);
}

/* ===================== CLIENT LINKS ===================== */
.client-row {
    text-align: center;
    padding: 12px 20px;
}

.client-row a {
    color: var(--ac);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.client-row a:hover {
    text-decoration: underline;
    color: var(--pr);
}

/* ===================== SHARE SECTION ===================== */
.share-section {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    margin: 12px 0;
    flex-wrap: nowrap;
    box-shadow: var(--shadow-xs);
}

.share-url-display {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    background: var(--bg-input);
    padding: 8px 12px;
    border-radius: var(--r-xs);
    border: 1px solid var(--border);
    overflow: hidden;
}

.share-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--ac);
    white-space: nowrap;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

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

.share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: var(--r-sm);
    background: var(--bg-muted);
    color: var(--txt);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

.share-copy-btn:hover {
    background: var(--pr);
    color: var(--txt-white);
    border-color: var(--pr);
}

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

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

.pgr-a,
.pgr-cur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 13px;
    border-radius: var(--r-xs);
    font-size: 13px;
    transition: var(--ease);
    min-width: 36px;
    text-align: center;
    text-decoration: none;
}

.pgr-a {
    background: var(--bg-main);
    color: var(--txt);
    border: 1px solid var(--border);
}

.pgr-a:hover {
    background: var(--ac);
    border-color: var(--ac);
    color: var(--txt-white);
}

.pgr-cur {
    background: var(--pr);
    color: var(--txt-white);
    border: 1px solid var(--pr);
    cursor: default;
}

/* ===================== FOOTER ===================== */
.pg-footer {
    padding: 22px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 24px;
    background: var(--bg-main);
}

.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(--ac);
}

/* ===================== FRIEND LINKS ===================== */
.lnk-zone {
    padding: 10px 12px;
    background: var(--bg-main);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.lnk-zone dl {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.lnk-zone dd {
    display: inline-block;
    margin: 3px;
}

.lnk-zone a {
    color: var(--ac);
    text-decoration: none;
    transition: var(--ease);
    font-size: 13px;
    padding: 2px 5px;
    border-radius: var(--r-xs);
}

.lnk-zone a:hover {
    color: var(--pr);
    background: var(--ac-bg);
}

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

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

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

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

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .pg-wrap { padding: 0 8px; }
    .pg-header { padding: 0.45rem 0; }
    .hd-brand { gap: 10px; }
    .hd-sitename { font-size: 18px; }
    .hd-domain { padding: 4px 11px; gap: 6px; }
    .hd-domain-lbl { font-size: 9px; }
    .hd-domain-val { font-size: 12px; }
    .pg-row { padding: 6px 0; }

    /* Mobile nav: zone 15%, cats 85%, 4 per row */
    .nav-line .nav-zone {
        width: 15%;
        font-size: 10px;
        padding: 7px 2px;
        letter-spacing: 0;
    }

    .nav-line .nav-cats {
        width: 85%;
        font-size: 12px;
        gap: 4px;
        padding: 7px 4px;
    }

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

    .film-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
    .film-info h5 { font-size: 12px; }
    .ms-ttl { font-size: 15px; }
    .hotwords { padding: 8px 10px; gap: 5px; }
    .hw-item { padding: 4px 10px; font-size: 12px; }
    .qbox form { gap: 5px; }
    .qbox input[type="text"] { min-width: 80px; padding: 8px 10px; font-size: 12px; }
    .qbox button { padding: 8px 9px; font-size: 12px; }

    .video-container { height: 56.25vw; max-height: 360px; margin-bottom: 12px; }
    .btns-row { padding: 12px 8px; gap: 8px; }
    .btn-dl { padding: 9px 16px; font-size: 13px; }

    .share-section { padding: 9px 10px; margin: 10px 0; gap: 7px; }
    .share-url-display { padding: 7px 9px; gap: 5px; }
    .share-label { font-size: 10px; }
    .share-url { font-size: 10px; }
    .share-copy-btn { padding: 7px 10px; font-size: 12px; flex-shrink: 0; }
    .share-icon { font-size: 14px; }

    .pgr { gap: 4px; padding: 14px 0; }
    .pgr-a, .pgr-cur { padding: 6px 10px; font-size: 12px; min-width: 30px; }
    .pg-footer { padding: 18px 0; margin-top: 18px; }
}

@media (max-width: 480px) {
    .hd-sitename { font-size: 16px; }
    .hd-domain-lbl { font-size: 9px; }
    .hd-domain-val { font-size: 11px; }

    .nav-line .nav-zone { width: 15%; font-size: 10px; padding: 6px 1px; }
    .nav-line .nav-cats { width: 85%; gap: 3px; padding: 6px 3px; }
    .nav-line .nav-cats a { font-size: 12px; padding: 3px 1px; width: calc((100% - 9px) / 4); }

    .film-info h5 { font-size: 12px; }
    .ms-ttl { font-size: 14px; }
    .video-container { height: 56.25vw; max-height: 270px; margin-bottom: 10px; }
    .btn-dl { padding: 8px 13px; font-size: 12px; }
    .share-section { padding: 7px 8px; gap: 5px; }
    .share-url-display { padding: 6px 7px; }
    .share-copy-btn { padding: 6px 8px; font-size: 11px; }
}

/* ===================== LAZY IMG ===================== */
img[data-original] { background: var(--bg-muted); }
