/* ====== 黑白极简杂志风 Noir 模板 ====== */

/* ---- 变量 ---- */
:root {
    --black: #111;
    --gray: #888;
    --gray-light: #ddd;
    --white: #fff;
    --max-w: 960px;
    --font-serif: Georgia, "Times New Roman", serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--white);
    color: var(--black);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--black);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul, ol {
    list-style: none;
}

/* ---- 全局分隔线 ---- */
.nr-sep {
    height: 1px;
    background: var(--gray-light);
    margin: 0 auto;
    max-width: var(--max-w);
}

/* ---- 最外层容器 ---- */
.nr-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- 头部 ---- */
.nr-head {
    border-bottom: 1px solid var(--gray-light);
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 100;
}

.nr-head-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1rem;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* ---- 品牌 logo ---- */
.nr-brand {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--black);
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
}

.nr-brand:hover {
    text-decoration: none;
    color: var(--black);
}

/* ---- 导航 ---- */
.nr-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.nr-nav::-webkit-scrollbar {
    display: none;
}

.nr-nav-link {
    font-size: 0.875rem;
    color: var(--gray);
    white-space: nowrap;
    text-decoration: none;
}

.nr-nav-link:hover,
.nr-nav-link.is-active {
    color: var(--black);
    text-decoration: none;
}

/* ---- 搜索框（头部） ---- */
.nr-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-light);
    flex-shrink: 0;
}

.nr-search-input {
    border: none;
    outline: none;
    padding: 0.35rem 0.6rem;
    font-size: 0.875rem;
    width: 160px;
    background: transparent;
    color: var(--black);
}

.nr-search-btn {
    border: none;
    border-left: 1px solid var(--gray-light);
    background: transparent;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    color: var(--black);
    white-space: nowrap;
}

.nr-search-btn:hover {
    background: var(--black);
    color: var(--white);
}

/* ---- 汉堡按钮（移动端） ---- */
.nr-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}

.nr-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--black);
    transition: opacity 0.2s;
}

/* ---- 主内容区 ---- */
.nr-main {
    flex: 1;
    max-width: var(--max-w);
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ---- 通用 section ---- */
.nr-section {
    padding: 2.5rem 0;
}

/* ---- section 头部 ---- */
.nr-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

/* ---- 标题（衬线，大号） ---- */
.nr-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--black);
    letter-spacing: 0.01em;
}

/* ---- 页面大标题 ---- */
.nr-page-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: bold;
    color: var(--black);
    margin-bottom: 0.4rem;
}

/* ---- 更多链接 ---- */
.nr-more {
    font-size: 0.8125rem;
    color: var(--gray);
    text-decoration: none;
    white-space: nowrap;
}

.nr-more:hover {
    color: var(--black);
    text-decoration: underline;
}

/* ---- meta 文字（灰色小字） ---- */
.nr-meta {
    font-size: 0.8125rem;
    color: var(--gray);
    line-height: 1.4;
}

/* ---- 标签 ---- */
.nr-label {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--gray);
    border: 1px solid var(--gray-light);
    padding: 0 0.4em;
    margin-bottom: 0.5rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ---- 按钮 ---- */
.nr-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.25rem;
    background: var(--black);
    color: var(--white);
    font-size: 0.875rem;
    text-decoration: none;
    border: 1px solid var(--black);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.nr-btn:hover {
    background: var(--white);
    color: var(--black);
    text-decoration: none;
}

/* ====== 首页 Hero ====== */
.nr-hero {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.nr-hero-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}

/* 左侧主推 */
.nr-hero-main {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.nr-hero-pic {
    display: block;
    overflow: hidden;
}

.nr-hero-pic img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}

.nr-hero-body {
    padding-top: 0.25rem;
}

.nr-hero-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: bold;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

.nr-hero-title a {
    color: var(--black);
    text-decoration: none;
}

.nr-hero-title a:hover {
    text-decoration: underline;
}

.nr-hero-meta {
    font-size: 0.8125rem;
    color: var(--gray);
    margin-bottom: 0.75rem;
}

.nr-hero-summary {
    font-size: 0.9375rem;
    color: var(--black);
    line-height: 1.65;
    margin-bottom: 0;
}

/* 右侧推荐列表 */
.nr-hero-side {
    border-left: 1px solid var(--gray-light);
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.nr-hero-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 0.75rem;
    align-items: start;
}

.nr-hero-item-pic {
    display: block;
    overflow: hidden;
}

.nr-hero-item-pic img {
    width: 56px;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}

.nr-hero-item-body {
    padding-top: 0.1rem;
}

.nr-hero-item-name {
    display: block;
    font-size: 0.875rem;
    font-weight: bold;
    color: var(--black);
    line-height: 1.35;
    margin-bottom: 0.3rem;
    text-decoration: none;
}

.nr-hero-item-name:hover {
    text-decoration: underline;
}

/* ====== 视频网格 ====== */
.nr-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem 1rem;
}

/* 视频卡片 */
.nr-item {
    /* 无阴影无边框，极简 */
}

.nr-pic {
    display: block;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.nr-pic img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}

.nr-pic:hover img {
    opacity: 0.85;
}

.nr-name {
    font-size: 0.875rem;
    font-weight: bold;
    color: var(--black);
    line-height: 1.35;
    margin-bottom: 0.2rem;
    /* 超出单行省略 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nr-name a {
    color: var(--black);
    text-decoration: none;
}

.nr-name a:hover {
    text-decoration: underline;
}

/* ====== 分类/搜索 Banner ====== */
.nr-category-banner,
.nr-search-banner {
    padding-bottom: 1.5rem;
}

/* ====== 筛选器 ====== */
.nr-filter {
    padding-top: 0;
    padding-bottom: 1.5rem;
}

.nr-filter-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.nr-filter-row:last-child {
    margin-bottom: 0;
}

.nr-filter-label {
    font-size: 0.8125rem;
    color: var(--gray);
    white-space: nowrap;
    padding-top: 0.15rem;
    flex-shrink: 0;
    min-width: 2.5rem;
}

.nr-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.nr-chip {
    display: inline-block;
    font-size: 0.8125rem;
    color: var(--gray);
    border: 1px solid var(--gray-light);
    padding: 0.1rem 0.6rem;
    text-decoration: none;
    line-height: 1.6;
    transition: border-color 0.15s, color 0.15s;
}

.nr-chip:hover {
    color: var(--black);
    border-color: var(--black);
    text-decoration: none;
}

.nr-chip.is-active {
    color: var(--white);
    background: var(--black);
    border-color: var(--black);
}

/* ====== 空状态 ====== */
.nr-empty {
    padding: 3rem 0;
    text-align: center;
}

.nr-empty-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* ====== 分页 ====== */
.nr-pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 2.5rem;
}

.nr-page-link {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--gray-light);
    color: var(--gray);
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}

.nr-page-link:hover {
    color: var(--black);
    border-color: var(--black);
    text-decoration: none;
}

.nr-page-link.is-active {
    color: var(--white);
    background: var(--black);
    border-color: var(--black);
}

/* ====== 详情页布局 ====== */
.nr-detail-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 2.5rem;
    align-items: start;
}

.nr-detail-main {
    min-width: 0;
}

.nr-detail-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: bold;
    line-height: 1.25;
    margin-bottom: 0.4rem;
}

/* ---- 播放器 ---- */
.nr-player-wrap {
    margin-bottom: 0;
}

.nr-player-wrap > .nr-meta {
    margin-bottom: 1rem;
}

.nr-player-stage {
    position: relative;
    background: #000;
    margin-top: 1rem;
}

.nr-video-player {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.nr-player-empty {
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 0.875rem;
    gap: 0.5rem;
}

.nr-fallback-link {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray);
    text-decoration: underline;
    text-align: center;
}

.nr-fallback-link:hover {
    color: var(--black);
}

/* ---- 片源按钮 ---- */
.nr-source-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.nr-source-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    border: 1px solid var(--gray-light);
    background: transparent;
    color: var(--gray);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.nr-source-btn:hover {
    color: var(--black);
    border-color: var(--black);
}

.nr-source-btn.is-active {
    color: var(--white);
    background: var(--black);
    border-color: var(--black);
}

/* ---- 影片信息 ---- */
.nr-info-block {
    padding: 2rem 0;
}

.nr-info-block .nr-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.nr-summary {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--black);
    margin-bottom: 1.5rem;
}

.nr-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.nr-info-table th {
    text-align: left;
    color: var(--gray);
    font-weight: normal;
    width: 4em;
    padding: 0.35rem 0.75rem 0.35rem 0;
    vertical-align: top;
    white-space: nowrap;
}

.nr-info-table td {
    color: var(--black);
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--gray-light);
    line-height: 1.5;
}

/* ---- 详情侧边栏 ---- */
.nr-detail-side {
    position: sticky;
    top: 72px;
}

.nr-poster {
    margin-bottom: 1.25rem;
}

.nr-poster img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}

/* ---- 播放说明 ---- */
.nr-note {
    border-top: 1px solid var(--gray-light);
    padding-top: 1rem;
}

.nr-note-title {
    font-size: 0.875rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.nr-note-list {
    font-size: 0.8125rem;
    color: var(--gray);
    line-height: 1.6;
    list-style: none;
    padding: 0;
}

.nr-note-list li {
    padding-left: 1em;
    position: relative;
    margin-bottom: 0.3rem;
}

.nr-note-list li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--gray-light);
}

/* ====== 搜索页 ====== */
.nr-search-banner {
    padding-bottom: 1.5rem;
}

.nr-search-form {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-light);
    margin-top: 1rem;
    max-width: 400px;
}

/* nr-search-input 在搜索页也用 */
.nr-search-form .nr-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.45rem 0.75rem;
    font-size: 0.9375rem;
    background: transparent;
    color: var(--black);
}

.nr-search-form .nr-search-btn {
    border: none;
    border-left: 1px solid var(--gray-light);
    background: transparent;
    padding: 0.45rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    color: var(--black);
    white-space: nowrap;
}

.nr-search-form .nr-search-btn:hover {
    background: var(--black);
    color: var(--white);
}

/* ====== 页脚 ====== */
.nr-foot {
    border-top: 1px solid var(--gray-light);
    margin-top: 2rem;
}

.nr-foot-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 2rem 1rem 1.5rem;
}

.nr-foot .nr-sep {
    margin-bottom: 1.25rem;
}

.nr-foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-bottom: 1.5rem;
}

.nr-foot-link {
    font-size: 0.8125rem;
    color: var(--gray);
    text-decoration: none;
}

.nr-foot-link:hover {
    color: var(--black);
    text-decoration: underline;
}

.nr-foot-copy {
    font-size: 0.8125rem;
    color: var(--gray);
    margin-top: 1rem;
}

/* ====== 移动端适配 ====== */
@media (max-width: 860px) {
    /* 头部：隐藏 nav，显示汉堡 */
    .nr-nav {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--gray-light);
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        z-index: 99;
        overflow-y: auto;
        max-height: calc(100vh - 56px);
    }

    .menu-open .nr-nav {
        display: flex;
    }

    .nr-menu-btn {
        display: flex;
    }

    .nr-search {
        display: none;
    }

    /* Hero 变单列 */
    .nr-hero-layout {
        grid-template-columns: 1fr;
    }

    .nr-hero-main {
        grid-template-columns: 120px 1fr;
        gap: 1rem;
    }

    .nr-hero-title {
        font-size: 1.25rem;
    }

    .nr-hero-side {
        border-left: none;
        border-top: 1px solid var(--gray-light);
        padding-left: 0;
        padding-top: 1.25rem;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .nr-hero-item {
        width: calc(50% - 0.5rem);
        grid-template-columns: 48px 1fr;
    }

    /* 网格改 3 列 */
    .nr-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 详情布局改单列 */
    .nr-detail-layout {
        grid-template-columns: 1fr;
    }

    .nr-detail-side {
        position: static;
        /* 侧边栏放到底部 */
        display: grid;
        grid-template-columns: 140px 1fr;
        gap: 1rem;
        align-items: start;
    }

    .nr-poster {
        margin-bottom: 0;
    }

    .nr-poster img {
        width: 140px;
    }

    .nr-page-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .nr-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nr-hero-main {
        grid-template-columns: 1fr;
    }

    .nr-hero-pic {
        display: none;
    }

    .nr-detail-side {
        grid-template-columns: 1fr;
    }

    .nr-poster {
        display: none;
    }

    .nr-hero-item {
        width: 100%;
    }

    .nr-filter-row {
        flex-direction: column;
        gap: 0.4rem;
    }
}

/* 精彩影评区块 */
.nr-review-block {
    margin-bottom: 1.5rem;
}

.nr-review-text {
    font-family: var(--font-serif);
    font-size: 15px;
    line-height: 1.85;
    color: var(--black);
    background: #f7f7f7;
    border-left: 3px solid var(--black);
    padding: 14px 18px;
    margin-top: 10px;
}

/* 折叠按钮样式 */
.filter-toggle-btn { display:inline-block; margin:6px 0 4px; padding:4px 14px; font-size:12px; cursor:pointer; background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.15); border-radius:4px; color:#aaa; }
.filter-toggle-btn:hover { color:#fff; border-color:rgba(255,255,255,0.3); }