/* Netflix Style Template - 参考Netflix设计风格 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --nf-bg: #141414;
    --nf-bg-dark: #000000;
    --nf-bg-light: #1f1f1f;
    --nf-text: #ffffff;
    --nf-text-dim: #b3b3b3;
    --nf-primary: #e50914;
    --nf-primary-dark: #b20710;
    --nf-border: #333333;
    --nf-shadow: rgba(0, 0, 0, 0.5);
}

body.nf-body {
    font-family: 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--nf-bg-dark);
    color: var(--nf-text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

/* 顶部导航栏 */
.nf-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
    transition: background 0.3s;
}

.nf-header.scrolled {
    background: var(--nf-bg-dark);
}

.nf-header-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nf-header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nf-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 28px;
    font-weight: 900;
    color: var(--nf-primary);
    transition: transform 0.2s;
}

.nf-logo:hover {
    transform: scale(1.05);
}

.nf-logo-text {
    font-size: 32px;
}

.nf-logo-full {
    font-size: 20px;
    color: var(--nf-text);
}

.nf-nav {
    display: flex;
    gap: 20px;
}

.nf-nav-link {
    font-size: 14px;
    color: var(--nf-text-dim);
    transition: color 0.2s;
    position: relative;
}

.nf-nav-link:hover,
.nf-nav-link.is-active {
    color: var(--nf-text);
}

.nf-nav-link.is-active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--nf-primary);
}

.nf-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nf-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nf-search-input {
    background: transparent;
    border: 1px solid var(--nf-border);
    border-radius: 4px;
    padding: 8px 12px;
    color: var(--nf-text);
    font-size: 14px;
    width: 200px;
    transition: width 0.3s, border-color 0.3s;
}

.nf-search-input:focus {
    width: 300px;
    border-color: var(--nf-primary);
    outline: none;
}

.nf-search-btn {
    background: transparent;
    border: none;
    color: var(--nf-text);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.nf-search-btn:hover {
    color: var(--nf-primary);
}

.nf-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nf-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--nf-text);
    transition: all 0.3s;
}

/* 主内容区域 */
.nf-main {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

/* Hero横幅 */
.nf-hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 0 60px 80px;
}

.nf-hero-content {
    max-width: 600px;
    z-index: 1;
}

.nf-hero-title {
    font-size: 64px;
    font-weight: 900;
    margin-bottom: 16px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    line-height: 1.1;
}

.nf-hero-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--nf-text-dim);
}

.nf-hero-year,
.nf-hero-rating,
.nf-hero-status {
    display: inline-block;
}

.nf-hero-desc {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 24px;
    color: var(--nf-text);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.nf-hero-actions {
    display: flex;
    gap: 12px;
}

.nf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.nf-btn-primary {
    background: var(--nf-text);
    color: var(--nf-bg-dark);
}

.nf-btn-primary:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

.nf-btn-secondary {
    background: rgba(109, 109, 110, 0.7);
    color: var(--nf-text);
    backdrop-filter: blur(10px);
}

.nf-btn-secondary:hover {
    background: rgba(109, 109, 110, 0.9);
}

/* 内容行 */
.nf-content-rows {
    padding: 40px 60px;
}

.nf-row {
    margin-bottom: 40px;
}

.nf-row-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--nf-text);
}

.nf-row-content {
    position: relative;
}

.nf-slider {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 10px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nf-slider::-webkit-scrollbar {
    display: none;
}

/* 卡片 */
.nf-card {
    flex: 0 0 200px;
    transition: transform 0.3s;
}

.nf-card:hover {
    transform: scale(1.1);
    z-index: 10;
}

.nf-card-link {
    display: block;
    color: inherit;
}

.nf-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 4px;
    overflow: hidden;
    background: var(--nf-bg-light);
}

.nf-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.nf-card:hover .nf-card-image img {
    transform: scale(1.1);
}

.nf-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.nf-card:hover .nf-card-overlay {
    opacity: 1;
}

.nf-card-play {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: transform 0.3s;
}

.nf-card:hover .nf-card-play {
    transform: scale(1);
}

.nf-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--nf-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.nf-card-info {
    padding: 12px 0;
}

.nf-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nf-card-meta {
    font-size: 12px;
    color: var(--nf-text-dim);
    display: flex;
    gap: 8px;
}

/* 详情页 */
.nf-detail-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 0 60px 60px;
    margin-bottom: 40px;
}

.nf-detail-hero-content {
    max-width: 800px;
    z-index: 1;
}

.nf-detail-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 16px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

.nf-detail-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--nf-text-dim);
}

.nf-detail-desc {
    font-size: 16px;
    line-height: 1.6;
    color: var(--nf-text);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.nf-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px 60px;
}

.nf-detail-section {
    margin-bottom: 40px;
}

.nf-section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--nf-text);
}

.nf-player-container,
.nf-player-box {
    width: 100%;
    margin-bottom: 30px;
}

.nf-player-wrapper {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #000;
}

.nf-player-wrapper .player-ad-layer {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    z-index: 10 !important;
}

.nf-episodes {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nf-episode-group {
    background: var(--nf-bg-light);
    padding: 20px;
    border-radius: 8px;
}

.nf-episode-group-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--nf-text);
}

.nf-episode-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nf-episode-item {
    padding: 10px 20px;
    background: var(--nf-bg);
    border: 1px solid var(--nf-border);
    border-radius: 4px;
    color: var(--nf-text-dim);
    transition: all 0.2s;
    font-size: 14px;
}

.nf-episode-item:hover {
    background: var(--nf-primary);
    border-color: var(--nf-primary);
    color: white;
}

.nf-episode-item.is-active {
    background: var(--nf-primary);
    border-color: var(--nf-primary);
    color: white;
}

.nf-detail-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nf-info-item {
    display: flex;
    gap: 12px;
    font-size: 16px;
}

.nf-info-label {
    color: var(--nf-text-dim);
    min-width: 80px;
}

.nf-info-value {
    color: var(--nf-text);
    flex: 1;
}

.nf-detail-synopsis {
    font-size: 16px;
    line-height: 1.8;
    color: var(--nf-text-dim);
    white-space: pre-line;
}

/* 列表页 */
.nf-list-page {
    padding: 40px 60px;
}

.nf-list-header {
    margin-bottom: 40px;
}

.nf-list-title {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 12px;
}

.nf-list-count {
    font-size: 16px;
    color: var(--nf-text-dim);
}

.nf-list-count strong {
    color: var(--nf-primary);
}

.nf-list-content {
    width: 100%;
}

.nf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.nf-list-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--nf-text-dim);
}

.nf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    padding: 20px;
}

.nf-pagination-btn {
    padding: 10px 24px;
    background: var(--nf-primary);
    color: white;
    border-radius: 4px;
    transition: background 0.2s;
}

.nf-pagination-btn:hover {
    background: var(--nf-primary-dark);
}

.nf-pagination-info {
    color: var(--nf-text-dim);
}

/* 播放页 */
.nf-play-page {
    padding: 40px 60px;
}

.nf-play-header {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nf-play-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--nf-bg-light);
    border: 1px solid var(--nf-border);
    border-radius: 4px;
    color: var(--nf-text);
    transition: all 0.2s;
}

.nf-play-back:hover {
    background: var(--nf-primary);
    border-color: var(--nf-primary);
}

.nf-play-title {
    font-size: 28px;
    font-weight: 700;
}

.nf-play-container {
    max-width: 1400px;
    margin: 0 auto;
}

.nf-play-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--nf-text-dim);
}

.nf-play-sources {
    margin-top: 30px;
}

.nf-play-source-group {
    background: var(--nf-bg-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.nf-play-source-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--nf-text);
}

.nf-play-episodes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nf-play-episode {
    padding: 10px 20px;
    background: var(--nf-bg);
    border: 1px solid var(--nf-border);
    border-radius: 4px;
    color: var(--nf-text-dim);
    transition: all 0.2s;
    font-size: 14px;
}

.nf-play-episode:hover {
    background: var(--nf-primary);
    border-color: var(--nf-primary);
    color: white;
}

.nf-play-episode.is-active {
    background: var(--nf-primary);
    border-color: var(--nf-primary);
    color: white;
}

/* Footer */
.nf-footer {
    background: var(--nf-bg-dark);
    border-top: 1px solid var(--nf-border);
    padding: 60px 0 30px;
    margin-top: 60px;
}

.nf-footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
}

.nf-footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.nf-footer-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--nf-text);
}

.nf-footer-text {
    font-size: 14px;
    color: var(--nf-text-dim);
    line-height: 1.6;
}

.nf-footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nf-footer-links a {
    color: var(--nf-text-dim);
    font-size: 14px;
    transition: color 0.2s;
}

.nf-footer-links a:hover {
    color: var(--nf-primary);
}

.nf-footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--nf-border);
    color: var(--nf-text-dim);
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 1024px) {
    .nf-header-container {
        padding: 0 30px;
    }

    .nf-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--nf-bg-dark);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
        z-index: 999;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nf-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nf-nav-link {
        padding: 12px 16px;
        border-bottom: 1px solid var(--nf-border);
        display: block;
    }

    .nf-nav-link:last-child {
        border-bottom: none;
    }

    .nf-menu-toggle {
        display: flex;
        cursor: pointer;
        z-index: 1001;
    }

    .nf-menu-toggle.is-active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nf-menu-toggle.is-active span:nth-child(2) {
        opacity: 0;
    }

    .nf-menu-toggle.is-active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .nf-hero {
        padding: 0 30px 60px;
        height: 70vh;
    }

    .nf-hero-title {
        font-size: 48px;
    }

    .nf-content-rows {
        padding: 30px;
    }

    .nf-detail-hero {
        padding: 0 30px 40px;
    }

    .nf-detail-title {
        font-size: 36px;
    }

    .nf-detail-container {
        padding: 0 30px 40px;
    }

    .nf-list-page {
        padding: 30px;
    }

    .nf-play-page {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .nf-header-container {
        padding: 0 20px;
        height: 60px;
    }

    .nf-main {
        margin-top: 60px;
    }

    .nf-nav {
        top: 60px;
        max-height: calc(100vh - 60px);
    }

    .nf-main {
        margin-top: 60px;
    }

    .nf-search-input {
        width: 150px;
    }

    .nf-search-input:focus {
        width: 200px;
    }

    .nf-hero {
        height: 60vh;
        min-height: 400px;
        padding: 0 20px 40px;
    }

    .nf-hero-title {
        font-size: 36px;
    }

    .nf-hero-desc {
        font-size: 14px;
    }

    .nf-content-rows {
        padding: 20px;
    }

    .nf-card {
        flex: 0 0 160px;
    }

    .nf-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }

    .nf-detail-hero {
        padding: 0 20px 30px;
    }

    .nf-detail-title {
        font-size: 28px;
    }

    .nf-detail-container {
        padding: 0 20px 30px;
    }

    .nf-list-page {
        padding: 20px;
    }

    .nf-play-page {
        padding: 20px;
    }
}

