/* StreamSite Template - Green Nav Clean White Style */

:root {
    --g-primary: #1a9b3c;
    --g-primary-dk: #158032;
    --g-primary-lt: #e8f7ed;
    --g-accent: #27ae60;
    --g-red: #e74c3c;
    --g-orange: #f39c12;
    --g-text: #222222;
    --g-text-sub: #555555;
    --g-muted: #888888;
    --g-border: #e0e0e0;
    --g-bg: #f4f4f4;
    --g-surface: #ffffff;
    --g-nav-height: 44px;
    --g-shadow-xs: 0 1px 3px rgba(0,0,0,0.06);
    --g-shadow-sm: 0 2px 8px rgba(0,0,0,0.09);
    --g-shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --g-shadow-lg: 0 8px 28px rgba(0,0,0,0.16);
    --g-grad: linear-gradient(135deg, #1a9b3c 0%, #27ae60 100%);
    --g-r: 4px;
    --g-r-md: 6px;
    --g-r-lg: 8px;
    --g-ease: cubic-bezier(0.25,0.46,0.45,0.94);
    --g-dur: 0.22s;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    background: var(--g-bg);
    color: var(--g-text);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   BRANDING  (不置顶)
============================================================ */

.tp-branding {
    background: var(--g-surface);
    border-bottom: 1px solid var(--g-border);
    padding: 12px 0;
    box-shadow: var(--g-shadow-xs);
}

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

.tp-logo-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    transition: opacity var(--g-dur) var(--g-ease);
}

.tp-logo-link:hover { opacity: 0.82; }

.tp-logo-icon {
    width: 34px;
    height: 34px;
    background: var(--g-grad);
    border-radius: var(--g-r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(26,155,60,0.3);
}

.tp-site-name {
    font-size: 24px;
    font-weight: 800;
    color: var(--g-primary);
    letter-spacing: -0.3px;
    line-height: 1;
}

.tp-domain-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--g-primary-lt);
    border: 1.5px solid var(--g-primary);
    border-radius: 20px;
    padding: 5px 14px;
    animation: g-pulse 2.8s ease-in-out infinite;
}

@keyframes g-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(26,155,60,0.4); }
    50%       { box-shadow: 0 0 0 7px rgba(26,155,60,0); }
}

.tp-domain-badge {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: var(--g-primary);
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.tp-domain-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--g-text);
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* ============================================================
   GREEN NAV BAR  (PC only)
============================================================ */

.gn-bar {
    background: var(--g-grad);
    display: block;
}

.gn-bar-row {
    display: flex;
    align-items: stretch;
    height: var(--g-nav-height);
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

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

.gn-zone-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    background: rgba(0,0,0,0.15);
    width: 10%;
    min-width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1.3;
    border-right: 1px solid rgba(255,255,255,0.15);
}

.gn-zone-links {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    padding: 0 6px;
    gap: 2px;
    width: 90%;
    overflow: hidden;
}

.gn-zone-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    padding: 0 4px;
    height: 30px;
    border-radius: var(--g-r);
    font-size: 13px;
    white-space: nowrap;
    text-align: center;
    transition: background var(--g-dur) var(--g-ease), color var(--g-dur) var(--g-ease);
    width: calc((100% - 14px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.gn-zone-links a:hover {
    background: rgba(255,255,255,0.22);
    color: #fff;
}

.gn-zone-links a.active {
    background: rgba(255,255,255,0.28);
    color: #fff;
    font-weight: 700;
}

/* ============================================================
   MOBILE NAV ROWS  (hidden on PC)
============================================================ */

.gn-mob-rows {
    background: var(--g-surface);
    border-bottom: 1px solid var(--g-border);
    box-shadow: var(--g-shadow-xs);
    display: none;
}

.gn-mob-strip {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #f0f0f0;
    overflow: hidden;
    width: 100%;
}

.gn-mob-strip:last-child { border-bottom: none; }

.gn-mob-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--g-primary);
    background: var(--g-primary-lt);
    width: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 3px;
    text-align: center;
    flex-shrink: 0;
    box-shadow: inset -2px 0 0 var(--g-primary);
    line-height: 1.3;
}

.gn-mob-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 5px 4px;
    width: 85%;
    align-content: start;
}

.gn-mob-items a {
    display: block;
    color: var(--g-text-sub);
    text-decoration: none;
    padding: 5px 2px;
    border-radius: var(--g-r);
    border: 1px solid var(--g-border);
    background: #fafafa;
    white-space: nowrap;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background var(--g-dur) var(--g-ease), color var(--g-dur) var(--g-ease), border-color var(--g-dur) var(--g-ease);
}

.gn-mob-items a:hover,
.gn-mob-items a.active {
    background: var(--g-primary);
    color: #fff;
    border-color: var(--g-primary);
}

.gn-mob-items a.active { font-weight: 600; }

/* ============================================================
   LAYOUT
============================================================ */

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.content { padding: 14px 0; }

/* ============================================================
   SEARCH BOX
============================================================ */

.g-search-box {
    background: var(--g-surface);
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-lg);
    padding: 12px;
    margin-bottom: 14px;
    box-shadow: var(--g-shadow-xs);
}

.g-search-box form {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
}

.g-search-box input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 10px 15px;
    border: 1.5px solid var(--g-border);
    border-radius: var(--g-r-md);
    background: var(--g-bg);
    color: var(--g-text);
    font-size: 14px;
    outline: none;
    transition: border-color var(--g-dur) var(--g-ease), box-shadow var(--g-dur) var(--g-ease);
    font-family: inherit;
}

.g-search-box input[type="text"]:focus {
    border-color: var(--g-primary);
    box-shadow: 0 0 0 3px rgba(26,155,60,0.12);
    background: #fff;
}

.g-search-box input[type="text"]::placeholder { color: #aaa; }

.g-search-box button {
    padding: 10px 18px;
    border: none;
    border-radius: var(--g-r-md);
    background: var(--g-grad);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity var(--g-dur) var(--g-ease), box-shadow var(--g-dur) var(--g-ease);
    font-family: inherit;
    letter-spacing: 0.2px;
}

.g-search-box button:hover {
    opacity: 0.88;
    box-shadow: 0 4px 14px rgba(26,155,60,0.3);
}

/* ============================================================
   HOT TAGS
============================================================ */

.g-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    padding: 12px;
    background: var(--g-surface);
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-lg);
    margin-bottom: 14px;
    box-shadow: var(--g-shadow-xs);
}

.g-tag-item {
    padding: 4px 12px;
    background: #f7f7f7;
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    color: var(--g-text-sub);
    text-decoration: none;
    font-size: 12px;
    transition: background var(--g-dur) var(--g-ease), color var(--g-dur) var(--g-ease), border-color var(--g-dur) var(--g-ease);
    line-height: 1;
}

.g-tag-item:hover {
    background: var(--g-primary);
    color: #fff;
    border-color: var(--g-primary);
}

/* ============================================================
   SECTION HEADING
============================================================ */

.g-section { margin-bottom: 24px; }

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

.g-sec-hd::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--g-primary);
    border-radius: 1px;
}

.g-sec-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--g-text);
    margin: 0;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.g-sec-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--g-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

.g-sec-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--g-dur) var(--g-ease);
}

.g-sec-title a:hover { color: var(--g-primary); }

/* ============================================================
   CARD GRID  (PC: 4col, Mobile: 2col)
============================================================ */

.g-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    list-style: none;
    padding: 0;
}

@keyframes g-cardIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.g-card-grid li:nth-child(1) { animation: g-cardIn 0.35s var(--g-ease) 0.04s both; }
.g-card-grid li:nth-child(2) { animation: g-cardIn 0.35s var(--g-ease) 0.08s both; }
.g-card-grid li:nth-child(3) { animation: g-cardIn 0.35s var(--g-ease) 0.12s both; }
.g-card-grid li:nth-child(4) { animation: g-cardIn 0.35s var(--g-ease) 0.16s both; }
.g-card-grid li:nth-child(5) { animation: g-cardIn 0.35s var(--g-ease) 0.20s both; }
.g-card-grid li:nth-child(6) { animation: g-cardIn 0.35s var(--g-ease) 0.24s both; }
.g-card-grid li:nth-child(7) { animation: g-cardIn 0.35s var(--g-ease) 0.28s both; }
.g-card-grid li:nth-child(8) { animation: g-cardIn 0.35s var(--g-ease) 0.32s both; }

.g-thumb-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--g-r-md);
    aspect-ratio: 600 / 350;
    background: #ececec;
    border: 1px solid var(--g-border);
    box-shadow: var(--g-shadow-xs);
    transition: box-shadow var(--g-dur) var(--g-ease), transform var(--g-dur) var(--g-ease);
}

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

.g-thumb-link:hover {
    box-shadow: var(--g-shadow-md);
    transform: translateY(-2px);
}

.g-thumb-link:hover img { transform: scale(1.05); }

.g-thumb-link::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: rgba(255,255,255,0.95);
    background: rgba(26,155,60,0.35);
    opacity: 0;
    transition: opacity var(--g-dur) var(--g-ease);
    z-index: 1;
}

.g-thumb-link:hover::after { opacity: 1; }

.g-card-info { padding: 7px 0 0; }

.g-card-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
}

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

.g-card-info h5 a:hover { color: var(--g-primary); }

/* ============================================================
   VIDEO PLAYER
============================================================ */

.g-player-wrap {
    width: 100%;
    height: 640px;
    max-height: 640px;
    background: #000;
    border-radius: var(--g-r-lg);
    overflow: hidden;
    box-shadow: var(--g-shadow-lg);
    margin-bottom: 18px;
    position: relative;
}

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

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

/* ============================================================
   DETAIL TITLE BAR
============================================================ */

.g-detail-bar {
    line-height: 1.8;
    text-align: center;
    padding: 16px 20px;
    font-size: 17px;
    margin: 16px 0;
    word-break: break-all;
    background: var(--g-primary-lt);
    border-radius: var(--g-r-lg);
    border: 1px solid #c3e8ce;
    box-shadow: var(--g-shadow-xs);
}

.g-cat-link {
    color: var(--g-primary);
    text-decoration: none;
    font-weight: 700;
    margin-right: 8px;
    transition: color var(--g-dur) var(--g-ease);
}

.g-cat-link:hover { color: var(--g-primary-dk); }

/* ============================================================
   INFO PANEL
============================================================ */

.g-info-panel {
    font-size: 15px;
    line-height: 2;
    padding: 20px 24px;
    background: var(--g-surface);
    border-radius: var(--g-r-lg);
    border: 1px solid var(--g-border);
    margin: 16px 0;
    box-shadow: var(--g-shadow-xs);
}

/* ============================================================
   TORRENT PREVIEW
============================================================ */

.g-preview-wrap { width: 100%; margin-top: 12px; }

.g-preview-wrap picture { display: block; width: 100%; }

.g-preview-wrap picture img {
    width: 100%;
    height: auto;
    border-radius: var(--g-r-md);
    border: 1px solid var(--g-border);
    display: block;
}

/* ============================================================
   ACTION BUTTONS
============================================================ */

.g-action-row {
    text-align: center;
    padding: 16px;
    background: var(--g-surface);
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-lg);
    margin: 16px 0;
    box-shadow: var(--g-shadow-xs);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.g-btn {
    display: inline-block;
    padding: 11px 24px;
    background: var(--g-grad);
    color: #fff;
    text-decoration: none;
    border-radius: var(--g-r-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity var(--g-dur) var(--g-ease), box-shadow var(--g-dur) var(--g-ease);
    letter-spacing: 0.2px;
    font-family: inherit;
}

.g-btn:hover {
    opacity: 0.87;
    box-shadow: 0 5px 16px rgba(26,155,60,0.35);
}

/* ============================================================
   SHARE SECTION
============================================================ */

.g-share-strip {
    background: var(--g-surface);
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-lg);
    padding: 14px 16px;
    margin: 14px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--g-shadow-xs);
}

.g-share-url-box {
    flex: 1;
    min-width: 0;
    background: var(--g-bg);
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-md);
    padding: 9px 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.g-share-lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--g-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.g-share-uri {
    font-size: 12px;
    color: var(--g-muted);
    word-break: break-all;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.g-share-copy {
    padding: 9px 18px;
    background: var(--g-grad);
    color: #fff;
    border: none;
    border-radius: var(--g-r-md);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity var(--g-dur) var(--g-ease), box-shadow var(--g-dur) var(--g-ease);
    font-family: inherit;
}

.g-share-copy:hover {
    opacity: 0.88;
    box-shadow: 0 4px 14px rgba(26,155,60,0.3);
}

.g-share-ico { font-size: 15px; }

/* ============================================================
   PAGINATION
============================================================ */

.g-pg {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.g-pg-a {
    display: inline-block;
    padding: 7px 13px;
    border-radius: var(--g-r-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background var(--g-dur) var(--g-ease), color var(--g-dur) var(--g-ease), border-color var(--g-dur) var(--g-ease);
    min-width: 36px;
    text-align: center;
    background: var(--g-surface);
    color: var(--g-text);
    border: 1px solid var(--g-border);
}

.g-pg-a:hover {
    background: var(--g-primary);
    color: #fff;
    border-color: var(--g-primary);
}

.g-pg-cur {
    display: inline-block;
    padding: 7px 13px;
    border-radius: var(--g-r-md);
    background: var(--g-grad);
    color: #fff;
    border: 1px solid var(--g-primary);
    font-weight: 700;
    font-size: 13px;
    min-width: 36px;
    text-align: center;
    cursor: default;
}

/* ============================================================
   FOOTER
============================================================ */

.g-footer {
    padding: 22px 0;
    text-align: center;
    border-top: 1px solid var(--g-border);
    margin-top: 30px;
    background: var(--g-surface);
}

.g-footer p { margin: 5px 0; color: var(--g-muted); font-size: 12px; }

.g-footer a {
    color: var(--g-muted);
    text-decoration: none;
    transition: color var(--g-dur) var(--g-ease);
}

.g-footer a:hover { color: var(--g-primary); }

/* ============================================================
   FRIENDLY LINKS
============================================================ */

.g-flink-box {
    padding: 12px;
    background: var(--g-surface);
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-md);
}

.g-flink-box dl { margin: 0; }
.g-flink-box dd { display: inline-block; margin: 3px 4px; }

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

.g-flink-box a:hover { color: var(--g-primary); }
.pd5 { padding: 3px 5px; }

/* ============================================================
   MISC
============================================================ */

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

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

/* ============================================================
   PC: 4 columns, show green bar, hide mob rows
============================================================ */

@media (min-width: 769px) {
    .g-card-grid { grid-template-columns: repeat(4, 1fr); }
    .hide-on-mob { display: block; }
    .hide-on-pc  { display: none !important; }
    .gn-mob-rows { display: none !important; }
    .gn-bar      { display: block; }
}

/* ============================================================
   MOBILE (max 768px)
============================================================ */

@media (max-width: 768px) {
    .container { padding: 0 10px; }
    .content { padding: 10px 0; }

    .tp-branding { padding: 10px 0; }
    .tp-branding-inner { gap: 10px; }
    .tp-site-name { font-size: 19px; }
    .tp-domain-text { font-size: 12px; }
    .tp-domain-badge { font-size: 9px; }

    /* hide green bar, show mobile rows */
    .gn-bar { display: none !important; }
    .gn-mob-rows { display: block; }

    .gn-mob-label { font-size: 10px; }

    .gn-mob-items {
        gap: 4px;
        padding: 5px 4px;
    }
    .gn-mob-items a {
        font-size: 14px;
        padding: 4px 2px;
    }

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

    .g-player-wrap {
        height: 56.25vw;
        max-height: 380px;
        margin-bottom: 12px;
    }

    .g-search-box input[type="text"] { min-width: 100px; padding: 9px 12px; font-size: 13px; }
    .g-search-box button { padding: 9px 12px; font-size: 12px; }

    .g-btn { padding: 9px 14px; font-size: 12px; }
    .g-action-row { gap: 7px; }

    .g-share-strip { padding: 12px; gap: 8px; }
    .g-share-lbl { font-size: 10px; }
    .g-share-uri { font-size: 10px; }
    .g-share-copy { padding: 8px 11px; font-size: 11px; }

    .g-sec-title { font-size: 16px; }
    .g-card-info h5 { font-size: 12px; }

    .g-pg-a, .g-pg-cur { padding: 6px 10px; font-size: 12px; min-width: 32px; }

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

    .hide-on-mob { display: none !important; }
    .hide-on-pc  { display: block; }
}

/* ============================================================
   SMALL MOBILE (max 480px)
============================================================ */

@media (max-width: 480px) {
    .tp-site-name { font-size: 17px; }

    .gn-mob-items {
        gap: 3px;
        padding: 4px 3px;
    }
    .gn-mob-items a {
        font-size: 12px;
        padding: 3px 1px;
    }

    .g-card-grid { gap: 8px; }
    .g-card-info h5 { font-size: 11px; }

    .g-search-box input[type="text"] { min-width: 80px; padding: 8px 10px; font-size: 12px; }
    .g-search-box button { padding: 8px 9px; font-size: 11px; }

    .g-action-row { gap: 5px; padding: 12px 8px; }
    .g-btn { padding: 8px 10px; font-size: 11px; }

    .g-share-strip { padding: 9px; gap: 6px; }
    .g-share-copy { padding: 7px 9px; font-size: 11px; }
}
