/* Video Site Template - Amazon Light Edition */

:root {
    --clr-orange: #f08804;
    --clr-orange2: #e47911;
    --clr-navy: #131921;
    --clr-navy2: #1e2939;
    --clr-navy3: #232f3e;
    --clr-bg: #eaeded;
    --clr-bg2: #f3f3f3;
    --clr-white: #ffffff;
    --clr-text: #0f1111;
    --clr-text2: #565959;
    --clr-link: #007185;
    --clr-link2: #c45500;
    --clr-border: #d5d9d9;
    --clr-border2: #c8cacb;
    --clr-shadow: rgba(0, 0, 0, 0.13);
    --clr-shadow2: rgba(0, 0, 0, 0.22);
    --grad-btn: linear-gradient(to bottom, #f7dfa5, #f0c14b);
    --grad-orange: linear-gradient(to bottom, #f9a825, #f08804);
    --rd: 6px;
    --rd-sm: 4px;
    --ease: all 0.22s ease;
}

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

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

/* SITE HEADER */
.site-header {
    background: var(--clr-navy);
    padding: 0.5rem 0;
}

.brand-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
    justify-content: center;
}

.site-logo {
    text-decoration: none;
    display: inline-block;
    transition: var(--ease);
}
.site-logo:hover { opacity: 0.88; }

.site-ttl {
    font-size: 26px;
    font-weight: 800;
    color: var(--clr-white);
    letter-spacing: 0.3px;
    font-style: normal;
    text-decoration: none;
}
.site-ttl:hover { color: var(--clr-orange); }

.domain-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.06);
}

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

.domain-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--clr-orange);
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

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

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

/* CATEGORY NAVIGATION */
.cate-nav {
    background: var(--clr-white);
    border-radius: var(--rd);
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid var(--clr-border);
    box-shadow: 0 1px 4px var(--clr-shadow);
}

.cate-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--clr-border);
}
.cate-row:last-child { border-bottom: none; }

.cate-zone {
    font-weight: 700;
    font-size: 13px;
    color: var(--clr-white);
    white-space: nowrap;
    width: 10%;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    flex-shrink: 0;
    background: var(--clr-navy3);
}

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

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

.cate-links a:hover {
    background: var(--clr-orange);
    color: var(--clr-white);
    border-color: var(--clr-orange2);
    font-weight: 600;
}

.cate-links a.active {
    background: var(--clr-orange);
    color: var(--clr-white);
    border-color: var(--clr-orange2);
    font-weight: 700;
}

/* SEARCH BOX */
.srch-box {
    background: var(--clr-white);
    border-radius: var(--rd);
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid var(--clr-border);
    box-shadow: 0 1px 4px var(--clr-shadow);
}

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

.srch-box input[type="text"] {
    flex: 1;
    min-width: 180px;
    padding: 9px 12px;
    border: 1px solid var(--clr-border2);
    border-radius: var(--rd-sm);
    background: var(--clr-white);
    color: var(--clr-text);
    font-size: 14px;
    transition: var(--ease);
    outline: none;
}

.srch-box input[type="text"]:focus {
    border-color: var(--clr-orange);
    box-shadow: 0 0 0 2px rgba(240,136,4,0.18);
}

.srch-box input[type="text"]::placeholder { color: var(--clr-text2); }

.srch-box button {
    padding: 9px 14px;
    border: 1px solid #a88734;
    border-radius: var(--rd-sm);
    background: var(--grad-btn);
    color: var(--clr-text);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

.srch-box button:hover {
    background: linear-gradient(to bottom, #f5d078, #e8a613);
    border-color: #a07118;
}

/* HOT TAGS */
.tag-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 9px 12px;
    background: var(--clr-white);
    border-radius: var(--rd);
    margin-bottom: 8px;
    border: 1px solid var(--clr-border);
    box-shadow: 0 1px 4px var(--clr-shadow);
}

.tag-link {
    padding: 4px 11px;
    background: var(--clr-bg2);
    border-radius: 12px;
    color: var(--clr-link);
    text-decoration: none;
    font-size: 12px;
    transition: var(--ease);
    border: 1px solid var(--clr-border);
}

.tag-link:hover {
    background: var(--clr-orange);
    color: var(--clr-white);
    border-color: var(--clr-orange2);
    font-weight: 600;
}

/* SECTION BLOCKS */
.sec-block { margin-bottom: 12px; }

.sec-inner {
    background: var(--clr-white);
    border-radius: var(--rd);
    border: 1px solid var(--clr-border);
    padding: 14px 14px 10px;
    box-shadow: 0 1px 4px var(--clr-shadow);
}

.sec-head {
    margin-bottom: 11px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--clr-border);
    position: relative;
}

.sec-head::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--clr-orange);
    border-radius: 2px;
}

.sec-ttl {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--clr-text);
}

.sec-ttl a {
    color: var(--clr-text);
    text-decoration: none;
    transition: var(--ease);
}
.sec-ttl a:hover { color: var(--clr-link2); text-decoration: underline; }

/* FILM GRID */
/*
 * 使用 float 布局替代 grid，彻底避免 iPad Safari 的
 * grid 行高撑开导致 padding-top 百分比计算错误的问题。
 * 每个 li 独立浮动，宽度固定为 calc，互不影响。
 */
.film-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.film-grid::after {
    content: "";
    display: table;
    clear: both;
}

.film-grid li {
    float: left;
    width: 25%;
    min-width: 0;
    padding: 0 6px 12px 6px;
    box-sizing: border-box;
    vertical-align: top;
    animation: fadeUp 0.4s 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 fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 封面图：padding-top 百分比基于 li 自身宽度，与行高/标题完全无关 */
.film-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--rd-sm);
    width: 100%;
    height: 0;
    padding-top: 58.33%;
    background: var(--clr-bg2);
    outline: 1px solid var(--clr-border); /* outline不占宽度，不影响布局计算 */
    border: none;
}

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

.film-thumb:hover {
    outline: 1px solid var(--clr-orange);
    box-shadow: 0 2px 10px var(--clr-shadow2);
}

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

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

.film-meta h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4em;
    height: 2.8em;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.film-meta h5 a {
    color: var(--clr-link);
    text-decoration: none;
    transition: var(--ease);
}

.film-meta h5 a:hover { color: var(--clr-link2); text-decoration: underline; }

/* VIDEO PLAYER */
.video-container {
    width: 100%;
    height: 620px;
    max-height: 620px;
    margin-bottom: 12px;
    background: #000;
    border-radius: var(--rd);
    overflow: hidden;
    box-shadow: 0 4px 16px var(--clr-shadow2);
    position: relative;
}

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

.MacPlayer {
    background: #000;
    border-radius: var(--rd);
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: 0 4px 16px var(--clr-shadow2);
}

/* TORRENT CAPTURE */
.snap-grid { width: 100%; }

.snap-grid picture { display: block; width: 100%; }

.snap-grid img,
.snap-grid .img_item img {
    width: 100%;
    height: auto;
    border-radius: var(--rd-sm);
    border: 1px solid var(--clr-border);
    display: block;
}

.snap-grid .img_item { width: 100%; }

/* DOWNLOAD BUTTONS */
.dl-wrap {
    text-align: center;
    padding: 12px;
    background: var(--clr-white);
    border-radius: var(--rd);
    margin: 9px 0;
    border: 1px solid var(--clr-border);
    box-shadow: 0 1px 4px var(--clr-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

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

.dl-btn:hover {
    background: linear-gradient(to bottom, #fbb040, #e8860a);
    box-shadow: 0 2px 8px var(--clr-shadow2);
}

/* SHARE / LINK SECTION */
.lnk-section {
    background: var(--clr-white);
    border-radius: var(--rd);
    padding: 13px;
    margin: 9px 0;
    border: 1px solid var(--clr-border);
    box-shadow: 0 1px 4px var(--clr-shadow);
    display: flex;
    align-items: center;
    gap: 10px;
}

.lnk-display {
    background: var(--clr-bg2);
    border: 1px solid var(--clr-border2);
    border-radius: var(--rd-sm);
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

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

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

.lnk-copy {
    padding: 9px 18px;
    background: var(--grad-orange);
    color: var(--clr-white);
    border: 1px solid #b35900;
    border-radius: var(--rd-sm);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.lnk-copy:hover { background: linear-gradient(to bottom, #fbb040, #e8860a); }
.lnk-copy:active { transform: scale(0.97); }
.lnk-icon { font-size: 15px; }

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

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

.pg-link {
    background: var(--clr-white);
    color: var(--clr-link);
    border: 1px solid var(--clr-border2);
}

.pg-link:hover {
    background: var(--clr-orange);
    border-color: var(--clr-orange2);
    color: var(--clr-white);
    font-weight: 700;
}

.pg-cur {
    background: var(--clr-orange);
    color: var(--clr-white);
    border: 1px solid #b35900;
    cursor: default;
    font-weight: 700;
}

/* FOOTER */
.site-footer {
    padding: 18px 0;
    text-align: center;
    border-top: 1px solid var(--clr-border);
    margin-top: 14px;
    background: var(--clr-navy3);
}

.site-footer p {
    margin: 5px 0;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

.site-footer a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: var(--ease);
}

.site-footer a:hover { color: var(--clr-orange); text-decoration: underline; }

/* FRIENDLY LINKS */
.flink-box {
    padding: 10px 12px;
    background: var(--clr-white);
    border-radius: var(--rd);
    border: 1px solid var(--clr-border);
}

.flink-box dl { margin: 0; }
.flink-box dd { display: inline-block; margin: 3px; }

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

.flink-box a:hover { color: var(--clr-link2); text-decoration: underline; }

.pd5 { padding: 2px 4px; }

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

.hide-mob { display: block; }
.hide-pc  { display: block; }

@media (max-width: 768px) { .hide-mob { display: none !important; } }
@media (min-width: 769px) { .hide-pc  { display: none !important; } }

img[data-original] { background: var(--clr-bg2); }

/* iPad (portrait 768px, landscape up to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .film-grid li {
        width: 25%;
    }
    .cate-links a {
        width: calc((100% - 28px) / 7);
    }
}

/* RESPONSIVE ≤ 768px */
@media (max-width: 768px) {
    .pg-wrap { padding: 0 8px; }
    .pg-body  { padding: 6px 0; }
    .site-ttl { font-size: 20px; }
    .domain-val { font-size: 16px; }
    .domain-tag { font-size: 10px; }

    .cate-zone { width: 15%; font-size: 10px; padding: 7px 2px; }
    .cate-links { width: 85%; gap: 4px; padding: 7px 4px; }
    .cate-links a {
        font-size: 14px;
        padding: 4px 2px;
        width: calc((100% - 12px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    .film-grid li { width: 50%; }
    .film-grid { margin: 0; }
    .film-meta h5 { font-size: 12px; }
    .sec-ttl { font-size: 16px; }
    .sec-block { margin-bottom: 9px; }
    .sec-inner { padding: 10px 10px 8px; }

    .srch-box { padding: 8px 10px; }
    .srch-box input[type="text"] { min-width: 90px; font-size: 12px; padding: 8px 9px; }
    .srch-box button { padding: 8px 9px; font-size: 12px; }

    .tag-wrap { padding: 7px 9px; gap: 5px; }
    .tag-link  { padding: 3px 9px; font-size: 11px; }

    .dl-wrap { padding: 9px 6px; margin: 7px 0; gap: 6px; }
    .dl-btn  { padding: 8px 12px; font-size: 13px; }

    .lnk-section { padding: 9px; margin: 8px 0; gap: 6px; }
    .lnk-display  { padding: 7px 9px; }
    .lnk-copy     { padding: 8px 10px; font-size: 12px; }

    .pager-wrap { padding: 11px 0; gap: 4px; }
    .pg-link, .pg-cur { padding: 5px 9px; font-size: 12px; min-width: 28px; }

    .video-container { height: 56.25vw; max-height: 360px; margin-bottom: 10px; }
    .site-footer { padding: 13px 0; margin-top: 10px; }
}

/* RESPONSIVE ≤ 480px */
@media (max-width: 480px) {
    .site-ttl { font-size: 18px; }
    .domain-val { font-size: 15px; }
    .brand-inner { gap: 11px; }

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

    .film-grid li { width: 50%; }
    .film-meta h5 { font-size: 11px; }
    .sec-ttl { font-size: 14px; }

    .srch-box input[type="text"] { min-width: 65px; padding: 7px 7px; }
    .srch-box button { padding: 7px 7px; font-size: 11px; }

    .dl-btn { padding: 7px 10px; font-size: 12px; }
    .lnk-url   { font-size: 10px; }
    .lnk-label { font-size: 10px; }

    .video-container { height: 56.25vw; max-height: 260px; margin-bottom: 8px; }
}
