/* TdmStyle — Game Portal Orange-Gray Theme */

:root {
    /* 橙色主调 */
    --oc:    #f47920;
    --oc2:   #d96800;
    --oc3:   #ff9840;
    --oc-bg: rgba(244, 121, 32, 0.10);
    --oc-bg2:rgba(244, 121, 32, 0.18);

    /* 文字 */
    --th:  #1a1a1a;
    --tm:  #333333;
    --ts:  #666666;
    --tl:  #999999;
    --tx:  #bbbbbb;

    /* 分割线 & 背景 */
    --lna: #e8e8e8;
    --lnb: #f0f0f0;
    --lnc: #f7f7f7;

    --bg0: #f2f2f2;
    --bg1: #ffffff;
    --bg2: #fafafa;
    --bg3: #f5f5f5;

    /* 深色顶栏（3DM 特征） */
    --nav-bg:  #3d3d3d;
    --nav-bg2: #2e2e2e;
    --nav-tx:  #e8e8e8;
    --nav-ac:  var(--oc);

    --shd:  rgba(0,0,0,0.07);
    --shd2: rgba(0,0,0,0.14);

    --rd:  4px;
    --rd2: 6px;
    --rd3: 10px;
    --tr:  all 0.2s ease;
}

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

body {
    font-family: -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
    background: var(--bg0);
    color: var(--tm);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* =============================================
   SITE HEADER  — NOT sticky / NOT fixed
   ============================================= */
.gbar-outer {
    background: var(--bg1);
    border-bottom: 3px solid var(--oc);
    padding: 12px 0 10px;
}

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

.glogo-link {
    text-decoration: none;
    display: inline-flex;
    align-items: baseline;
    gap: 0;
}

.gsite-title {
    font-size: 26px;
    font-weight: 900;
    color: var(--oc);
    letter-spacing: -0.5px;
}

.gsite-title em {
    font-style: normal;
    color: var(--th);
}

.gaddr-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--oc-bg);
    border: 1.5px solid var(--oc);
    border-radius: var(--rd);
    padding: 4px 12px;
}

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

.gaddr-url {
    font-size: 14px;
    font-weight: 800;
    color: var(--oc2);
    letter-spacing: 0.2px;
}

/* =============================================
   CONTAINER
   ============================================= */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

.content { padding: 10px 0; }

/* =============================================
   NAV ROWS  — 深灰色标签，橙色激活
   ============================================= */
.nav-container {
    background: var(--bg1);
    border-radius: var(--rd2);
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--lna);
    box-shadow: 0 1px 4px var(--shd);
}

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

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

/* 区域标签：深灰底白字（对应图片中左侧深色导航列） */
.nav-row .nav-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--nav-tx);
    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 4px;
    flex-shrink: 0;
    background: var(--nav-bg);
    letter-spacing: 0.2px;
}

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

.nav-row .nav-links a {
    display: inline-block;
    color: var(--tm);
    text-decoration: none;
    padding: 4px 3px;
    border-radius: var(--rd);
    transition: var(--tr);
    background: var(--bg3);
    border: 1px solid var(--lna);
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
    font-size: 13px;
}

.nav-row .nav-links a:hover {
    background: var(--oc);
    color: #fff;
    border-color: var(--oc);
}

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

/* =============================================
   SEARCH BOX
   ============================================= */
.seach {
    background: var(--bg1);
    border-radius: var(--rd2);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--lna);
    box-shadow: 0 1px 4px var(--shd);
}

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

.seach input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 9px 14px;
    border: 1.5px solid var(--lna);
    border-radius: var(--rd3);
    background: var(--bg2);
    color: var(--th);
    font-size: 14px;
    transition: var(--tr);
    outline: none;
}

.seach input[type="text"]:focus {
    border-color: var(--oc);
    background: #fff;
    box-shadow: 0 0 0 2px var(--oc-bg);
}

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

.seach button {
    padding: 9px 18px;
    border: none;
    border-radius: var(--rd3);
    background: var(--oc);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--tr);
    white-space: nowrap;
    flex-shrink: 0;
}

.seach button:hover { background: var(--oc2); }

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

.grid-item {
    padding: 4px 12px;
    background: var(--bg3);
    border-radius: 12px;
    color: var(--ts);
    text-decoration: none;
    font-size: 12px;
    transition: var(--tr);
    border: 1px solid var(--lna);
}

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

/* =============================================
   SECTION HEADINGS  — 橙色竖条 + 橙色底线
   ============================================= */
.mhlleset { margin-bottom: 20px; }

.mhlleset-heading {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--lnb);
    position: relative;
    display: flex;
    align-items: center;
}

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

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

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

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

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

/* =============================================
   THUMBNAIL GRID — PC:4列, Mobile:2列
   封面比例 600:350
   ============================================= */
.thumbnail2-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    list-style: none;
    padding: 0;
}

.thumbnail2-group li {
    position: relative;
    animation: gfUp 0.4s ease backwards;
    background: var(--bg1);
    border-radius: var(--rd2);
    box-shadow: 0 1px 5px var(--shd);
    overflow: hidden;
    transition: var(--tr);
}

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

/* 卡片悬停：顶部显示橙色条 */
.thumbnail2-group li:hover {
    box-shadow: 0 4px 14px var(--shd2);
    transform: translateY(-2px);
}

.thumbnail2-group li:hover .thumbnail2::after {
    opacity: 1;
}

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

/* 卡片顶部橙色线 */
.thumbnail2-group li::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--oc);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.thumbnail2-group li:hover::before {
    transform: scaleX(1);
}

.thumbnail2 {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    /* 封面比例 600:350 */
    aspect-ratio: 600 / 350;
    background: var(--bg3);
    border: none;
}

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

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

.thumbnail2::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.58) 0%, transparent 52%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.thumbnail2::before {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.55);
    font-size: 28px;
    color: rgba(255,255,255,0.95);
    opacity: 0;
    transition: var(--tr);
    z-index: 2;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.video-info {
    padding: 8px 10px 10px;
}

.video-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--tm);
}

.video-info h5 a {
    color: var(--tm);
    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(--oc); }

/* =============================================
   VIDEO PLAYER
   ============================================= */
.video-container {
    width: 100%;
    height: 600px;
    max-height: 600px;
    margin-bottom: 16px;
    background: #000;
    border-radius: var(--rd2);
    overflow: hidden;
    box-shadow: 0 4px 16px var(--shd2);
    position: relative;
}

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

.MacPlayer {
    background: #000;
    border-radius: var(--rd2);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px var(--shd2);
}

/* =============================================
   TORRENT CAPTURE  — picture 占 100%
   ============================================= */
.torrent-capture-grid {}

.torrent-capture-grid picture {
    display: block;
    width: 100%;
}

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

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

/* =============================================
   DOWNLOAD BUTTONS — 居中
   ============================================= */
.download {
    text-align: center;
    padding: 14px;
    background: var(--bg1);
    border-radius: var(--rd2);
    margin: 14px 0;
    border: 1px solid var(--lna);
    box-shadow: 0 1px 4px var(--shd);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.down_btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--oc);
    color: #ffffff;
    text-decoration: none;
    border-radius: var(--rd);
    font-weight: 700;
    font-size: 14px;
    transition: var(--tr);
    margin: 0;
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
}

.down_btn:hover {
    background: var(--oc2);
    box-shadow: 0 4px 10px rgba(244,121,32,0.38);
}

/* =============================================
   SHARE SECTION
   ============================================= */
.share-box {
    background: var(--bg1);
    border-radius: var(--rd);
    padding: 12px;
    margin: 12px 0;
    border: 1px solid var(--lna);
    box-shadow: 0 1px 4px var(--shd);
}

.share-box span { color: var(--ts); font-size: 13px; word-break: break-all; }
.share-box a { color: var(--oc); text-decoration: none; font-weight: 600; transition: var(--tr); }
.share-box a:hover { color: var(--oc2); }

.share-section {
    background: var(--bg1);
    border-radius: var(--rd2);
    padding: 14px;
    margin: 14px 0;
    border: 1px solid var(--lna);
    box-shadow: 0 1px 4px var(--shd);
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-url-display {
    background: var(--bg2);
    border: 1px solid var(--lna);
    border-radius: var(--rd);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

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

.share-url {
    font-size: 12px;
    color: var(--ts);
    word-break: break-all;
    flex: 1;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-copy-btn {
    padding: 10px 20px;
    background: var(--oc);
    color: #ffffff;
    border: none;
    border-radius: var(--rd);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--tr);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.share-copy-btn:hover { background: var(--oc2); }
.share-copy-btn:active { transform: scale(0.97); }
.share-icon { font-size: 15px; }

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

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

.a_page_info {
    background: var(--bg1);
    color: var(--tm);
    border: 1px solid var(--lna);
}

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

.page_info_focus {
    background: var(--oc);
    color: #ffffff;
    border: 1px solid var(--oc);
    cursor: default;
    font-weight: 800;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    padding: 22px 0;
    text-align: center;
    border-top: 1px solid var(--lna);
    margin-top: 30px;
    background: var(--nav-bg2);
}

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

/* =============================================
   FRIEND LINKS
   ============================================= */
.txtguanggao2 {
    padding: 10px 12px;
    background: var(--bg1);
    border-radius: var(--rd);
    border: 1px solid var(--lna);
    box-shadow: 0 1px 4px var(--shd);
}

.txtguanggao2 dl { margin: 0; }
.txtguanggao2 dd { display: inline-block; margin: 3px 4px; }
.txtguanggao2 a { color: var(--ts); text-decoration: none; font-size: 13px; transition: var(--tr); }
.txtguanggao2 a:hover { color: var(--oc); }
.pd5 { padding: 1px 4px; }

/* =============================================
   RESPONSIVE — ≤768px  大屏手机
   ============================================= */
@media (max-width: 768px) {
    .container { padding: 0 8px; }

    .gbar-outer { padding: 9px 0 7px; }
    .gsite-title { font-size: 20px; }
    .gaddr-lbl { font-size: 10px; }
    .gaddr-url { font-size: 13px; }

    .content { padding: 7px 0; }

    .nav-row { display: flex; align-items: stretch; }

    /* 分区标签 15%，字体10px，4汉字全显 */
    .nav-row .nav-label {
        width: 15%;
        font-size: 10px;
        padding: 6px 2px;
        text-align: center;
        line-height: 1.4;
        word-break: keep-all;
    }

    .nav-row .nav-links {
        width: 85%;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 6px 4px;
    }

    /* 大屏手机栏目字体14px，每行4个共2行 */
    .nav-row .nav-links a {
        padding: 4px 2px;
        font-size: 14px;
        text-align: center;
        width: calc((100% - 12px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    .seach { padding: 8px; }
    .seach form { gap: 5px; }
    .seach input[type="text"] { min-width: 80px; padding: 8px 10px; font-size: 13px; }
    .seach button { padding: 8px 10px; font-size: 12px; }

    /* 移动端每行2个影片 */
    .thumbnail2-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

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

    .mhlleset { margin-bottom: 14px; }
    .mhlleset-heading { margin-bottom: 10px; padding-bottom: 8px; }
    .mhlleset-heading::before { height: 16px; }
    .mhlleset-title { font-size: 15px; }

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

    .download { padding: 10px 6px; gap: 7px; flex-wrap: nowrap; }
    .down_btn { padding: 9px 14px; font-size: 13px; }

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

    .video-container { height: 56.25vw; max-height: 380px; margin-bottom: 12px; }

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

    .footer { padding: 14px 0; margin-top: 18px; }
}

/* =============================================
   RESPONSIVE — ≤480px  小屏手机
   ============================================= */
@media (max-width: 480px) {
    .gsite-title { font-size: 17px; }
    .gaddr-tag { padding: 3px 8px; gap: 5px; }
    .gaddr-lbl { font-size: 9px; }
    .gaddr-url { font-size: 12px; }

    /* 小屏手机栏目最小12px */
    .nav-row .nav-label {
        width: 15%;
        font-size: 10px;
        padding: 5px 1px;
    }

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

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

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

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

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

    .share-section { padding: 8px; gap: 5px; flex-wrap: nowrap; }
    .share-url-display { padding: 7px 8px; }
    .share-label { font-size: 10px; }
    .share-url { font-size: 9px; }
    .share-copy-btn { padding: 7px 9px; font-size: 11px; gap: 3px; }
    .share-icon { font-size: 12px; }

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

/* =============================================
   HIDE UTILITIES
   ============================================= */
.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: var(--bg3); }

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