/* Video Site Template — Microsoft Teams Lavender/Purple Style */

:root {
    --tm-purple: #6264a7;
    --tm-purple-deep: #464775;
    --tm-purple-mid: #7b7dc4;
    --tm-purple-light: #dfe0f5;
    --tm-purple-pale: #f0f0fb;
    --tm-blue: #5558af;
    --tm-blue-btn: #6264a7;
    --tm-lavender: #e8eaf6;
    --tm-lavender-mid: #d8daf0;
    --tm-white: #ffffff;
    --tm-off-white: #f7f8fc;
    --tm-surface: #ffffff;
    --tm-bg: #f3f3f8;
    --tm-card-bg: #f7f7fc;
    --tm-line: #e2e3f0;
    --tm-line-strong: #cccde8;
    --tm-ink: #1f1f3a;
    --tm-ink-sub: #3b3b5c;
    --tm-ink-muted: #7a7a9d;
    --tm-ink-faint: #b0b0cc;
    --radius: 12px;
    --radius-sm: 6px;
    --radius-xs: 4px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    --ease: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-xs: 0 1px 4px rgba(98,100,167,0.07), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 10px rgba(98,100,167,0.10), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 20px rgba(98,100,167,0.14), 0 2px 6px rgba(0,0,0,0.05);
    --shadow-lg: 0 8px 36px rgba(98,100,167,0.18), 0 4px 10px rgba(0,0,0,0.06);
    --purple-glow: rgba(98, 100, 167, 0.14);
}

* { 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', 'Segoe UI', sans-serif;
    background: var(--tm-bg);
    color: var(--tm-ink);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
}

/* ===== HEADER ===== */
.tm-header {
    background: var(--tm-white);
    border-bottom: 1px solid var(--tm-line);
    padding: 10px 0;
    box-shadow: 0 1px 6px rgba(98,100,167,0.07);
}

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

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

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

/* Teams-style four-square grid logo */
.tm-logo-mark {
    width: 34px;
    height: 34px;
    background: var(--tm-purple);
    border-radius: var(--radius-sm);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    padding: 7px;
    flex-shrink: 0;
}

.tm-logo-mark span {
    display: block;
    background: rgba(255,255,255,0.9);
    border-radius: 2px;
}

.tm-site-name {
    font-size: 21px;
    font-weight: 600;
    color: var(--tm-ink);
    letter-spacing: -0.2px;
    font-style: normal;
    text-decoration: none;
    line-height: 1.2;
}

.tm-domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--tm-purple-pale);
    border: 1.5px solid var(--tm-purple-light);
    border-radius: var(--radius-pill);
    padding: 6px 18px;
    transition: var(--ease);
}

.tm-domain-badge:hover {
    background: var(--tm-lavender);
    border-color: var(--tm-lavender-mid);
}

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

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

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

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

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

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

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

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

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

/* PC: label takes auto width, links fill remainder */
.nav-row .nav-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--tm-white);
    background: var(--tm-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.1px;
}

.nav-row .nav-links {
    flex: 1;
    display: flex;
    flex-wrap: nowrap;   /* PC: single row, all 8 fill width */
    gap: 6px;
    padding: 8px 10px;
    align-items: center;
}

/* PC: each of 8 links fills equal width across the row */
.nav-row .nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tm-ink-sub);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--radius-sm);
    transition: var(--ease);
    background: var(--tm-card-bg);
    border: 1px solid var(--tm-line);
    white-space: nowrap;
    text-align: center;
    flex: 1 1 0;          /* all 8 share width equally, filling 100% */
    min-width: 0;
    font-size: 13px;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.nav-row .nav-links a.active {
    background: var(--tm-purple);
    color: var(--tm-white);
    border-color: var(--tm-purple);
    font-weight: 600;
    box-shadow: 0 2px 8px var(--purple-glow);
}

/* ===== SEARCH ===== */
.seach {
    background: var(--tm-surface);
    border-radius: var(--radius-lg);
    padding: 12px;
    margin-bottom: 6px;
    border: 1px solid var(--tm-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(--tm-line-strong);
    border-radius: var(--radius-pill);
    background: var(--tm-card-bg);
    color: var(--tm-ink);
    font-size: 14px;
    font-family: inherit;
    transition: var(--ease);
    outline: none;
}

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

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

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

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

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

.grid-item {
    padding: 5px 13px;
    background: var(--tm-card-bg);
    border-radius: var(--radius-pill);
    color: var(--tm-ink-sub);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ease);
    border: 1px solid var(--tm-line);
}

.grid-item:hover {
    background: var(--tm-purple-pale);
    color: var(--tm-purple);
    border-color: var(--tm-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(--tm-line);
    position: relative;
}

.mhlleset-heading::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 44px;
    height: 3px;
    background: linear-gradient(90deg, var(--tm-purple) 0%, var(--tm-purple-mid) 100%);
    border-radius: 2px;
}

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

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

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

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

.thumbnail2-group li {
    animation: tmReveal 0.4s 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 tmReveal {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

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

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

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

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

/* Purple play orb */
.thumbnail2::before {
    content: '▶';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    z-index: 2;
    color: white;
    font-size: 18px;
    background: var(--tm-purple);
    width: 46px; height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--ease);
    line-height: 46px;
    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(70,71,117,0.6) 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(--tm-ink-sub);
}

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

.video-info h5 a:hover { color: var(--tm-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(--tm-purple-pale);
    border-radius: var(--radius-lg);
    border: 1px solid var(--tm-purple-light);
    box-shadow: var(--shadow-xs);
}

.pg-titlebar a {
    color: var(--tm-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(--tm-surface);
    border-radius: var(--radius-lg);
    margin: 8px 0;
    border: 1px solid var(--tm-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(--tm-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--tm-line);
    box-shadow: var(--shadow-xs);
}

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

.down_btn:hover {
    background: var(--tm-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(--tm-surface);
    border-radius: var(--radius-lg);
    margin: 8px 0;
    border: 1px solid var(--tm-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(--tm-card-bg);
    padding: 9px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--tm-line-strong);
    overflow: hidden;
}

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

.share-url {
    font-size: 12px;
    color: var(--tm-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-pill);
    background: var(--tm-purple);
    color: var(--tm-white);
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: var(--ease);
    box-shadow: 0 2px 8px var(--purple-glow);
    flex-shrink: 0;
    white-space: nowrap;
}

.share-copy-btn:hover {
    background: var(--tm-purple-deep);
    box-shadow: var(--shadow-sm);
    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(--tm-surface);
    color: var(--tm-ink-sub);
    border: 1px solid var(--tm-line-strong);
}

.a_page_info:hover {
    background: var(--tm-purple-pale);
    border-color: var(--tm-purple-light);
    color: var(--tm-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(--tm-purple);
    color: var(--tm-white);
    border: 1px solid var(--tm-purple);
    cursor: default;
    font-weight: 700;
    box-shadow: 0 2px 8px var(--purple-glow);
}

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

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

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

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

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

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

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

.footer a:hover { color: var(--tm-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 (≤768px) ===== */
@media (max-width: 768px) {
    .tm-wrap { padding: 0 8px; }
    .tm-header { padding: 8px 0; }
    .tm-header-inner { gap: 8px; }
    .tm-site-name { font-size: 18px; }

    .tm-domain-badge { padding: 5px 14px; gap: 8px; }
    .tm-domain-tag { font-size: 9px; padding: 2px 7px; }
    .tm-domain-addr { font-size: 15px; }

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

    /* ---- Mobile nav: 15% label (4 chars visible) + 85% links ---- */
    /* Label: fixed 15% width, font sized to fit 4 Chinese chars     */
    .nav-row .nav-label {
        width: 15%;
        flex-shrink: 0;
        font-size: 11px;
        padding: 8px 2px;
        letter-spacing: 0;
        line-height: 1.4;
        word-break: keep-all;   /* keep Chinese chars together per word */
        white-space: normal;    /* allow wrap if needed */
        text-align: center;
    }

    /* Links area: 85%, wrap into 2 rows of 4 */
    .nav-row .nav-links {
        width: 85%;
        flex-wrap: wrap;        /* allow wrapping to 2 rows */
        gap: 4px;
        padding: 6px 5px;
    }

    /* Each link: exactly 4 per row (2 rows for 8 items) */
    .nav-row .nav-links a {
        flex: none;                          /* override PC flex:1 */
        width: calc((100% - 12px) / 4);     /* 4 per row, 3 gaps of 4px */
        font-size: 12px;
        padding: 5px 2px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

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

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

    .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) {
    .tm-site-name { font-size: 16px; }
    .tm-domain-addr { font-size: 13px; }

    /* Keep 15% label / 85% links ratio on small phones */
    .nav-row .nav-label {
        width: 15%;
        font-size: 10px;
        padding: 8px 1px;
    }

    /* 4 per row still, adjust gap calculation for tighter screens */
    .nav-row .nav-links {
        width: 85%;
        gap: 3px;
    }

    .nav-row .nav-links a {
        width: calc((100% - 9px) / 4);   /* 4 per row, 3 gaps of 3px */
        font-size: 11px;
        padding: 4px 1px;
    }

    .thumbnail2-group { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .video-info h5 { font-size: 12px; }
    .mhlleset-title { font-size: 15px; }

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

    .down_btn { padding: 9px 14px; font-size: 12px; }
}

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