/* 引入字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

/* CSS 变量定义 */
:root {
    --primary-color: #E50914; /* Netflix Red */
    --background-color: #141414;
    --card-background: #181818;
    --text-color: #FFFFFF;
    --text-color-secondary: #a0a0a0;
}

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* 顶部导航栏 */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 3rem;
    z-index: 100;
    background-image: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0));
    transition: background-color 0.3s ease;
}
.main-header.scrolled {
    background-color: var(--background-color);
}
.header-content {
    display: flex;
    align-items: center;
}
.logo {
    height: 35px;
    margin-right: 2rem;
}
.main-nav .nav-link {
    color: var(--text-color-secondary);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 400;
    transition: color 0.3s ease;
}
.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: var(--text-color);
}

/* 英雄区域 */
.hero {
    position: relative;
    height: 85vh;
    display: flex;
    align-items: center;
    padding: 0 3rem;
    color: white;
}
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 将 'images/hero-background.jpg' 替换为你的主打海报 */
    background-image: url('images/hero-background.jpg');
    background-size: cover;
    background-position: center top;
    z-index: -1;
}
/* 渐变遮罩，让文字更清晰 */
.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to right, rgba(20,20,20,1) 10%, rgba(20,20,20,0) 80%),
                      linear-gradient(to top, rgba(20,20,20,1) 0%, rgba(20,20,20,0) 20%);
}
.hero-content {
    max-width: 40%;
}
.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
}
.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}
.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-right: 1rem;
    transition: background-color 0.3s ease;
}
.btn-play {
    background-color: var(--text-color);
    color: #000;
}
.btn-play:hover {
    background-color: rgba(255, 255, 255, 0.8);
}
.btn-info {
    background-color: rgba(109, 109, 110, 0.7);
    color: var(--text-color);
}
.btn-info:hover {
    background-color: rgba(109, 109, 110, 0.4);
}
.btn i {
    margin-right: 0.5rem;
}

/* 主内容和分类 */
.main-content {
    padding-top: 2rem;
}
.category-row {
    margin-bottom: 3rem;
}
.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding: 0 3rem;
}
.carousel {
    position: relative;
    padding: 0 3rem;
}
.carousel-inner {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    padding-bottom: 1rem; /* 为阴影留出空间 */
}
.carousel-inner::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}
.video-card {
    flex: 0 0 16.66%; /* 一行显示6个 */
    padding: 0 0.25rem;
    transition: transform 0.3s ease, z-index 0.3s ease;
    cursor: pointer;
}
.video-card:hover {
    transform: scale(1.15);
    z-index: 10;
}
.video-card img {
    width: 100%;
    border-radius: 5px;
    display: block;
}

/* 视频模态框 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.85);
}
.modal-content {
    position: relative;
    margin: 5% auto;
    width: 80%;
    max-width: 900px;
}
.close-button {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}
#modalVideoPlayer {
    width: 100%;
    height: auto;
    outline: none;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-content { max-width: 60%; }
    .hero-title { font-size: 3rem; }
    .video-card { flex: 0 0 25%; } /* 一行4个 */
}
@media (max-width: 768px) {
    .main-header, .hero, .category-title, .carousel { padding: 1rem 1.5rem; }
    .logo { height: 25px; }
    .main-nav .nav-link { margin-left: 1rem; font-size: 0.9rem; }
    .hero { height: 60vh; text-align: center; align-items: flex-end; padding-bottom: 4rem; }
    .hero-content { max-width: 100%; }
    .hero-title { font-size: 2.5rem; }
    .hero-description { font-size: 1rem; max-width: 500px; margin: 0 auto 1.5rem; }
    .hero-buttons { justify-content: center; display: flex; }
    .video-card { flex: 0 0 33.33%; } /* 一行3个 */
    .modal-content { width: 95%; }
}
