/* ============================================================
   Film & Media Portal — New Relic Dark Green Tech Theme
   ============================================================ */

:root {
    --nr-green:        #00d084;
    --nr-green-dk:     #00a86b;
    --nr-green-lt:     #33e09b;
    --nr-green-glow:   rgba(0,208,132,0.18);
    --nr-green-pale:   rgba(0,208,132,0.10);
    --page-bg:         #151920;
    --topbar-bg:       #1a1f2e;
    --card-bg:         #1e2433;
    --card-bg2:        #232a3b;
    --border-clr:      #2a3349;
    --border-lt:       #344060;
    --txt-main:        #f0f2f7;
    --txt-sub:         #b8c0d4;
    --txt-muted:       #6b7899;
    --btn-grad:        linear-gradient(135deg,#00d084 0%,#00b872 100%);
    --btn-grad-hov:    linear-gradient(135deg,#00b872 0%,#008f58 100%);
    --card-shadow:     0 2px 14px rgba(0,0,0,0.40);
    --card-shadow-h:   0 6px 28px rgba(0,208,132,0.22);
    --radius:          12px;
    --radius-sm:       8px;
    --radius-xs:       6px;
    --tr:              all 0.22s ease;
}

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

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

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--page-bg); }
::-webkit-scrollbar-thumb { background: var(--border-lt); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--nr-green-dk); }

/* ===== TOP HEADER ===== */
.nr-topbar {
    background: var(--topbar-bg);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-clr);
    box-shadow: 0 2px 16px rgba(0,0,0,0.50);
    position: relative;
}

/* subtle green glow line at top */
.nr-topbar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--nr-green) 40%, var(--nr-green-lt) 60%, transparent 100%);
    opacity: 0.85;
}

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

.nr-brand-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* small hex icon accent */
.nr-brand-icon {
    width: 28px;
    height: 28px;
    background: var(--nr-green);
    clip-path: polygon(50% 0%,93% 25%,93% 75%,50% 100%,7% 75%,7% 25%);
    flex-shrink: 0;
    display: inline-block;
}

.nr-site-name {
    font-size: 26px;
    font-weight: 900;
    color: var(--txt-main);
    letter-spacing: -0.3px;
    font-style: normal;
    text-decoration: none;
}

.nr-domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--nr-green-pale);
    border: 1.5px solid var(--nr-green-dk);
    border-radius: var(--radius-xs);
    padding: 5px 14px;
}

.nr-domain-lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--nr-green);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    white-space: nowrap;
}

.nr-domain-url {
    font-size: 18px;
    font-weight: 800;
    color: var(--nr-green);
    letter-spacing: 0.2px;
    white-space: nowrap;
    text-shadow: 0 0 12px rgba(0,208,132,0.45);
}

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

.content { padding: 8px 0; }

/* ===== CATEGORY NAV ===== */
.nr-nav-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid var(--border-clr);
    box-shadow: var(--card-shadow);
}

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

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

.nr-zone-lbl {
    font-weight: 700;
    font-size: 13px;
    color: var(--nr-green);
    white-space: nowrap;
    width: 10%;
    text-align: center;
    border-right: 1px solid var(--border-clr);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 6px;
    flex-shrink: 0;
    background: rgba(0,208,132,0.07);
}

.nr-zone-cats {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
    align-items: center;
}

.nr-zone-cats a {
    display: inline-block;
    color: var(--txt-sub);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--radius-xs);
    transition: var(--tr);
    background: var(--card-bg2);
    border: 1px solid var(--border-clr);
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    width: calc((100% - 42px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.nr-zone-cats a:hover {
    background: var(--nr-green);
    color: #0a1008;
    border-color: var(--nr-green);
    box-shadow: 0 2px 10px rgba(0,208,132,0.30);
    font-weight: 600;
}

.nr-zone-cats a.active {
    background: var(--nr-green);
    color: #0a1008;
    border-color: var(--nr-green);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,208,132,0.30);
}

/* ===== SEARCH MODULE ===== */
.nr-search-wrap {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 11px;
    margin-bottom: 8px;
    border: 1px solid var(--border-clr);
    box-shadow: var(--card-shadow);
}

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

.nr-search-wrap input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 9px 14px;
    border: 1.5px solid var(--border-lt);
    border-radius: var(--radius-sm);
    background: var(--card-bg2);
    color: var(--txt-main);
    font-size: 14px;
    outline: none;
    transition: var(--tr);
}

.nr-search-wrap input[type="text"]:focus {
    border-color: var(--nr-green);
    box-shadow: 0 0 0 3px rgba(0,208,132,0.12);
}

.nr-search-wrap input[type="text"]::placeholder { color: var(--txt-muted); }

.nr-search-wrap button {
    padding: 9px 15px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--btn-grad);
    color: #081a10;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--tr);
    white-space: nowrap;
    flex-shrink: 0;
}

.nr-search-wrap button:hover {
    background: var(--btn-grad-hov);
    box-shadow: 0 4px 14px rgba(0,208,132,0.35);
}

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

.nr-tag-item {
    padding: 4px 13px;
    background: var(--nr-green-pale);
    border-radius: 16px;
    color: var(--nr-green);
    text-decoration: none;
    font-size: 13px;
    transition: var(--tr);
    border: 1px solid rgba(0,208,132,0.25);
    white-space: nowrap;
}

.nr-tag-item:hover {
    background: var(--nr-green);
    color: #0a1008;
    border-color: var(--nr-green);
    box-shadow: 0 2px 10px rgba(0,208,132,0.30);
    font-weight: 600;
}

/* ===== SECTION BLOCK ===== */
.nr-section { margin-bottom: 14px; }

.nr-sect-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-clr);
    position: relative;
}

.nr-sect-hd::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--nr-green);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(0,208,132,0.50);
}

.nr-sect-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--txt-main);
    margin: 0;
}

.nr-sect-title a {
    color: var(--txt-main);
    text-decoration: none;
    transition: var(--tr);
}

.nr-sect-title a:hover { color: var(--nr-green); }

/* ===== FILM CARD GRID ===== */
.nr-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 13px;
    list-style: none;
    padding: 0;
}

.nr-grid li { animation: nrIn 0.38s ease backwards; }
.nr-grid li:nth-child(1){animation-delay:0.03s}
.nr-grid li:nth-child(2){animation-delay:0.06s}
.nr-grid li:nth-child(3){animation-delay:0.09s}
.nr-grid li:nth-child(4){animation-delay:0.12s}
.nr-grid li:nth-child(5){animation-delay:0.15s}
.nr-grid li:nth-child(6){animation-delay:0.18s}
.nr-grid li:nth-child(7){animation-delay:0.21s}
.nr-grid li:nth-child(8){animation-delay:0.24s}

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

.nr-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    aspect-ratio: 600 / 350;
    background: var(--card-bg2);
    border: 1px solid var(--border-clr);
    box-shadow: var(--card-shadow);
    transition: var(--tr);
}

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

.nr-thumb:hover {
    box-shadow: var(--card-shadow-h);
    border-color: var(--nr-green);
    transform: translateY(-2px);
}

.nr-thumb:hover img { transform: scale(1.07); }

.nr-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,rgba(0,60,30,0.70) 0%,transparent 58%);
    opacity: 0;
    transition: opacity 0.28s ease;
    pointer-events: none;
}

.nr-thumb:hover::after { opacity: 1; }

/* green glow pulse on hover */
.nr-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 0 2px var(--nr-green);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 2;
}

.nr-thumb:hover::before { opacity: 1; }

.nr-info { padding: 7px 0 2px; }

.nr-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--txt-sub);
}

.nr-info h5 a {
    color: var(--txt-sub);
    text-decoration: none;
    transition: var(--tr);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nr-info h5 a:hover { color: var(--nr-green); }

/* ===== VIDEO PLAYER ===== */
.video-container {
    width: 100%;
    height: 640px;
    max-height: 640px;
    margin-bottom: 14px;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,208,132,0.15);
    position: relative;
    border: 1px solid var(--border-clr);
}

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

.MacPlayer {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.50);
}

/* ===== TORRENT PREVIEW ===== */
.torrent-capture-grid { width: 100%; margin-top: 10px; }

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

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

/* ===== DOWNLOAD BUTTONS ===== */
.nr-dl-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 14px;
    background: var(--card-bg);
    border-radius: var(--radius);
    margin: 12px 0;
    border: 1px solid var(--border-clr);
    box-shadow: var(--card-shadow);
}

.nr-dl-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--btn-grad);
    color: #081a10;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    transition: var(--tr);
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    letter-spacing: 0.3px;
}

.nr-dl-btn:hover {
    background: var(--btn-grad-hov);
    box-shadow: 0 5px 18px rgba(0,208,132,0.40);
    transform: translateY(-1px);
}

/* ===== SHARE PANEL ===== */
.share-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin: 12px 0;
    border: 1px solid var(--border-clr);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

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

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

.share-url {
    font-size: 12px;
    color: var(--txt-muted);
    font-family: 'Courier New', monospace;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-copy-btn {
    padding: 9px 18px;
    background: var(--btn-grad);
    color: #081a10;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--tr);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.share-copy-btn:hover {
    background: var(--btn-grad-hov);
    box-shadow: 0 4px 14px rgba(0,208,132,0.32);
}

.share-icon { font-size: 15px; }

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

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

.a_page_info {
    background: var(--card-bg);
    color: var(--txt-sub);
    border: 1px solid var(--border-lt);
}

.a_page_info:hover {
    background: var(--nr-green);
    border-color: var(--nr-green);
    color: #081a10;
    font-weight: 700;
}

.page_info_focus {
    background: var(--btn-grad);
    color: #081a10;
    border: 1px solid var(--nr-green);
    cursor: default;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0,208,132,0.25);
}

/* ===== FOOTER ===== */
.nr-footer {
    padding: 18px 0;
    text-align: center;
    border-top: 1px solid var(--border-clr);
    margin-top: 16px;
    background: var(--topbar-bg);
}

.nr-footer p { margin: 6px 0; color: var(--txt-muted); font-size: 13px; }
.nr-footer a { color: var(--txt-muted); text-decoration: none; transition: var(--tr); }
.nr-footer a:hover { color: var(--nr-green); }

/* ===== FRIENDLY LINKS ===== */
.nr-flinks {
    padding: 10px 12px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-clr);
    box-shadow: var(--card-shadow);
}

.nr-flinks dl { margin: 0; }
.nr-flinks dd { display: inline-block; margin: 3px 4px; }
.nr-flinks a { color: var(--txt-muted); text-decoration: none; font-size: 13px; transition: var(--tr); }
.nr-flinks a:hover { color: var(--nr-green); }

.pd5 { padding: 2px 0; display: inline-block; }

/* ===== UTILITIES ===== */
.clearfix::after { content:""; display:table; clear:both; }
img[data-original] { background: var(--card-bg2); }

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

/* ============================================================
   RESPONSIVE — TABLET / LARGE PHONE  (<=768px)
   ============================================================ */
@media (max-width: 768px) {

    .container { padding: 0 8px; }
    .content   { padding: 6px 0; }
    .nr-topbar { padding: 7px 0; }

    .nr-site-name  { font-size: 20px; }
    .nr-domain-lbl { font-size: 10px; }
    .nr-domain-url { font-size: 15px; }
    .nr-brand-icon { width: 22px; height: 22px; }

    /* ---- Nav: label=15%, links=85%, 4 per row × 2 rows ---- */
    .nr-zone-lbl {
        width: 15%;
        font-size: 10px;
        padding: 7px 3px;
    }
    .nr-zone-cats {
        width: 85%;
        gap: 4px;
        padding: 6px 5px;
    }
    .nr-zone-cats a {
        font-size: 13px;
        padding: 5px 2px;
        width: calc((100% - 12px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    /* ---- Film grid: 2 columns ---- */
    .nr-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .nr-info h5 { font-size: 12px; }

    /* ---- Search: single row, NO wrap ---- */
    .nr-search-wrap form { flex-wrap: nowrap; gap: 5px; }
    .nr-search-wrap input[type="text"] {
        min-width: 0;
        padding: 8px 10px;
        font-size: 13px;
    }
    .nr-search-wrap button {
        padding: 8px 10px;
        font-size: 12px;
        flex-shrink: 0;
    }

    .nr-sect-title { font-size: 16px; }
    .nr-tag-cloud  { gap: 5px; padding: 7px 10px; }
    .nr-tag-item   { padding: 4px 10px; font-size: 12px; }

    .nr-dl-bar  { padding: 10px 8px; gap: 7px; }
    .nr-dl-btn  { padding: 9px 14px; font-size: 13px; }

    .share-section     { padding: 9px 10px; }
    .share-url-display { padding: 7px 10px; }
    .share-label       { font-size: 11px; }
    .share-url         { font-size: 10px; }
    .share-copy-btn    { padding: 8px 11px; font-size: 12px; }

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

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

/* ============================================================
   RESPONSIVE — SMALL PHONE  (<=480px)
   ============================================================ */
@media (max-width: 480px) {

    .nr-site-name  { font-size: 17px; }
    .nr-domain-lbl { font-size: 9px; }
    .nr-domain-url { font-size: 13px; }
    .nr-brand-icon { width: 18px; height: 18px; }

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

    .nr-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .nr-info h5 { font-size: 12px; }

    .nr-search-wrap input[type="text"] { padding: 7px 8px; font-size: 12px; }
    .nr-search-wrap button             { padding: 7px 8px; font-size: 11px; }

    .nr-sect-title   { font-size: 15px; }
    .video-container { height: 56.25vw; max-height: 280px; }
    .nr-dl-btn       { padding: 8px 12px; font-size: 12px; }
    .share-copy-btn  { padding: 7px 9px; font-size: 11px; }
    .page_info_div   { padding: 8px 0; }
}

/* ===== PC — enforce 4-column grid ===== */
@media (min-width: 769px) {
    .nr-grid { grid-template-columns: repeat(4, 1fr); }
}
