/* Video Portal Template - 20Minutes Electric Blue Edition */

:root {
    --blue: #3d3df5;
    --blue-dk: #2828d4;
    --blue-lt: #eeeeff;
    --blue-mid: #5050f8;
    --blue-grad: linear-gradient(135deg, #3d3df5 0%, #5050f8 100%);
    --red: #e8001e;
    --red-dk: #c0001a;
    --red-grad: linear-gradient(135deg, #e8001e 0%, #c0001a 100%);
    --bg: #f5f5f7;
    --white: #ffffff;
    --nav2-bg: #ffffff;
    --card-bg: #ffffff;
    --border: #e5e5e5;
    --border-dk: #cccccc;
    --txt: #111111;
    --txt-mid: #333333;
    --txt-soft: #666666;
    --txt-dim: #999999;
    --shd-xs: rgba(0,0,0,0.05);
    --shd-sm: rgba(0,0,0,0.10);
    --shd-md: rgba(0,0,0,0.16);
    --shd-blue: rgba(61,61,245,0.18);
    --shd-red: rgba(232,0,30,0.15);
    --r: 6px;
    --r-sm: 4px;
    --r-pill: 50px;
    --tr: all 0.18s ease;
}

*, *::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, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--txt);
    line-height: 1.5;
    font-size: 14px;
    overflow-x: hidden;
}

/* ── Main Header (20min blue-violet bar) ─────── */
.hdr-main {
    background: var(--blue-grad);
    padding: 0.6rem 0;
    border-bottom: 3px solid var(--blue-dk);
}

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

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

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

.logo-txt {
    font-size: 26px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
    font-style: normal;
    text-decoration: none;
    line-height: 1;
}

.new-addr {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.40);
    border-radius: var(--r-pill);
    flex-shrink: 0;
}

.na-tag {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.na-url {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    letter-spacing: -0.2px;
}

/* ── Secondary nav bar ───────────────────────── */
.hdr-nav2 {
    background: var(--nav2-bg);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 2px 6px var(--shd-xs);
}

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

.g-row {
    padding: 7px 0;
}

/* ── Category Navigation ─────────────────────── */
.catgrid {
    background: var(--card-bg);
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px var(--shd-xs);
}

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

.catgrid-ln:last-child { border-bottom: none; }

.zone-nm {
    font-weight: 800;
    font-size: 12px;
    color: #fff;
    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 4px;
    flex-shrink: 0;
    background: var(--blue);
    letter-spacing: 0.3px;
}

.zone-lks {
    font-size: 13px;
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 10px;
    align-items: center;
    background: var(--card-bg);
}

.zone-lks a {
    display: inline-block;
    color: var(--txt-mid);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--r-sm);
    transition: var(--tr);
    background: var(--bg);
    border: 1px solid var(--border);
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.zone-lks a:hover {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    box-shadow: 0 2px 8px var(--shd-blue);
}

.zone-lks a.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    font-weight: 700;
}

/* ── Search ───────────────────────────────────── */
.qform {
    background: var(--card-bg);
    border-radius: var(--r);
    padding: 11px 13px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    border-top: 2px solid var(--blue);
    box-shadow: 0 1px 4px var(--shd-xs);
}

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

.qform input[type="text"] {
    flex: 1;
    min-width: 80px;
    padding: 9px 14px;
    border: 1.5px solid var(--border-dk);
    border-radius: var(--r-pill);
    background: var(--bg);
    color: var(--txt);
    font-size: 13px;
    transition: var(--tr);
    outline: none;
}

.qform input[type="text"]:focus {
    border-color: var(--blue);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(61,61,245,0.10);
}

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

.qform button {
    padding: 9px 14px;
    border: none;
    border-radius: var(--r-pill);
    background: var(--blue-grad);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: var(--tr);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

.qform button:hover {
    opacity: 0.88;
    box-shadow: 0 3px 10px var(--shd-blue);
}

/* ── Hot Tags ─────────────────────────────────── */
.hot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 10px 12px;
    background: var(--card-bg);
    border-radius: var(--r);
    margin-bottom: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px var(--shd-xs);
}

.ht-item {
    padding: 4px 12px;
    background: var(--bg);
    border-radius: var(--r-pill);
    color: var(--txt-soft);
    text-decoration: none;
    font-size: 12px;
    transition: var(--tr);
    border: 1px solid var(--border);
}

.ht-item:hover {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    box-shadow: 0 2px 8px var(--shd-blue);
}

/* ── Content Block ────────────────────────────── */
.content-blk { margin-bottom: 16px; }

.content-blk-hd {
    margin-bottom: 11px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--border);
    position: relative;
}

.content-blk-hd::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--red-grad);
    border-radius: 2px;
}

.content-blk-ttl {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    color: var(--txt);
    letter-spacing: -0.2px;
}

.content-blk-ttl a {
    color: var(--txt);
    text-decoration: none;
    transition: var(--tr);
}

.content-blk-ttl a:hover { color: var(--blue); }

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

.fgrid li { animation: slideUp 0.38s ease backwards; }
.fgrid li:nth-child(1) { animation-delay: 0.03s; }
.fgrid li:nth-child(2) { animation-delay: 0.07s; }
.fgrid li:nth-child(3) { animation-delay: 0.11s; }
.fgrid li:nth-child(4) { animation-delay: 0.15s; }
.fgrid li:nth-child(5) { animation-delay: 0.19s; }
.fgrid li:nth-child(6) { animation-delay: 0.23s; }
.fgrid li:nth-child(7) { animation-delay: 0.27s; }
.fgrid li:nth-child(8) { animation-delay: 0.31s; }

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

.fcover {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--r);
    aspect-ratio: 600 / 350;
    background: var(--bg);
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px var(--shd-xs);
}

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

.fcover:hover {
    border-color: var(--blue);
    box-shadow: 0 4px 14px var(--shd-blue);
}

.fcover:hover img { transform: scale(1.06); }

.fcover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(61,61,245,0.48) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

.fcover:hover::after { opacity: 1; }

.finfo { padding: 6px 0 2px; }

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

.finfo h5 a {
    color: var(--txt-soft);
    text-decoration: none;
    transition: var(--tr);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.finfo h5 a:hover { color: var(--blue); }

/* ── Video Player ─────────────────────────────── */
.vplay-box {
    width: 100%;
    height: 640px;
    max-height: 640px;
    margin-bottom: 14px;
    background: #000;
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: 0 4px 18px var(--shd-md);
    position: relative;
}

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

.MacPlayer {
    background: #000;
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 11px;
    box-shadow: 0 4px 18px var(--shd-md);
}

/* ── Preview Image ────────────────────────────── */
.img-shots { width: 100%; }

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

.img-shots .img_item { width: 100%; }

/* ── Download Buttons ─────────────────────────── */
.dl-strip {
    text-align: center;
    padding: 13px;
    background: var(--card-bg);
    border-radius: var(--r);
    margin: 11px 0;
    border: 1px solid var(--border);
    border-top: 2px solid var(--blue);
    box-shadow: 0 1px 4px var(--shd-xs);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.dl-cta {
    display: inline-block;
    padding: 10px 20px;
    background: var(--red-grad);
    color: #fff;
    text-decoration: none;
    border-radius: var(--r-pill);
    font-weight: 700;
    font-size: 14px;
    transition: var(--tr);
    margin: 0;
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    letter-spacing: 0.2px;
}

.dl-cta:hover {
    opacity: 0.88;
    box-shadow: 0 4px 12px var(--shd-red);
}

/* ── Share ────────────────────────────────────── */
.share-band {
    background: var(--card-bg);
    border-radius: var(--r);
    padding: 12px 13px;
    margin: 11px 0;
    border: 1px solid var(--border);
    border-top: 2px solid var(--blue);
    box-shadow: 0 1px 4px var(--shd-xs);
    display: flex;
    align-items: center;
    gap: 10px;
}

.url-seg {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    padding: 8px 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.share-label {
    font-weight: 800;
    font-size: 12px;
    color: var(--blue);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

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

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

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

.share-copy:hover { opacity: 0.88; box-shadow: 0 3px 10px var(--shd-blue); }
.share-copy:active { transform: scale(0.97); }

/* ── Pagination ───────────────────────────────── */
.page_info_div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    padding: 14px 0;
}

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

.a_page_info {
    background: var(--card-bg);
    color: var(--txt);
    border: 1px solid var(--border-dk);
}

.a_page_info:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    box-shadow: 0 2px 8px var(--shd-blue);
}

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

/* ── Footer ───────────────────────────────────── */
.g-footer {
    padding: 18px 0;
    text-align: center;
    border-top: 3px solid var(--blue);
    margin-top: 18px;
    background: var(--white);
}

.g-footer p { margin: 5px 0; color: var(--txt-dim); font-size: 12px; }
.g-footer a { color: var(--txt-dim); text-decoration: none; transition: var(--tr); }
.g-footer a:hover { color: var(--blue); }

/* ── Friend Links ─────────────────────────────── */
.flinks-grid {
    padding: 10px 12px;
    background: var(--card-bg);
    border-radius: var(--r);
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px var(--shd-xs);
}

.flinks-grid dl { margin: 0; }
.flinks-grid dd { display: inline-block; margin: 3px; }

.flinks-grid a {
    color: var(--blue);
    text-decoration: none;
    font-size: 13px;
    transition: var(--tr);
}

.flinks-grid a:hover { color: var(--blue-dk); text-decoration: underline; }

/* ── Utility ──────────────────────────────────── */
.d-pc  { display: block; }
.d-mob { display: block; }

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

.clearfix::after { content: ""; display: table; clear: both; }
img[data-original] { background: var(--bg); }

/* ── Responsive 768px ─────────────────────────── */
@media (max-width: 768px) {
    .g-wrap  { padding: 0 8px; }
    .hdr-main { padding: 0.4rem 0; }
    .logo-row { gap: 10px; flex-wrap: nowrap; }
    .logo-txt { font-size: 20px; }
    .new-addr { padding: 4px 10px; gap: 6px; }
    .na-tag { font-size: 10px; }
    .na-url { font-size: 16px; }
    .g-row { padding: 5px 0; }

    /* mobile nav: zone 15%, links 85%, 4 per row × 2 rows */
    .catgrid-ln { display: flex; align-items: stretch; }
    .zone-nm {
        width: 15%;
        font-size: 10px;
        padding: 7px 2px;
        word-break: keep-all;
        line-height: 1.4;
    }
    .zone-lks {
        width: 85%;
        font-size: 12px;
        gap: 3px;
        padding: 6px 4px;
    }
    .zone-lks a {
        padding: 4px 2px;
        font-size: 12px;
        width: calc((100% - 9px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    /* search same row, no wrap */
    .qform form { flex-wrap: nowrap; gap: 5px; }
    .qform input[type="text"] { min-width: 80px; padding: 8px 10px; font-size: 12px; }
    .qform button { padding: 8px 10px; font-size: 11px; }

    /* 2-col grid */
    .fgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .finfo h5 { font-size: 12px; }
    .content-blk { margin-bottom: 12px; }
    .content-blk-ttl { font-size: 16px; }

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

    .dl-strip { flex-wrap: nowrap; gap: 6px; padding: 10px 8px; }
    .dl-cta { padding: 9px 12px; font-size: 12px; }

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

    .vplay-box { height: 56.25vw; max-height: 380px; margin-bottom: 11px; }
    .g-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-txt { font-size: 18px; }
    .new-addr { padding: 3px 9px; }
    .na-tag { font-size: 9px; }
    .na-url { font-size: 15px; }

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

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

    .fgrid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .finfo h5 { font-size: 12px; }
    .content-blk-ttl { font-size: 15px; }

    .dl-strip { padding: 8px 5px; gap: 5px; }
    .dl-cta   { padding: 8px 11px; font-size: 12px; }

    .share-band { padding: 7px; gap: 5px; flex-wrap: nowrap; }
    .url-seg    { padding: 6px 9px; }
    .share-label { font-size: 10px; }
    .share-url   { font-size: 10px; }
    .share-copy  { padding: 7px 9px; font-size: 11px; }

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