/* Video Site Template - Fresh Green Style */

:root {
    --clr-main: #2e7d32;
    --clr-main-dk: #1b5e20;
    --clr-main-lt: #43a047;
    --clr-accent: #ff6f00;
    --clr-accent2: #ffd600;
    --clr-text: #1a1a1a;
    --clr-text-sub: #444;
    --clr-text-muted: #777;
    --clr-bg: #f0f4f0;
    --clr-bg-card: #ffffff;
    --clr-bg-panel: #e8f5e9;
    --clr-line: #c8e6c9;
    --clr-line-dk: #a5d6a7;
    --sh-sm: 0 1px 4px rgba(0,0,0,0.10);
    --sh-md: 0 3px 10px rgba(0,0,0,0.14);
    --sh-lg: 0 6px 20px rgba(0,0,0,0.18);
    --rd: 6px;
    --rd-sm: 4px;
    --ease: all 0.25s ease;
    --grad-main: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
    --grad-accent: linear-gradient(135deg, #ff6f00 0%, #ffa000 100%);
}

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

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

/* ===== TOP HEADER ===== */
.pg-header {
    background: var(--clr-bg-card);
    border-bottom: 3px solid var(--clr-main);
    padding: 8px 0;
    box-shadow: var(--sh-sm);
}

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

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

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

.site-logo-link:hover .pg-site-name {
    color: var(--clr-main);
}

.pg-site-name {
    font-size: 26px;
    font-weight: 900;
    color: var(--clr-main-dk);
    letter-spacing: 1px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
    display: inline-block;
    transition: var(--ease);
}

.pg-domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--clr-bg-panel);
    border: 2px solid var(--clr-main-lt);
    border-radius: 20px;
    padding: 5px 14px;
}

.pg-domain-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--clr-main);
    white-space: nowrap;
    background: var(--clr-main);
    color: #fff;
    padding: 1px 6px;
    border-radius: 10px;
    letter-spacing: 0.3px;
}

.pg-domain-val {
    font-size: 17px;
    font-weight: 800;
    color: var(--clr-main-dk);
    letter-spacing: 0.5px;
}

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

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

/* ===== NAVIGATION ===== */
.nav-wrap {
    background: var(--clr-bg-card);
    border-radius: var(--rd);
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid var(--clr-line);
    box-shadow: var(--sh-sm);
}

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

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

.nav-zone-lbl {
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    background: var(--clr-main);
    white-space: nowrap;
    width: 10%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    flex-shrink: 0;
    border-right: 2px solid var(--clr-main-dk);
}

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

.nav-zone-links a {
    display: inline-block;
    color: var(--clr-text-sub);
    text-decoration: none;
    padding: 4px 3px;
    border-radius: var(--rd-sm);
    transition: var(--ease);
    background: var(--clr-bg-card);
    border: 1px solid var(--clr-line);
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
    font-weight: 500;
}

.nav-zone-links a:hover {
    background: var(--clr-main);
    color: #fff;
    border-color: var(--clr-main);
    box-shadow: var(--sh-sm);
}

.nav-zone-links a.active {
    background: var(--clr-accent);
    color: #fff;
    border-color: var(--clr-accent);
    font-weight: 700;
    box-shadow: var(--sh-sm);
}

/* ===== SEARCH BOX ===== */
.search-panel {
    background: var(--clr-bg-card);
    border-radius: var(--rd);
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid var(--clr-line);
    box-shadow: var(--sh-sm);
}

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

.search-panel input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 9px 13px;
    border: 2px solid var(--clr-line);
    border-radius: var(--rd-sm);
    background: var(--clr-bg);
    color: var(--clr-text);
    font-size: 14px;
    transition: var(--ease);
    outline: none;
    font-family: inherit;
}

.search-panel input[type="text"]:focus {
    border-color: var(--clr-main);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
}

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

.search-panel button {
    padding: 9px 14px;
    border: none;
    border-radius: var(--rd-sm);
    background: var(--grad-main);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.search-panel button:hover {
    background: var(--grad-accent);
    box-shadow: var(--sh-md);
}

/* ===== HOT TAGS GRID ===== */
.tags-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 10px 12px;
    background: var(--clr-bg-card);
    border-radius: var(--rd);
    margin-bottom: 8px;
    border: 1px solid var(--clr-line);
    box-shadow: var(--sh-sm);
}

.tags-panel .tag-item {
    padding: 4px 12px;
    background: var(--clr-bg-panel);
    border-radius: 14px;
    color: var(--clr-text-sub);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ease);
    border: 1px solid var(--clr-line-dk);
}

.tags-panel .tag-item:hover {
    background: var(--clr-main);
    color: #fff;
    border-color: var(--clr-main);
}

/* ===== SECTION HEADINGS ===== */
.film-section {
    margin-bottom: 12px;
}

.film-section-hd {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--clr-line);
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.film-section-hd::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--grad-main);
    border-radius: 2px;
}

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

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

.film-section-title a:hover {
    color: var(--clr-main);
}

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

.film-list-grid li {
    position: relative;
    animation: fcFadeUp 0.5s ease backwards;
}

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

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

.film-thumb-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--rd);
    aspect-ratio: 600 / 350;
    background: var(--clr-bg-panel);
    border: 1px solid var(--clr-line);
    box-shadow: var(--sh-sm);
}

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

.film-thumb-link:hover {
    box-shadow: var(--sh-md);
}

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

.film-thumb-link::before {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 28px;
    color: rgba(255,255,255,0.9);
    z-index: 2;
    opacity: 0;
    transition: all 0.3s ease;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.film-thumb-link:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.film-thumb-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

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

.film-meta {
    padding: 7px 0 0;
}

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

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

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

/* ===== VIDEO PLAYER ===== */
.video-wrap {
    width: 100%;
    height: 620px;
    max-height: 620px;
    margin-bottom: 15px;
    background: #000;
    border-radius: var(--rd);
    overflow: hidden;
    box-shadow: var(--sh-lg);
    position: relative;
}

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

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

/* ===== TORRENT CAPTURE ===== */
.capture-block {
    width: 100%;
}

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

.capture-block .img_item {
    width: 100%;
}

/* ===== DOWNLOAD BUTTONS ===== */
.dl-actions {
    text-align: center;
    padding: 14px;
    background: var(--clr-bg-card);
    border-radius: var(--rd);
    margin: 12px 0;
    border: 1px solid var(--clr-line);
    box-shadow: var(--sh-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.dl-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--grad-main);
    color: #fff;
    text-decoration: none;
    border-radius: var(--rd-sm);
    font-weight: 700;
    font-size: 14px;
    transition: var(--ease);
    margin: 0;
    border: 2px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
}

.dl-btn:hover {
    background: var(--grad-accent);
    box-shadow: var(--sh-md);
}

/* ===== SHARE SECTION ===== */
.link-share-box {
    background: var(--clr-bg-card);
    border-radius: var(--rd);
    padding: 14px 16px;
    margin: 12px 0;
    border: 1px solid var(--clr-line);
    box-shadow: var(--sh-sm);
    display: flex;
    align-items: center;
    gap: 10px;
}

.link-share-display {
    background: var(--clr-bg-panel);
    border: 1px solid var(--clr-line);
    border-radius: var(--rd-sm);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.link-share-lbl {
    font-weight: 700;
    font-size: 12px;
    color: var(--clr-main);
    white-space: nowrap;
    flex-shrink: 0;
    background: var(--clr-main);
    color: #fff;
    padding: 2px 7px;
    border-radius: 10px;
}

.link-share-url {
    font-size: 12px;
    color: var(--clr-text-muted);
    word-break: break-all;
    flex: 1;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-share-btn {
    padding: 10px 18px;
    background: var(--grad-accent);
    color: #fff;
    border: 2px solid transparent;
    border-radius: var(--rd-sm);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.link-share-btn:hover {
    box-shadow: var(--sh-md);
    filter: brightness(1.08);
}

.link-share-btn:active {
    transform: scale(0.97);
}

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

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

.pg-btn {
    display: inline-block;
    padding: 7px 13px;
    border-radius: var(--rd-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--ease);
    min-width: 36px;
    text-align: center;
}

.pg-btn-link {
    background: var(--clr-bg-card);
    color: var(--clr-text);
    border: 1px solid var(--clr-line);
}

.pg-btn-link:hover {
    background: var(--clr-main);
    border-color: var(--clr-main);
    color: #fff;
}

.pg-btn-cur {
    background: var(--grad-main);
    color: #fff;
    border: 1px solid var(--clr-main);
    cursor: default;
}

/* ===== FOOTER ===== */
.pg-footer {
    padding: 20px 0;
    text-align: center;
    border-top: 2px solid var(--clr-line);
    margin-top: 20px;
    background: var(--clr-bg-card);
}

.pg-footer p {
    margin: 6px 0;
    color: var(--clr-text-muted);
    font-size: 12px;
}

.pg-footer a {
    color: var(--clr-text-muted);
    text-decoration: none;
    transition: var(--ease);
}

.pg-footer a:hover {
    color: var(--clr-main);
}

/* ===== FRIENDLY LINKS ===== */
.flink-wrap {
    padding: 10px 12px;
    background: var(--clr-bg-card);
    border-radius: var(--rd);
    border: 1px solid var(--clr-line);
}

.flink-wrap dl {
    margin: 0;
}

.flink-wrap dd {
    display: inline-block;
    margin: 3px;
}

.flink-wrap a {
    color: var(--clr-main-dk);
    text-decoration: none;
    transition: var(--ease);
    font-size: 13px;
}

.flink-wrap a:hover {
    color: var(--clr-accent);
}

/* ===== UTILITIES ===== */
.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

.show-pc { display: block; }
.show-mb { display: none; }

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

/* legacy compat aliases */
.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; } }

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

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

    .pg-header {
        padding: 6px 0;
    }

    .pg-site-name {
        font-size: 20px;
    }

    .pg-domain-badge {
        padding: 4px 10px;
    }

    .pg-domain-tag {
        font-size: 9px;
    }

    .pg-domain-val {
        font-size: 14px;
    }

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

    /* Mobile nav: label 15% + links 85%, 4 per row */
    .nav-strip {
        display: flex;
        align-items: stretch;
    }

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

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

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

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

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

    .search-panel {
        padding: 8px;
    }

    .search-panel form {
        gap: 5px;
    }

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

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

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

    .film-section {
        margin-bottom: 10px;
    }

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

    .dl-actions {
        padding: 10px 6px;
        margin: 10px 0;
        gap: 6px;
    }

    .dl-btn {
        padding: 9px 14px;
        font-size: 13px;
    }

    .link-share-box {
        padding: 10px;
        margin: 10px 0;
        gap: 7px;
    }

    .link-share-display {
        padding: 8px 10px;
    }

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

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

    .link-share-btn {
        padding: 9px 11px;
        font-size: 12px;
        gap: 4px;
    }

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

@media (max-width: 480px) {
    .pg-site-name {
        font-size: 18px;
    }

    .pg-domain-val {
        font-size: 13px;
    }

    .nav-zone-lbl {
        width: 15%;
        font-size: 10px;
        padding: 5px 2px;
    }

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

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

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

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

    .search-panel button {
        padding: 7px 7px;
        font-size: 11px;
    }

    .dl-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* Large screens: ensure 4-column grid */
@media (min-width: 769px) {
    .film-list-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
