/* Film Portal - Navy Official Style */

:root {
    --navy: #333366;
    --navy-dark: #1f1f4e;
    --navy-mid: #3d3d7a;
    --red: #c01111;
    --red-hover: #a00d0d;
    --white: #ffffff;
    --off-white: #f5f5f5;
    --bg-light: #eef0f3;
    --bg-section: #f0f2f5;
    --border-light: #d8dce4;
    --border-mid: #c4c9d4;
    --text-main: #1a1a2e;
    --text-body: #333344;
    --text-muted: #5a5a7a;
    --text-light: #9090aa;
    --shadow-sm: 0 1px 3px rgba(51,51,102,0.10);
    --shadow-md: 0 2px 8px rgba(51,51,102,0.14);
    --shadow-lg: 0 4px 16px rgba(51,51,102,0.18);
    --r: 3px;
    --r-sm: 2px;
    --ease: all 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-body);
    line-height: 1.55;
    font-size: 14px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
.header {
    background: var(--navy-dark);
    border-bottom: 3px solid var(--red);
    padding: 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 8px 14px;
    flex-wrap: nowrap;
}

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

.logo {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.site-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 0.4px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
    line-height: 1;
}

.logo:hover .site-name { color: #f0d080; }

.domain-info {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: var(--r);
    padding: 5px 14px;
}

.domain-label {
    font-size: 11px;
    font-weight: 700;
    color: #f0d080;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.domain-url {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    font-family: 'Courier New', 'Consolas', monospace;
    letter-spacing: 0.3px;
}

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

.content { padding: 8px 0; }

/* ===== NAV ===== */
.nav-container {
    background: var(--navy);
    overflow: hidden;
    margin-bottom: 8px;
    border-bottom: 2px solid var(--red);
}

.nav-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

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

.nav-row .nav-label {
    font-weight: 700;
    font-size: 13px;
    color: #f0d080;
    white-space: nowrap;
    width: 10%;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 5px;
    flex-shrink: 0;
    background: rgba(0,0,0,0.18);
}

.nav-row .nav-links {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 7px 8px;
    align-items: center;
}

.nav-row .nav-links a {
    display: inline-block;
    color: #d8d8ee;
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--r-sm);
    transition: var(--ease);
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    /* PC: 8 links fill row */
    width: calc((100% - 28px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.nav-row .nav-links a:hover {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}

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

/* ===== SEARCH ===== */
.seach {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--navy);
    padding: 10px 12px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}

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

.seach input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 1.5px solid var(--border-mid);
    border-radius: var(--r);
    background: var(--off-white);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: var(--ease);
    font-family: inherit;
}

.seach input[type="text"]:focus {
    border-color: var(--navy);
    background: var(--white);
    box-shadow: 0 0 0 2px rgba(51,51,102,0.15);
}

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

.seach button {
    padding: 8px 13px;
    border: none;
    border-radius: var(--r);
    background: var(--navy);
    color: var(--white);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.seach button:hover { background: var(--red); }
.seach button:active { transform: scale(0.97); }

/* ===== HOT TAGS ===== */
.grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    list-style: none;
    padding: 8px 12px;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-top: 2px solid var(--navy);
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}

.grid-item {
    padding: 3px 10px;
    background: var(--bg-light);
    border: 1px solid var(--border-mid);
    border-radius: var(--r);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    transition: var(--ease);
}

.grid-item:hover {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

/* ===== SECTION HEADING ===== */
.mhlleset { margin-bottom: 12px; }
.mhlleset-main { }

.mhlleset-heading {
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--border-light);
    position: relative;
}

.mhlleset-heading::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--red);
}

.mhlleset-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: var(--navy-dark);
}

.mhlleset-title a { color: var(--navy-dark); text-decoration: none; transition: var(--ease); }
.mhlleset-title a:hover { color: var(--red); }

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

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

.thumbnail2 {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--r);
    aspect-ratio: 600 / 350;
    background: var(--bg-section);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.22s ease;
}

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

.thumbnail2:hover { box-shadow: var(--shadow-lg); }
.thumbnail2:hover img { transform: scale(1.06); }

.thumbnail2::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(31,31,78,0.60) 0%, transparent 52%);
    opacity: 0;
    transition: opacity 0.28s ease;
}

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

.video-info { padding: 6px 0 2px; }

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

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

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

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

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

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

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

.torrent-capture-grid img,
.torrent-capture-grid .img_item img {
    width: 100%;
    height: auto;
    border-radius: var(--r-sm);
    border: 1px solid var(--border-light);
    display: block;
}

.torrent-capture-grid .img_item { width: 100%; }

/* ===== DOWNLOAD BUTTONS ===== */
.download {
    text-align: center;
    padding: 12px;
    background: var(--white);
    border-radius: var(--r);
    margin: 12px 0;
    border: 1px solid var(--border-light);
    border-top: 2px solid var(--navy);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.down_btn {
    display: inline-block;
    padding: 9px 22px;
    background: var(--navy);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--r);
    font-weight: 700;
    font-size: 13px;
    transition: var(--ease);
    border: 2px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.down_btn:hover {
    background: var(--red);
    box-shadow: var(--shadow-md);
}

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

.share-url-display {
    background: var(--off-white);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-sm);
    padding: 8px 11px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
}

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

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

.share-copy-btn {
    padding: 9px 16px;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: var(--r);
    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;
}

.share-copy-btn:hover { background: var(--red); box-shadow: var(--shadow-md); }
.share-copy-btn:active { transform: scale(0.97); }
.share-icon { font-size: 14px; }

/* ===== ITEM HEADLINE ===== */
.item-title-bar {
    line-height: 1.7;
    text-align: center;
    padding: 12px 16px;
    font-size: 16px;
    margin: 12px 0;
    word-break: break-all;
    background: var(--white);
    border-radius: var(--r);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--navy);
    box-shadow: var(--shadow-sm);
}

.item-title-bar a {
    color: var(--navy);
    text-decoration: none;
    font-weight: 700;
    margin-right: 6px;
    transition: var(--ease);
}

.item-title-bar a:hover { color: var(--red); }

/* ===== DETAIL INFO BOX ===== */
.detail-infobox {
    font-size: 14px;
    line-height: 1.9;
    padding: 16px 18px;
    background: var(--white);
    border-radius: var(--r);
    margin: 12px 0;
    border: 1px solid var(--border-light);
    border-top: 2px solid var(--navy);
    box-shadow: var(--shadow-sm);
}

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

.a_page_info,
.page_info_focus {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--r);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--ease);
    min-width: 34px;
    text-align: center;
}

.a_page_info { background: var(--white); color: var(--navy); border: 1px solid var(--border-mid); }
.a_page_info:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.page_info_focus { background: var(--red); color: var(--white); border: 1px solid var(--red); cursor: default; }

/* ===== FOOTER ===== */
.footer {
    padding: 18px 0;
    text-align: center;
    border-top: 2px solid var(--navy);
    margin-top: 16px;
    background: var(--white);
}

.footer p { margin: 5px 0; color: var(--text-muted); font-size: 12px; }
.footer a { color: var(--text-muted); text-decoration: none; transition: var(--ease); }
.footer a:hover { color: var(--red); }

/* ===== FRIEND LINKS ===== */
.txtguanggao2 {
    padding: 9px 12px;
    background: var(--white);
    border-radius: var(--r);
    border: 1px solid var(--border-light);
}

.txtguanggao2 dl { margin: 0; }
.txtguanggao2 dd { display: inline-block; margin: 3px; }
.txtguanggao2 a { color: var(--navy); text-decoration: none; font-size: 13px; transition: var(--ease); }
.txtguanggao2 a:hover { color: var(--red); text-decoration: underline; }
.pd5 { padding: 2px 5px; }

/* ===== SHARE BOX (legacy) ===== */
.share-box {
    background: var(--white);
    border-radius: var(--r);
    padding: 10px 12px;
    margin: 10px 0;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}
.share-box span { color: var(--text-muted); font-size: 13px; word-break: break-all; }
.share-box a { color: var(--navy); text-decoration: none; font-weight: 600; }
.share-box a:hover { color: var(--red); }

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

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

/* lazy load */
img[data-original] { background: var(--bg-section); }

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

    /* Header */
    .header-content { padding: 6px 10px; gap: 10px; }
    .site-branding { gap: 10px; }
    .site-name { font-size: 18px; }
    .domain-info { padding: 4px 10px; gap: 5px; }
    .domain-label { font-size: 10px; }
    .domain-url { font-size: 14px; }

    /* Nav: label 15%, links 85%, MOBILE: 4 per row */
    .nav-row .nav-label {
        width: 15%;
        font-size: 10px;
        padding: 7px 3px;
    }
    .nav-row .nav-links {
        width: 85%;
        gap: 3px;
        padding: 6px 4px;
    }
    .nav-row .nav-links a {
        font-size: 12px;
        padding: 4px 2px;
        /* 4 per row */
        width: calc((100% - 9px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    /* Search: single row, no wrap */
    .seach { padding: 8px 10px; margin-bottom: 6px; }
    .seach form { flex-wrap: nowrap; gap: 5px; }
    .seach input[type="text"] { min-width: 0; padding: 7px 8px; font-size: 13px; }
    .seach button { padding: 7px 9px; font-size: 12px; flex-shrink: 0; }

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

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

    .mhlleset { margin-bottom: 10px; }
    .mhlleset-heading { margin-bottom: 9px; padding-bottom: 6px; }
    .mhlleset-title { font-size: 15px; }

    .grid-container { padding: 7px 10px; gap: 4px; margin-bottom: 6px; }
    .grid-item { padding: 3px 8px; font-size: 11px; }

    /* Download */
    .download { padding: 10px 8px; margin: 10px 0; gap: 6px; flex-wrap: nowrap; }
    .down_btn { padding: 8px 13px; font-size: 13px; }

    /* Share */
    .share-section { padding: 9px 10px; margin: 10px 0; gap: 7px; flex-wrap: nowrap; }
    .share-url-display { padding: 7px 9px; gap: 5px; flex: 1; min-width: 0; }
    .share-label { font-size: 10px; }
    .share-url { font-size: 10px; }
    .share-copy-btn { padding: 8px 10px; font-size: 12px; flex-shrink: 0; }
    .share-icon { font-size: 13px; }

    .video-container { height: 56.25vw; max-height: 360px; margin-bottom: 10px; }

    .page_info_div { padding: 10px 0; gap: 3px; }
    .a_page_info, .page_info_focus { padding: 5px 10px; font-size: 12px; min-width: 30px; }

    .footer { padding: 14px 0; margin-top: 12px; }
    .item-title-bar { padding: 10px 12px; font-size: 14px; margin: 10px 0; }
    .detail-infobox { padding: 12px 14px; font-size: 13px; }
}

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

    .nav-row .nav-label { width: 15%; font-size: 10px; padding: 6px 2px; }
    .nav-row .nav-links { width: 85%; gap: 3px; padding: 5px 3px; }
    /* keep 4 per row, ensure min 13px font */
    .nav-row .nav-links a {
        font-size: 13px;
        padding: 4px 1px;
        width: calc((100% - 9px) / 4);
    }

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

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

    .download { padding: 9px 6px; gap: 5px; }
    .down_btn { padding: 7px 10px; font-size: 12px; }

    .share-section { padding: 8px; gap: 5px; }
    .share-copy-btn { padding: 7px 9px; font-size: 11px; }

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

@media (min-width: 769px) {
    /* PC: 4 columns, 8 nav links fill row */
    .thumbnail2-group { grid-template-columns: repeat(4, 1fr); }
    .nav-row .nav-links a { width: calc((100% - 28px) / 8); }
}
