/* 影视大全 - 仿乐视电影风格 */

:root {
    --primary-color: #ff6b00;
    --primary-hover: #e66000;
    --bg-color: #f5f5f5;
    --card-bg: #fff;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --border-color: #e8e8e8;
    --header-height: 60px;
}

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

body {
    font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 头部导航 */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo-icon {
    font-size: 26px;
}

.main-nav {
    display: flex;
    gap: 25px;
    flex: 1;
}

.main-nav .nav-item {
    font-size: 15px;
    color: var(--text-primary);
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.main-nav .nav-item:hover,
.main-nav .nav-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.search-box {
    position: relative;
}

.search-box input {
    width: 240px;
    height: 36px;
    padding: 0 40px 0 15px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 5px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 13px;
}

.search-box button:hover {
    background: var(--primary-hover);
}

/* 主内容区 */
.main-content {
    min-height: calc(100vh - var(--header-height) - 80px);
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 轮播图 */
.banner-section {
    margin-bottom: 30px;
}

.banner-slider {
    position: relative;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
}

.banner-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.banner-item.active {
    opacity: 1;
}

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

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

.banner-info h3 {
    font-size: 28px;
    margin-bottom: 10px;
}

.banner-info p {
    font-size: 14px;
    opacity: 0.9;
    max-width: 600px;
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    right: 30px;
    display: flex;
    gap: 8px;
}

.banner-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.banner-dots .dot.active {
    background: var(--primary-color);
    width: 24px;
    border-radius: 5px;
}

/* 分类区块 */
.category-section {
    margin-bottom: 40px;
}

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

.section-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    padding-left: 12px;
    border-left: 4px solid var(--primary-color);
}

.more-link {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.2s;
}

.more-link:hover {
    color: var(--primary-color);
}

.total-count {
    color: var(--text-muted);
    font-size: 14px;
}

/* 视频卡片网格 - 首页6列 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.video-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.video-thumb {
    position: relative;
    padding-top: 140%;
    overflow: hidden;
}

.video-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.video-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.video-info {
    padding: 12px;
}

.video-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 6px;
}

.video-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* 加载占位符 */
.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* 加载更多按钮 */
.load-more-container {
    text-align: center;
    margin-top: 30px;
}

.load-more-btn {
    padding: 12px 40px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.load-more-btn:hover {
    background: var(--primary-hover);
}

.loading-indicator {
    padding: 12px 40px;
    color: var(--text-muted);
    font-size: 14px;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-more {
    color: var(--text-muted);
}

/* 子分类筛选 */
.sub-type-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.sub-type-btn {
    padding: 8px 18px;
    background: #f5f5f5;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.sub-type-btn:hover {
    background: #e8e8e8;
    color: var(--text-primary);
    transform: translateY(-1px);
}

.sub-type-btn.active {
    background: linear-gradient(135deg, var(--primary-color), #ff8c42);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

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

.page-btn {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* 详情页 */
.detail-page {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
}

.detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.detail-poster {
    flex-shrink: 0;
    width: 240px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.detail-poster img {
    width: 100%;
    height: auto;
    display: block;
}

.detail-info {
    flex: 1;
}

.detail-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
}

.detail-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.detail-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.meta-item {
    background: var(--bg-color);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.detail-row {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-row strong {
    color: var(--text-primary);
}

.detail-desc {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.detail-desc p {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* 播放区 */
.play-section {
    margin-bottom: 40px;
}

.source-block {
    margin-bottom: 25px;
}

.source-name {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.episode-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.episode-btn {
    padding: 8px 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.episode-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.episode-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* 播放器 */
.player-section {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 40px;
}

.player-title {
    padding: 15px 20px;
    background: #1a1a1a;
    color: #fff;
    font-size: 14px;
    font-weight: normal;
}

.player-container {
    position: relative;
    padding-top: 56.25%;
}

.player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

/* 下载区 */
.download-section {
    margin-bottom: 20px;
}

.download-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.download-link {
    padding: 8px 20px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.download-link:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

.back-link {
    color: var(--primary-color);
}

.back-link:hover {
    text-decoration: underline;
}

/* 底部 */
.footer {
    background: #2a2a2a;
    color: #999;
    padding: 30px 20px;
    margin-top: 60px;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    font-size: 13px;
}

/* 响应式 */
@media (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1024px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 15px;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        margin-top: 10px;
        gap: 15px;
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .search-box input {
        width: 180px;
    }
    
    .banner-slider {
        height: 280px;
    }
    
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    
    .detail-header {
        flex-direction: column;
    }
    
    .detail-poster {
        width: 180px;
        margin: 0 auto;
    }
    
    .detail-title {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .video-info {
        padding: 8px;
    }
    
    .video-title {
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    .banner-slider {
        height: 200px;
    }
    
    .banner-info h3 {
        font-size: 18px;
    }
    
    .banner-info p {
        display: none;
    }
    
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .pagination {
        gap: 4px;
    }
    
    .page-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}
