/* Blue Editorial Theme - Film & Media Website */

:root {
    --cp: #1255a8;
    --cp-dk: #0a3d80;
    --cp-lt: #2471c9;
    --ca: #d9363e;
    --ca-dk: #b52830;
    --cbg: #edf1f7;
    --cbg2: #dce5f0;
    --ccard: #ffffff;
    --ctxt: #1c2333;
    --ctxt2: #4a5568;
    --cborder: #c8d6e8;
    --csh: rgba(18,85,168,0.09);
    --csh2: rgba(18,85,168,0.20);
    --rr: 5px;
    --rr2: 3px;
    --tr: all 0.22s ease;
    --grad: linear-gradient(90deg, var(--cp) 0%, var(--cp-lt) 100%);
    --grad-r: linear-gradient(90deg, var(--ca) 0%, var(--ca-dk) 100%);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
    background: var(--cbg);
    color: var(--ctxt);
    line-height: 1.55;
    font-size: 14px;
    overflow-x: hidden;
}

/* ============================
   SITE HEADER  (NOT sticky)
============================ */
.site-header {
    background: var(--grad);
    padding: 12px 0;
    box-shadow: 0 3px 12px var(--csh2);
    position: relative;
    /* intentionally NOT position:fixed or position:sticky */
}

.site-header::after {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--ca) 0%, #f7a234 50%, var(--ca) 100%);
    position: absolute;
    bottom: 0; left: 0; right: 0;
}

.site-hdr-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

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

.brand-link {
    text-decoration: none;
    display: inline-block;
}

.brand-link:hover .brand-name {
    opacity: 0.88;
}

.brand-name {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.25);
    display: inline-block;
    padding: 2px 0;
    border-bottom: 2px solid rgba(255,255,255,0.4);
}

.latest-domain {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.18);
    border: 1.5px solid rgba(255,255,255,0.55);
    border-radius: 20px;
    padding: 5px 14px;
    backdrop-filter: blur(4px);
}

.domain-tag {
    font-size: 11px;
    font-weight: 700;
    color: #ffe082;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.domain-value {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

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

.inner-wrap {
    padding: 12px 0;
}

/* ============================
   CATEGORY NAVIGATION
============================ */
.cat-nav {
    background: var(--ccard);
    border-radius: var(--rr);
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--cborder);
    box-shadow: 0 2px 8px var(--csh);
}

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

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

.cat-row .cat-zone {
    font-weight: 700;
    font-size: 13px;
    color: var(--ccard);
    background: var(--cp);
    white-space: normal;
    word-break: break-all;
    width: 10%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    flex-shrink: 0;
    line-height: 1.3;
}

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

.cat-row .cat-links a {
    display: inline-block;
    color: var(--ctxt2);
    text-decoration: none;
    padding: 4px 5px;
    border-radius: var(--rr2);
    transition: var(--tr);
    background: var(--cbg);
    border: 1px solid var(--cborder);
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.cat-row .cat-links a:hover,
.cat-row .cat-links a.active {
    background: var(--cp);
    color: #fff;
    border-color: var(--cp);
    box-shadow: 0 3px 8px var(--csh2);
    font-weight: 600;
}

/* ============================
   SEARCH BOX
============================ */
.search-box {
    background: var(--ccard);
    border-radius: var(--rr);
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--cborder);
    box-shadow: 0 2px 8px var(--csh);
}

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

.search-box input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 9px 13px;
    border: 1.5px solid var(--cborder);
    border-radius: var(--rr2);
    background: var(--cbg);
    color: var(--ctxt);
    font-size: 14px;
    transition: var(--tr);
    outline: none;
}

.search-box input[type="text"]:focus {
    border-color: var(--cp);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(18,85,168,0.10);
}

.search-box input[type="text"]::placeholder {
    color: #9aabb8;
}

.search-box button {
    padding: 9px 15px;
    border: none;
    border-radius: var(--rr2);
    background: var(--grad);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--tr);
    white-space: nowrap;
    flex-shrink: 0;
}

.search-box button:hover {
    background: var(--grad-r);
    box-shadow: 0 4px 12px var(--csh2);
}

/* ============================
   TAG CLOUD (Hot Searches)
============================ */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    padding: 10px 12px;
    background: var(--ccard);
    border-radius: var(--rr);
    margin-bottom: 12px;
    border: 1px solid var(--cborder);
    box-shadow: 0 2px 8px var(--csh);
}

.tag-cloud-hdr {
    width: 100%;
    font-size: 13px;
    font-weight: 700;
    color: var(--cp);
    padding-bottom: 6px;
    margin-bottom: 2px;
    border-bottom: 1px solid var(--cborder);
}

.tag-item {
    padding: 4px 12px;
    background: var(--cbg);
    border-radius: 12px;
    color: var(--ctxt2);
    text-decoration: none;
    font-size: 12px;
    transition: var(--tr);
    border: 1px solid var(--cborder);
    line-height: 1.6;
}

.tag-item:hover {
    background: var(--cp);
    color: #fff;
    border-color: var(--cp);
}

/* ============================
   FILM SECTIONS
============================ */
.film-section {
    margin-bottom: 18px;
}

.film-section-body {
    /* intentional no padding */
}

.film-section-hdr {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--cborder);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.film-section-hdr::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--grad);
}

.film-section-ttl {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--ctxt);
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.film-section-ttl::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--grad);
    border-radius: 2px;
    flex-shrink: 0;
}

.film-section-ttl a {
    color: var(--ctxt);
    text-decoration: none;
    transition: var(--tr);
}

.film-section-ttl a:hover {
    color: var(--cp);
}

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

.poster-grid > li {
    position: relative;
    animation: revealUp 0.5s ease both;
}

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

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

.poster-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--rr);
    aspect-ratio: 600 / 350;
    background: var(--cbg2);
    border: 1px solid var(--cborder);
    box-shadow: 0 2px 6px var(--csh);
    transition: var(--tr);
}

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

.poster-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,25,60,0.72) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.28s ease;
    pointer-events: none;
}

.poster-link:hover {
    box-shadow: 0 6px 20px var(--csh2);
    transform: translateY(-2px);
}

.poster-link:hover img {
    transform: scale(1.06);
}

.poster-link:hover::after {
    opacity: 1;
}

.film-meta {
    padding: 8px 0 4px;
}

.film-meta h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

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

.film-meta h5 a:hover {
    color: var(--cp);
}

/* ============================
   VIDEO PLAYER
============================ */
.video-container {
    width: 100%;
    height: 600px;
    max-height: 600px;
    margin-bottom: 16px;
    background: #0a0a14;
    border-radius: var(--rr);
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.3);
    position: relative;
}

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

.MacPlayer {
    background: #0a0a14;
    border-radius: var(--rr);
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}

/* ============================
   TORRENT CAPTURE (Preview)
============================ */
.preview-grid {
    /* single-image: full width */
}

.preview-grid picture,
.preview-grid img,
.preview-grid .img_item,
.preview-grid .img_item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--rr2);
    border: 1px solid var(--cborder);
}

/* ============================
   DOWNLOAD / ACTION BUTTONS
============================ */
.action-btns {
    text-align: center;
    padding: 16px 12px;
    background: var(--ccard);
    border-radius: var(--rr);
    margin: 14px 0;
    border: 1px solid var(--cborder);
    box-shadow: 0 2px 8px var(--csh);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

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

.btn-action:hover {
    background: var(--grad-r);
    box-shadow: 0 5px 16px var(--csh2);
    transform: translateY(-1px);
}

.btn-action:active {
    transform: translateY(0);
}

/* ============================
   SHARE PANEL
============================ */
.share-panel {
    background: var(--ccard);
    border-radius: var(--rr);
    padding: 16px;
    margin: 16px 0;
    border: 1px solid var(--cborder);
    box-shadow: 0 2px 8px var(--csh);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.share-link-box {
    background: var(--cbg);
    border: 1px solid var(--cborder);
    border-radius: var(--rr2);
    padding: 10px 13px;
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
    min-width: 0;
}

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

.share-link-val {
    font-size: 12px;
    color: var(--ctxt2);
    word-break: break-all;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-share-copy {
    padding: 10px 20px;
    background: var(--grad);
    color: #fff;
    border: none;
    border-radius: var(--rr2);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--tr);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-share-copy:hover {
    background: var(--grad-r);
    box-shadow: 0 4px 12px var(--csh2);
}

.copy-icon {
    font-size: 16px;
    line-height: 1;
}

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

.pager-btn,
.pager-current {
    display: inline-block;
    padding: 7px 13px;
    border-radius: var(--rr2);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--tr);
    min-width: 36px;
    text-align: center;
    line-height: 1.5;
}

.pager-btn {
    background: var(--ccard);
    color: var(--ctxt);
    border: 1px solid var(--cborder);
}

.pager-btn:hover {
    background: var(--cp);
    border-color: var(--cp);
    color: #fff;
}

.pager-current {
    background: var(--grad);
    color: #fff;
    border: 1px solid var(--cp);
    cursor: default;
}

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

.footer-cr p {
    margin: 6px 0;
    color: var(--ctxt2);
    font-size: 12px;
    line-height: 1.7;
}

.footer-cr a {
    color: var(--ctxt2);
    text-decoration: none;
    transition: var(--tr);
}

.footer-cr a:hover {
    color: var(--cp);
}

.links-area {
    padding: 10px 12px;
    background: var(--ccard);
    border-radius: var(--rr);
    border: 1px solid var(--cborder);
}

.links-area dl {
    margin: 0;
}

.links-area dd {
    display: inline-block;
    margin: 3px 4px;
}

.links-area a {
    color: var(--ctxt2);
    text-decoration: none;
    font-size: 13px;
    transition: var(--tr);
}

.links-area a:hover {
    color: var(--cp);
}

/* ============================
   UTILITY
============================ */
.pc-only { display: block; }
.mobile-only { display: block; }

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

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

/* inline detail info rows */
.detail-row {
    font-size: 15px;
    line-height: 1.8;
    padding: 22px;
    background: var(--ccard);
    border-radius: var(--rr);
    margin: 16px 0;
    border: 1px solid var(--cborder);
    box-shadow: 0 2px 8px var(--csh);
}

.detail-title-bar {
    line-height: 1.8;
    text-align: center;
    padding: 16px 20px;
    font-size: 17px;
    margin: 16px 0;
    word-break: break-all;
    background: var(--ccard);
    border-radius: var(--rr);
    border: 1px solid var(--cborder);
    border-left: 4px solid var(--cp);
    box-shadow: 0 2px 8px var(--csh);
}

.detail-title-bar a {
    color: var(--cp);
    text-decoration: none;
    font-weight: 600;
    margin-right: 6px;
}

.detail-title-bar b {
    color: var(--ctxt);
}

/* ============================
   RESPONSIVE — TABLET/MOBILE
============================ */
@media (max-width: 768px) {
    .page-wrap {
        padding: 0 8px;
    }

    .site-header {
        padding: 10px 0;
    }

    .site-hdr-inner {
        gap: 10px;
    }

    .brand-name {
        font-size: 20px;
    }

    .latest-domain {
        padding: 4px 10px;
        gap: 5px;
    }

    .domain-tag {
        font-size: 10px;
    }

    .domain-value {
        font-size: 13px;
    }

    .inner-wrap {
        padding: 8px 0;
    }

    /* --- NAV: mobile layout --- */
    .cat-row .cat-zone {
        width: 15%;
        font-size: 10px;
        padding: 6px 2px;
        word-break: break-all;
        line-height: 1.2;
    }

    .cat-row .cat-links {
        width: 85%;
        gap: 4px;
        padding: 6px 5px;
        font-size: 14px;
    }

    /* 8 links → 2 rows of 4 */
    .cat-row .cat-links a {
        font-size: 14px;
        padding: 4px 2px;
        width: calc((100% - 12px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    /* --- POSTER GRID: 2 per row --- */
    .poster-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .poster-link:hover {
        transform: none;
    }

    .film-meta h5 {
        font-size: 12px;
    }

    .film-section-ttl {
        font-size: 16px;
    }

    .film-section-ttl::before {
        height: 15px;
    }

    .video-container {
        height: 56.25vw;
        max-height: 380px;
        margin-bottom: 12px;
    }

    .search-box {
        padding: 9px;
    }

    .search-box input[type="text"] {
        min-width: 90px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .search-box button {
        padding: 8px 9px;
        font-size: 12px;
    }

    .tag-cloud {
        padding: 8px;
        gap: 5px;
    }

    .tag-item {
        padding: 4px 10px;
        font-size: 12px;
    }

    .action-btns {
        padding: 12px 6px;
        gap: 7px;
    }

    .btn-action {
        padding: 9px 14px;
        font-size: 12px;
    }

    .share-panel {
        padding: 10px;
        margin: 12px 0;
        gap: 7px;
    }

    .share-link-box {
        padding: 9px 10px;
    }

    .share-link-tag {
        font-size: 11px;
    }

    .share-link-val {
        font-size: 11px;
    }

    .btn-share-copy {
        padding: 9px 11px;
        font-size: 12px;
    }

    .pager-wrap {
        padding: 14px 0;
        gap: 4px;
    }

    .pager-btn,
    .pager-current {
        padding: 6px 11px;
        font-size: 12px;
        min-width: 32px;
    }

    .detail-title-bar {
        font-size: 15px;
        padding: 14px 14px;
    }

    .detail-row {
        padding: 14px;
        font-size: 14px;
    }

    .site-footer {
        padding: 16px 0;
        margin-top: 16px;
    }

    .pc-only {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 8px 0;
    }

    .brand-area {
        gap: 8px;
    }

    .brand-name {
        font-size: 18px;
    }

    /* Small screen phone: nav link font 12px min */
    .cat-row .cat-zone {
        width: 15%;
        font-size: 10px;
        padding: 5px 2px;
    }

    .cat-row .cat-links {
        width: 85%;
        gap: 3px;
        padding: 5px 3px;
    }

    .cat-row .cat-links a {
        font-size: 12px;
        padding: 3px 1px;
        width: calc((100% - 9px) / 4);
    }

    .poster-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .video-container {
        height: 56.25vw;
        max-height: 280px;
    }

    .action-btns {
        padding: 10px 4px;
        gap: 5px;
        flex-wrap: nowrap;
    }

    .btn-action {
        padding: 8px 10px;
        font-size: 11px;
    }

    .share-panel {
        padding: 8px;
        gap: 5px;
        flex-wrap: nowrap;
    }

    .share-link-val {
        font-size: 10px;
    }

    .btn-share-copy {
        padding: 8px 9px;
        font-size: 11px;
    }

    .copy-icon {
        font-size: 13px;
    }

    .detail-row {
        padding: 12px;
        font-size: 13px;
    }
}

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