/* Fang.com Style - Red Top Nav + White Content + Professional Portal */

:root {
    --red:          #cc2222;
    --red-deep:     #aa1818;
    --red-bright:   #e03030;
    --red-light:    #fff0f0;
    --red-pale:     #fdf5f5;
    --nav-bg:       #cc2222;
    --nav-hover:    #aa1818;
    --body-bg:      #f5f5f5;
    --white:        #ffffff;
    --border:       #e0e0e0;
    --border-lt:    #eeeeee;
    --text:         #333333;
    --text-sub:     #555555;
    --text-muted:   #999999;
    --link:         #333333;
    --link-red:     #cc2222;
    --shadow-xs:    rgba(0,0,0,0.05);
    --shadow-sm:    rgba(0,0,0,0.09);
    --shadow-md:    rgba(0,0,0,0.14);
    --shadow-red:   rgba(204,34,34,0.22);
    --r:            4px;
    --r-sm:         3px;
    --r-lg:         6px;
    --ease:         all 0.18s cubic-bezier(0.4,0,0.2,1);
}

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

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

/* ══════════════════════════════
   TOP NAV BAR  — solid red, Fang.com style
══════════════════════════════ */
.fang-topbar {
    background: var(--nav-bg);
    padding: 0;
    border-bottom: 2px solid var(--red-deep);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.fang-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 10px 14px;
    min-height: 50px;
}

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

.fang-logo-block {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: var(--r-sm);
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.fang-logo-block::before {
    content: '房';
    color: var(--red);
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

.fang-site-name {
    font-size: 20px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.fang-domain-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--r-sm);
    padding: 5px 14px;
}

.fang-domain-cap {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.fang-domain-val {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Courier New', monospace;
}

/* ══════════════════════════════
   CONTAINER
══════════════════════════════ */
.container {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 14px;
}

.content { padding: 10px 0; }

/* ══════════════════════════════
   NAVIGATION ROWS  — white panel, red label
══════════════════════════════ */
.fang-nav-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 3px solid var(--red);
    border-radius: 0 0 var(--r) var(--r);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px var(--shadow-xs);
}

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

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

.nav-row .nav-label {
    width: 9%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 5px;
    background: var(--red);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    word-break: break-all;
    line-height: 1.4;
    border-right: none;
}

.nav-row .nav-links {
    width: 91%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 9px 12px;
    align-items: center;
    background: var(--white);
}

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

.nav-row .nav-links a:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    box-shadow: 0 2px 6px var(--shadow-red);
}

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

/* ══════════════════════════════
   SEARCH BAR  — fang.com portal style
══════════════════════════════ */
.fang-search-strip {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px var(--shadow-xs);
}

.fang-search-strip form {
    display: flex;
    gap: 0;
    align-items: center;
    flex-wrap: nowrap;
}

.fang-search-strip input[type="text"] {
    flex: 1;
    min-width: 100px;
    padding: 10px 16px;
    border: 2px solid var(--red);
    border-right: none;
    border-radius: var(--r-sm) 0 0 var(--r-sm);
    background: var(--white);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: var(--ease);
    font-family: inherit;
}

.fang-search-strip input[type="text"]:focus {
    border-color: var(--red-deep);
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.08);
}

.fang-search-strip input[type="text"]::placeholder { color: #bbb; }

.fang-search-strip button {
    padding: 10px 18px;
    background: var(--red);
    color: #fff;
    border: 2px solid var(--red);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--ease);
    font-family: inherit;
    margin-left: -1px;
}

.fang-search-strip button:hover {
    background: var(--red-deep);
    border-color: var(--red-deep);
}

.fang-search-strip button:first-of-type {
    border-radius: 0;
    border-left: none;
    border-right: 1px solid rgba(255,255,255,0.3);
    padding: 10px 14px;
}

.fang-search-strip button:last-of-type {
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

/* ══════════════════════════════
   HOT TAGS
══════════════════════════════ */
.grid-container {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 12px;
    box-shadow: 0 1px 4px var(--shadow-xs);
}

.grid-item {
    text-decoration: none;
    color: var(--text-sub);
    background: var(--body-bg);
    border: 1px solid #ddd;
    border-radius: var(--r-sm);
    padding: 3px 11px;
    font-size: 12px;
    transition: var(--ease);
}

.grid-item:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

/* ══════════════════════════════
   SECTION HEADING  — fang.com style
   large red text left bar
══════════════════════════════ */
.mhlleset { margin-bottom: 20px; }

.mhlleset-heading {
    margin-bottom: 12px;
    padding-bottom: 9px;
    border-bottom: 2px solid #e8e8e8;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mhlleset-heading::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--red);
    border-radius: 2px;
    flex-shrink: 0;
}

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

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

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

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

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

.thumbnail2-group li {
    background: var(--white);
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--ease);
    animation: fangUp 0.35s ease both;
}

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

.thumbnail2-group li:hover {
    box-shadow: 0 5px 20px var(--shadow-md);
    transform: translateY(-3px);
    border-color: rgba(204,34,34,0.25);
}

.thumbnail2 {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 600 / 350;
    background: #eee;
}

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

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

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

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

.thumbnail2::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%) scale(0.6);
    width: 40px;
    height: 40px;
    background: var(--red);
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    line-height: 40px;
    text-align: center;
    opacity: 0;
    transition: var(--ease);
    z-index: 2;
    box-shadow: 0 3px 10px var(--shadow-red);
}

.thumbnail2:hover::after {
    opacity: 1;
    transform: translate(-50%,-50%) scale(1);
}

.fang-card-desc {
    padding: 8px 10px 10px;
    background: var(--white);
}

.fang-card-desc h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
}

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

.fang-card-desc h5 a:hover { color: var(--red); }

/* ══════════════════════════════
   DETAIL TITLE BAR
══════════════════════════════ */
.fang-title-row {
    line-height: 1.8;
    text-align: center;
    padding: 15px 20px;
    font-size: 17px;
    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);
    box-shadow: 0 2px 6px var(--shadow-xs);
}

.fang-title-row a {
    color: var(--red);
    text-decoration: none;
    font-weight: 700;
    margin-right: 8px;
}

/* ══════════════════════════════
   TORRENT META
══════════════════════════════ */
.fang-detail-box {
    font-size: 14px;
    line-height: 2;
    padding: 16px 20px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin: 12px 0;
    box-shadow: 0 2px 6px var(--shadow-xs);
}

/* ══════════════════════════════
   CAPTURE IMAGE
══════════════════════════════ */
.torrent-capture-grid { margin-top: 12px; }

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

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

/* ══════════════════════════════
   DOWNLOAD BUTTONS
══════════════════════════════ */
.download {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
    padding: 18px 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin: 12px 0;
    box-shadow: 0 2px 6px var(--shadow-xs);
}

.down_btn {
    display: inline-block;
    padding: 10px 28px;
    background: var(--red);
    color: #fff;
    text-decoration: none;
    border-radius: var(--r-sm);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    border: 1.5px solid var(--red);
    cursor: pointer;
    box-shadow: 0 2px 8px var(--shadow-red);
}

.down_btn:hover {
    background: var(--red-deep);
    border-color: var(--red-deep);
    box-shadow: 0 4px 14px var(--shadow-red);
    transform: translateY(-1px);
}

/* ══════════════════════════════
   SHARE SECTION
══════════════════════════════ */
.share-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 13px 15px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 6px var(--shadow-xs);
}

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

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

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

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

.share-copy-btn:hover {
    background: var(--red-deep);
    box-shadow: 0 3px 10px var(--shadow-red);
}

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

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

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

.a_page_info {
    background: var(--white);
    color: var(--text-sub);
    border: 1px solid var(--border);
}

.a_page_info:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.page_info_focus {
    background: var(--red);
    color: #fff;
    border: 1.5px solid var(--red);
    font-weight: 700;
    cursor: default;
    box-shadow: 0 2px 6px var(--shadow-red);
}

/* ══════════════════════════════
   FRIENDLY LINKS
══════════════════════════════ */
.txtguanggao2 {
    padding: 10px 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: 0 1px 4px var(--shadow-xs);
}

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

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

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

/* ══════════════════════════════
   FOOTER  — light grey fang style
══════════════════════════════ */
.footer {
    padding: 20px 0;
    text-align: center;
    border-top: 2px solid var(--red);
    margin-top: 26px;
    background: var(--white);
}

.footer p { margin: 4px 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); }

/* ══════════════════════════════
   VIDEO PLAYER
══════════════════════════════ */
.MacPlayer, .video-container {
    background: #000;
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 4px 18px var(--shadow-md);
}

.video-container {
    width: 100%;
    height: 580px;
    max-height: 580px;
    position: relative;
}

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

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

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

img[data-original] { background: #eeeeee; }

/* ══════════════════════════════
   RESPONSIVE ≤900px
══════════════════════════════ */
@media (max-width: 900px) {
    .thumbnail2-group { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}

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

    .fang-topbar-inner { gap: 10px; min-height: 44px; }
    .fang-site-name    { font-size: 17px; }
    .fang-logo-block   { width: 30px; height: 30px; }
    .fang-domain-wrap  { padding: 4px 10px; }
    .fang-domain-cap   { font-size: 10px; }
    .fang-domain-val   { font-size: 12px; }

    /* Mobile nav */
    .nav-row { align-items: stretch; }

    .nav-row .nav-label {
        width: 15%;
        flex-shrink: 0;
        font-size: 12px;
        padding: 6px 2px;
        word-break: break-all;
        white-space: normal;
        line-height: 1.3;
        letter-spacing: 0;
    }

    .nav-row .nav-links {
        width: 85%;
        gap: 3px;
        padding: 6px 5px;
    }

    .nav-row .nav-links a {
        font-size: 12px;
        padding: 5px 2px;
        width: calc((100% - 9px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

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

    .mhlleset-title { font-size: 15px; }
    .video-container { height: 56.25vw; max-height: 360px; }

    .fang-search-strip input[type="text"] { font-size: 13px; padding: 8px 12px; }
    .fang-search-strip button { padding: 8px 12px; font-size: 12px; }

    .share-section     { padding: 10px; gap: 7px; }
    .share-url-display { padding: 7px 10px; }

    .download { padding: 12px 8px; gap: 8px; flex-wrap: nowrap; }
    .down_btn { padding: 9px 14px; font-size: 13px; }

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

/* ══════════════════════════════
   RESPONSIVE ≤480px
══════════════════════════════ */
@media (max-width: 480px) {
    .fang-site-name { font-size: 15px; }
    .fang-domain-val { font-size: 11px; }

    .nav-row .nav-label {
        width: 15%;
        font-size: 12px;
        padding: 5px 2px;
        word-break: break-all;
        white-space: normal;
    }

    .nav-row .nav-links {
        width: 85%;
        gap: 3px;
        padding: 5px 3px;
    }

    .nav-row .nav-links a {
        font-size: 12px;
        padding: 4px 2px;
        width: calc((100% - 9px) / 4);
    }

    .video-container { height: 56.25vw; max-height: 260px; }
    .mhlleset-title  { font-size: 14px; }
    .share-url       { font-size: 10px; }
    .share-label     { font-size: 9px; }
    .share-copy-btn  { padding: 6px 10px; font-size: 11px; }
}
