/* Video Site Template — LDS Church Elegant White/Purple Style */

:root {
    --lds-purple: #4a1a6b;
    --lds-purple-deep: #350f50;
    --lds-purple-mid: #6b2d9a;
    --lds-purple-light: #ede0f5;
    --lds-purple-pale: #f7f0fc;
    --lds-teal: #006e8c;
    --lds-teal-light: #d0edf5;
    --lds-gold: #b8962e;
    --lds-gold-light: #f5edcc;
    --lds-white: #ffffff;
    --lds-off-white: #fafafa;
    --lds-surface: #ffffff;
    --lds-bg: #f8f8f8;
    --lds-line: #e8e4ed;
    --lds-line-strong: #d4cce0;
    --lds-ink: #1a1a2e;
    --lds-ink-sub: #3d3550;
    --lds-ink-muted: #7a6e8a;
    --lds-ink-faint: #b8aec8;
    --radius: 4px;
    --radius-sm: 2px;
    --radius-lg: 8px;
    --radius-pill: 999px;
    --ease: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-xs: 0 1px 4px rgba(74,26,107,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 10px rgba(74,26,107,0.08), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 20px rgba(74,26,107,0.12), 0 2px 6px rgba(0,0,0,0.05);
    --shadow-lg: 0 8px 36px rgba(74,26,107,0.16), 0 4px 10px rgba(0,0,0,0.06);
    --purple-glow: rgba(74, 26, 107, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC', Georgia, serif;
    background: var(--lds-bg);
    color: var(--lds-ink);
    line-height: 1.65;
    font-size: 14px;
    overflow-x: hidden;
}

/* ===== HEADER ===== */
.lds-header {
    background: var(--lds-white);
    border-bottom: 3px solid var(--lds-purple);
    padding: 10px 0;
    box-shadow: 0 1px 8px rgba(74,26,107,0.08);
}

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

.lds-brand-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: var(--ease);
}

.lds-brand-link:hover { opacity: 0.82; }

/* Church-style square emblem */
.lds-logo-mark {
    width: 38px;
    height: 38px;
    background: var(--lds-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    border-radius: var(--radius-sm);
}

.lds-logo-mark::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.85);
    border-radius: 50%;
}

.lds-logo-mark::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background: var(--lds-gold);
    border-radius: 1px;
}

.lds-site-name {
    font-size: 21px;
    font-weight: 700;
    color: var(--lds-ink);
    letter-spacing: -0.1px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
    line-height: 1.25;
}

/* Gold accent underline on site name */
.lds-site-name::after {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    background: var(--lds-purple);
    margin-top: 2px;
    border-radius: 1px;
}

.lds-domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--lds-purple-pale);
    border: 1.5px solid var(--lds-line);
    border-radius: var(--radius);
    padding: 7px 18px;
    box-shadow: var(--shadow-xs);
}

.lds-domain-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--lds-white);
    background: var(--lds-purple);
    border-radius: var(--radius-sm);
    padding: 2px 9px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.lds-domain-addr {
    font-size: 18px;
    font-weight: 700;
    color: var(--lds-purple-deep);
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    letter-spacing: 0.2px;
}

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

.lds-seg {
    padding: 6px 0;
}

/* ===== BANNER ===== */
.lds-banner-zone {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 4px 0;
    box-shadow: var(--shadow-sm);
}

.lds-banner-zone img {
    display: block;
    width: 100%;
}

/* ===== NAVIGATION ===== */
.lds-nav-panel {
    background: var(--lds-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 6px;
    border: 1px solid var(--lds-line);
    box-shadow: var(--shadow-xs);
}

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

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

/* PC: label takes natural width, links fill rest */
.nav-row .nav-label {
    font-weight: 700;
    font-size: 13px;
    color: var(--lds-white);
    background: var(--lds-purple);
    white-space: nowrap;
    flex-shrink: 0;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    letter-spacing: 0.2px;
}

.nav-row .nav-links {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 10px;
    align-items: center;
}

/* PC: 8 links fill the full row */
.nav-row .nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--lds-ink-sub);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--radius-sm);
    transition: var(--ease);
    background: var(--lds-off-white);
    border: 1px solid var(--lds-line);
    white-space: nowrap;
    text-align: center;
    /* 8 items with 7 gaps of 5px = 35px total gap */
    flex: 1 1 calc((100% - 35px) / 8);
    max-width: calc((100% - 35px) / 8);
    font-size: 13px;
    font-weight: 400;
}

.nav-row .nav-links a:hover {
    background: var(--lds-purple-pale);
    color: var(--lds-purple);
    border-color: var(--lds-purple-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-xs);
}

.nav-row .nav-links a.active {
    background: var(--lds-purple);
    color: var(--lds-white);
    border-color: var(--lds-purple);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* ===== SEARCH ===== */
.seach {
    background: var(--lds-surface);
    border-radius: var(--radius-lg);
    padding: 12px;
    margin-bottom: 6px;
    border: 1px solid var(--lds-line);
    box-shadow: var(--shadow-xs);
}

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

.seach input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 9px 15px;
    border: 1.5px solid var(--lds-line-strong);
    border-radius: var(--radius-sm);
    background: var(--lds-off-white);
    color: var(--lds-ink);
    font-size: 14px;
    font-family: inherit;
    transition: var(--ease);
    outline: none;
}

.seach input[type="text"]:focus {
    border-color: var(--lds-purple);
    background: var(--lds-white);
    box-shadow: 0 0 0 3px var(--purple-glow);
}

.seach input[type="text"]::placeholder { color: var(--lds-ink-faint); }

.seach button {
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--lds-purple);
    color: var(--lds-white);
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.seach button:hover {
    background: var(--lds-purple-deep);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* ===== KEYWORD TAGS ===== */
.grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 12px;
    background: var(--lds-surface);
    border-radius: var(--radius-lg);
    margin-bottom: 6px;
    border: 1px solid var(--lds-line);
    box-shadow: var(--shadow-xs);
}

.grid-item {
    padding: 4px 12px;
    background: var(--lds-off-white);
    border-radius: var(--radius-sm);
    color: var(--lds-ink-sub);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ease);
    border: 1px solid var(--lds-line);
}

.grid-item:hover {
    background: var(--lds-purple-pale);
    color: var(--lds-purple);
    border-color: var(--lds-purple-light);
    transform: translateY(-1px);
}

/* ===== SECTION HEADINGS ===== */
.mhlleset { margin-bottom: 10px; }
.mhlleset-main { width: 100%; }

.mhlleset-heading {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--lds-line);
    position: relative;
}

/* Gold-purple double underline like LDS site accent */
.mhlleset-heading::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--lds-purple);
    border-radius: 2px;
}

.mhlleset-heading::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 52px;
    width: 12px;
    height: 3px;
    background: var(--lds-gold);
    border-radius: 2px;
}

.mhlleset-title {
    font-size: 19px;
    font-weight: 700;
    margin: 0;
    color: var(--lds-ink);
    letter-spacing: -0.1px;
}

.mhlleset-title a {
    color: var(--lds-ink);
    text-decoration: none;
    transition: var(--ease);
}

.mhlleset-title a:hover { color: var(--lds-purple); }

/* ===== FILM GRID — PC: 4 per row ===== */
.thumbnail2-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    list-style: none;
    padding: 0;
}

.thumbnail2-group li {
    animation: ldsReveal 0.45s ease backwards;
}

.thumbnail2-group li:nth-child(1) { animation-delay: 0.03s; }
.thumbnail2-group li:nth-child(2) { animation-delay: 0.06s; }
.thumbnail2-group li:nth-child(3) { animation-delay: 0.09s; }
.thumbnail2-group li:nth-child(4) { animation-delay: 0.12s; }
.thumbnail2-group li:nth-child(5) { animation-delay: 0.15s; }
.thumbnail2-group li:nth-child(6) { animation-delay: 0.18s; }
.thumbnail2-group li:nth-child(7) { animation-delay: 0.21s; }
.thumbnail2-group li:nth-child(8) { animation-delay: 0.24s; }

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

/* 600:350 = 12:7 */
.thumbnail2 {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 12 / 7;
    background: var(--lds-off-white);
    border: 1px solid var(--lds-line);
    box-shadow: var(--shadow-xs);
    transition: var(--ease);
}

.thumbnail2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.thumbnail2:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--lds-purple-light);
    transform: translateY(-3px);
}

.thumbnail2:hover img { transform: scale(1.06); }

/* Purple play button */
.thumbnail2::before {
    content: '▶';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    z-index: 2;
    color: white;
    font-size: 17px;
    background: var(--lds-purple);
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--ease);
    line-height: 44px;
    text-indent: 2px;
    box-shadow: 0 4px 16px var(--purple-glow);
}

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

.thumbnail2::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(53,15,80,0.55) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.thumbnail2:hover::after { opacity: 1; }

.video-info { padding: 8px 2px 4px; }

.video-info h5 {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--lds-ink-sub);
}

.video-info h5 a {
    color: var(--lds-ink-sub);
    text-decoration: none;
    transition: var(--ease);
}

.video-info h5 a:hover { color: var(--lds-purple); }

/* ===== DETAIL TITLE BAR ===== */
.pg-titlebar {
    line-height: 1.7;
    text-align: center;
    padding: 18px 22px;
    font-size: 16px;
    margin: 8px 0;
    word-break: break-all;
    background: var(--lds-purple-pale);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--lds-purple);
    border-top: 1px solid var(--lds-line);
    border-right: 1px solid var(--lds-line);
    border-bottom: 1px solid var(--lds-line);
    box-shadow: var(--shadow-xs);
}

.pg-titlebar a {
    color: var(--lds-purple);
    text-decoration: none;
    font-weight: 700;
    margin-right: 8px;
}

/* ===== TORRENT DETAIL ===== */
.torrent-detail-blk {
    font-size: 15px;
    line-height: 1.9;
    padding: 22px 24px;
    background: var(--lds-surface);
    border-radius: var(--radius-lg);
    margin: 8px 0;
    border: 1px solid var(--lds-line);
    box-shadow: var(--shadow-xs);
}

.torrent-capture-grid picture {
    display: block;
    width: 100%;
}

.torrent-capture-grid picture img,
.torrent-capture-grid img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin-top: 10px;
    box-shadow: var(--shadow-sm);
}

/* ===== DOWNLOAD BUTTONS ===== */
.download {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 10px;
    margin: 8px 0;
    background: var(--lds-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--lds-line);
    box-shadow: var(--shadow-xs);
}

.down_btn {
    display: inline-block;
    padding: 11px 28px;
    border-radius: var(--radius-sm);
    color: var(--lds-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--ease);
    border: none;
    background: var(--lds-purple);
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.1px;
    text-align: center;
}

.down_btn:hover {
    background: var(--lds-purple-deep);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ===== SHARE ===== */
.share-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--lds-surface);
    border-radius: var(--radius-lg);
    margin: 8px 0;
    border: 1px solid var(--lds-line);
    box-shadow: var(--shadow-xs);
    flex-wrap: nowrap;
}

.share-url-display {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    background: var(--lds-off-white);
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--lds-line-strong);
    overflow: hidden;
}

.share-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--lds-purple);
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.share-url {
    font-size: 12px;
    color: var(--lds-ink-muted);
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    background: var(--lds-purple);
    color: var(--lds-white);
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: var(--ease);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    white-space: nowrap;
}

.share-copy-btn:hover {
    background: var(--lds-purple-deep);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

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

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

.a_page_info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: var(--ease);
    min-width: 36px;
    text-align: center;
    text-decoration: none;
    background: var(--lds-surface);
    color: var(--lds-ink-sub);
    border: 1px solid var(--lds-line-strong);
}

.a_page_info:hover {
    background: var(--lds-purple-pale);
    border-color: var(--lds-purple-light);
    color: var(--lds-purple);
}

.page_info_focus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    min-width: 36px;
    background: var(--lds-purple);
    color: var(--lds-white);
    border: 1px solid var(--lds-purple);
    cursor: default;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

/* ===== FRIENDLY LINKS ===== */
.txtguanggao2 {
    padding: 12px;
    background: var(--lds-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--lds-line);
}

.txtguanggao2 dl { margin: 0; }
.txtguanggao2 dd { display: inline-block; margin: 4px; }

.txtguanggao2 a {
    color: var(--lds-purple);
    text-decoration: none;
    transition: var(--ease);
    font-size: 13px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.txtguanggao2 a:hover {
    background: var(--lds-purple-pale);
    color: var(--lds-purple-deep);
}

/* ===== FOOTER ===== */
.footer {
    padding: 22px 0;
    text-align: center;
    border-top: 3px solid var(--lds-purple);
    margin-top: 20px;
    background: var(--lds-white);
}

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

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

.footer a:hover { color: var(--lds-purple); }

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

/* ===== UTILS ===== */
.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 — MOBILE ===== */
@media (max-width: 768px) {
    .lds-wrap { padding: 0 8px; }
    .lds-header { padding: 8px 0; }
    .lds-header-inner { gap: 8px; }
    .lds-site-name { font-size: 18px; }
    .lds-site-name::after { width: 24px; }

    .lds-domain-badge { padding: 5px 13px; gap: 8px; }
    .lds-domain-tag { font-size: 9px; padding: 2px 6px; }
    .lds-domain-addr { font-size: 15px; }

    .lds-seg { padding: 4px 0; }

    /* ---- Mobile nav: 15% label + 85% links, 4 per row × 2 rows ---- */
    .nav-row .nav-label {
        width: 15%;
        flex-shrink: 0;
        flex-basis: 15%;
        /* Override flex: auto from PC */
        flex: 0 0 15%;
        font-size: 10px;
        padding: 8px 2px;
        letter-spacing: 0;
        line-height: 1.3;
        word-break: break-all;
        /* Force all 4 Chinese chars visible */
        writing-mode: horizontal-tb;
        overflow: visible;
        white-space: normal;
        text-align: center;
    }

    .nav-row .nav-links {
        flex: 0 0 85%;
        width: 85%;
        gap: 4px;
        padding: 6px 5px;
    }

    /* Mobile: 4 items per row (2 rows for 8 items) */
    .nav-row .nav-links a {
        font-size: 12px;
        padding: 5px 2px;
        /* 4 items, 3 gaps of 4px = 12px */
        flex: 0 0 calc((100% - 12px) / 4);
        max-width: calc((100% - 12px) / 4);
    }

    /* ---- Search ---- */
    .seach { padding: 10px; }
    .seach form { gap: 6px; }
    .seach input[type="text"] { min-width: 100px; padding: 8px 11px; font-size: 13px; }
    .seach button { padding: 8px 10px; font-size: 12px; }

    /* ---- Film grid: 2 per row on mobile ---- */
    .thumbnail2-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .video-info h5 { font-size: 12px; }
    .mhlleset { margin-bottom: 8px; }
    .mhlleset-title { font-size: 16px; }

    .grid-container { padding: 10px; gap: 5px; }
    .grid-item { padding: 4px 10px; font-size: 12px; }

    .download { padding: 12px 8px; gap: 8px; }
    .down_btn { padding: 10px 18px; font-size: 13px; }

    .share-section { padding: 10px 11px; gap: 7px; }
    .share-url-display { padding: 8px 10px; }
    .share-label { font-size: 10px; }
    .share-url { font-size: 10px; }
    .share-copy-btn { padding: 8px 11px; font-size: 12px; }
    .share-icon { font-size: 14px; }

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

@media (max-width: 480px) {
    .lds-site-name { font-size: 16px; }
    .lds-domain-addr { font-size: 13px; }

    .nav-row .nav-label {
        flex: 0 0 15%;
        width: 15%;
        font-size: 10px;
        padding: 8px 2px;
    }

    .nav-row .nav-links {
        flex: 0 0 85%;
        width: 85%;
    }

    .nav-row .nav-links a {
        font-size: 11px;
        flex: 0 0 calc((100% - 12px) / 4);
        max-width: calc((100% - 12px) / 4);
    }

    .seach input[type="text"] { min-width: 80px; font-size: 12px; }
    .seach button { padding: 8px 8px; font-size: 11px; }

    /* Keep 2-col on small mobile */
    .thumbnail2-group { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .video-info h5 { font-size: 12px; }
    .mhlleset-title { font-size: 15px; }
    .down_btn { padding: 9px 14px; font-size: 12px; }
}

img[data-original] { background: var(--lds-off-white); }
