/* ============================================
   全局样式
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --bg-dark: #0f172a;
    --bg-light: #1e293b;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(30, 41, 59, 0.8);
    --hover-bg: rgba(255, 255, 255, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
                 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* ============================================
   布局容器
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    min-height: calc(100vh - 200px);
}

/* ============================================
   页面标题
   ============================================ */
.page-header {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 30px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-muted);
}

/* ============================================
   面包屑导航
   ============================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 0;
    font-size: 14px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb .current {
    color: var(--text-primary);
}

.breadcrumb .separator {
    color: var(--text-muted);
}

/* ============================================
   视频区块
   ============================================ */
.video-section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

.more-link {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.more-link:hover {
    color: var(--primary-color);
}

/* ============================================
   视频网格
   ============================================ */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.video-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .card-poster img {
    transform: scale(1.1);
}

.card-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .card-overlay {
    opacity: 1;
}

.overlay-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-score {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fbbf24;
    font-weight: 600;
    font-size: 14px;
}

.card-body {
    padding: 12px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-meta {
    font-size: 13px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   分页
   ============================================ */
.pagination-wrapper {
    margin-top: 40px;
    padding: 30px 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-item {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-item:hover {
    background: var(--primary-color);
    color: #fff;
}

.page-item.current {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    font-weight: 600;
}

.page-dots {
    color: var(--text-muted);
}

/* ============================================
   空状态
   ============================================ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state svg {
    margin: 0 auto 20px;
    color: var(--text-muted);
}

.empty-state h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.back-home {
    display: inline-block;
    padding: 10px 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
}

.back-home:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* ============================================
   详情页样式
   ============================================ */
.detail-section {
    margin: 30px 0;
}

.detail-main {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.detail-poster {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.detail-poster img {
    width: 100%;
    height: auto;
}

.detail-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.detail-meta {
    display: grid;
    gap: 12px;
    margin-bottom: 30px;
}

.meta-item {
    display: flex;
    align-items: flex-start;
    font-size: 15px;
}

.meta-label {
    color: var(--text-muted);
    min-width: 60px;
}

.meta-value {
    color: var(--text-primary);
    flex: 1;
}

.score-value {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fbbf24;
    font-weight: 600;
}

.meta-value.tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-color);
    border-radius: 6px;
    font-size: 14px;
}

/* 播放列表 */
.play-section {
    margin-bottom: 30px;
}

.play-title {
    font-size: 20px;
    margin-bottom: 15px;
}

.play-group {
    margin-bottom: 20px;
}

.play-from-name {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.episode-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.episode-item {
    padding: 8px 16px;
    background: var(--card-bg);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.episode-item:hover {
    background: var(--primary-color);
    color: #fff;
}

.episode-item.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    font-weight: 600;
}

/* 剧情简介 */
.detail-desc {
    margin-top: 30px;
}

.desc-title {
    font-size: 20px;
    margin-bottom: 15px;
}

.desc-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================
   播放页样式
   ============================================ */
.player-section {
    margin: 20px 0;
}

.player-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.player-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

/* 选集区域 */
.episode-section {
    margin: 30px 0;
}

.episode-group {
    margin-bottom: 25px;
}

/* 视频信息 */
.info-section {
    margin: 40px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    font-size: 15px;
}

.info-label {
    color: var(--text-muted);
    min-width: 60px;
}

.info-value {
    color: var(--text-primary);
}

.info-desc {
    margin-top: 20px;
}

.info-desc h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.info-desc p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .detail-main {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 24px;
    }

    .section-title {
        font-size: 20px;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .card-body {
        padding: 8px;
    }

    .card-title {
        font-size: 13px;
    }

    .card-meta {
        font-size: 12px;
    }

    .detail-title {
        font-size: 24px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .player-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .page-header {
        padding: 20px 0;
    }

    .video-section {
        margin-bottom: 30px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
