/* Video Portal Template - Clean Light Theme */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700;900&display=swap');

:root {
    --brand: #f04d23;
    --brand-deep: #d63c14;
    --brand-soft: #fff0ec;
    --accent: #ff6b35;
    --link: #1a73c8;
    --link-hover: #0d5fab;
    --dark: #1a1a1a;
    --mid: #444;
    --muted: #888;
    --lite: #bbb;
    --border: #e8e8e8;
    --border-dark: #d0d0d0;
    --panel: #ffffff;
    --surface: #f5f5f5;
    --surface2: #fafafa;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
    --shadow: 0 2px 10px rgba(0,0,0,0.10);
    --shadow-lg: 0 6px 24px rgba(0,0,0,0.14);
    --radius: 6px;
    --radius-lg: 10px;
    --ease: all 0.25s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background: var(--surface);
    color: var(--dark);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== SITE HEADER ===== */
.site-header {
    background: #fff;
    border-bottom: 3px solid var(--brand);
    box-shadow: var(--shadow-sm);
    padding: 14px 0 10px;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: nowrap;
    overflow: hidden;
}

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

.brand-logo {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    transition: var(--ease);
}

.brand-logo:hover {
    opacity: 0.85;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: var(--brand);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}

.brand-name {
    font-size: 26px;
    font-weight: 900;
    color: var(--brand);
    letter-spacing: 0.5px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-domain-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-soft);
    border: 1.5px solid var(--brand);
    border-radius: 20px;
    padding: 5px 14px;
    position: relative;
}

.site-domain-wrap::before {
    content: '';
    position: absolute;
    inset: -1.5px;
    border-radius: 22px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    z-index: -1;
    opacity: 0.15;
}

.domain-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--brand);
    background: var(--brand);
    color: #fff;
    padding: 1px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.domain-str {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    font-family: 'Courier New', 'Consolas', monospace;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 14px;
}

.content {
    padding: 12px 0;
}

/* ===== CATEGORY NAVIGATION ===== */
.category-nav-block {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

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

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

.category-zone {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--brand);
    white-space: nowrap;
    width: 9%;
    min-width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 4px;
    flex-shrink: 0;
    letter-spacing: 0.3px;
    border-right: 2px solid var(--brand-deep);
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 9px 10px;
    width: 91%;
    align-items: center;
}

.category-links a {
    display: inline-block;
    text-decoration: none;
    color: var(--mid);
    font-size: 13px;
    font-weight: 500;
    padding: 5px 0;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--surface2);
    transition: var(--ease);
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
}

.category-links a:hover {
    color: var(--brand);
    border-color: var(--brand);
    background: var(--brand-soft);
}

.category-links a.active {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(240,77,35,0.25);
}

/* ===== SEARCH BOX ===== */
.search-wrap {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

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

.search-wrap input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 10px 16px;
    border: 1.5px solid var(--border-dark);
    border-radius: 4px;
    background: var(--surface2);
    color: var(--dark);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: var(--ease);
}

.search-wrap input[type="text"]:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(240,77,35,0.12);
}

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

.search-wrap button {
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

.search-wrap button[value="1"],
.search-wrap button[value="2"] {
    background: var(--brand);
    color: #fff;
}

.search-wrap button[value="1"]:hover,
.search-wrap button[value="2"]:hover {
    background: var(--brand-deep);
    box-shadow: 0 3px 12px rgba(240,77,35,0.35);
}

.search-wrap button:not([value]) {
    background: var(--surface);
    color: var(--mid);
    border: 1.5px solid var(--border-dark);
}

.search-wrap button:not([value]):hover {
    background: var(--link);
    color: #fff;
    border-color: var(--link);
}

/* ===== HOT SEARCH TAGS ===== */
.hot-search-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.hot-search-panel h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.hot-search-panel h4 strong {
    color: var(--dark);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.tag-list a {
    display: inline-block;
    padding: 5px 13px;
    background: var(--surface2);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    color: var(--mid);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ease);
}

.tag-list a:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    box-shadow: 0 2px 8px rgba(240,77,35,0.2);
}

/* ===== SECTION BLOCKS ===== */
.section-block {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.section-head {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
}

.section-head::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--brand);
    border-radius: 2px;
    margin-right: 10px;
    flex-shrink: 0;
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.2px;
}

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

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

.section-title span {
    font-size: 0.8em;
    color: var(--muted);
    font-weight: 400;
}

.section-body {
    padding: 16px;
}

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

.film-grid li {
    animation: fadeUp 0.5s ease backwards;
}

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

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

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

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

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

.film-thumb::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: rgba(255,255,255,0.92);
    background: rgba(0,0,0,0.30);
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.film-info {
    padding: 8px 2px 2px;
}

.film-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
}

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

.film-info h5 a:hover {
    color: var(--brand);
}

/* ===== VIDEO PLAYER ===== */
.video-container {
    width: 100%;
    height: 620px;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow-lg);
}

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

.MacPlayer {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: var(--shadow-lg);
}

/* ===== DETAIL TITLE BAR ===== */
.detail-title-bar {
    line-height: 1.8;
    text-align: center;
    padding: 18px 20px;
    font-size: 17px;
    margin: 16px 0;
    word-break: break-all;
    background: linear-gradient(135deg, #fff8f6 0%, #fff 100%);
    border: 1px solid #fcd8cc;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--brand);
}

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

/* ===== FILM META BOX ===== */
.meta-info-box {
    font-size: 15px;
    line-height: 1.9;
    padding: 22px 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin: 16px 0;
    box-shadow: var(--shadow-sm);
}

/* ===== TORRENT PREVIEW ===== */
.preview-image-wrap {
    width: 100%;
    margin: 10px 0;
}

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

/* ===== DOWNLOAD BUTTONS ===== */
.btn-group-center {
    text-align: center;
    padding: 18px 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin: 14px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    box-shadow: var(--shadow-sm);
}

.btn-action {
    display: inline-block;
    padding: 11px 24px;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--ease);
    border: 2px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.btn-action:hover {
    background: var(--brand-deep);
    box-shadow: 0 4px 14px rgba(240,77,35,0.4);
    transform: translateY(-1px);
}

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

/* ===== SHARE SECTION ===== */
.share-section {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
}

.share-url-display {
    background: var(--surface2);
    border: 1px solid var(--border-dark);
    border-radius: 4px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.share-label {
    font-weight: 700;
    font-size: 12px;
    color: #fff;
    background: var(--brand);
    padding: 2px 7px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.share-url {
    font-size: 13px;
    color: var(--muted);
    font-family: 'Courier New', monospace;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.share-copy-btn:hover {
    background: var(--link-hover);
    box-shadow: var(--shadow);
}

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

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

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

.a_page_info {
    background: var(--panel);
    color: var(--mid);
    border: 1px solid var(--border-dark);
}

.a_page_info:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.page_info_focus {
    background: var(--brand);
    color: #fff;
    border: 1px solid var(--brand);
    cursor: default;
    font-weight: 700;
}

/* ===== FRIEND LINKS ===== */
.link-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.link-panel-head {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.link-panel-head::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--brand);
    border-radius: 2px;
}

.link-grid dl {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.link-grid dd {
    margin: 0;
}

.link-grid a {
    display: inline-block;
    padding: 4px 12px;
    color: var(--link);
    text-decoration: none;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--surface2);
    transition: var(--ease);
}

.link-grid a:hover {
    color: var(--brand);
    border-color: var(--brand);
    background: var(--brand-soft);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--panel);
    border-top: 2px solid var(--border);
    padding: 22px 0;
    margin-top: 20px;
    text-align: center;
}

.site-footer p {
    color: var(--muted);
    font-size: 13px;
    margin: 6px 0;
    line-height: 1.8;
}

.site-footer a {
    color: var(--link);
    text-decoration: none;
}

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

/* ===== CLIENT DOWNLOAD LINKS ===== */
.client-dl-pc,
.client-dl-mobile {
    text-align: center;
    padding: 14px 16px;
}

.client-dl-pc a,
.client-dl-mobile a {
    color: var(--link);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--ease);
}

.client-dl-pc a:hover,
.client-dl-mobile a:hover {
    color: var(--brand);
    text-decoration: underline;
}

/* ===== HIDE UTILITIES ===== */
.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; }
}

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

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 8px;
    }

    .content {
        padding: 8px 0;
    }

    /* Category nav mobile: label narrower + smaller, links bigger font 4-per-row */
    .category-zone {
        width: 16%;
        min-width: 38px;
        font-size: 10px;
        padding: 5px 2px;
        letter-spacing: 0;
    }

    .category-links {
        width: 84%;
        gap: 4px;
        padding: 6px 5px;
    }

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

    /* Film grid: 2 columns */
    .film-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

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

    .section-title {
        font-size: 15px;
    }

    .section-body {
        padding: 12px;
    }

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

    .btn-group-center {
        padding: 14px 10px;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .btn-action {
        padding: 10px 14px;
        font-size: 13px;
    }

    .share-section {
        padding: 12px;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .share-url-display {
        padding: 9px 10px;
    }

    .share-url {
        font-size: 12px;
    }

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

    .search-wrap {
        padding: 10px 12px;
    }

    .search-wrap button {
        padding: 9px 10px;
        font-size: 12px;
    }

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

    .hot-search-panel {
        padding: 10px 12px;
    }

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

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

    .site-branding {
        gap: 10px;
        flex-wrap: nowrap;
    }

    .site-domain-wrap {
        flex-shrink: 0;
    }

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

    .meta-info-box {
        padding: 16px;
        font-size: 14px;
    }

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

    .page_info_div {
        padding: 15px 0;
        gap: 4px;
    }

    .a_page_info,
    .page_info_focus {
        padding: 6px 11px;
        font-size: 12px;
        min-width: 32px;
    }
}

@media (max-width: 480px) {
    .brand-name {
        font-size: 20px;
    }

    .brand-icon {
        width: 30px;
        height: 30px;
        font-size: 17px;
    }

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

    .domain-str {
        font-size: 12px;
    }

    .category-zone {
        width: 15%;
        min-width: 34px;
        font-size: 9px;
        padding: 4px 1px;
    }

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

    .category-links a {
        font-size: 13px;
        padding: 6px 1px;
        width: calc((100% - 9px) / 4);
    }

    .film-grid {
        gap: 8px;
    }

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

    .section-title {
        font-size: 14px;
    }

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