/* ================================================================
   Morningstar Editorial Style v2
   White · Light-gray panels · Red #e8402a · Blue links #005ca9
   Clean data-driven editorial typography, no external fonts
   ================================================================ */

:root {
    --red:          #e8402a;
    --red-dk:       #c33320;
    --red-pale:     #fdf3f1;
    --blue:         #005ca9;
    --blue-dk:      #004a8a;
    --green:        #00864b;
    --white:        #ffffff;
    --bg:           #f7f7f7;
    --bg2:          #ffffff;
    --bg3:          #f2f2f2;
    --bg4:          #ebebeb;
    --border:       #d5d5d5;
    --border-lt:    #ebebeb;
    --text:         #1a1a1a;
    --text-mid:     #555555;
    --text-dim:     #999999;
    --head:         #111111;
    --r-xs: 2px;
    --r-sm: 4px;
    --r-md: 6px;
    --r-lg: 10px;
    --r-pill: 999px;
    --sh-xs: 0 1px 3px rgba(0,0,0,0.07);
    --sh-sm: 0 2px 8px rgba(0,0,0,0.09);
    --sh-md: 0 4px 16px rgba(0,0,0,0.12);
    --tr: all 0.18s cubic-bezier(0.4,0,0.2,1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial,
                 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── HEADER ──────────────────────────────────────────────────── */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--sh-xs);
    position: relative;
    padding: 10px 0;
}

/* 3 px red top bar — signature Morningstar element */
.site-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--red);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-block {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
}

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

/* Red star circle — Morningstar mark */
.brand-logo-mark {
    width: 30px; height: 30px;
    background: var(--red);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: 15px; font-weight: 900; line-height: 1;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(232,64,42,0.35);
}

.brand-title {
    font-size: 22px;
    font-weight: 700;
    font-style: normal;
    color: var(--head);
    letter-spacing: -0.3px;
    text-decoration: none;
}

.brand-separator {
    width: 1px; height: 26px;
    background: var(--border);
    flex-shrink: 0;
    margin: 0 20px;
}

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

.domain-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-mid);
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.domain-val {
    font-family: 'Courier New', 'Lucida Console', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--red);
    white-space: nowrap;
    letter-spacing: 0.2px;
}

/* ── LAYOUT ──────────────────────────────────────────────────── */
.wrapper { max-width: 1080px; margin: 0 auto; padding: 0 15px; }
.section-wrap { padding: 8px 0; }

/* ── NAV PANEL ───────────────────────────────────────────────── */
.nav-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: var(--sh-xs);
}

.nav-zone {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border-lt);
}
.nav-zone:last-child { border-bottom: none; }

/* Red label — like Morningstar's category pills */
.zone-tag {
    font-size: 12px;
    font-weight: 700;
    font-style: normal;
    color: var(--white);
    background: var(--red);
    width: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    flex-shrink: 0;
    text-align: center;
    white-space: nowrap;
    border-right: none;
}

.zone-links {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 10px;
    align-items: center;
    background: var(--bg3);
}

.zone-links a {
    display: inline-block;
    color: var(--blue);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--r-xs);
    transition: var(--tr);
    background: var(--white);
    border: 1px solid var(--border);
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.zone-links a:hover {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
    box-shadow: 0 2px 8px rgba(232,64,42,0.22);
}

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

/* ── SEARCH ──────────────────────────────────────────────────── */
.search-module {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px 14px;
    margin-bottom: 8px;
    box-shadow: var(--sh-xs);
}

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

.search-module input[type="text"] {
    flex: 1;
    min-width: 60px;
    padding: 9px 15px;
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    background: var(--bg3);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: var(--tr);
    font-family: inherit;
}

.search-module input[type="text"]:focus {
    border-color: var(--red);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(232,64,42,0.1);
}

.search-module input::placeholder { color: var(--text-dim); }

.search-module button {
    padding: 9px 14px;
    border: none;
    border-radius: var(--r-pill);
    background: var(--red);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--tr);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.search-module button:hover {
    background: var(--red-dk);
    box-shadow: 0 3px 10px rgba(232,64,42,0.3);
}

/* ── HOT TAGS ────────────────────────────────────────────────── */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    padding: 10px 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    margin-bottom: 8px;
    box-shadow: var(--sh-xs);
}

.tag-cloud-item {
    padding: 4px 13px;
    background: var(--bg3);
    border-radius: var(--r-sm);
    color: var(--blue);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--tr);
    border: 1px solid var(--border);
}

.tag-cloud-item:hover {
    background: var(--red-pale);
    color: var(--red);
    border-color: var(--red);
}

/* ── SECTION HEADINGS ────────────────────────────────────────── */
.media-block { margin-bottom: 14px; }

.media-block-head {
    margin-bottom: 12px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--border);
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

/* Red accent line — Morningstar section underline */
.media-block-head::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0;
    width: 40px; height: 2px;
    background: var(--red);
}

.media-block-title {
    font-size: 18px;
    font-weight: 700;
    font-style: normal;
    margin: 0;
    color: var(--head);
    letter-spacing: -0.2px;
}

.media-block-title a { color: var(--head); text-decoration: none; transition: var(--tr); }
.media-block-title a:hover { color: var(--red); }

/* ── CARD GRID ───────────────────────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    list-style: none;
    padding: 0;
}

.card-grid li { position: relative; }

.card-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--r-sm);
    aspect-ratio: 600 / 350;
    background: var(--bg3);
    border: 1px solid var(--border);
    box-shadow: var(--sh-xs);
    transition: var(--tr);
}

.card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.36s cubic-bezier(0.4,0,0.2,1);
    display: block;
}

.card-thumb::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(20,20,20,0.75) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.2s;
}

.card-thumb:hover { box-shadow: var(--sh-sm); border-color: var(--red); }
.card-thumb:hover img { transform: scale(1.04); }
.card-thumb:hover::after { opacity: 1; }

/* Article-style red badge on hover */
.card-thumb::before {
    content: '▶ 播放';
    position: absolute;
    bottom: 9px; left: 9px;
    background: var(--red);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--r-xs);
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s;
    letter-spacing: 0.3px;
}

.card-thumb:hover::before { opacity: 1; }

.card-caption { padding: 8px 0; }

.card-caption h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    font-style: normal;
    line-height: 1.45;
}

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

.card-caption h5 a:hover {
    color: var(--red);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── PLAYER ──────────────────────────────────────────────────── */
.player-wrap {
    width: 100%; margin-bottom: 14px;
    background: #000;
    border-radius: var(--r-sm);
    overflow: hidden;
    box-shadow: var(--sh-md);
    border: 1px solid var(--border);
}

.player-wrap iframe,
.player-wrap video,
.player-wrap #video-container { width: 100%; border: none; display: block; }

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

/* ── DETAIL TITLE BAR ────────────────────────────────────────── */
.detail-title-bar {
    line-height: 1.7;
    text-align: center;
    padding: 16px 20px;
    font-size: 16px;
    margin: 12px 0;
    word-break: break-all;
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 3px solid var(--red);
    border-radius: var(--r-sm);
    box-shadow: var(--sh-xs);
}

.detail-title-bar a {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 700;
    margin-right: 8px;
}

/* ── TORRENT INFO ────────────────────────────────────────────── */
.torrent-info-box {
    font-size: 15px;
    font-style: normal;
    line-height: 1.9;
    padding: 20px 22px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    margin: 12px 0;
    box-shadow: var(--sh-xs);
}

.torrent-preview-wrap { margin-top: 12px; }
.torrent-preview-wrap picture,
.torrent-preview-wrap picture img { display: block; width: 100%; }
.torrent-preview-wrap img {
    width: 100%; height: auto;
    border-radius: var(--r-xs);
    border: 1px solid var(--border);
    display: block;
}

/* ── DOWNLOAD BUTTONS ────────────────────────────────────────── */
.btn-group {
    padding: 16px 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    margin: 12px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    box-shadow: var(--sh-xs);
}

.action-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--red);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--r-pill);
    font-weight: 700;
    font-size: 14px;
    transition: var(--tr);
    border: 2px solid var(--red);
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.2px;
}

.action-btn:hover {
    background: var(--red-dk);
    border-color: var(--red-dk);
    box-shadow: 0 3px 12px rgba(232,64,42,0.35);
    transform: translateY(-1px);
}

/* ── SHARE PANEL ─────────────────────────────────────────────── */
.link-share-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 14px 16px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--sh-xs);
}

.link-display-box {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    padding: 9px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

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

.link-url-text {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--text-mid);
    word-break: break-all;
    flex: 1;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-copy-btn {
    padding: 9px 18px;
    background: var(--red);
    color: var(--white);
    border: 2px solid var(--red);
    border-radius: var(--r-pill);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--tr);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.link-copy-btn:hover { background: var(--red-dk); border-color: var(--red-dk); transform: translateY(-1px); }
.link-copy-btn:active { transform: scale(0.97); }
.icon-clip { font-size: 15px; }

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

.pg-link {
    display: inline-block;
    padding: 6px 13px;
    border-radius: var(--r-sm);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-size: 13px;
    font-weight: 600;
    transition: var(--tr);
    min-width: 34px;
    text-align: center;
    background: var(--white);
    color: var(--blue);
    border: 1px solid var(--border);
}

.pg-link:hover {
    background: var(--red-pale);
    border-color: var(--red);
    color: var(--red);
    text-decoration: none;
}

.pg-current {
    background: var(--red);
    color: var(--white);
    border: 1px solid var(--red);
    cursor: default;
    text-decoration: none;
    font-weight: 700;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
    padding: 20px 0;
    text-align: center;
    margin-top: 18px;
    background: var(--head);
    border-top: 3px solid var(--red);
}

.site-footer p { margin: 5px 0; color: rgba(255,255,255,0.5); font-size: 13px; }
.site-footer a { color: rgba(255,255,255,0.5); text-decoration: none; transition: var(--tr); }
.site-footer a:hover { color: rgba(255,255,255,0.85); text-decoration: underline; }

.friend-links-wrap {
    padding: 10px 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    box-shadow: var(--sh-xs);
}

.friend-links-wrap dl { margin: 0; }
.friend-links-wrap dd { display: inline-block; margin: 3px 6px; }
.friend-links-wrap a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; font-size: 13px; transition: var(--tr); }
.friend-links-wrap a:hover { color: var(--red); }
.pd5 { padding: 2px 0; display: inline-block; }

/* ── UTILITIES ───────────────────────────────────────────────── */
.clearfix::after { content: ""; display: table; clear: both; }
.vis-pc  { display: block; }
.vis-mob { display: block; }
img[data-original] { background: var(--bg3); }

/* ── RESPONSIVE ≤ 768px ──────────────────────────────────────── */
@media (max-width: 768px) {
    .wrapper { padding: 0 8px; }
    .site-header { padding: 8px 0; }
    .brand-logo-mark { width: 24px; height: 24px; font-size: 11px; }
    .brand-title { font-size: 18px; }
    .brand-separator { height: 20px; margin: 0 12px; }
    .domain-tag { font-size: 10px; }
    .domain-val { font-size: 15px; }
    .section-wrap { padding: 6px 0; }

    /* Nav: zone-tag 15%, links 85%, 4 per row = 2 rows of 4 */
    .zone-tag {
        width: 15%;
        font-size: 10px;
        padding: 8px 2px;
        text-align: center;
        line-height: 1.3;
    }
    .zone-links {
        width: 85%;
        gap: 4px;
        padding: 6px 5px;
    }
    .zone-links a {
        font-size: 12px;
        padding: 4px 2px;
        width: calc((100% - 12px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    /* Search: single row, no wrap */
    .search-module { padding: 9px 10px; }
    .search-module form { flex-wrap: nowrap; gap: 5px; }
    .search-module input[type="text"] { min-width: 55px; padding: 8px 10px; font-size: 13px; }
    .search-module button { padding: 8px 9px; font-size: 12px; }

    /* Cards: 2 per row */
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .card-caption h5 { font-size: 12px; }
    .media-block { margin-bottom: 12px; }
    .media-block-title { font-size: 16px; }
    .tag-cloud { padding: 8px 10px; gap: 5px; }
    .tag-cloud-item { font-size: 12px; padding: 4px 10px; }
    .btn-group { padding: 12px 8px; gap: 8px; }
    .action-btn { padding: 9px 14px; font-size: 13px; }
    .link-share-panel { padding: 10px 10px; gap: 7px; }
    .link-display-box { padding: 8px 10px; }
    .link-label-text { font-size: 11px; }
    .link-url-text { font-size: 10px; }
    .link-copy-btn { padding: 8px 11px; font-size: 12px; }
    .pager-row { gap: 3px; padding: 12px 0; }
    .pg-link { padding: 5px 10px; font-size: 12px; min-width: 30px; }
    .site-footer { padding: 15px 0; margin-top: 14px; }
}

/* ── RESPONSIVE ≤ 480px ──────────────────────────────────────── */
@media (max-width: 480px) {
    .brand-logo-mark { width: 20px; height: 20px; font-size: 10px; }
    .brand-title { font-size: 15px; }
    .domain-val { font-size: 13px; }
    .domain-tag { font-size: 9px; }
    .brand-separator { margin: 0 10px; height: 18px; }
    .zone-tag { width: 15%; font-size: 10px; padding: 6px 2px; }
    .zone-links { width: 85%; gap: 3px; padding: 5px 4px; }
    .zone-links a { font-size: 12px; padding: 4px 1px; width: calc((100% - 9px) / 4); }
    .search-module input[type="text"] { min-width: 45px; padding: 7px 8px; font-size: 12px; }
    .search-module button { padding: 7px 7px; font-size: 11px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .media-block-title { font-size: 15px; }
    .action-btn { padding: 8px 12px; font-size: 12px; }
}

/* ── HIDE UTILITIES ──────────────────────────────────────────── */
@media (max-width: 768px) { .vis-pc  { display: none !important; } }
@media (min-width: 769px) { .vis-mob { display: none !important; } }
