:root {
    --primary: #6C5CE7;
    --secondary: #FD79A8;
    --dark: #0F0E1E;
    --light: #F8F9FF;
    --text-muted: rgba(255, 255, 255, 0.6);
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.15);
    --success: #00E676;
    --error: #FF5252;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark);
    color: var(--light);
    min-height: 100vh;
    line-height: 1.6;
}

/* 顶部导航 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: relative;
    z-index: 10;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    color: var(--primary);
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
    z-index: 1;
}

/* 标题区域 */
.hero-section {
    text-align: center;
    margin: 2rem 0 3rem;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* 主内容布局 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

/* 视频卡片 */
.image-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.image-container {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    display: block;
}

.loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    gap: 1rem;
}

.fa-spin {
    font-size: 2rem;
}

.image-overlay {
    position: absolute;
    top: 0;
    right: 0;
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
}

.overlay-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.overlay-btn:hover {
    background: var(--primary);
}

/* 控制按钮 */
.controls {
    display: flex;
    padding: 1rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* 统计数据 */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 视频质量选择 */
.quality-selector {
    display: flex;
    gap: 0.5rem;
}

.quality-btn {
    flex: 1;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.quality-btn.active {
    background: var(--primary);
}

/* 内容列表 */
.content-list {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(255, 255, 255, 0.1);
}

.content-list::-webkit-scrollbar {
    width: 6px;
}

.content-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.content-list::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 3px;
}

/* 错误消息 */
.error-msg {
    padding: 1rem;
    color: var(--error);
    text-align: center;
    display: none;
}

/* 开关控件 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* 收藏项样式 */
.favorite-item {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.75rem;
}

.favorite-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.favorite-item .video-thumbnail {
    width: 60px;
    height: 40px;
    background-color: #333;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-item .video-thumbnail i {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
}

.favorite-item .video-thumbnail .duration {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
    border-radius: 2px;
}

.favorite-item .video-info {
    flex: 1;
    min-width: 0;
}

.favorite-item .video-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.favorite-item .video-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.favorite-item .play-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.favorite-item .play-btn:hover {
    background: var(--primary);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .controls {
        justify-content: center;
    }
    
    .sidebar {
        order: -1;
    }
}