/* Official Portal Style - Clean Government Inspired */

:root {
    --clr-primary: #26374a;
    --clr-accent: #1a5276;
    --clr-link: #295376;
    --clr-link-hover: #0535d2;
    --clr-red: #b10e1e;
    --clr-teal: #1c7c8c;
    --clr-teal-light: #e8f4f6;
    --clr-bg: #f5f5f5;
    --clr-bg2: #ffffff;
    --clr-bg3: #eef2f5;
    --clr-surface: #ffffff;
    --clr-border: #d3d3d3;
    --clr-border-light: #e8e8e8;
    --clr-text: #333333;
    --clr-text-muted: #5c5c5c;
    --clr-text-dim: #767676;
    --clr-nav-bar: #26374a;
    --clr-nav-text: #ffffff;
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.10);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --trans: all 0.2s var(--ease);
}

*, *::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(--clr-bg);
    color: var(--clr-text);
    line-height: 1.6;
    font-size: 15px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===================== HEADER ===================== */
.site-header {
    background: var(--clr-bg2);
    border-bottom: 3px solid var(--clr-red);
    padding: 10px 0;
}

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

.brand-block {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: center;
}

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

.brand-title {
    font-size: 26px;
    font-weight: 700;
    font-style: normal;
    color: var(--clr-primary);
    letter-spacing: 0;
    line-height: 1.1;
    text-decoration: none;
    border-bottom: none;
    position: relative;
    padding-bottom: 5px;
}

.brand-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 3px;
    background: var(--clr-red);
}

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

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

.domain-tag {
    font-size: 11px;
    font-weight: 600;
    font-style: normal;
    color: var(--clr-text-muted);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

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

/* ===================== LAYOUT ===================== */
.wrapper {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

.section-wrap { padding: 8px 0; }

/* ===================== NAVIGATION ===================== */
.nav-panel {
    background: var(--clr-bg2);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}

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

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

.zone-tag {
    font-size: 13px;
    font-weight: 700;
    font-style: normal;
    color: var(--clr-nav-text);
    background: var(--clr-nav-bar);
    white-space: nowrap;
    width: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    flex-shrink: 0;
    text-align: center;
    border-right: 2px solid var(--clr-teal);
}

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

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

.zone-links a:hover {
    background: var(--clr-teal);
    color: #fff;
    border-color: var(--clr-teal);
}

.zone-links a.active {
    background: var(--clr-primary);
    color: #fff;
    border-color: var(--clr-primary);
    font-weight: 700;
}

/* ===================== SEARCH ===================== */
.search-module {
    background: var(--clr-bg2);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}

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

.search-module input[type="text"] {
    flex: 1;
    min-width: 70px;
    padding: 9px 14px;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-xs);
    background: var(--clr-bg2);
    color: var(--clr-text);
    font-size: 14px;
    outline: none;
    transition: var(--trans);
    font-family: inherit;
}

.search-module input[type="text"]:focus {
    border-color: var(--clr-teal);
    box-shadow: 0 0 0 2px rgba(28,124,140,0.15);
}

.search-module input[type="text"]::placeholder { color: var(--clr-text-dim); }

.search-module button {
    padding: 9px 13px;
    border: 1px solid var(--clr-primary);
    border-radius: var(--radius-xs);
    background: var(--clr-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--trans);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.search-module button:hover {
    background: var(--clr-teal);
    border-color: var(--clr-teal);
}

/* ===================== HOT TAGS ===================== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 10px 12px;
    background: var(--clr-bg2);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}

.tag-cloud-item {
    padding: 4px 11px;
    background: var(--clr-bg3);
    border-radius: var(--radius-sm);
    color: var(--clr-link);
    text-decoration: none;
    font-size: 13px;
    transition: var(--trans);
    border: 1px solid var(--clr-border);
}

.tag-cloud-item:hover {
    background: var(--clr-teal);
    color: #fff;
    border-color: var(--clr-teal);
}

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

.media-block-head {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--clr-border);
    position: relative;
}

.media-block-head::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--clr-red);
}

.media-block-title {
    font-size: 18px;
    font-weight: 700;
    font-style: normal;
    margin: 0;
    color: var(--clr-primary);
}

.media-block-title a {
    color: var(--clr-primary);
    text-decoration: none;
    transition: var(--trans);
}

.media-block-title a:hover {
    color: var(--clr-teal);
    text-decoration: underline;
}

/* ===================== 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(--radius-sm);
    aspect-ratio: 600 / 350;
    background: var(--clr-bg3);
    border: 1px solid var(--clr-border);
    box-shadow: var(--shadow-sm);
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s var(--ease);
    display: block;
}

.card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(38,55,74,0.72) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.card-thumb:hover img { transform: scale(1.05); }
.card-thumb:hover::after { opacity: 1; }

.card-thumb::before {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    color: rgba(255,255,255,0.95);
    font-size: 20px;
    z-index: 2;
    opacity: 0;
    transition: all 0.2s ease;
}

.card-thumb:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

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

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

.card-caption h5 a:hover {
    color: var(--clr-link-hover);
    text-decoration: underline;
}

/* ===================== VIDEO PLAYER ===================== */
.player-wrap {
    width: 100%;
    margin-bottom: 14px;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

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

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

/* ===================== DETAIL TITLE ===================== */
.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(--clr-bg2);
    border: 1px solid var(--clr-border);
    border-left: 4px solid var(--clr-teal);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.detail-title-bar a {
    color: var(--clr-teal);
    text-decoration: none;
    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(--clr-bg2);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    margin: 12px 0;
    color: var(--clr-text);
    box-shadow: var(--shadow-sm);
}

.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(--radius-sm);
    border: 1px solid var(--clr-border);
    display: block;
}

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

.action-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--clr-primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-xs);
    font-weight: 600;
    font-size: 14px;
    transition: var(--trans);
    margin: 0;
    border: 2px solid var(--clr-primary);
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    font-family: inherit;
}

.action-btn:hover {
    background: var(--clr-teal);
    border-color: var(--clr-teal);
    box-shadow: 0 2px 8px rgba(28,124,140,0.3);
}

/* ===================== SHARE SECTION ===================== */
.link-share-panel {
    background: var(--clr-bg2);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
}

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

.link-label-text {
    font-weight: 700;
    font-size: 12px;
    color: var(--clr-primary);
    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(--clr-text-muted);
    word-break: break-all;
    flex: 1;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-copy-btn {
    padding: 9px 18px;
    background: var(--clr-primary);
    color: #fff;
    border: 2px solid var(--clr-primary);
    border-radius: var(--radius-xs);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--trans);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.link-copy-btn:hover {
    background: var(--clr-teal);
    border-color: var(--clr-teal);
}

.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: 4px;
    flex-wrap: wrap;
    padding: 16px 0;
}

.pg-link {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--trans);
    min-width: 34px;
    text-align: center;
    background: var(--clr-bg2);
    color: var(--clr-link);
    border: 1px solid var(--clr-border);
}

.pg-link:hover {
    background: var(--clr-teal);
    border-color: var(--clr-teal);
    color: #fff;
}

.pg-current {
    background: var(--clr-primary);
    color: #fff;
    border: 1px solid var(--clr-primary);
    cursor: default;
}

/* ===================== FOOTER ===================== */
.site-footer {
    padding: 20px 0;
    text-align: center;
    border-top: 2px solid var(--clr-border);
    margin-top: 20px;
    background: var(--clr-primary);
}

.site-footer p {
    margin: 5px 0;
    color: rgba(255,255,255,0.75);
    font-size: 13px;
}

.site-footer a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: var(--trans);
}

.site-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

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

.friend-links-wrap dl { margin: 0; }

.friend-links-wrap dd {
    display: inline-block;
    margin: 4px 6px;
}

.friend-links-wrap a {
    color: var(--clr-link);
    text-decoration: none;
    font-size: 13px;
    transition: var(--trans);
}

.friend-links-wrap a:hover {
    color: var(--clr-teal);
    text-decoration: underline;
}

.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(--clr-bg3); }

/* ===================== RESPONSIVE MOBILE ===================== */
@media (max-width: 768px) {
    .wrapper { padding: 0 8px; }
    .site-header { padding: 7px 0; }
    .brand-title { font-size: 20px; }
    .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 */
    .nav-zone { display: flex; align-items: stretch; }

    .zone-tag {
        width: 15%;
        font-size: 10px;
        padding: 8px 3px;
        text-align: center;
        letter-spacing: 0;
        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: 60px; padding: 8px 9px; font-size: 13px; }
    .search-module button { padding: 8px 8px; font-size: 12px; }

    /* Card grid: 2 per row on mobile */
    .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 9px; }
    .btn-group { padding: 12px 10px; gap: 8px; }
    .action-btn { padding: 9px 13px; font-size: 13px; }
    .link-share-panel { padding: 10px 12px; 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: 16px 0; margin-top: 16px; }
}

@media (max-width: 480px) {
    .brand-title { font-size: 17px; }
    .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: 50px; padding: 7px 7px; font-size: 12px; }
    .search-module button { padding: 7px 6px; font-size: 11px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .media-block-title { font-size: 15px; }
    .action-btn { padding: 8px 10px; font-size: 12px; }
}

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