/* ========================================
   百度 SEO 优化影视模板 - 全局样式
   版本：1.0
   最后更新：2024
======================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-width: 320px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #007bff;
}

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

/* 广告卡片图片样式 - 根据父容器设置固定高度 */
.banner-item .ad-card-img,
.banner-item.ad-banner-item .ad-card-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 4px;
}

.video-card .ad-card-img,
.video-card.ad-card .ad-card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 4px;
}

ul, ol {
    list-style: none;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========================================
   头部导航
======================================== */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.nav ul {
    display: flex;
    gap: 20px;
}

.nav a {
    color: #fff;
    font-size: 15px;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.nav a:hover,
.nav a.active {
    background: rgba(255,255,255,0.2);
}

.search-box form {
    display: flex;
}

.search-box input {
    padding: 8px 12px;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
    width: 200px;
    font-size: 14px;
}

.search-box button {
    padding: 8px 15px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.search-box button:hover {
    background: #0056b3;
}

/* ========================================
   面包屑导航
======================================== */
.breadcrumb {
    background: #fff;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb a {
    color: #007bff;
}

.breadcrumb span {
    color: #6c757d;
}

/* ========================================
   主要内容区
======================================== */
.main-content {
    padding: 30px 0;
    min-height: calc(100vh - 400px);
}

/* ========================================
   轮播推荐区
======================================== */
.banner-section {
    margin-bottom: 30px;
}

.banner-title {
    margin-bottom: 20px;
}

.banner-title h2 {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    display: inline-block;
    border-left: 4px solid #007bff;
    padding-left: 12px;
}

.banner-title span {
    color: #6c757d;
    font-size: 14px;
    margin-left: 10px;
}

.banner-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.banner-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.banner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.banner-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.banner-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px 15px 15px;
    color: #fff;
}

.banner-info h3 {
    font-size: 15px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.banner-info p {
    font-size: 12px;
    opacity: 0.9;
}

/* ========================================
   影片区块
======================================== */
.video-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.section-header .more a {
    color: #007bff;
    font-size: 14px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.video-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.video-cover {
    position: relative;
    overflow: hidden;
}

.video-cover img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-cover img {
    transform: scale(1.05);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .play-icon {
    opacity: 1;
}

.video-score {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.video-info {
    padding: 12px;
}

.video-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-desc {
    font-size: 12px;
    color: #6c757d;
}

/* ========================================
   播放页面
======================================== */
.player-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.player-wrapper {
    margin-bottom: 20px;
}

.player-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 比例 */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-detail {
    margin-bottom: 30px;
}

.video-main-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.meta-item {
    color: #6c757d;
}

.meta-item strong {
    color: #333;
}

.score {
    color: #f5576c !important;
    font-weight: 700;
}

.video-actors,
.video-director {
    margin-bottom: 10px;
    font-size: 14px;
    color: #6c757d;
}

.video-plot {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.video-plot h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.video-plot p {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.8;
}

/* 集数列表 */
.episodes-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.episodes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.episode-btn {
    padding: 8px 15px;
    background: #f8f9fa;
    color: #333;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.episode-btn:hover,
.episode-btn.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* 相关推荐 */
.related-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

/* ========================================
   列表页
======================================== */
.list-header {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.list-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item span {
    color: #6c757d;
    font-weight: 600;
}

.filter-item a {
    padding: 4px 10px;
    border-radius: 4px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.filter-item a:hover,
.filter-item a.active {
    background: #007bff;
    color: #fff;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 8px 15px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination span.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* ========================================
   页脚
======================================== */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-links {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-links a {
    color: #ecf0f1;
    margin: 0 10px;
    font-size: 14px;
}

.footer-links a:hover {
    color: #007bff;
}

.footer-info {
    text-align: center;
    margin-bottom: 20px;
}

.footer-info p {
    font-size: 13px;
    color: #bdc3c7;
    margin-bottom: 8px;
}

.footer-SEO {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-SEO p {
    font-size: 12px;
    color: #95a5a6;
}

/* ========================================
   响应式设计
======================================== */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .search-box input {
        width: 150px;
    }
    
    .banner-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .banner-item img {
        height: 200px;
    }

    /* 移动端广告图片高度同步 */
    .banner-item .ad-card-img,
    .banner-item.ad-banner-item .ad-card-img {
        height: 200px;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .video-cover img {
        height: 200px;
    }

    /* 移动端视频卡片广告图片高度同步 */
    .video-card .ad-card-img,
    .video-card.ad-card .ad-card-img {
        height: 200px;
    }
    
    .video-main-title {
        font-size: 18px;
    }
    
    .video-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .episodes-grid {
        gap: 8px;
    }
    
    .episode-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .banner-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-box input {
        width: 120px;
    }
}

/* ========================================
   加载动画
======================================== */
@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

/* ========================================
   工具类
======================================== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}
