/* 轮播图模块 - 优化合并 */
.banner-section {
    position: relative;
    margin-bottom: 20px;
}

/* Swiper通用样式 */
.swiper {
    width: 100%;
    height: 160px;
    border-radius: 8px;
    overflow: hidden;
}

.swiper-slide {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.banner-item {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

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

.banner-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 20px 15px 10px;
    font-size: 16px;
    font-weight: bold;
}

/* Swiper分页器 */
.swiper-pagination {
    position: absolute;
    bottom: 10px !important;
    /* left: 50% !important; */
    transform: translateX(-50%);
    z-index: 10;
}

.swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.5);
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: white;
}

/* 轮播图多种风格 */
/* 修复风格2：横向铺满，脱离父级宽度限制 */
.banner-style-2 {
    position: relative; /* 确保脱离父级宽度限制 */
    left: 50%;          /* 向右偏移父级宽度的一半 */
    transform: translateX(-50%); /* 再向左偏移自身宽度的一半，居中对齐 */
    width: 100vw;       /* 设置宽度为视口宽度 */
    max-width: 540px; 
    margin: 0;
    padding: 0;
}

.banner-style-2 .banner-swiper-full {
    width: 100%;        /* 确保轮播图内容铺满 */
    height: 160px;      /* 设置固定高度 */
    border-radius: 0;   /* 去掉圆角 */
    overflow: hidden;
}

/* 风格3: 可关闭样式 */
.banner-style-3 {
    background: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: 180px;
}

.banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.banner-label {
    background: #ff6b6b;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.banner-close-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
}

.banner-close-btn:hover {
    color: #666;
}

/* 模块标题通用样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 5px;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.more-link {
    color: #5d43ae;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.more-link:hover {
    color: #4a3590;
}

/* Section Header多种风格 */
.section-header.style-1 .title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ad-badge {
    background: linear-gradient(135deg, #5d43ae, #fbaf03);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.more-link.style-1 {
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 12px;
    color: #666;
}

.more-link.style-2 {
    color: #5d43ae;
    font-weight: 500;
    text-decoration: underline;
}

.more-link.style-3 {
    background: #5d43ae;
    color: white;
    padding: 6px;
    border-radius: 6px;
    width: 50px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 分类导航模块 */
.category-section {
    margin-bottom: 25px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    padding: 0 5px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-2px);
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 8px;
    background: #f5f5f5;
}

.category-icon a {
    display: block;
    width: 100%;
    height: 100%;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持图片比例并填充容器 */
    display: block;
    border-radius: 15px; /* 与容器圆角保持一致 */
}

.category-name {
    font-size: 14px;
    text-align: center;
}

/* 视频卡片通用样式 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 5px;
}

.video-card {
    background: white;
    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(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.video-thumb {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
}

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

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

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.play-overlay i {
    color: white;
    font-size: 40px;
}

.video-info {
    padding: 10px;
}

.video-title {
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.score {
    color: #ff6b6b;
}

.video-duration {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

/* 视频卡片多种风格 */
/* 风格2: 封面图样式 */
.video-style.style-2 .video-grid.cover-style {
    grid-template-columns: repeat(2, 1fr);
}

.video-style.style-2 .video-thumb {
    height: 140px;
}

/* 风格3: 竖版卡片 */
.video-style.style-3 .video-grid.vertical-style {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.video-style.style-3 .video-thumb.vertical {
    height: 180px;
}

.video-style.style-3 .video-card {
    text-align: center;
}

.video-style.style-3 .video-info {
    padding: 8px 5px;
}

.video-style.style-3 .video-title {
    font-size: 13px;
    margin-bottom: 4px;
}

/* 四角信息通用样式 */
.corner-info {
    position: absolute;
    z-index: 2;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 2px;
    backdrop-filter: blur(4px);
    background: rgba(173, 173, 173, 0.7);
    color: white;
    line-height: 1;
    transition: all 0.3s ease;
}

/* 四角位置 */
.corner-top-left { top: 6px; left: 6px; }
.corner-top-right { top: 6px; right: 6px; }
.corner-bottom-left { bottom: 6px; left: 6px; }
.corner-bottom-right { bottom: 6px; right: 6px; }

/* 无背景角标样式 */
.corner-info.no-bg {
    background: none !important;
    backdrop-filter: none !important;
}

/* 标签样式 */
.corner-tag {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.movie-tag { background: linear-gradient(135deg, #ff6b6b, #ee5a52); }
.tv-tag { background: linear-gradient(135deg, #4ecdc4, #44a08d); }
.anime-tag { background: linear-gradient(135deg, #45b7d1, #96c93d); }
.variety-tag { background: linear-gradient(135deg, #feca57, #ff9ff3); }
.hot-tag { background: linear-gradient(135deg, #ff9f43, #ff6b6b); }
.new-tag { background: linear-gradient(135deg, #54a0ff, #5f27cd); }

/* 评分样式 */
.corner-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #ffd700;
}

.corner-top-right.no-bg .corner-rating {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    font-size: 11px;
}

.vip-rating {
    background: linear-gradient(135deg, #ffd700, #ff6b00);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
}

.free-rating {
    background: #27ae60;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
}

/* 底部信息 */
.corner-update, .corner-duration, .corner-views {
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

/* 风格4: 四角信息样式 */
.video-style.style-4 .video-grid.corner-style {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.video-style.style-4 .corner-card {
    background: transparent;
    box-shadow: none;
}

.video-style.style-4 .corner-thumb {
    height: 160px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.video-style.style-4 .corner-card:hover .corner-info {
    background: rgba(98, 98, 98, 0.9);
    transform: scale(1.05);
}

/* 风格5: 横版四角信息 */
.video-style.style-5 .video-grid.horizontal-style {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.video-style.style-5 .horizontal-card {
    background: transparent;
    box-shadow: none;
}

.video-style.style-5 .horizontal-thumb {
    height: 160px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 无背景角标优化 */
.corner-top-left.no-bg .corner-tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.horizontal-card:hover .corner-info.no-bg .corner-tag {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.horizontal-card:hover .corner-info.no-bg .corner-rating {
    transform: scale(1.05);
}

/* 视频角标样式 */
.video-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 2px;
    z-index: 2;
}

.badge-hot { background: #ff6b6b; color: white; }
.badge-new { background: #4ecdc4; color: white; }
.badge-vip { background: linear-gradient(135deg, #ffd700, #ff6b00); color: white; }
.badge-free { background: #5d43ae; color: white; }
.badge-exclusive { background: #ff9ff3; color: white; }

/* 最新更新模块 */
.update-section {
    margin-bottom: 20px;
}

.update-list {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.update-item {
    display: flex;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s ease;
}

.update-item:last-child {
    border-bottom: none;
}

.update-item:hover {
    background: #f8f9fa;
}

.update-thumb {
    width: 40%;
    height: 95px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 12px;
}

.update-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.update-info {
    flex: 1;
}

.update-title {
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.update-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.update-time {
    color: #5d43ae;
}

.update-tag {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

/* 标题信息模块 */
.title-info-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.title-info-header {
    margin-bottom: 15px;
}

.main-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.title-meta {
    display: flex;
    gap: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 14px;
}

.meta-item i {
    color: #5d43ae;
    font-size: 16px;
}

.meta-value {
    font-weight: bold;
    color: #333;
}

.meta-label {
    color: #999;
}

.title-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.sci-fi-tag { background: linear-gradient(135deg, #4ecdc4, #44a08d); }
.action-tag { background: linear-gradient(135deg, #ff6b6b, #ee5a52); }
.adventure-tag { background: linear-gradient(135deg, #feca57, #ff9ff3); }
.china-tag { background: linear-gradient(135deg, #5d43ae, #4a3590); }
.imax-tag { background: linear-gradient(135deg, #ff9f43, #ff6b00); }

/* 图片展示模块 */
.image-showcase-section {
    margin-bottom: 20px;
}

.image-showcase-container {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
}

.image-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.image-bottom-row {
    width: 100%;
}

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

.image-item:hover {
    transform: translateY(-2px);
}

.image-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.image-item.full-width img {
    height: 180px;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-item:hover .image-overlay {
    opacity: 1;
}

.image-overlay i {
    color: white;
    font-size: 32px;
}

/* 线路选择模块 */
/* 剧集选择模块 */
.episode-select-section {
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.episode-select-container {
    width: 100%;
}

/* 选项卡容器 */
.episode-tabs-container {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0 5px;
}

.tab-arrow {
    background: none;
    border: none;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tab-arrow:hover {
    color: #5d43ae;
}

.episode-tabs-scroll {
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.episode-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.episode-tabs {
    display: flex;
    padding: 10px 5px;
    gap: 8px;
    min-width: min-content;
}

.episode-tab {
    white-space: nowrap;
    padding: 8px 16px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.episode-tab:hover {
    border-color: #5d43ae;
    color: #5d43ae;
}

.episode-tab.active {
    background: #5d43ae;
    border-color: #5d43ae;
    color: white;
}

/* 剧集内容区域 */
.episode-content {
    padding: 20px;
}

.episode-panel {
    display: none;
}

.episode-panel.active {
    display: block;
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* 修改：统一按钮大小 */
.episode-grid .episode-btn {
    position: relative;
    width: 100%;
    height: 35px;
    background: white;
    border: 2px solid #cec8df; /* 默认边框颜色 */
    border-radius: 8px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.episode-grid .episode-btn:hover {
    border-color: #5d43ae;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(93, 67, 174, 0.2);
}

/* 观看中状态：紫色边框 */
.episode-grid .episode-btn.current {
    border-color: #5d43ae;
    border-width: 2px;
    background: rgba(93, 67, 174, 0.05);
}

.episode-grid .episode-btn.vip-only {
    border-color: #ffd700;
}

.episode-num {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.episode-title {
    font-size: 12px;
    color: #666;
    text-align: center;
    line-height: 1.2;
}

/* VIP角标调整 */
.vip-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: linear-gradient(135deg, #ffd700, #ff6b00);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
}


/* 响应式设计 */
@media (max-width: 480px) {
    .swiper {
        height: 140px;
    }
    
    .banner-title {
        font-size: 14px;
        padding: 15px 12px 8px;
    }
    
    .banner-style-3 {
        height: 160px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .category-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 12px;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .category-name {
        font-size: 12px;
    }
    
    .video-grid {
        gap: 12px;
    }
    
    .video-thumb {
        height: 100px;
    }
    
    .video-title {
        font-size: 13px;
    }
    
    .video-style.style-3 .video-grid.vertical-style {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .video-style.style-3 .video-thumb.vertical {
        height: 160px;
    }
    
    .video-style.style-4 .video-grid.corner-style {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .video-style.style-4 .corner-thumb {
        height: 140px;
    }
    
    .video-style.style-5 .video-grid.horizontal-style {
        gap: 12px;
    }
    
    .video-style.style-5 .horizontal-thumb {
        height: 140px;
    }
    
    .corner-info {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .corner-tag {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .corner-top-left.no-bg .corner-tag {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .play-overlay i {
        font-size: 32px;
    }
    
    .update-item {
        padding: 10px 12px;
    }
    
    .update-thumb {
        width: 50px;
        height: 40px;
    }
    
    .update-title {
        font-size: 13px;
    }
    
    /* 移动端角标位置调整 */
    .corner-top-left, .corner-top-right { top: 4px; }
    .corner-bottom-left, .corner-bottom-right { bottom: 4px; }
    .corner-top-left { left: 4px; }
    .corner-top-right { right: 4px; }
    .corner-bottom-left { left: 4px; }
    .corner-bottom-right { right: 4px; }

    .main-title {
        font-size: 20px;
    }
    
    .title-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .image-top-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .image-item img,
    .image-item.full-width img {
        height: 150px;
    }
    
    .episode-content {
        padding: 15px;
    }
    
    .episode-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .episode-grid .episode-btn {
        border-width: 2px;
        gap: 3px;
    }
    
    .episode-num {
        font-size: 13px;
    }
    
    .episode-title {
        font-size: 11px;
    }
    
    .vip-badge {
        top: 3px;
        right: 3px;
        padding: 1px 4px;
        font-size: 9px;
    }
}

/* 小屏幕手机适配 */
@media (max-width: 360px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .category-icon {
        width: 45px;
        height: 45px;
        border-radius: 10px;
    }
    
    .category-icon img {
        border-radius: 10px;
    }
    
    .category-name {
        font-size: 11px;
    }

    .video-style.style-4 .video-grid.corner-style,
    .video-style.style-5 .video-grid.horizontal-style {
        gap: 8px;
    }
    
    .video-style.style-4 .corner-thumb {
        height: 120px;
    }
    
    .video-style.style-5 .horizontal-thumb {
        height: 120px;
    }
    
    .corner-top-left.no-bg .corner-tag {
        font-size: 9px;
        padding: 2px 4px;
    }

    .title-info-section {
        padding: 15px;
    }
    
    .main-title {
        font-size: 18px;
    }
    
    .image-item img,
    .image-item.full-width img {
        height: 120px;
    }
    
    .episode-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .episode-grid .episode-btn {
        border-width: 2px;
        gap: 2px;
    }
    
    .episode-num {
        font-size: 12px;
    }
    
    .episode-title {
        font-size: 10px;
    }
    
    .vip-badge {
        top: 2px;
        right: 2px;
        padding: 1px 3px;
        font-size: 8px;
    }
}