/* Video Portal – Amazon-Inspired Theme */

:root {
    --topbar-bg: #131921;
    --subbar-bg: #232f3e;
    --accent: #ff9900;
    --accent-dk: #e47911;
    --accent-light: #fff3cd;
    --bg-page: #eaeded;
    --bg-card: #ffffff;
    --bg-card2: #f3f3f3;
    --border: #d5d9d9;
    --border-dk: #adb1b8;
    --text-primary: #0f1111;
    --text-secondary: #565959;
    --text-link: #007185;
    --text-link-hover: #c45500;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.15);
    --radius: 6px;
    --radius-sm: 4px;
    --trans: all 0.2s ease;
}

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

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

/* ── Top Brand Bar ── */
.site-topbar {
    background: var(--topbar-bg);
    padding: 0.45rem 0;
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

.brand-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-name {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
    line-height: 1;
}

.brand-name em {
    color: var(--accent);
    font-style: normal;
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px;
    border: 1px solid #546171;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.06);
    white-space: nowrap;
    flex-shrink: 0;
}

.domain-badge-label {
    font-size: 11px;
    color: #cccccc;
    font-weight: 500;
    white-space: nowrap;
}

.domain-badge-url {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

/* ── Layout ── */
.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 12px;
    overflow: hidden;
}

.section-block {
    padding: 6px 0;
}

/* ── Nav Panel ── */
.nav-panel {
    background: var(--subbar-bg);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 6px;
    border: 1px solid #3a4553;
}

.nav-strip {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #3a4553;
}

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

.zone-tag {
    width: 10%;
    min-width: 40px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 3px;
    border-right: 1px solid #3a4553;
    background: rgba(0,0,0,0.25);
    flex-shrink: 0;
    line-height: 1.3;
    word-break: break-all;
}

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

.zone-links a {
    display: inline-block;
    color: #d5d9d9;
    text-decoration: none;
    padding: 4px 3px;
    border-radius: var(--radius-sm);
    transition: var(--trans);
    background: rgba(255,255,255,0.06);
    border: 1px solid #3a4553;
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.zone-links a:hover {
    background: var(--accent);
    color: var(--topbar-bg);
    border-color: var(--accent);
    font-weight: 600;
}

.zone-links a.active {
    background: var(--accent);
    color: var(--topbar-bg);
    border-color: var(--accent-dk);
    font-weight: 700;
}

/* ── Search ── */
.search-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    margin-bottom: 6px;
    box-shadow: var(--shadow-sm);
}

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

.search-wrap input[type="text"] {
    flex: 1;
    min-width: 140px;
    padding: 8px 12px;
    border: 1px solid var(--border-dk);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--trans);
}

.search-wrap input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255,153,0,0.3);
}

.search-wrap input[type="text"]::placeholder {
    color: #aaaaaa;
}

.search-wrap button {
    padding: 8px 14px;
    border: 1px solid var(--accent-dk);
    border-radius: var(--radius-sm);
    background: linear-gradient(to bottom, #f0c14b, #daa520);
    color: var(--topbar-bg);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--trans);
    white-space: nowrap;
    flex-shrink: 0;
}

.search-wrap button:hover {
    background: linear-gradient(to bottom, #f4ca64, #e4ad1a);
    border-color: #a57c00;
}

/* ── Hot Tags ── */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 6px;
    box-shadow: var(--shadow-sm);
}

.tag-pill {
    padding: 4px 11px;
    background: var(--bg-card2);
    border-radius: 14px;
    color: var(--text-link);
    text-decoration: none;
    font-size: 13px;
    transition: var(--trans);
    border: 1px solid var(--border);
}

.tag-pill:hover {
    background: var(--accent-light);
    color: var(--text-link-hover);
    border-color: var(--accent);
    font-weight: 600;
}

/* ── Section headings ── */
.film-section {
    margin-bottom: 6px;
}

.card-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 6px;
}

.section-hd {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.section-hd::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 44px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.section-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--trans);
}

.section-title a:hover {
    color: var(--text-link-hover);
}

/* ── Film Grid ── */
.film-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    list-style: none;
    padding: 0;
    width: 100%;
    overflow: hidden;
}

.film-grid li {
    min-width: 0;
    overflow: hidden;
    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(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.film-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    aspect-ratio: 600 / 350;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    transition: var(--trans);
}

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

.film-thumb:hover {
    border-color: var(--accent-dk);
    box-shadow: 0 4px 10px rgba(0,0,0,0.16);
}

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

.film-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.22s ease;
}

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

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

.film-caption h5 {
    font-size: 13px;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
    color: var(--text-primary);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.film-caption h5 a {
    color: inherit;
    text-decoration: none;
    transition: var(--trans);
}

.film-caption h5 a:hover {
    color: var(--text-link-hover);
    text-decoration: underline;
}

/* ── Torrent / Video Detail ── */
.detail-title-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin: 6px 0;
    font-size: 16px;
    line-height: 1.75;
    text-align: center;
    word-break: break-all;
    box-shadow: var(--shadow-sm);
}

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

.detail-title-bar a:hover {
    color: var(--text-link-hover);
    text-decoration: underline;
}

.detail-meta {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.85;
    box-shadow: var(--shadow-sm);
}

.torrent-preview-box {
    margin-top: 12px;
}

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

.torrent-preview-box picture img,
.torrent-preview-box img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

/* ── Download Buttons ── */
.dl-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 8px;
    margin: 6px 0;
}

.dl-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    background: linear-gradient(to bottom, #f0c14b, #daa520);
    color: var(--topbar-bg);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--accent-dk);
    transition: var(--trans);
    white-space: nowrap;
    text-align: center;
}

.dl-btn:hover {
    background: linear-gradient(to bottom, #f4ca64, #e4ad1a);
    border-color: #a57c00;
    box-shadow: 0 3px 7px rgba(0,0,0,0.15);
}

/* ── Share Section ── */
.share-section {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    margin: 6px 0;
    box-shadow: var(--shadow-sm);
    flex-wrap: nowrap;
}

.share-url-display {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.share-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.share-url {
    font-size: 12px;
    color: var(--text-link);
    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: 7px 13px;
    background: linear-gradient(to bottom, #f0c14b, #daa520);
    border: 1px solid var(--accent-dk);
    border-radius: var(--radius-sm);
    color: var(--topbar-bg);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--trans);
    white-space: nowrap;
    flex-shrink: 0;
}

.share-copy-btn:hover {
    background: linear-gradient(to bottom, #f4ca64, #e4ad1a);
    border-color: #a57c00;
}

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

/* ── Video Player ── */
.video-player-wrap {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin: 6px 0;
    border: 1px solid var(--border);
}

.video-player-wrap iframe,
.video-player-wrap video,
.video-container {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    border: none;
    background: #000;
}

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

.a_page_info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: var(--trans);
    min-width: 34px;
    text-align: center;
    text-decoration: none;
    border: 1px solid var(--border-dk);
    color: var(--text-link);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.a_page_info:hover {
    background: var(--accent-light);
    border-color: var(--accent-dk);
    color: var(--text-link-hover);
}

.page_info_focus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    min-width: 34px;
    text-align: center;
    text-decoration: none;
    background: linear-gradient(to bottom, #f0c14b, #daa520);
    color: var(--topbar-bg);
    border: 1px solid var(--accent-dk);
    font-weight: 700;
    cursor: default;
}

.p_c { cursor: default; }

/* ── Footer Links ── */
.friendlinks-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    margin-bottom: 6px;
    box-shadow: var(--shadow-sm);
}

.friendlinks-inner dl { margin: 0; }

.friendlinks-inner dd {
    display: inline-block;
    margin: 3px 4px;
}

.friendlinks-inner a {
    color: var(--text-link);
    text-decoration: none;
    font-size: 13px;
    transition: var(--trans);
}

.friendlinks-inner a:hover {
    color: var(--text-link-hover);
    text-decoration: underline;
}

/* ── Site Footer ── */
.site-footer-bar {
    background: var(--subbar-bg);
    border-top: 1px solid #3a4553;
    padding: 16px 0;
    text-align: center;
    margin-top: 8px;
}

.site-footer-bar p {
    color: #aab7c4;
    font-size: 12px;
    margin: 4px 0;
}

.site-footer-bar a {
    color: #aab7c4;
    text-decoration: none;
    transition: var(--trans);
}

.site-footer-bar a:hover { color: var(--accent); }

/* ── Utilities ── */
.pd5 { padding: 2px 5px; }
.clearfix::after { content: ""; display: table; clear: both; }

/* ── Visibility Helpers ── */
.hide-mobile { display: block; }
.hide-pc     { display: block; }

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

/* ── Responsive 768px ── */
@media (max-width: 768px) {
    .wrap { padding: 0 7px; }

    .site-topbar { padding: 0.4rem 0; }
    .brand-name { font-size: 18px; }
    .domain-badge-url { font-size: 13px; }
    .domain-badge-label { font-size: 10px; }
    .domain-badge { padding: 3px 8px; gap: 5px; }

    .section-block { padding: 4px 0; }

    .zone-tag {
        width: 15%;
        font-size: 10px;
        padding: 7px 2px;
    }

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

    .zone-links a {
        font-size: 12px;
        padding: 4px 2px;
        width: calc((100% - 12px) / 4);
    }

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

    .card-block { padding: 10px; }
    .section-title { font-size: 16px; }
    .film-caption h5 { font-size: 12px; }

    .search-wrap input[type="text"] { min-width: 90px; font-size: 13px; padding: 7px 9px; }
    .search-wrap button { padding: 7px 9px; font-size: 12px; }

    .dl-actions { gap: 7px; padding: 12px 4px; }
    .dl-btn { padding: 9px 14px; font-size: 13px; }

    .detail-title-bar { font-size: 14px; padding: 11px; }
    .detail-meta { font-size: 13px; padding: 12px; }

    .share-section { padding: 8px; gap: 6px; flex-wrap: nowrap; }
    .share-url-display { padding: 7px 8px; gap: 5px; }
    .share-label { font-size: 11px; }
    .share-url { font-size: 10px; }
    .share-copy-btn { padding: 7px 10px; font-size: 12px; }

    .page_info_div { gap: 4px; padding: 12px 0; }
    .a_page_info, .page_info_focus { padding: 5px 10px; font-size: 12px; min-width: 30px; }
}

/* ── Responsive 480px ── */
@media (max-width: 480px) {
    .brand-name { font-size: 15px; }
    .domain-badge-url { font-size: 12px; }
    .domain-badge-label { font-size: 10px; }

    .zone-tag {
        width: 15%;
        font-size: 10px;
        padding: 6px 2px;
    }

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

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

    .film-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .film-caption h5 { font-size: 11px; }
    .section-title { font-size: 14px; }
    .dl-btn { padding: 8px 10px; font-size: 12px; }

    .share-section { padding: 7px; gap: 5px; }
    .share-url-display { padding: 6px 7px; }
    .share-copy-btn { padding: 6px 8px; font-size: 11px; }
}

/* Lazy load placeholder */
img[data-original] { background: var(--bg-card2); }
