/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

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

/* 头部 */
.header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-box input {
    padding: 12px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    width: 250px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-box button {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* 页面标题 */
.page-title {
    font-size: 24px;
    margin: 30px 0 20px;
    padding-left: 15px;
    border-left: 4px solid #667eea;
}

/* 提示文字 */
.tip-text {
    text-align: center;
    color: #888;
    margin-top: 50px;
    font-size: 16px;
}

/* 错误提示 */
.error-tip {
    text-align: center;
    color: #ff6b6b;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
}

/* 视频网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* 视频卡片 */
.video-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.video-card .cover {
    position: relative;
    width: 100%;
    padding-top: 140%;
    overflow: hidden;
}

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

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

.video-card .remark {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.video-card .info {
    padding: 15px;
}

.video-card .title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}

.video-card .meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 5px;
}

.video-card .actor {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.pagination a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.pagination .current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 详情页 */
.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

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

.detail-poster {
    flex: 0 0 300px;
    max-width: 300px;
}

.detail-poster img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.detail-info {
    flex: 1;
    min-width: 300px;
}

.detail-info h1 {
    font-size: 28px;
    margin-bottom: 15px;
}

.detail-info .tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.detail-info .tag {
    padding: 5px 12px;
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 15px;
    font-size: 12px;
}

.detail-info .desc {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.detail-info .brief {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.6);
}

/* 播放源分类 */
.source-section {
    margin-top: 30px;
}

.source-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.source-tab {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.source-tab:hover {
    background: rgba(102, 126, 234, 0.2);
}

.source-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

/* 剧集列表 */
.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.episode-item {
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.episode-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    transform: translateY(-3px);
}

/* 播放窗口 */
.player-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.player-modal.show {
    display: flex;
}

.player-container {
    width: 95%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.close-player {
    position: absolute;
    top: -50px;
    right: 0;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

.close-player:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 返回按钮 */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .header-content {
        justify-content: center;
    }

    .search-box {
        width: 100%;
        justify-content: center;
    }

    .search-box input {
        width: 200px;
    }

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

    .detail-header {
        flex-direction: column;
        align-items: center;
    }

    .detail-poster {
        flex: 0 0 auto;
        max-width: 250px;
    }

    .detail-info {
        text-align: center;
    }

    .detail-info .tags {
        justify-content: center;
    }

    .player-container {
        width: 100%;
        border-radius: 0;
    }

    .episode-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }

    .page-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .logo {
        font-size: 22px;
    }

    .search-box input {
        width: 160px;
        padding: 10px 15px;
    }

    .search-box button {
        padding: 10px 18px;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .video-card .info {
        padding: 10px;
    }

    .video-card .title {
        font-size: 13px;
    }

    .detail-info h1 {
        font-size: 22px;
    }

    .source-tab {
        padding: 10px 16px;
        font-size: 13px;
    }
}
