/* GovClean VideoSite Template — USPS-inspired */

:root {
    --navy:        #333366;
    --navy-dark:   #1f1f4e;
    --navy-mid:    #3d3d7a;
    --red:         #d0021b;
    --red-dark:    #a8000f;
    --blue-link:   #004b87;
    --blue-hover:  #00305a;
    --bg-page:     #f5f5f5;
    --bg-white:    #ffffff;
    --bg-light:    #eef2f7;
    --bg-panel:    #f0f3f8;
    --txt-main:    #2c2c2c;
    --txt-sub:     #555555;
    --txt-muted:   #808080;
    --border:      #d0d8e4;
    --border-lt:   #e4e9f0;
    --shadow:      rgba(51,51,102,0.08);
    --shadow-md:   rgba(51,51,102,0.14);
    --rad:         4px;
    --rad-sm:      3px;
    --ease:        all 0.2s ease;
}

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

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

/* ===== TOPBAR ===== */
.g-topbar {
    background: var(--navy);
    border-bottom: 3px solid var(--red);
    padding: 0.55rem 0;
}

.g-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    flex-wrap: nowrap;
}

.g-site-link {
    text-decoration: none;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.3px;
    font-style: normal;
    white-space: nowrap;
}
.g-site-link:hover { color: #ccd8f0; }

.g-domain-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--rad-sm);
    padding: 4px 14px;
}

.g-domain-label {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    white-space: nowrap;
}

.g-domain-text {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

/* ===== LAYOUT ===== */
.g-wrap {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 14px;
}

.g-pad { padding: 8px 0; }

/* ===== NAV ===== */
.g-nav-panel {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px var(--shadow);
}

.g-nav-strip {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border-lt);
}
.g-nav-strip:last-child { border-bottom: none; }

.g-zone-lbl {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    background: var(--navy);
    white-space: nowrap;
    width: 10%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 5px;
    flex-shrink: 0;
    border-right: 2px solid var(--red);
}

.g-zone-cats {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 7px 10px;
    align-items: center;
    background: var(--bg-white);
}

.g-zone-cats a {
    display: inline-block;
    color: var(--blue-link);
    text-decoration: none;
    padding: 4px 3px;
    border-radius: var(--rad-sm);
    transition: var(--ease);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}
.g-zone-cats a:hover {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}
.g-zone-cats a.active {
    background: var(--red);
    color: #fff;
    border-color: var(--red-dark);
    font-weight: 600;
}

/* ===== SEARCH ===== */
.g-search-box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    padding: 9px 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px var(--shadow);
}
.g-search-box form {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
}
.g-search-box input[type="text"] {
    flex: 1;
    min-width: 60px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--rad-sm);
    background: var(--bg-light);
    color: var(--txt-main);
    font-size: 13px;
    outline: none;
    transition: var(--ease);
}
.g-search-box input[type="text"]:focus {
    border-color: var(--navy);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(51,51,102,0.1);
}
.g-search-box input[type="text"]::placeholder { color: var(--txt-muted); }
.g-search-box button {
    padding: 8px 13px;
    border: none;
    border-radius: var(--rad-sm);
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}
.g-search-box button:hover { background: var(--navy-dark); }

/* ===== TAG CLOUDS ===== */
.g-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    list-style: none;
    padding: 9px 12px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    margin-bottom: 8px;
    box-shadow: 0 1px 3px var(--shadow);
}
.g-tag-pill {
    padding: 4px 12px;
    background: var(--bg-panel);
    border-radius: 2px;
    color: var(--blue-link);
    text-decoration: none;
    font-size: 12px;
    border: 1px solid var(--border);
    transition: var(--ease);
}
.g-tag-pill:hover {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

/* ===== SECTION BLOCK ===== */
.g-block { margin-bottom: 14px; }

.g-block-hd {
    display: flex;
    align-items: center;
    padding-bottom: 7px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--border);
    position: relative;
}
.g-block-hd::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--navy);
}

.g-block-ttl {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
    letter-spacing: 0.1px;
}
.g-block-ttl a { color: inherit; text-decoration: none; }
.g-block-ttl a:hover { color: var(--red); }

/* ===== CARD GRID ===== */
.g-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    list-style: none;
    padding: 0;
}
.g-card-grid li { animation: gCardIn 0.4s ease backwards; }
.g-card-grid li:nth-child(1){animation-delay:0.03s}
.g-card-grid li:nth-child(2){animation-delay:0.06s}
.g-card-grid li:nth-child(3){animation-delay:0.09s}
.g-card-grid li:nth-child(4){animation-delay:0.12s}
.g-card-grid li:nth-child(5){animation-delay:0.15s}
.g-card-grid li:nth-child(6){animation-delay:0.18s}
.g-card-grid li:nth-child(7){animation-delay:0.21s}
.g-card-grid li:nth-child(8){animation-delay:0.24s}

@keyframes gCardIn {
    from { opacity:0; transform:translateY(14px); }
    to   { opacity:1; transform:translateY(0); }
}

.g-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--rad);
    aspect-ratio: 600 / 350;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px var(--shadow);
}
.g-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}
.g-thumb:hover {
    border-color: var(--navy);
    box-shadow: 0 4px 14px var(--shadow-md);
}
.g-thumb:hover img { transform: scale(1.06); }
.g-thumb::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.95);
    font-size: 24px;
    background: rgba(51,51,102,0.35);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 1;
}
.g-thumb:hover::after { opacity: 1; }

.g-item-meta { padding: 6px 0 0; }
.g-item-meta h5 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--txt-main);
}
.g-item-meta h5 a {
    color: inherit;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--ease);
}
.g-item-meta h5 a:hover { color: var(--red); }

/* ===== PLAYER ===== */
.MacPlayer {
    background: #000;
    border-radius: var(--rad);
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: 0 3px 12px var(--shadow-md);
    border: 1px solid var(--border);
}

/* ===== DETAIL TITLE ===== */
.g-detail-hd {
    line-height: 1.7;
    text-align: center;
    padding: 14px 18px;
    font-size: 16px;
    margin: 10px 0;
    word-break: break-all;
    background: var(--bg-white);
    border-radius: var(--rad);
    border: 1px solid var(--border);
    border-left: 4px solid var(--navy);
    box-shadow: 0 1px 3px var(--shadow);
    color: var(--txt-main);
}

/* ===== TORRENT INFO ===== */
.g-torrent-info {
    font-size: 14px;
    line-height: 1.9;
    padding: 18px;
    background: var(--bg-white);
    border-radius: var(--rad);
    border: 1px solid var(--border);
    border-left: 4px solid var(--navy);
    margin: 8px 0;
    box-shadow: 0 1px 3px var(--shadow);
    color: var(--txt-main);
}
.g-preview-wrap { width: 100%; margin-top: 8px; }
.g-preview-wrap picture { display: block; width: 100%; }
.g-preview-wrap img {
    width: 100%;
    height: auto;
    border-radius: var(--rad-sm);
    border: 1px solid var(--border);
    display: block;
}

/* ===== ACTION BUTTONS ===== */
.g-btn-row {
    text-align: center;
    padding: 12px;
    background: var(--bg-white);
    border-radius: var(--rad);
    margin: 8px 0;
    border: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    box-shadow: 0 1px 3px var(--shadow);
}
.down_btn {
    display: inline-block;
    padding: 9px 20px;
    background: var(--navy);
    color: #fff;
    text-decoration: none;
    border-radius: var(--rad-sm);
    font-weight: 600;
    font-size: 13px;
    transition: var(--ease);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.down_btn:hover {
    background: var(--navy-dark);
    box-shadow: 0 3px 10px var(--shadow-md);
}

/* ===== SHARE ===== */
.g-share-row {
    background: var(--bg-white);
    border-radius: var(--rad);
    padding: 12px 14px;
    margin: 8px 0;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px var(--shadow);
}
.share-url-display {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--rad-sm);
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.share-label {
    font-weight: 700;
    font-size: 12px;
    color: var(--navy);
    white-space: nowrap;
    flex-shrink: 0;
}
.share-url {
    font-size: 11px;
    color: var(--txt-sub);
    word-break: break-all;
    flex: 1;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
}
.share-copy-btn {
    padding: 9px 16px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: var(--rad-sm);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: var(--ease);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.share-copy-btn:hover { background: var(--navy-dark); }
.share-icon { font-size: 15px; }

/* ===== PAGINATION ===== */
.page_info_div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    padding: 14px 0;
}
.a_page_info,
.page_info_focus {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--rad-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--ease);
    min-width: 34px;
    text-align: center;
}
.a_page_info {
    background: var(--bg-white);
    color: var(--txt-main);
    border: 1px solid var(--border);
}
.a_page_info:hover {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.page_info_focus {
    background: var(--navy);
    color: #fff;
    border: 1px solid var(--navy-dark);
    cursor: default;
}

/* ===== FRIEND LINKS ===== */
.g-flinks {
    padding: 10px 12px;
    background: var(--bg-white);
    border-radius: var(--rad);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px var(--shadow);
}
.g-flinks dl { margin: 0; }
.g-flinks dd { display: inline-block; margin: 3px; }
.g-flinks a { color: var(--blue-link); text-decoration: none; font-size: 13px; }
.g-flinks a:hover { color: var(--red); }

/* ===== FOOTER ===== */
.g-footer {
    padding: 18px 0;
    text-align: center;
    border-top: 2px solid var(--navy);
    margin-top: 14px;
    background: var(--bg-white);
}
.g-footer p { margin: 5px 0; color: var(--txt-muted); font-size: 12px; }
.g-footer a { color: var(--txt-muted); text-decoration: none; }
.g-footer a:hover { color: var(--navy); }

/* ===== UTILITIES ===== */
.hide_mobile { display: block; }
.hide_pc     { display: block; }
@media (min-width: 769px) { .hide_pc { display: none !important; } }

.clearfix::after { content:''; display:table; clear:both; }
img[data-original] { background: var(--bg-panel); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .g-wrap { padding: 0 8px; }
    .g-pad  { padding: 6px 0; }
    .g-topbar { padding: 0.4rem 0; }
    .g-topbar-inner { gap: 10px; }
    .g-site-link { font-size: 16px; }
    .g-domain-text { font-size: 13px; }
    .g-domain-label { font-size: 10px; }

    /* Nav: zone 15%, links 85%, 4-per-row, min 12px */
    .g-zone-lbl { width:15%; font-size:10px; padding:6px 2px; }
    .g-zone-cats { width:85%; gap:3px; padding:6px 4px; }
    .g-zone-cats a {
        font-size: 12px;
        padding: 4px 1px;
        width: calc((100% - 9px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    /* Search one row */
    .g-search-box form { flex-wrap: nowrap; }
    .g-search-box input[type="text"] { min-width:60px; padding:7px 8px; font-size:12px; }
    .g-search-box button { padding:7px 8px; font-size:11px; }

    /* Cards 2-per-row */
    .g-card-grid { grid-template-columns:repeat(2,1fr); gap:8px; }

    .g-item-meta h5 { font-size:11px; }
    .g-block-ttl    { font-size:14px; }
    .g-block        { margin-bottom:10px; }

    .g-btn-row  { padding:9px 6px; gap:6px; }
    .down_btn   { padding:8px 12px; font-size:12px; }
    .g-share-row { padding:9px; flex-wrap:nowrap; }
    .share-url-display { padding:8px 10px; }
    .share-copy-btn { padding:8px 10px; font-size:11px; }

    .hide_mobile { display: none !important; }
}

@media (max-width: 480px) {
    .g-site-link { font-size:14px; }
    .g-domain-text { font-size:12px; }
    .g-zone-lbl { width:15%; font-size:10px; padding:5px 1px; }
    .g-zone-cats { width:85%; gap:3px; padding:5px 3px; }
    .g-zone-cats a {
        font-size: 12px;
        padding: 3px 1px;
        width: calc((100% - 9px) / 4);
    }
    .g-search-box input[type="text"] { padding:7px 6px; font-size:11px; }
    .g-search-box button { padding:7px 6px; font-size:11px; }
    .g-card-grid { grid-template-columns:repeat(2,1fr); gap:6px; }
    .down_btn { padding:7px 9px; font-size:11px; }
    .g-btn-row { gap:4px; }
}
