/* Sohu Portal Style - Blue + Orange + White - Video Portal */

:root {
    --blue: #1677ff;
    --blue-dark: #0958d9;
    --blue-deep: #063999;
    --blue-light: #e6f4ff;
    --blue-pale: #f0f7ff;
    --orange: #fa6400;
    --orange-light: #fff3eb;
    --red: #e02020;
    --black: #111111;
    --nav-dark: #222222;
    --white: #ffffff;
    --bg-root: #f5f6f8;
    --bg-panel: #ffffff;
    --bg-card: #fafbfc;
    --text-main: #1a1a1a;
    --text-sub: #333333;
    --text-muted: #888888;
    --text-light: #bbbbbb;
    --border: #e5e8ed;
    --border-blue: #1677ff;
    --shadow: rgba(0,0,0,0.06);
    --shadow-md: rgba(0,0,0,0.11);
    --shadow-lg: rgba(0,0,0,0.2);
    --grad-blue: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
    --grad-blue-h: linear-gradient(135deg, #4096ff 0%, #1677ff 100%);
    --grad-orange: linear-gradient(135deg, #fa6400 0%, #e04a00 100%);
    --rd: 4px;
    --rd-sm: 3px;
    --rd-lg: 8px;
    --ease: all 0.2s ease;
}

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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, Arial, 'Noto Sans SC', sans-serif;
    background: var(--bg-root);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== TOP BAR ===== */
.sx-topbar {
    background: var(--nav-dark);
    padding: 0;
    border-bottom: 1px solid #333;
}

/* ===== HEADER - NOT sticky ===== */
.sx-header {
    background: var(--white);
    border-bottom: 2px solid var(--blue);
    padding: 8px 0;
    box-shadow: 0 1px 4px var(--shadow);
}

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

.sx-branding {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: nowrap;
    justify-content: center;
}

.sx-logo-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--ease);
}

.sx-logo-link:hover { opacity: 0.85; }

.sx-logo-box {
    background: var(--blue);
    border-radius: var(--rd);
    padding: 4px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sx-logo-cn {
    font-size: 20px;
    font-weight: 900;
    color: var(--white);
    letter-spacing: 1px;
    line-height: 1;
}

.sx-sitename {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.2px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
}

.sx-domain-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--blue-pale);
    border: 1px solid var(--blue);
    border-radius: var(--rd);
    padding: 5px 14px;
    flex-shrink: 0;
}

.sx-domain-lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.sx-domain-url {
    font-size: 17px;
    font-weight: 700;
    color: var(--blue-dark);
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

/* ===== WRAPPER ===== */
.sx-wrap { max-width: 1080px; margin: 0 auto; padding: 0 14px; }
.sx-row { padding: 6px 0; }

/* ===== BANNER ===== */
.sx-banner { width: 100%; margin: 4px 0; overflow: hidden; line-height: 0; border-radius: var(--rd-lg); }
.sx-banner img { width: 100%; display: block; }

/* ===== NAVIGATION ===== */
.sx-navboard {
    background: var(--white);
    border-radius: var(--rd-lg);
    overflow: hidden;
    margin-bottom: 6px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px var(--shadow);
}

.sx-navrow {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
}

.sx-navrow:last-child { border-bottom: none; }

.sx-zone-lbl {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
    width: 10%;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 5px;
    flex-shrink: 0;
    background: var(--grad-blue);
}

.sx-navlinks {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 9px 8px;
    align-items: center;
    background: var(--white);
}

.sx-navlinks a {
    display: inline-block;
    color: var(--text-sub);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--rd-sm);
    transition: var(--ease);
    background: var(--bg-root);
    border: 1px solid var(--border);
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
    font-size: 13px;
}

.sx-navlinks a:hover {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

.sx-navlinks a.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.sx-searchbar {
    background: var(--white);
    border-radius: var(--rd-lg);
    padding: 10px 12px;
    margin-bottom: 6px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px var(--shadow);
}

#sxsf { display: flex; gap: 6px; flex-wrap: nowrap; align-items: center; }

#sxsf input[type="text"] {
    flex: 1;
    min-width: 80px;
    padding: 9px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--rd-sm);
    background: var(--bg-root);
    color: var(--text-main);
    font-size: 14px;
    transition: var(--ease);
    outline: none;
    font-family: inherit;
}

#sxsf input[type="text"]:focus {
    border-color: var(--blue);
    background: var(--white);
    box-shadow: 0 0 0 2px rgba(22,119,255,0.12);
}

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

#sxsf button {
    padding: 9px 16px;
    border: none;
    border-radius: var(--rd-sm);
    background: var(--grad-blue);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

#sxsf button:hover {
    background: var(--grad-blue-h);
    box-shadow: 0 3px 10px rgba(22,119,255,0.3);
}

/* ===== TAG CLOUD ===== */
.sx-tagpool {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 9px 12px;
    background: var(--white);
    border-radius: var(--rd-lg);
    margin-bottom: 6px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px var(--shadow);
}

.sx-taglink {
    padding: 4px 11px;
    background: var(--blue-pale);
    border-radius: var(--rd-sm);
    color: var(--blue-dark);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: var(--ease);
    border: 1px solid var(--blue-light);
}

.sx-taglink:hover {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

/* ===== CONTENT BLOCKS ===== */
.sx-block { margin-bottom: 10px; }

.sx-block-inner {
    background: var(--white);
    border-radius: var(--rd-lg);
    border: 1px solid var(--border);
    padding: 14px;
    box-shadow: 0 1px 4px var(--shadow);
}

.sx-block-hd {
    margin-bottom: 12px;
    padding-bottom: 9px;
    border-bottom: 2px solid var(--border);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

.sx-block-hd::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--blue);
    border-radius: 2px;
    margin-right: 10px;
    flex-shrink: 0;
}

.sx-block-hd::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--grad-blue);
}

.sx-block-ttl { font-size: 18px; font-weight: 700; color: var(--text-main); margin: 0; }
.sx-block-ttl a { color: var(--text-main); text-decoration: none; transition: var(--ease); }
.sx-block-ttl a:hover { color: var(--blue); }

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

.sx-filmgrid li { position: relative; }

.sx-filmthumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--rd);
    aspect-ratio: 600 / 350;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

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

.sx-filmthumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(22,119,255,0.55) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sx-filmthumb:hover::after { opacity: 1; }
.sx-filmthumb:hover img { transform: scale(1.06); }
.sx-filmthumb:hover { border-color: var(--blue); box-shadow: 0 4px 16px rgba(22,119,255,0.2); }

.sx-filmlabel { padding: 6px 0 3px; }
.sx-filmlabel h5 { margin: 0; font-size: 13px; font-weight: 500; line-height: 1.4; }

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

.sx-filmlabel h5 a:hover { color: var(--blue); }

/* ===== VIDEO PLAYER ===== */
.sx-player {
    width: 100%;
    height: 620px;
    max-height: 620px;
    background: #000;
    border-radius: var(--rd-lg);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 6px 24px var(--shadow-lg);
    position: relative;
}

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

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

/* ===== TORRENT PREVIEW ===== */
.sx-capture { width: 100%; margin-top: 10px; }
.sx-capture img, .sx-capture .img_item img { width: 100%; height: auto; border-radius: var(--rd-sm); border: 1px solid var(--border); display: block; }
.sx-capture .img_item { width: 100%; }

/* ===== DOWNLOAD BUTTONS ===== */
.sx-dlrow {
    text-align: center;
    padding: 14px;
    background: var(--blue-pale);
    border-radius: var(--rd-lg);
    margin: 12px 0;
    border: 1px solid var(--blue-light);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.down_btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--grad-blue);
    color: #fff;
    text-decoration: none;
    border-radius: var(--rd-sm);
    font-weight: 700;
    font-size: 14px;
    transition: var(--ease);
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    font-family: inherit;
}

.down_btn:hover { background: var(--grad-blue-h); box-shadow: 0 4px 14px rgba(22,119,255,0.35); }

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

.share-url-display {
    background: var(--bg-root);
    border: 1px solid var(--border);
    border-radius: var(--rd-sm);
    padding: 9px 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

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

.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;
    line-height: 1.5;
}

.share-copy-btn {
    padding: 9px 16px;
    background: var(--grad-blue);
    color: #fff;
    border: none;
    border-radius: var(--rd-sm);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.share-copy-btn:hover { background: var(--grad-blue-h); box-shadow: 0 3px 10px rgba(22,119,255,0.3); }
.share-icon { font-size: 15px; }

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

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

.a_page_info { background: var(--white); color: var(--text-main); border: 1px solid var(--border); }
.a_page_info:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.page_info_focus { background: var(--grad-blue); color: #fff; border: 1px solid var(--blue-dark); cursor: default; }

/* ===== FOOTER ===== */
.sx-footer {
    padding: 20px 0;
    text-align: center;
    border-top: 2px solid var(--blue);
    margin-top: 16px;
    background: var(--nav-dark);
}

.sx-footer p { margin: 6px 0; color: #888; font-size: 12px; }
.sx-footer a { color: #888; text-decoration: none; transition: var(--ease); }
.sx-footer a:hover { color: var(--blue-light); }

/* ===== FRIEND LINKS ===== */
.sx-flinks { padding: 10px 12px; background: var(--white); border-radius: var(--rd-lg); border: 1px solid var(--border); }
.sx-flinks dl { margin: 0; }
.sx-flinks dd { display: inline-block; margin: 3px 4px; }
.sx-flinks a { color: var(--text-muted); text-decoration: none; transition: var(--ease); font-size: 13px; }
.sx-flinks a:hover { color: var(--blue); }

/* ===== UTILITIES ===== */
.clearfix::after { content: ""; display: table; clear: both; }
.sxhide-mob { display: block; }
.sxhide-pc { display: block; }

/* ===== TABLET / MOBILE ===== */
@media (max-width: 768px) {
    .sx-wrap { padding: 0 8px; }
    .sx-row { padding: 5px 0; }
    .sx-sitename { font-size: 19px; }
    .sx-branding { gap: 12px; }
    .sx-logo-cn { font-size: 17px; }
    .sx-domain-panel { padding: 4px 10px; gap: 6px; }
    .sx-domain-lbl { font-size: 10px; }
    .sx-domain-url { font-size: 15px; }

    /* Mobile nav: 15% label, 85% links, 4 per row */
    .sx-navrow { display: flex; align-items: stretch; }
    .sx-zone-lbl { width: 15%; font-size: 10px; padding: 7px 2px; text-align: center; }
    .sx-navlinks { width: 85%; gap: 4px; padding: 7px 4px; }
    .sx-navlinks a {
        font-size: 13px;
        padding: 4px 2px;
        text-align: center;
        width: calc((100% - 12px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    /* Search all on one line */
    #sxsf { flex-wrap: nowrap; gap: 5px; }
    #sxsf input[type="text"] { min-width: 80px; padding: 8px 9px; font-size: 13px; }
    #sxsf button { padding: 8px 9px; font-size: 12px; }

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

    .sx-player { height: 56.25vw; max-height: 380px; margin-bottom: 10px; }
    .sx-block-ttl { font-size: 15px; }
    .sx-taglink { font-size: 11px; padding: 3px 9px; }
    .down_btn { padding: 9px 13px; font-size: 13px; }
    .sx-dlrow { padding: 10px 8px; gap: 7px; flex-wrap: nowrap; }
    .share-section { padding: 9px; gap: 7px; flex-wrap: nowrap; }
    .share-url-display { padding: 7px 9px; flex: 1; min-width: 0; }
    .share-label { font-size: 11px; }
    .share-url { font-size: 10px; }
    .share-copy-btn { padding: 8px 10px; font-size: 12px; flex-shrink: 0; }
    .page_info_div { gap: 4px; padding: 12px 0; }
    .a_page_info, .page_info_focus { padding: 6px 10px; font-size: 12px; min-width: 30px; }
    .sxhide-mob { display: none !important; }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 480px) {
    .sx-branding { gap: 8px; }
    .sx-sitename { font-size: 17px; }
    .sx-logo-cn { font-size: 15px; }
    .sx-domain-url { font-size: 13px; }
    .sx-domain-lbl { font-size: 9px; }

    .sx-zone-lbl { width: 15%; font-size: 10px; padding: 5px 2px; }
    .sx-navlinks { width: 85%; gap: 3px; padding: 5px 3px; }
    .sx-navlinks a { font-size: 12px; padding: 3px 1px; width: calc((100% - 9px) / 4); }

    #sxsf input[type="text"] { min-width: 60px; padding: 7px 7px; font-size: 12px; }
    #sxsf button { padding: 7px 7px; font-size: 11px; }

    .sx-filmgrid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
    .sx-filmlabel h5 { font-size: 12px; }
    .sx-block-ttl { font-size: 14px; }
    .down_btn { padding: 8px 9px; font-size: 12px; }
    .sx-dlrow { padding: 8px 4px; gap: 5px; }
    .share-section { padding: 7px; gap: 5px; flex-wrap: nowrap; }
    .share-url-display { padding: 6px 7px; }
    .share-label { font-size: 10px; }
    .share-url { font-size: 10px; }
    .share-copy-btn { padding: 7px 8px; font-size: 11px; }
}

@media (min-width: 769px) { .sxhide-pc { display: none !important; } }

img[data-original] { background: var(--bg-card); }
