/* css/style.css */
/* 基础样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部导航样式 */
.header {
    background-color: #121212;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #ff4d4f;
}

.logo img {
    margin-right: 10px;
    width:130px;
}

.main-nav ul {
    display: flex;
}

.main-nav li {
    margin: 0 10px;
}

.main-nav a {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.main-nav a i {
    margin-right: 5px;
}

.main-nav li.active a,
.main-nav a:hover {
    background-color: #ff4d4f;
    color: #fff;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 8px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    background-color: #333;
    color: #fff;
    width: 200px;
}

.search-box button {
    padding: 8px 15px;
    border: none;
    border-radius: 0 4px 4px 0;
    background-color: #ff4d4f;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: #e04345;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ff4d4f;
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 101;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 轮播图样式 */
.banner {
    position: relative;
    margin-bottom: 30px;
    overflow: hidden;
}

.banner-slider {
    position: relative;
    height: 400px;
}

.banner-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.banner-item.active {
    opacity: 1;
    z-index: 1;
}

.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    z-index: 2;
}

.banner-info h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.banner-info p {
    max-width: 700px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background-color: #ff4d4f;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.play-btn i {
    margin-right: 8px;
}

.play-btn:hover {
    background-color: #e04345;
}

.banner-dots {
    position: absolute;
    bottom: 15px;
    right: 30px;
    display: flex;
    z-index: 3;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: #ff4d4f;
}

/* 主要内容区样式 */
.main-content {
    margin-top: 20px;
	margin-bottom: 40px;
}

.content-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

.section-header h2 {
    display: flex;
    align-items: center;
    color: #ff4d4f;
}

.section-header h2 i {
    margin-right: 10px;
}

.more {
    color: #999;
    transition: color 0.3s;
}

.more:hover {
    color: #ff4d4f;
}

.more i {
    margin-left: 5px;
}

/* 筛选区域样式 */
.filter-section {
    background-color: #121212;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.filter-label {
    font-weight: 500;
    margin-right: 15px;
    color: #fff;
    min-width: 60px;
	text-align:center;
}

.filter-item {
    display: inline-block;
    padding: 5px 12px;
    margin: 0 8px;
    background-color: #f5f5f5;
    border-radius: 15px;
    font-size: 14px;
    transition: all 0.3s;
	 color: #000;
}

.filter-item.active,
.filter-item:hover {
        background-color: #ff4d4f;
    color: #fff;
}

/* 影视卡片网格 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.movie-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.movie-poster {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}

.movie-type {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    background-color: #ff4d4f;
    border-radius: 4px;
    font-size: 12px;
}

.movie-score {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 3px 8px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    font-size: 12px;
    color: #ffd700;
}

.movie-title {
    font-size: 16px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-desc {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-title{

}
/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 5px;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding:0px 10px;
    height: 36px;
    border-radius: 4px;
    background-color: #222;
    border: 1px solid #444;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination .active {
    background-color: #ff4d4f;
    border-color: #ff4d4f;
}

.pagination a:hover{
    background-color: #333;
    border-color: #555;
}

.pagination span {
    color: #999;
    padding: 0 5px;
}

/* 播放页样式 */
.play-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.player-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    border-radius: 4px;
    overflow: hidden;
}

.video-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-info {
    background-color: #222;
    padding: 20px;
    border-radius: 4px;
}

.movie-info .movie-title {
    font-size: 24px;
    margin-bottom: 15px;
    white-space: normal;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    color: #ccc;
}

.meta-item strong {
    color: #ff4d4f;
}

.movie-desc {
    margin-bottom: 20px;
}

.movie-desc h3{
    font-size: 18px;
    margin-bottom: 10px;
    color: #ff4d4f;
}

.movie-desc p {
    color: #ccc;
    line-height: 1.8;
}

.episodes-section {
    background-color: #222;
    padding: 20px;
    border-radius: 4px;
}

.episodes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.episode-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding:0px 10px;
    height: 40px;
    background-color: #333;
    border-radius: 4px;
    transition: all 0.3s;
}

.episode-item.active {
    background-color: #ff4d4f;
}

.episode-item:hover:not(.active) {
    background-color: #444;
}

.related-section {
    background-color: #222;
    padding: 20px;
    border-radius: 4px;
}

/* 页脚样式 */
.footer {
    background-color: #121212;
    padding: 30px 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a {
    color: #999;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #ff4d4f;
}

.copyright {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .search-box input {
        width: 150px;
    }
}

@media (max-width: 768px) {
    .banner-slider {
        height: 300px;
    }
    
    .banner-info h2 {
        font-size: 22px;
    }
    
    .banner-info p {
        font-size: 14px;
    }
    .filter-label{
		display:none;
	}
    .filter-item{
		margin-bottom:10px;
	}
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .list-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .header .container {
        flex-wrap: wrap;
    }
    
    .search-box {
		width:50%;
        margin-top: 10px;
    }
    
    .search-box input {
        width: 100%;
    }
    .main-nav.on{
		display:block;
	}
	.main-nav.on ul {
		display: flex;
		flex-wrap: wrap; /* 允许换行 */
		margin: 0;
		padding: 0;
		list-style: none;
	}
	.main-nav.on ul li {
		flex: 0 0 calc(100% / 3); /* 每个元素占1/3宽度（一行3个） */
		box-sizing: border-box; /* 避免padding/border影响宽度计算 */
		padding: 0 10px; /* 可选：添加间距 */
		margin: 0;
		margin-top: 10px;
	}
	.main-nav.on+.search-box{
		width:100%;
	}
    .banner-slider {
        height: 200px;
    }
    
    .banner-info {
        padding: 15px;
    }
    
    .banner-info h2 {
        font-size: 18px;
    }
    
    .banner-info p {
        display: none;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .list-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .movie-title {
        font-size: 14px;
    }
    
    .movie-info .movie-title {
        font-size: 20px;
    }
    
    .page-btn, .page-num {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}