/* Video Site Template — Microsoft Fluent Design Style */

:root {
    --ms-blue: #0067b8;
    --ms-blue-deep: #005a9e;
    --ms-blue-dark: #004578;
    --ms-blue-light: #deecf9;
    --ms-blue-pale: #eff6fc;
    --ms-teal: #0078d4;
    --ms-teal-light: #c7e0f4;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --gray-100: #f3f2f1;
    --gray-200: #edebe9;
    --gray-300: #d2d0ce;
    --gray-400: #b3b0ad;
    --gray-500: #8a8886;
    --gray-700: #3b3a39;
    --ink: #1b1b1b;
    --ink-sub: #3b3a39;
    --ink-muted: #605e5c;
    --ink-faint: #a19f9d;
    --surface: #ffffff;
    --surface-raised: #faf9f8;
    --page-bg: #ffffff;
    --hero-bg: linear-gradient(160deg, #e8f4fd 0%, #f0f8ff 40%, #ffffff 100%);
    --radius: 12px;
    --radius-sm: 6px;
    --radius-xs: 4px;
    --radius-pill: 999px;
    --ease: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 28px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.07);
    --blue-glow: rgba(0, 103, 184, 0.15);
}

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

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    background: var(--page-bg);
    color: var(--ink);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
}

/* ===== HEADER ===== */
.ms-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 10px 0;
    box-shadow: var(--shadow-xs);
}

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

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

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

/* Four-square logo mark */
.ms-logo-mark {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.ms-logo-mark span {
    display: block;
    border-radius: 2px;
}

.ms-logo-mark span:nth-child(1) { background: #f25022; }
.ms-logo-mark span:nth-child(2) { background: #7fba00; }
.ms-logo-mark span:nth-child(3) { background: #00a4ef; }
.ms-logo-mark span:nth-child(4) { background: #ffb900; }

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

.ms-domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--ms-blue-pale);
    border: 1px solid var(--ms-blue-light);
    border-radius: var(--radius-sm);
    padding: 6px 16px;
}

.ms-domain-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--ms-blue-deep);
    background: var(--ms-blue-light);
    border-radius: var(--radius-xs);
    padding: 2px 8px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    text-transform: uppercase;
}

.ms-domain-addr {
    font-size: 18px;
    font-weight: 600;
    color: var(--ms-blue-dark);
    font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    letter-spacing: 0.2px;
}

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

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

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

.ms-banner-area img {
    display: block;
    width: 100%;
}

/* ===== NAVIGATION ===== */
.ms-nav-grid {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 6px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-xs);
}

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

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

/* PC端: nav-label 自适应宽度，nav-links 占满剩余宽度 */
.nav-row .nav-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--ms-blue-deep);
    background: var(--ms-blue-pale);
    white-space: nowrap;
    min-width: 72px;
    width: auto;
    text-align: center;
    border-right: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 10px;
    flex-shrink: 0;
    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个链接均分占满整行 */
.nav-row .nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-sub);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--radius-xs);
    transition: var(--ease);
    background: var(--off-white);
    border: 1px solid var(--gray-200);
    white-space: nowrap;
    text-align: center;
    flex: 1 1 0;
    min-width: 0;
    font-size: 13px;
    font-weight: 400;
}

.nav-row .nav-links a:hover {
    background: var(--ms-blue-pale);
    color: var(--ms-blue-deep);
    border-color: var(--ms-teal-light);
}

.nav-row .nav-links a.active {
    background: var(--ms-blue);
    color: var(--white);
    border-color: var(--ms-blue);
    font-weight: 600;
}

/* ===== SEARCH ===== */
.seach {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 6px;
    border: 1px solid var(--gray-200);
    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 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-xs);
    background: var(--off-white);
    color: var(--ink);
    font-size: 14px;
    font-family: inherit;
    transition: var(--ease);
    outline: none;
}

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

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

.seach button {
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-xs);
    background: var(--ms-blue);
    color: var(--white);
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.1px;
}

.seach button:hover {
    background: var(--ms-blue-deep);
    box-shadow: var(--shadow-sm);
}

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

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

.grid-item:hover {
    background: var(--ms-blue-pale);
    color: var(--ms-blue-deep);
    border-color: var(--ms-teal-light);
}

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

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

.mhlleset-heading::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 44px;
    height: 2px;
    background: var(--ms-blue);
    border-radius: 1px;
}

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

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

.mhlleset-title a:hover { color: var(--ms-blue); }

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

.thumbnail2-group li {
    animation: msReveal 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 msReveal {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 600:350 = 12:7 */
.thumbnail2 {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 12 / 7;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    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(--ms-teal-light);
    transform: translateY(-2px);
}

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

.thumbnail2::before {
    content: '▶';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    z-index: 2;
    color: white;
    font-size: 20px;
    background: var(--ms-blue);
    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 14px var(--blue-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(0,0,0,0.38) 0%, transparent 52%);
    opacity: 0;
    transition: opacity 0.28s 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.45;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--ink-sub);
}

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

.video-info h5 a:hover { color: var(--ms-blue); }

/* ===== 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(--ms-blue-pale);
    border-radius: var(--radius);
    border: 1px solid var(--ms-blue-light);
}

.pg-titlebar a {
    color: var(--ms-blue);
    text-decoration: none;
    font-weight: 600;
    margin-right: 8px;
}

/* ===== TORRENT DETAIL ===== */
.torrent-detail-blk {
    font-size: 15px;
    line-height: 1.9;
    padding: 22px 24px;
    background: var(--surface);
    border-radius: var(--radius);
    margin: 8px 0;
    border: 1px solid var(--gray-200);
    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(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-xs);
}

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

.down_btn:hover {
    background: var(--ms-blue-deep);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

/* ===== SHARE ===== */
.share-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--surface);
    border-radius: var(--radius);
    margin: 8px 0;
    border: 1px solid var(--gray-200);
    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(--off-white);
    padding: 9px 14px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.share-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ms-blue);
    white-space: nowrap;
    flex-shrink: 0;
}

.share-url {
    font-size: 12px;
    color: var(--ink-muted);
    font-family: '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-xs);
    background: var(--ms-blue);
    color: var(--white);
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: var(--ease);
    flex-shrink: 0;
    white-space: nowrap;
}

.share-copy-btn:hover {
    background: var(--ms-blue-deep);
    box-shadow: var(--shadow-sm);
}

.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-xs);
    font-size: 13px;
    transition: var(--ease);
    min-width: 36px;
    text-align: center;
    text-decoration: none;
    background: var(--surface);
    color: var(--ink-sub);
    border: 1px solid var(--gray-300);
}

.a_page_info:hover {
    background: var(--ms-blue-pale);
    border-color: var(--ms-teal-light);
    color: var(--ms-blue-deep);
}

.page_info_focus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 13px;
    border-radius: var(--radius-xs);
    font-size: 13px;
    min-width: 36px;
    background: var(--ms-blue);
    color: var(--white);
    border: 1px solid var(--ms-blue);
    cursor: default;
    font-weight: 600;
}

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

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

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

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

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

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

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

.footer a:hover { color: var(--ms-blue); }

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

    .ms-domain-badge { padding: 5px 12px; gap: 8px; }
    .ms-domain-tag { font-size: 10px; padding: 2px 6px; }
    .ms-domain-addr { font-size: 15px; }

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

    /*
     * 移动端导航：
     * nav-label 固定 15% 宽，4个汉字竖向排列完整显示；
     * nav-links 占 85%，每行4个链接，共2行（8个链接）。
     */
    .nav-row .nav-label {
        width: 15%;
        min-width: 0;
        font-size: 12px;
        padding: 6px 2px;
        letter-spacing: 0;
        line-height: 1.6;
        /* 4个汉字竖向排列：每字一行 */
        word-break: break-all;
        white-space: normal;
        writing-mode: horizontal-tb;
    }

    .nav-row .nav-links {
        width: 85%;
        flex: none;
        gap: 4px;
        padding: 6px 5px;
        /* 强制每行4个：4列网格 */
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        align-items: center;
    }

    .nav-row .nav-links a {
        font-size: 13px;
        padding: 5px 2px;
        width: 100%;
        flex: none;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .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; }

    /* 移动端影片网格：每行2个 */
    .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: 11px; }
    .share-url { font-size: 10px; }
    .share-copy-btn { padding: 8px 11px; font-size: 12px; }
    .share-icon { font-size: 15px; }

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

    /* 超小屏保持同样的导航布局 */
    .nav-row .nav-label {
        width: 15%;
        font-size: 11px;
        padding: 6px 2px;
    }

    .nav-row .nav-links {
        width: 85%;
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
        padding: 5px 4px;
    }

    .nav-row .nav-links a {
        font-size: 13px;
        padding: 4px 1px;
    }

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

    /* 移动端影片网格：每行2个 */
    .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(--gray-100); }
