/* TimeStream - Bold Black & Red High Contrast Theme */

:root {
    --rd: #e8002d;
    --rd2: #cc0022;
    --rd3: #ff1a40;
    --rd-pale: rgba(232,0,45,0.10);
    --rd-glow: rgba(232,0,45,0.28);
    --blk: #111111;
    --blk2: #1a1a1a;
    --blk3: #222222;
    --blk4: #2c2c2c;
    --blk5: #0d0d0d;
    --bg: #141414;
    --bg-panel: #1c1c1c;
    --bg-card: #202020;
    --bg-white: #ffffff;
    --bd: rgba(232,0,45,0.2);
    --bd2: rgba(255,255,255,0.09);
    --bd3: rgba(255,255,255,0.05);
    --txt: #ffffff;
    --txt2: #cccccc;
    --txt3: #888888;
    --txt4: #555555;
    --grad: linear-gradient(135deg, #e8002d 0%, #cc0022 100%);
    --grad-btn: linear-gradient(135deg, #e8002d 0%, #b5001c 100%);
    --grad-hover: linear-gradient(135deg, #ff1a40 0%, #e8002d 100%);
    --radius: 6px;
    --radius-sm: 4px;
    --radius-pill: 30px;
    --tr: all 0.22s cubic-bezier(0.4,0,0.2,1);
    --sh: 0 2px 10px rgba(0,0,0,0.5);
    --sh-rd: 0 4px 14px rgba(232,0,45,0.3);
    --sh-card: 0 2px 8px rgba(0,0,0,0.4);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
        'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    background: var(--bg);
    color: var(--txt);
    line-height: 1.55;
    font-size: 15px;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== HEADER ===== */
.site-header {
    background: var(--bg-white);
    padding: 10px 0;
    border-bottom: 4px solid var(--rd);
}

.hd-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.brand-anchor {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--rd);
    color: var(--bg-white);
    font-size: 20px;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    border: 3px solid var(--bg-white);
    outline: 2px solid var(--rd);
    letter-spacing: 0.5px;
    line-height: 1;
}

.brand-name {
    font-size: 24px;
    font-weight: 900;
    color: var(--blk);
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.domain-band {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--rd);
    background: var(--rd-pale);
}

.db-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--rd);
    white-space: nowrap;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.db-url {
    font-size: 18px;
    font-weight: 800;
    color: var(--blk);
    letter-spacing: 0.2px;
}

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

.row-unit { padding: 6px 0; }

/* ===== NAV BOARD ===== */
.nav-board {
    background: var(--bg-panel);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 6px;
    border: 1px solid var(--bd);
    box-shadow: var(--sh-card);
}

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

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

.nav-zone {
    font-size: 13px;
    font-weight: 800;
    color: var(--rd3);
    white-space: nowrap;
    width: 10%;
    text-align: center;
    border-right: 1px solid var(--bd2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    flex-shrink: 0;
    background: rgba(232,0,45,0.06);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.nav-entries {
    font-size: 13px;
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 8px;
    align-items: center;
}

.nav-entries a {
    display: inline-block;
    color: var(--txt2);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--radius-sm);
    transition: var(--tr);
    background: var(--bg-card);
    border: 1px solid var(--bd2);
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 42px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.nav-entries a:hover {
    background: var(--rd);
    color: var(--txt);
    border-color: var(--rd2);
    box-shadow: var(--sh-rd);
}

.nav-entries a.active {
    background: var(--grad-btn);
    color: var(--txt);
    border-color: var(--rd2);
    font-weight: 800;
    box-shadow: var(--sh-rd);
}

/* ===== SEARCH ===== */
.search-unit {
    background: var(--bg-panel);
    border-radius: var(--radius);
    padding: 11px;
    margin-bottom: 6px;
    border: 1px solid var(--bd);
    box-shadow: var(--sh-card);
}

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

.search-unit input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 10px 13px;
    border: 1.5px solid var(--bd2);
    border-radius: var(--radius-sm);
    background: var(--blk3);
    color: var(--txt);
    font-size: 14px;
    transition: var(--tr);
    outline: none;
}

.search-unit input[type="text"]:focus {
    border-color: var(--rd);
    background: var(--blk4);
    box-shadow: 0 0 0 3px var(--rd-pale);
}

.search-unit input[type="text"]::placeholder { color: var(--txt4); }

.search-unit button {
    padding: 10px 13px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--grad-btn);
    color: var(--txt);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: var(--tr);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.search-unit button:hover {
    background: var(--grad-hover);
    box-shadow: var(--sh-rd);
}

/* ===== TAG CLOUDS ===== */
.grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 10px;
    background: var(--bg-panel);
    border-radius: var(--radius);
    margin-bottom: 6px;
    border: 1px solid var(--bd);
    box-shadow: var(--sh-card);
}

.grid-item {
    padding: 4px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-pill);
    color: var(--txt2);
    text-decoration: none;
    font-size: 13px;
    transition: var(--tr);
    border: 1px solid var(--bd2);
    font-weight: 600;
}

.grid-item:hover {
    background: var(--rd);
    color: var(--txt);
    border-color: var(--rd2);
}

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

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

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

.mhlleset-title {
    font-size: 17px;
    font-weight: 800;
    margin: 0;
    color: var(--txt);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

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

.mhlleset-title a:hover { color: var(--rd3); }
.mhlleset-main { width: 100%; }

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

.thumbnail2 {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 60 / 35;
    background: var(--blk3);
    border: 1px solid var(--bd3);
    transition: var(--tr);
    box-shadow: var(--sh-card);
}

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

.thumbnail2::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,10,0.85) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.24s;
    z-index: 1;
}

.thumbnail2:hover::after { opacity: 1; }
.thumbnail2:hover img { transform: scale(1.06); }
.thumbnail2:hover {
    border-color: var(--rd);
    box-shadow: 0 4px 16px var(--rd-glow);
}

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

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

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

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

/* ===== VIDEO PLAYER ===== */
.MacPlayer {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: var(--sh);
}

.video-container {
    width: 100%;
    height: 600px;
    max-height: 600px;
    margin-bottom: 12px;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--sh);
    position: relative;
}

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

/* ===== TORRENT PREVIEW ===== */
.torrent-capture-grid { }

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

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

/* ===== INFO BLOCK ===== */
.entry-info-box {
    font-size: 15px;
    line-height: 1.9;
    padding: 20px;
    background: var(--bg-panel);
    border-radius: var(--radius);
    margin: 10px 0;
    border: 1px solid var(--bd);
    box-shadow: var(--sh-card);
    color: var(--txt);
}

.entry-header-bar {
    line-height: 1.8;
    text-align: center;
    padding: 15px 18px;
    font-size: 15px;
    margin: 10px 0;
    word-break: break-all;
    background: var(--bg-panel);
    border-radius: var(--radius);
    border: 1px solid var(--bd);
    border-top: 4px solid var(--rd);
    box-shadow: var(--sh-card);
    font-weight: 700;
}

.entry-header-bar a {
    color: var(--rd3);
    text-decoration: none;
    font-weight: 800;
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ===== ACTION BUTTONS ===== */
.download {
    text-align: center;
    padding: 14px;
    background: var(--bg-panel);
    border-radius: var(--radius);
    margin: 10px 0;
    border: 1px solid var(--bd);
    box-shadow: var(--sh-card);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.down_btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--grad-btn);
    color: var(--txt);
    text-decoration: none;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: 14px;
    transition: var(--tr);
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.down_btn:hover {
    background: var(--grad-hover);
    box-shadow: var(--sh-rd);
    transform: translateY(-1px);
}

/* ===== SHARE SECTION ===== */
.share-section {
    background: var(--bg-panel);
    border-radius: var(--radius);
    padding: 13px;
    margin: 10px 0;
    border: 1px solid var(--bd);
    box-shadow: var(--sh-card);
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-url-display {
    background: var(--blk3);
    border: 1px solid var(--bd2);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

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

.share-url {
    font-size: 12px;
    color: var(--txt3);
    word-break: break-all;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-copy-btn {
    padding: 9px 16px;
    background: var(--grad-btn);
    color: var(--txt);
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: var(--tr);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.share-copy-btn:hover {
    background: var(--grad-hover);
    box-shadow: var(--sh-rd);
}

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

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

.a_page_info,
.page_info_focus {
    display: inline-block;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: var(--tr);
    min-width: 36px;
    text-align: center;
}

.a_page_info {
    background: var(--bg-panel);
    color: var(--txt2);
    border: 1px solid var(--bd2);
}

.a_page_info:hover {
    background: var(--rd);
    border-color: var(--rd2);
    color: var(--txt);
}

.page_info_focus {
    background: var(--grad-btn);
    color: var(--txt);
    border: 1px solid var(--rd2);
    cursor: default;
}

/* ===== FOOTER ===== */
.footer {
    padding: 20px 0;
    text-align: center;
    border-top: 3px solid var(--rd);
    margin-top: 12px;
    background: var(--blk5);
}

.footer p {
    margin: 5px 0;
    color: var(--txt3);
    font-size: 13px;
}

.footer a {
    color: var(--txt3);
    text-decoration: none;
    transition: var(--tr);
}

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

/* ===== FRIEND LINKS ===== */
.txtguanggao2 {
    padding: 10px;
    background: var(--bg-panel);
    border-radius: var(--radius);
    border: 1px solid var(--bd);
    box-shadow: var(--sh-card);
}

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

.txtguanggao2 a {
    color: var(--txt3);
    text-decoration: none;
    font-size: 13px;
    transition: var(--tr);
}

.txtguanggao2 a:hover { color: var(--rd3); }

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

/* ===== RESPONSIVE 481~768px ===== */
@media (max-width: 768px) {
    .page-wrap { padding: 0 8px; }
    .row-unit { padding: 4px 0; }

    .site-header { padding: 8px 0; }
    .hd-inner { gap: 10px; }
    .brand-badge { font-size: 15px; padding: 3px 8px; }
    .brand-name { font-size: 18px; }
    .domain-band { padding: 4px 11px; gap: 6px; }
    .db-label { font-size: 10px; }
    .db-url { font-size: 15px; }

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

    .nav-zone {
        width: 15%;
        font-size: 10px;
        padding: 7px 3px;
    }

    .nav-entries {
        width: 85%;
        font-size: 13px;
        gap: 4px;
        padding: 7px 4px;
        display: flex;
        flex-wrap: wrap;
    }

    /* 8 items → 2 rows of 4 */
    .nav-entries a {
        font-size: 13px;
        padding: 4px 2px;
        width: calc((100% - 12px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
        text-align: center;
    }

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

    .mhlleset { margin-bottom: 10px; }
    .mhlleset-heading { margin-bottom: 8px; }
    .mhlleset-title { font-size: 14px; }

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

    /* search - single row no wrap */
    .search-unit { padding: 8px; }
    .search-unit form { flex-wrap: nowrap; gap: 5px; }
    .search-unit input[type="text"] {
        min-width: 0;
        padding: 8px 9px;
        font-size: 13px;
    }
    .search-unit button {
        padding: 8px 9px;
        font-size: 11px;
    }

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

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

    .share-section {
        padding: 9px;
        margin: 8px 0;
        gap: 6px;
        flex-wrap: nowrap;
    }
    .share-url-display { padding: 7px 9px; min-width: 0; flex: 1; }
    .share-label { font-size: 10px; }
    .share-url { font-size: 10px; }
    .share-copy-btn { padding: 7px 10px; font-size: 11px; }

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

    .entry-info-box { padding: 13px; font-size: 14px; }
    .entry-header-bar { padding: 10px 12px; font-size: 14px; }
    .footer { padding: 14px 0; margin-top: 8px; }
}

/* ===== RESPONSIVE <=480px ===== */
@media (max-width: 480px) {
    .brand-badge { font-size: 13px; }
    .brand-name { font-size: 15px; }
    .db-label { font-size: 10px; }
    .db-url { font-size: 14px; }

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

    .nav-entries {
        width: 85%;
        gap: 3px;
        padding: 6px 3px;
    }

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

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

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

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

    .down_btn { padding: 8px 10px; font-size: 11px; }
    .download { gap: 5px; padding: 8px 4px; }

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

/* Loading placeholder */
img[data-original] { background: var(--blk3); }

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