/* Video Portal – Game8 Style */

:root {
    --topbar-bg:    #ffffff;
    --bg-page:      #f0f0f0;
    --bg-card:      #ffffff;
    --bg-card2:     #f7f7f7;
    --bg-section:   #f5f5f5;
    --border:       #e4e4e4;
    --border-dk:    #d0d0d0;
    --accent:       #f07800;
    --accent-dk:    #d66a00;
    --accent-lt:    #ff9a30;
    --accent-pale:  #fff4e8;
    --text-primary: #1a1a1a;
    --text-sub:     #444444;
    --text-muted:   #888888;
    --text-white:   #ffffff;
    --shadow-xs:    0 1px 3px rgba(0,0,0,0.07);
    --shadow-sm:    0 2px 8px rgba(0,0,0,0.09);
    --shadow-card:  0 2px 10px rgba(0,0,0,0.08);
    --shadow-hover: 0 6px 20px rgba(0,0,0,0.14);
    --radius:       8px;
    --radius-sm:    5px;
    --radius-tag:   4px;
    --trans:        all 0.2s cubic-bezier(0.4,0,0.2,1);
}

*, *::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.6;
    overflow-x: hidden;
}

/* ── Top Brand Bar ── */
.site-topbar {
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
    min-height: 52px;
}

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

/* Game8-style hexagonal icon */
.brand-link::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    background: var(--accent);
    border-radius: 6px;
    position: relative;
}

.brand-name {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1;
}

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

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 13px;
    border: 1px solid var(--border-dk);
    border-radius: var(--radius-sm);
    background: var(--accent-pale);
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--trans);
}

.domain-badge:hover {
    border-color: var(--accent);
    background: #ffeedd;
}

.domain-badge-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding-right: 8px;
    border-right: 1px solid var(--border-dk);
}

.domain-badge-url {
    font-size: 17px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.2px;
}

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

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

/* ── Nav Panel ── */
.nav-panel {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 5px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

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

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

.zone-tag {
    width: 10%;
    min-width: 40px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-white);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 3px;
    border-right: none;
    background: var(--accent);
    flex-shrink: 0;
    line-height: 1.3;
    word-break: break-all;
    letter-spacing: 0.3px;
}

.zone-links {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 7px 9px;
    align-items: center;
    background: var(--bg-card);
}

.zone-links a {
    display: inline-block;
    color: var(--text-sub);
    text-decoration: none;
    padding: 4px 3px;
    border-radius: var(--radius-tag);
    transition: var(--trans);
    background: var(--bg-section);
    border: 1px solid var(--border);
    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: #fff;
    border-color: var(--accent-dk);
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(240,120,0,0.28);
}

.zone-links a.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent-dk);
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(240,120,0,0.28);
}

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

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

.search-wrap input[type="text"] {
    flex: 1;
    min-width: 140px;
    padding: 9px 14px 9px 36px;
    border: 1px solid var(--border-dk);
    border-radius: 24px;
    background: var(--bg-section) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 12px center;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--trans);
}

.search-wrap input[type="text"]:focus {
    border-color: var(--accent);
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(240,120,0,0.18);
}

.search-wrap input[type="text"]::placeholder { color: var(--text-muted); }

.search-wrap button {
    padding: 9px 17px;
    border: none;
    border-radius: 24px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--trans);
    white-space: nowrap;
    flex-shrink: 0;
}

.search-wrap button:hover {
    background: var(--accent-lt);
    box-shadow: 0 2px 8px rgba(240,120,0,0.3);
}

/* ── 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: 5px;
    box-shadow: var(--shadow-xs);
}

.tag-pill {
    padding: 4px 12px;
    background: var(--bg-section);
    border-radius: var(--radius-tag);
    color: var(--text-sub);
    text-decoration: none;
    font-size: 13px;
    transition: var(--trans);
    border: 1px solid var(--border);
    font-weight: 600;
}

.tag-pill:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent-dk);
    box-shadow: 0 2px 6px rgba(240,120,0,0.25);
}

/* ── Section Headings ── */
.film-section { margin-bottom: 5px; }

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

.section-hd {
    margin-bottom: 11px;
    padding-bottom: 9px;
    border-bottom: 2px solid var(--bg-section);
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Orange left bar like Game8 section headers */
.section-hd::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--accent);
    border-radius: 2px;
    flex-shrink: 0;
}

.section-title {
    font-size: 17px;
    font-weight: 800;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

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

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

/* ── 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.38s 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(10px); }
    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-section);
    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;
}

/* Game8-style gradient overlay always visible at bottom */
.film-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.22s ease;
    border-radius: var(--radius-sm);
}

.film-thumb:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

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

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

.film-caption h5 {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    line-height: 1.45;
    color: var(--text-sub);
    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(--accent); }

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

.detail-title-bar a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    margin-right: 7px;
}

.detail-title-bar a:hover { text-decoration: underline; }

.detail-title-bar b {
    color: var(--text-primary);
    font-weight: 700;
}

.detail-meta {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 16px;
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.85;
    color: var(--text-sub);
    box-shadow: var(--shadow-xs);
}

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

.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;
    border: 1px solid var(--border);
}

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

.dl-btn {
    display: inline-block;
    padding: 10px 26px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--trans);
    white-space: nowrap;
    text-align: center;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 6px rgba(240,120,0,0.3);
}

.dl-btn:hover {
    background: var(--accent-lt);
    box-shadow: 0 4px 14px rgba(240,120,0,0.35);
    transform: translateY(-1px);
}

/* ── 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: 5px 0;
    box-shadow: var(--shadow-xs);
    flex-wrap: nowrap;
}

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

.share-label {
    font-size: 11px;
    color: var(--accent);
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-right: 1px solid var(--border-dk);
    padding-right: 8px;
}

.share-url {
    font-size: 12px;
    color: var(--text-muted);
    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: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--trans);
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(240,120,0,0.25);
}

.share-copy-btn:hover {
    background: var(--accent-lt);
    box-shadow: 0 3px 10px rgba(240,120,0,0.3);
}

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

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

.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 13px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: var(--trans);
    min-width: 36px;
    text-align: center;
    text-decoration: none;
    border: 1px solid var(--border-dk);
    color: var(--text-sub);
    background: var(--bg-card);
    box-shadow: var(--shadow-xs);
    font-weight: 600;
}

.a_page_info:hover {
    background: var(--accent);
    border-color: var(--accent-dk);
    color: #fff;
    box-shadow: 0 2px 8px rgba(240,120,0,0.28);
}

.page_info_focus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 13px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    min-width: 36px;
    text-align: center;
    text-decoration: none;
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent-dk);
    font-weight: 800;
    cursor: default;
    box-shadow: 0 2px 8px rgba(240,120,0,0.28);
}

.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: 5px;
    box-shadow: var(--shadow-xs);
}

.friendlinks-inner dl { margin: 0; }

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

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

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

/* ── Site Footer ── */
.site-footer-bar {
    background: #1a1a1a;
    padding: 16px 0;
    text-align: center;
    margin-top: 8px;
}

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

.site-footer-bar a {
    color: rgba(255,255,255,0.35);
    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; }

.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 8px; }
    .topbar-inner { min-height: 44px; }
    .brand-name { font-size: 18px; }
    .domain-badge-url { font-size: 14px; }
    .domain-badge-label { font-size: 10px; }
    .domain-badge { padding: 4px 10px; gap: 6px; }
    .brand-link::before { width: 24px; height: 24px; }
    .section-block { padding: 3px 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; }
    .film-thumb:hover { transform:none; }

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

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

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

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

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

/* ── Responsive 480px ── */
@media (max-width:480px) {
    .brand-name { font-size:15px; }
    .domain-badge-url { font-size:13px; }
    .domain-badge-label { font-size:9px; }
    .domain-badge { padding:3px 8px; gap:5px; }
    .brand-link::before { width:20px; height:20px; }

    .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 14px; font-size:12px; }

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

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