/* 3DM Gaming Portal Style - Video Template */

:root {
    --og: #f47521;
    --og-dark: #d4621a;
    --og-deep: #b05010;
    --og-light: #fff4ec;
    --og-pale: #fde8d4;
    --white: #ffffff;
    --bg-root: #f0f2f5;
    --bg-panel: #ffffff;
    --bg-card: #f8f9fa;
    --nav-bg: #4a4e57;
    --nav-hover: #f47521;
    --text-main: #1f1f1f;
    --text-sub: #333333;
    --text-muted: #777777;
    --text-light: #aaaaaa;
    --border: #e0e2e6;
    --border-og: #f47521;
    --shadow: rgba(0,0,0,0.06);
    --shadow-md: rgba(0,0,0,0.12);
    --shadow-lg: rgba(0,0,0,0.2);
    --grad-og: linear-gradient(135deg, #f47521 0%, #d4621a 100%);
    --grad-og-h: linear-gradient(135deg, #ff8c3a 0%, #f47521 100%);
    --rd: 4px;
    --rd-sm: 3px;
    --rd-lg: 6px;
    --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, sans-serif;
    background: var(--bg-root);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== HEADER - NOT sticky ===== */
.gm-header {
    background: var(--white);
    border-bottom: 3px solid var(--og);
    padding: 0;
}

.gm-topbar {
    background: var(--nav-bg);
    padding: 0;
}

.gm-header-main {
    padding: 10px 0;
}

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

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

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

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

.gm-logo-mark {
    width: 44px;
    height: 44px;
    background: var(--grad-og);
    border-radius: var(--rd);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -1px;
    font-style: italic;
}

.gm-sitename {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.3px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
    line-height: 1;
}

.gm-sitename em {
    color: var(--og);
    font-style: normal;
}

.gm-domain-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--og-light);
    border: 1px solid var(--og);
    border-radius: var(--rd-sm);
    padding: 5px 14px;
    flex-shrink: 0;
}

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

.gm-domain-addr {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

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

/* ===== BANNER ===== */
.gm-banner { width: 100%; margin: 4px 0; overflow: hidden; line-height: 0; }
.gm-banner img { width: 100%; display: block; }

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

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

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

.gm-zone-tag {
    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-og);
}

.gm-navlinks {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 9px 8px;
    align-items: center;
}

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

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

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

/* ===== SEARCH ===== */
.gm-searchbox {
    background: var(--bg-panel);
    border-radius: var(--rd-lg);
    padding: 10px 12px;
    margin-bottom: 7px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px var(--shadow);
}

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

#gmsf input[type="text"] {
    flex: 1;
    min-width: 80px;
    padding: 9px 14px;
    border: 1px 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;
}

#gmsf input[type="text"]:focus {
    border-color: var(--og);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(244,117,33,0.14);
}

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

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

#gmsf button:hover {
    background: var(--grad-og-h);
    box-shadow: 0 3px 10px rgba(244,117,33,0.35);
}

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

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

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

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

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

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

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

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

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

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

.gm-filmgrid li { position: relative; }

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

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

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

.gm-filmthumb:hover::after { opacity: 1; }
.gm-filmthumb:hover img { transform: scale(1.06); }
.gm-filmthumb:hover { border-color: var(--og); box-shadow: 0 4px 14px rgba(244,117,33,0.22); }

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

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

.gm-filmlabel h5 a:hover { color: var(--og); }

/* ===== VIDEO PLAYER ===== */
.gm-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;
}

.gm-player iframe, .gm-player video, .gm-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 ===== */
.gm-capture { width: 100%; margin-top: 10px; }
.gm-capture img, .gm-capture .img_item img { width: 100%; height: auto; border-radius: var(--rd-sm); border: 1px solid var(--border); display: block; }
.gm-capture .img_item { width: 100%; }

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

.down_btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--grad-og);
    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-og-h); box-shadow: 0 4px 14px rgba(244,117,33,0.38); }

/* ===== SHARE SECTION ===== */
.share-section {
    background: var(--bg-panel);
    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(--og); 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-og);
    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-og-h); box-shadow: 0 3px 10px rgba(244,117,33,0.35); }
.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(--bg-panel); color: var(--text-main); border: 1px solid var(--border); }
.a_page_info:hover { background: var(--og); border-color: var(--og); color: #fff; }
.page_info_focus { background: var(--grad-og); color: #fff; border: 1px solid var(--og-dark); cursor: default; }

/* ===== FOOTER ===== */
.gm-footer {
    padding: 20px 0;
    text-align: center;
    border-top: 3px solid var(--og);
    margin-top: 16px;
    background: var(--nav-bg);
}

.gm-footer p { margin: 6px 0; color: #aab0bc; font-size: 12px; }
.gm-footer a { color: #aab0bc; text-decoration: none; transition: var(--ease); }
.gm-footer a:hover { color: var(--og); }

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

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

/* ===== TABLET / MOBILE ===== */
@media (max-width: 768px) {
    .gm-wrap { padding: 0 8px; }
    .gm-row { padding: 5px 0; }
    .gm-sitename { font-size: 20px; }
    .gm-branding { gap: 12px; }
    .gm-logo-mark { width: 36px; height: 36px; font-size: 15px; }
    .gm-domain-strip { padding: 4px 10px; gap: 6px; }
    .gm-domain-tag { font-size: 10px; }
    .gm-domain-addr { font-size: 15px; }

    /* Mobile nav: 15% label, 85% links, 4 per row */
    .gm-navrow { display: flex; align-items: stretch; }
    .gm-zone-tag { width: 15%; font-size: 10px; padding: 7px 2px; text-align: center; }
    .gm-navlinks { width: 85%; gap: 4px; padding: 7px 4px; }
    .gm-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 */
    #gmsf { flex-wrap: nowrap; gap: 5px; }
    #gmsf input[type="text"] { min-width: 80px; padding: 8px 9px; font-size: 13px; }
    #gmsf button { padding: 8px 9px; font-size: 12px; }

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

    .gm-player { height: 56.25vw; max-height: 380px; margin-bottom: 10px; }
    .gm-block-ttl { font-size: 15px; }
    .gm-taglink { font-size: 11px; padding: 3px 9px; }
    .down_btn { padding: 9px 13px; font-size: 13px; }
    .gm-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; }
    .gmhide-mob { display: none !important; }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 480px) {
    .gm-branding { gap: 8px; }
    .gm-sitename { font-size: 18px; }
    .gm-logo-mark { width: 32px; height: 32px; font-size: 13px; }
    .gm-domain-addr { font-size: 13px; }
    .gm-domain-tag { font-size: 9px; }

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

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

    .gm-filmgrid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
    .gm-filmlabel h5 { font-size: 12px; }
    .gm-block-ttl { font-size: 14px; }
    .down_btn { padding: 8px 9px; font-size: 12px; }
    .gm-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) { .gmhide-pc { display: none !important; } }

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