/* ============================================
   视频号助手 - 新版UI设计
   参考: 现代化仪表盘风格
   ============================================ */

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

:root {
    /* 主色调 - 绿色系 */
    --primary-color: #22c55e;
    --primary-hover: #16a34a;
    --primary-light: #dcfce7;
    --primary-lighter: #f0fdf4;
    
    /* 状态色 */
    --danger-color: #ef4444;
    --danger-light: #fef2f2;
    --warning-color: #f59e0b;
    --warning-light: #fffbeb;
    --info-color: #3b82f6;
    --info-light: #eff6ff;
    --success-color: #22c55e;
    --success-light: #f0fdf4;
    
    /* 文字色 */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    /* 背景色 */
    --bg-primary: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-sidebar: #ffffff;
    
    /* 边框 */
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* 尺寸 */
    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
}

/* 暗色主题 */
[data-theme="dark"] {
    /* 文字色 */
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    
    /* 背景色 */
    --bg-primary: #111827;
    --bg-card: #1f2937;
    --bg-hover: #374151;
    --bg-sidebar: #1f2937;
    
    /* 边框 */
    --border-color: #374151;
    --border-light: #4b5563;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    
    /* 状态色调整 */
    --primary-light: rgba(34, 197, 94, 0.15);
    --primary-lighter: rgba(34, 197, 94, 0.08);
    --danger-light: rgba(239, 68, 68, 0.15);
    --warning-light: rgba(245, 158, 11, 0.15);
    --info-light: rgba(59, 130, 246, 0.15);
    --success-light: rgba(34, 197, 94, 0.15);
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #111827 0%, #1f2937 50%, #111827 100%);
}

/* 暗色主题下的卡片和面板 */
[data-theme="dark"] .card {
    background: rgba(31, 41, 55, 0.8);
    border-color: #374151;
}

[data-theme="dark"] .sidebar {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(55, 65, 81, 0.5);
}

[data-theme="dark"] .main-content {
    background: rgba(17, 24, 39, 0.7);
    border-color: rgba(55, 65, 81, 0.5);
}

[data-theme="dark"] .page-header {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(55, 65, 81, 0.5);
}

/* 暗色主题下的按钮 */
[data-theme="dark"] .btn-secondary {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
}

[data-theme="dark"] .btn-secondary:hover {
    background: #4b5563;
    border-color: #6b7280;
}

/* 暗色主题下的输入框 */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

[data-theme="dark"] input[type="text"]:focus,
[data-theme="dark"] input[type="number"]:focus,
[data-theme="dark"] input[type="date"]:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    background: #1f2937;
    border-color: var(--primary-color);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #6b7280;
}

/* 暗色主题下的表格 */
[data-theme="dark"] .data-table th {
    background: linear-gradient(180deg, #374151 0%, rgba(55, 65, 81, 0.5) 100%);
}

[data-theme="dark"] .data-table tbody tr:hover {
    background: #374151;
}

[data-theme="dark"] .data-table tbody tr.selected {
    background: rgba(34, 197, 94, 0.15);
}

/* 暗色主题下的统计卡片 */
[data-theme="dark"] .stat-card {
    background: rgba(31, 41, 55, 0.8);
    border-color: #374151;
}

/* 暗色主题下的导航项 */
[data-theme="dark"] .nav-item:hover {
    background: #374151;
}

[data-theme="dark"] .nav-item.active {
    background: rgba(34, 197, 94, 0.15);
}

/* 暗色主题下的筛选栏 */
[data-theme="dark"] .filter-bar {
    background: rgba(31, 41, 55, 0.6);
    border-color: rgba(55, 65, 81, 0.6);
}

[data-theme="dark"] .filter-btn {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

[data-theme="dark"] .filter-btn:hover {
    background: #4b5563;
}

/* 暗色主题下的批量操作栏 */
[data-theme="dark"] .batch-actions-bar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
}

/* 暗色主题下的消息提示 */
[data-theme="dark"] .message-toast {
    background: #1f2937;
    border-color: #374151;
}

/* 暗色主题下的帮助内容 */
[data-theme="dark"] .help-content code {
    background: #374151;
    color: var(--primary-color);
}

[data-theme="dark"] .help-content pre {
    background: #1f2937;
    border-color: #374151;
}

[data-theme="dark"] .help-content table th {
    background: #374151;
}

[data-theme="dark"] .help-content table td {
    border-color: #374151;
}

/* 暗色主题下的视频播放器 */
[data-theme="dark"] .video-player {
    background: #000;
}

[data-theme="dark"] .video-controls {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

/* 暗色主题下的连接状态 */
[data-theme="dark"] .connection-status {
    background: #374151;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 25%, #e0f2fe 75%, #dbeafe 100%);
    height: 100vh;
    overflow: hidden;
    color: var(--text-primary);
    line-height: 1.5;
}

/* ============================================
   Layout - 整体布局
   ============================================ */
.app-container {
    display: flex;
    height: 100vh;
    padding: 20px;
    gap: 0;
    overflow: hidden;
}

/* 整体容器包装 - 创建融合效果 */
.app-container::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.15), 0 8px 16px -4px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   Sidebar - 左侧边栏
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
    border-right: 1px solid rgba(229, 231, 235, 0.3);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 40px);
    flex-shrink: 0;
    transition: transform 0.3s ease;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-header h1::before {
    content: "";
    display: inline-block;
    width: 32px;
    height: 32px;
    background-image: url('../icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.sidebar-header p {
    font-size: 13px;
    color: var(--text-muted);
}

/* 导航分组 */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

/* 侧边栏导航滚动条样式 */
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    transition: background 0.2s ease;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* 隐藏滚动条的上下箭头按钮 */
.sidebar-nav::-webkit-scrollbar-button {
    display: none;
}

/* 暗色主题下的滚动条 */
[data-theme="dark"] .sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Firefox 滚动条样式 */
.sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.05) transparent;
}

[data-theme="dark"] .sidebar-nav {
    scrollbar-color: rgba(255, 255, 255, 0.05) transparent;
}

/* 暗色主题下的下载队列 */
[data-theme="dark"] .queue-item {
    background: rgba(31, 41, 55, 0.8);
    border-color: #374151;
}

[data-theme="dark"] .queue-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.25);
}

[data-theme="dark"] .queue-item.downloading {
    background: rgba(31, 41, 55, 0.9);
    border-color: var(--primary-color);
}

[data-theme="dark"] .queue-item.failed {
    background: rgba(31, 41, 55, 0.9);
    border-color: var(--danger-color);
}

[data-theme="dark"] .queue-progress-bar {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .queue-action-btn {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

[data-theme="dark"] .queue-action-btn:hover {
    color: white;
}

[data-theme="dark"] .queue-action-btn:disabled:hover {
    background: #374151;
    color: #d1d5db;
}

[data-theme="dark"] .queue-item-status.pending {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .queue-item-status.downloading {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .queue-item-status.paused {
    background: rgba(107, 114, 128, 0.15);
    border-color: rgba(107, 114, 128, 0.3);
}

[data-theme="dark"] .queue-item-status.completed {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .queue-item-status.failed {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

/* 暗色主题下的设置页面 */
[data-theme="dark"] .settings-section-title {
    border-color: #374151;
}

[data-theme="dark"] .settings-item {
    border-color: #374151;
}

[data-theme="dark"] .settings-item-control input[type="text"],
[data-theme="dark"] .settings-item-control input[type="number"] {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

[data-theme="dark"] .settings-item-control input[type="text"]:hover,
[data-theme="dark"] .settings-item-control input[type="number"]:hover {
    border-color: #6b7280;
}

[data-theme="dark"] .settings-item-control input[type="text"]:focus,
[data-theme="dark"] .settings-item-control input[type="number"]:focus {
    background: #1f2937;
    border-color: var(--primary-color);
}

[data-theme="dark"] .settings-item-control input[type="text"]::placeholder,
[data-theme="dark"] .settings-item-control input[type="number"]::placeholder {
    color: #6b7280;
}

[data-theme="dark"] .settings-item-control input[type="text"].error,
[data-theme="dark"] .settings-item-control input[type="number"].error {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger-color);
}

[data-theme="dark"] .toggle-switch {
    background: #4b5563;
}

[data-theme="dark"] .toggle-switch::after {
    background: #d1d5db;
}

/* 暗色主题下的全局搜索 */
[data-theme="dark"] .global-search input {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

[data-theme="dark"] .global-search input:hover {
    border-color: #6b7280;
}

[data-theme="dark"] .global-search input:focus {
    background: #1f2937;
    border-color: var(--primary-color);
}

[data-theme="dark"] .global-search input::placeholder {
    color: #6b7280;
}

/* 暗色主题下的统计徽章 */
[data-theme="dark"] .stat-like {
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
}

[data-theme="dark"] .stat-comment {
    background: rgba(37, 99, 235, 0.15);
    color: #93c5fd;
}

[data-theme="dark"] .stat-fav {
    background: rgba(217, 119, 6, 0.15);
    color: #fcd34d;
}

[data-theme="dark"] .stat-forward {
    background: rgba(147, 51, 234, 0.15);
    color: #d8b4fe;
}

/* 暗色主题下的表格操作按钮 */
[data-theme="dark"] .table-action-btn {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

[data-theme="dark"] .table-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

[data-theme="dark"] .table-action-btn.danger:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
}

/* 暗色主题下的批量下载页面 */
[data-theme="dark"] #batchUrlsInput {
    background: #1f2937 !important;
    border-color: #4b5563 !important;
    color: #f9fafb !important;
}

[data-theme="dark"] #batchUrlsInput:hover {
    border-color: #6b7280 !important;
}

[data-theme="dark"] #batchUrlsInput:focus {
    background: #111827 !important;
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] #batchUrlsInput::placeholder {
    color: #6b7280 !important;
}

[data-theme="dark"] .form-group textarea {
    background: #1f2937 !important;
    border-color: #4b5563 !important;
    color: #f9fafb !important;
}

[data-theme="dark"] .form-group textarea:hover {
    border-color: #6b7280 !important;
}

[data-theme="dark"] .form-group textarea:focus {
    background: #111827 !important;
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] .form-group textarea::placeholder {
    color: #6b7280 !important;
}

[data-theme="dark"] .checkbox-label {
    color: #f9fafb;
}

[data-theme="dark"] .checkbox-label:hover {
    background: rgba(55, 65, 81, 0.5);
}

/* 暗色主题下的日期选择器图标 */
[data-theme="dark"] .date-picker input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

.nav-group {
    margin-bottom: 24px;
}

.nav-group-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: var(--border-radius-sm);
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    stroke-width: 2;
}

.nav-item span {
    flex: 1;
}

/* 主题切换项 */
.theme-toggle-item {
    cursor: pointer;
    position: relative;
}

.theme-toggle-item:focus {
    background-image: none !important;
}

.theme-toggle-item .theme-icon-light,
.theme-toggle-item .theme-icon-dark {
    transition: opacity 0.3s ease;
    position: absolute;
    left: 20px;
}

.theme-toggle-item .theme-icon-light[style*="display: none"],
.theme-toggle-item .theme-icon-dark[style*="display: none"] {
    display: none !important;
}

.theme-toggle-item span {
    margin-left: 32px;
}

/* 连接状态 */
.connection-status {
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    background: var(--bg-hover);
    margin: 12px;
    border-radius: var(--border-radius-sm);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger-color);
    flex-shrink: 0;
}

.status-dot.connected {
    background: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.status-dot.connecting {
    background: var(--warning-color);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

/* ============================================
   Main Content - 主内容区
   ============================================ */
.main-content {
    flex: 1;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-left: none;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* ============================================
   Page Header - 页面头部
   ============================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    flex-shrink: 0;
    z-index: 50;
    border-radius: 0 var(--border-radius-lg) 0 0;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 全局搜索 */
.global-search {
    position: relative;
    width: 320px;
}

.global-search input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
    color: var(--text-primary);
    font-weight: 400;
}

.global-search input:hover {
    border-color: var(--text-muted);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.global-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px var(--primary-light), 0 2px 8px rgba(34, 197, 94, 0.1);
}

.global-search input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.global-search svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

/* 搜索结果下拉 */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.08);
    max-height: 420px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results-dropdown.active {
    display: block;
}

.search-results-group {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.search-results-group:last-child {
    border-bottom: none;
}

.search-results-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.search-results-group-count {
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.search-result-item:hover {
    background: var(--bg-hover);
}

.search-result-thumbnail {
    width: 48px;
    height: 27px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-hover);
    flex-shrink: 0;
}

.search-result-thumbnail-placeholder {
    width: 48px;
    height: 27px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-result-thumbnail-placeholder svg {
    width: 16px;
    height: 16px;
    color: white;
    opacity: 0.9;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.search-result-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.search-results-empty,
.search-results-loading {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.search-highlight {
    background: var(--primary-light);
    padding: 1px 3px;
    border-radius: 3px;
    color: var(--primary-hover);
}

/* ============================================
   Page Content - 页面内容区
   ============================================ */
.page-content {
    flex: 1;
    padding: 24px 32px;
}

/* ============================================
   Filter Bar - 筛选栏
   ============================================ */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(229, 231, 235, 0.6);
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.filter-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-lighter);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}

.filter-btn:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

select.filter-btn {
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px 12px !important;
}

select.filter-btn:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2322c55e' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
}

.filter-btn svg {
    width: 18px;
    height: 18px;
}

.date-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-picker:hover {
    border-color: var(--primary-color);
    background: var(--primary-lighter);
}

.date-picker svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.date-picker input[type="date"] {
    border: none;
    background: transparent;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.date-picker input[type="date"]:focus {
    outline: none;
}

.date-picker input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.date-picker input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* ============================================
   Cards - 卡片
   ============================================ */
.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    overflow: visible;
}

.card:hover {
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.08);
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-link {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

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

/* ============================================
   Stats Grid - 统计卡片网格
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.08);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 8px;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.stat-trend.up {
    color: var(--success-color);
}

.stat-trend.down {
    color: var(--danger-color);
}

.stat-trend svg {
    width: 14px;
    height: 14px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-icon.browse {
    background: var(--primary-light);
    color: var(--primary-color);
}

.stat-icon.download {
    background: var(--info-light);
    color: var(--info-color);
}

.stat-icon.today {
    background: var(--warning-light);
    color: var(--warning-color);
}

.stat-icon.storage {
    background: #fae8ff;
    color: #a855f7;
}

/* ============================================
   Dashboard Grid - 仪表盘网格布局
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Chart - 图表
   ============================================ */
.chart-container {
    position: relative;
    height: 240px;
}

.chart-donut {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.chart-donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.chart-donut-label {
    font-size: 12px;
    color: var(--text-muted);
}

.chart-donut-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-legend {
    margin-top: 20px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.chart-legend-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.chart-legend-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.chart-legend-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 柱状图 */
.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 180px;
    padding: 0 10px;
    gap: 12px;
}

.chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.chart-bar {
    width: 100%;
    max-width: 48px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: 6px 6px 0 0;
    min-height: 4px;
    transition: height 0.3s ease;
    position: relative;
}

.chart-bar:hover {
    opacity: 0.85;
}

.chart-bar-value {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.chart-label {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ============================================
   Recent List - 最近列表
   ============================================ */
.recent-list {
    display: flex;
    flex-direction: column;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.15s ease;
}

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

.recent-item:hover {
    background: var(--bg-hover);
    margin: 0 -24px;
    padding: 16px 24px;
    border-radius: var(--border-radius-sm);
}

.recent-thumbnail {
    width: 64px;
    height: 36px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    background: var(--bg-hover);
    flex-shrink: 0;
}

.recent-thumbnail-placeholder {
    width: 64px;
    height: 36px;
    border-radius: var(--border-radius-sm);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.recent-thumbnail-placeholder svg {
    width: 20px;
    height: 20px;
    color: white;
    opacity: 0.9;
}

.recent-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.recent-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    max-width: 400px;
}

.recent-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
}

.recent-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.recent-status.completed {
    background: var(--success-light);
    color: var(--success-color);
}

.recent-status.failed {
    background: var(--danger-light);
    color: var(--danger-color);
}

.recent-status.in_progress,
.recent-status.pending {
    background: var(--warning-light);
    color: var(--warning-color);
}

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state p {
    font-size: 14px;
}

/* ============================================
   Buttons - 按钮
   ============================================ */
.btn {
    padding: 11px 22px;
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #15803d 100%);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-light);
}

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

.btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   Page Views - 页面视图
   ============================================ */
.page-view {
    display: none;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 32px;
}

.page-view.active {
    display: flex;
    flex-direction: column;
}


/* ============================================
   Data Table - 数据表格
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    background: linear-gradient(180deg, var(--bg-hover) 0%, rgba(241, 245, 249, 0.5) 100%);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-align: left;
    padding: 16px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table th:first-child {
    padding-left: 20px;
    border-radius: var(--border-radius-sm) 0 0 0;
}

.data-table th:last-child {
    padding-right: 20px;
    border-radius: 0 var(--border-radius-sm) 0 0;
}

.data-table td {
    padding: 20px 16px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    font-size: 14px;
    background: var(--bg-card);
}

.data-table td:first-child {
    padding-left: 20px;
}

.data-table td:last-child {
    padding-right: 20px;
}

.data-table tbody tr {
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table tbody tr.selected {
    background: var(--primary-lighter);
    border-left: 3px solid var(--primary-color);
}

.data-table tbody tr.selected td:first-child {
    padding-left: 17px;
}

.data-table tbody tr.error-row {
    background: var(--danger-light);
    border-left: 3px solid var(--danger-color);
}

.data-table tbody tr.error-row td:first-child {
    padding-left: 17px;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.table-thumbnail {
    width: 80px;
    height: 45px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    background: var(--bg-hover);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.table-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.table-thumbnail-placeholder {
    width: 80px;
    height: 45px;
    border-radius: var(--border-radius-sm);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.table-thumbnail-placeholder svg {
    width: 24px;
    height: 24px;
    color: white;
    opacity: 0.9;
}

.table-title {
    font-weight: 500;
    color: var(--text-primary);
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.data-table tbody tr:hover .table-title {
    color: var(--primary-color);
}

.table-error-hint {
    font-size: 11px;
    color: var(--danger-color);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.table-error-hint::before {
    content: '⚠';
    font-size: 12px;
}

.table-author {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.table-meta {
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 视频信息单元格 */
.video-info-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 视频元数据行 */
.video-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.meta-item svg {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* 互动数据单元格 */
.stats-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* 统计徽章样式 */
.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.stat-badge svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* 点赞徽章 */
.stat-like {
    background: #fef2f2;
    color: #dc2626;
}

.data-table tbody tr:hover .stat-like {
    background: #fee2e2;
    transform: translateY(-1px);
}

/* 评论徽章 */
.stat-comment {
    background: #eff6ff;
    color: #2563eb;
}

.data-table tbody tr:hover .stat-comment {
    background: #dbeafe;
    transform: translateY(-1px);
}

/* 收藏徽章 */
.stat-fav {
    background: #fffbeb;
    color: #d97706;
}

.data-table tbody tr:hover .stat-fav {
    background: #fef3c7;
    transform: translateY(-1px);
}

/* 转发徽章 */
.stat-forward {
    background: #faf5ff;
    color: #9333ea;
}

.data-table tbody tr:hover .stat-forward {
    background: #f3e8ff;
    transform: translateY(-1px);
}

.table-actions {
    display: flex;
    gap: 6px;
}

.table-action-btn {
    padding: 8px 10px;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    border: 1px solid var(--border-light);
}

.table-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.3);
}

.table-action-btn.danger:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.table-action-btn svg {
    width: 16px;
    height: 16px;
}

.table-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.table-empty-state svg {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
    opacity: 0.3;
    color: var(--primary-color);
}

.table-empty-state p {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
}

.table-empty-state p:first-of-type {
    margin-bottom: 8px;
}

.table-empty-state p:last-of-type {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
}

/* Checkbox */
.data-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
    border-radius: 4px;
    position: relative;
    z-index: 1;
    opacity: 1 !important;
    visibility: visible !important;
    transition: transform 0.2s ease;
}

.data-table input[type="checkbox"]:hover {
    transform: scale(1.1);
}

/* Download Status */
.download-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.download-status:hover {
    transform: scale(1.05);
}

.download-status.completed {
    background: var(--success-light);
    color: var(--success-color);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.download-status.completed::before {
    content: "✓";
    font-size: 13px;
    font-weight: 700;
}

.download-status.failed {
    background: var(--danger-light);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.download-status.failed::before {
    content: "✕";
    font-size: 13px;
    font-weight: 700;
}

.download-status.in_progress,
.download-status.pending {
    background: var(--warning-light);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.download-status.in_progress::before,
.download-status.pending::before {
    content: "◐";
    animation: spin 1s linear infinite;
    font-size: 13px;
}

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

/* ============================================
   Batch Actions Bar - 批量操作栏
   ============================================ */
.batch-actions-bar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.batch-actions-bar span {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.batch-actions-bar span::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    font-size: 12px;
}

.batch-actions-bar .btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.batch-actions-bar .btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.batch-actions-bar .btn-danger {
    background: rgba(239, 68, 68, 0.9);
    border-color: rgba(239, 68, 68, 1);
}

.batch-actions-bar .btn-danger:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
}

.download-batch-bar {
    background: linear-gradient(135deg, var(--info-color) 0%, #1d4ed8 100%);
}

/* ============================================
   Video Detail Panel - 视频详情面板
   ============================================ */
.video-detail-panel {
    margin-top: 20px;
}

.video-detail-content {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .video-detail-content {
        grid-template-columns: 1fr;
    }
}

/* 左侧列 */
.detail-left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-thumbnail-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 互动数据网格 */
.detail-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.detail-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--border-radius-lg);
    transition: all 0.2s ease;
}

.detail-stat-card svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.detail-stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-stat-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.detail-stat-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* 点赞卡片 */
.detail-stat-card.stat-like {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
}

.detail-stat-card.stat-like:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

/* 评论卡片 */
.detail-stat-card.stat-comment {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
}

.detail-stat-card.stat-comment:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* 分享卡片 */
.detail-stat-card.stat-share {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #16a34a;
}

.detail-stat-card.stat-share:hover {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
}

/* 收藏卡片 */
.detail-stat-card.stat-fav {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #d97706;
}

.detail-stat-card.stat-fav:hover {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

/* 右侧列 */
.detail-right-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-header {
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.detail-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
}

/* 元数据网格 */
.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.detail-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-hover);
    border-radius: var(--border-radius-lg);
    transition: all 0.2s ease;
}

.detail-meta-item:hover {
    background: var(--primary-lighter);
    transform: translateX(4px);
}

.detail-meta-item svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.detail-meta-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.detail-meta-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.detail-meta-value {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

/* 操作按钮区域 */
.detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 8px;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
}

.video-detail-thumbnail {
    width: 100%;
    border-radius: var(--border-radius);
    background: var(--bg-hover);
    cursor: pointer;
}

.video-detail-thumbnail-wrapper {
    position: relative;
}

.video-detail-thumbnail-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-detail-thumbnail-placeholder svg {
    width: 48px;
    height: 48px;
    color: white;
    opacity: 0.9;
}

.video-detail-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-detail-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.video-detail-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.video-detail-meta-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.video-detail-meta-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.video-detail-stats {
    display: flex;
    gap: 32px;
    padding: 20px;
    background: var(--bg-hover);
    border-radius: var(--border-radius-sm);
}

.video-detail-stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-detail-stat svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.video-detail-stat-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.video-detail-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
    flex-wrap: wrap;
}

/* ============================================
   Pagination - 分页
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    color: var(--text-primary);
}

.pagination button:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

.pagination-info {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 12px;
}

/* ============================================
   Form Elements - 表单元素
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    font-size: 14px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    font-family: inherit;
    line-height: 1.5;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    background: var(--bg-card);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: var(--danger-color);
    background: var(--danger-light);
}

.form-group input.valid,
.form-group select.valid,
.form-group textarea.valid {
    border-color: var(--success-color);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-hint svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.form-error {
    font-size: 12px;
    color: var(--danger-color);
    margin-top: 6px;
    display: none;
    align-items: center;
    gap: 6px;
}

.form-error.visible {
    display: flex;
}

.form-error svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    transition: background 0.15s ease;
}

.checkbox-label:hover {
    background: var(--bg-hover);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
    border-radius: 4px;
}

.form-group.disabled input,
.form-group.disabled select,
.form-group.disabled textarea {
    background-color: var(--bg-hover);
    cursor: not-allowed;
    opacity: 0.6;
    color: var(--text-muted);
}

/* Input with icon */
.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-left: 40px;
}

.input-with-icon svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

/* ============================================
   Alerts - 提示框
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: var(--success-light);
    color: var(--success-color);
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: var(--danger-light);
    color: var(--danger-color);
    border: 1px solid #fecaca;
}

.alert-info {
    background: var(--info-light);
    color: var(--info-color);
    border: 1px solid #bfdbfe;
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning-color);
    border: 1px solid #fde68a;
}

/* ============================================
   Mobile - 移动端适配
   ============================================ */
.hamburger {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 10px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.hamburger svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    .app-container {
        height: auto;
        min-height: 100vh;
        flex-direction: column;
        padding: 10px;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 280px;
        height: 100vh;
        border-radius: 0;
        transform: translateX(-100%);
        z-index: 1000;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.open {
        display: block;
    }

    .main-content {
        width: 100%;
        height: auto;
        min-height: calc(100vh - 20px);
        border-radius: var(--border-radius-lg);
        border: 1px solid rgba(255, 255, 255, 0.8);
    }

    .page-header {
        padding: 16px 20px;
        padding-top: 70px;
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    }

    .page-content {
        padding: 20px;
        overflow-y: visible;
    }

    .hamburger {
        display: block;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .global-search {
        width: 100%;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-left,
    .filter-right {
        flex-wrap: wrap;
    }
}

/* ============================================
   Queue Page - 下载队列页面
   ============================================ */
.queue-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.queue-empty-state svg {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
    opacity: 0.3;
    color: var(--primary-color);
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    margin-bottom: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.queue-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.15);
    transform: translateY(-2px);
}

.queue-item.downloading {
    border-color: var(--primary-color);
    border-width: 2px;
    background: var(--card-bg);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.2);
}

.queue-item.paused {
    opacity: 0.7;
    filter: grayscale(0.3);
}

.queue-item.failed {
    border-color: var(--danger-color);
    border-width: 2px;
    background: var(--card-bg);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.15);
}

.queue-item-thumbnail {
    width: 96px;
    height: 54px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    background: var(--bg-hover);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.queue-item:hover .queue-item-thumbnail {
    transform: scale(1.05);
}

.queue-item-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.queue-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
    max-width: 500px;
    line-height: 1.4;
}

.queue-item-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
}

.queue-item-progress {
    width: 220px;
    flex-shrink: 0;
}

.queue-progress-bar {
    height: 8px;
    background: var(--bg-hover);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 6px;
    position: relative;
}

.queue-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.queue-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.queue-progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: right;
    font-weight: 600;
}

.queue-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.queue-action-btn {
    padding: 8px 12px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.queue-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.3);
}

.queue-action-btn.pause:hover {
    background: var(--warning-color);
    border-color: var(--warning-color);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.queue-action-btn.danger:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.queue-action-btn svg {
    width: 14px;
    height: 14px;
}

.queue-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.queue-action-btn:disabled:hover {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-color: var(--border-color);
    box-shadow: none;
}

/* Queue Item Drag Handle */
.queue-item-drag-handle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: grab;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.queue-item-drag-handle:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.queue-item-drag-handle:active {
    cursor: grabbing;
}

.queue-item-drag-handle svg {
    width: 16px;
    height: 16px;
}

/* Queue Item Status Badge */
.queue-item-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    flex-shrink: 0;
    min-width: 80px;
    justify-content: center;
}

.queue-item-status.pending {
    background: var(--warning-light);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.queue-item-status.downloading {
    background: var(--primary-light);
    color: var(--primary-color);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.queue-item-status.downloading::before {
    content: "◐";
    animation: spin 1s linear infinite;
}

.queue-item-status.paused {
    background: var(--bg-hover);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.queue-item-status.completed {
    background: var(--success-light);
    color: var(--success-color);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.queue-item-status.completed::before {
    content: "✓";
}

.queue-item-status.failed {
    background: var(--danger-light);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.queue-item-status.failed::before {
    content: "✕";
}

/* ============================================
   Settings Page - 设置页面
   ============================================ */
.settings-section {
    margin-bottom: 32px;
}

.settings-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.settings-item-info {
    flex: 1;
}

.settings-item-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.settings-item-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.settings-item-control {
    flex-shrink: 0;
    margin-left: 24px;
}

/* Settings Input Styles */
.settings-item-control input[type="text"],
.settings-item-control input[type="number"] {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    font-family: inherit;
}

.settings-item-control input[type="text"]:hover,
.settings-item-control input[type="number"]:hover {
    border-color: var(--text-muted);
}

.settings-item-control input[type="text"]:focus,
.settings-item-control input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    background: var(--bg-card);
}

.settings-item-control input[type="text"]::placeholder,
.settings-item-control input[type="number"]::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.settings-item-control input[type="text"].error,
.settings-item-control input[type="number"].error {
    border-color: var(--danger-color);
    background: var(--danger-light);
}

.settings-item-control input[type="text"].valid,
.settings-item-control input[type="number"].valid {
    border-color: var(--success-color);
}

/* Number Input Specific */
.settings-item-control input[type="number"] {
    text-align: center;
    font-weight: 500;
}

/* Remove number input spinners for cleaner look */
.settings-item-control input[type="number"]::-webkit-inner-spin-button,
.settings-item-control input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.settings-item-control input[type="number"] {
    -moz-appearance: textfield;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    background: var(--border-color);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.toggle-switch.active {
    background: var(--primary-color);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.toggle-switch.active::after {
    transform: translateX(22px);
}

/* ============================================
   Export Dialog - 导出对话框
   ============================================ */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    backdrop-filter: blur(2px);
}

.dialog-overlay.active {
    opacity: 1;
    visibility: visible;
}

.dialog {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.15), 0 8px 16px -4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.dialog-overlay.active .dialog {
    transform: scale(1);
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.dialog-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.dialog-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.dialog-close svg {
    width: 20px;
    height: 20px;
}

.dialog-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dialog-title svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--primary-color);
}

.dialog-title.danger svg {
    color: var(--danger-color);
}

.dialog-title.warning svg {
    color: var(--warning-color);
}

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

.dialog-body {
    margin-bottom: 24px;
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.export-format-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 12px;
}

.export-format-option:hover {
    border-color: var(--primary-color);
}

.export-format-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-lighter);
}

.export-format-option input {
    display: none;
}

.export-format-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.export-format-icon svg {
    width: 20px;
    height: 20px;
}

.export-format-info {
    flex: 1;
}

.export-format-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.export-format-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Export Progress */
.export-progress {
    display: none;
    margin-top: 16px;
}

.export-progress.active {
    display: block;
}

.export-progress-bar {
    height: 8px;
    background: var(--bg-hover);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.export-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.export-progress-text {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* ============================================
   Message Toast - 消息提示
   ============================================ */
.message-area {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-toast {
    padding: 14px 20px;
    border-radius: var(--border-radius-lg);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.15), 0 8px 16px -4px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
    max-width: 400px;
    backdrop-filter: blur(10px);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.message-toast.success {
    background: var(--success-color);
    color: white;
}

.message-toast.error {
    background: var(--danger-color);
    color: white;
}

.message-toast.info {
    background: var(--info-color);
    color: white;
}

.message-toast.warning {
    background: var(--warning-color);
    color: white;
}

/* ============================================
   Lightbox - 图片灯箱
   ============================================ */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--border-radius);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
}

.lightbox-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
}

.lightbox-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.lightbox-meta {
    font-size: 13px;
    opacity: 0.8;
}

/* ============================================
   Video Player - 视频播放器
   ============================================ */
.video-player-overlay,
.video-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.video-player-overlay.active,
.video-player-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-player-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    background: linear-gradient(rgba(0, 0, 0, 0.8), transparent);
}

.video-player-title {
    color: white;
    font-size: 16px;
    font-weight: 500;
}

.video-player-container {
    position: relative;
    width: 90vw;
    max-width: 1200px;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.5);
}

.video-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.video-player-loading,
.video-player-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: white;
    background: #000;
    z-index: 5;
}

.video-player-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.video-player-error svg {
    width: 48px;
    height: 48px;
    color: var(--danger-color);
}

.video-player-error-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.video-player-close {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

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

.video-player-close svg {
    width: 20px;
    height: 20px;
}

.video-player {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    z-index: 10;
}

.video-progress-container {
    width: 100%;
    padding: 8px 0;
    cursor: pointer;
}

.video-progress-bar {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: visible;
}

.video-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    width: var(--progress, 0%);
}

.video-progress-handle {
    position: absolute;
    top: 50%;
    left: var(--progress, 0%);
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s;
}

.video-progress-container:hover .video-progress-handle {
    opacity: 1;
}

.video-controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.video-controls-left,
.video-controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-control-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

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

.video-control-btn svg {
    width: 20px;
    height: 20px;
}

.video-progress {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.video-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.1s linear;
}

.video-time {
    font-size: 13px;
    color: white;
    min-width: 100px;
    text-align: center;
}


/* ============================================
   Batch Download Log - 批量下载日志
   ============================================ */
.batch-log-container {
    max-height: 320px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 12px;
    background: #1a1a2e;
    color: #e4e4e7;
    padding: 16px;
    border-radius: var(--border-radius-sm);
    line-height: 1.6;
}

.batch-log-item {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.batch-log-item.success {
    color: #4ade80;
}

.batch-log-item.error {
    color: #f87171;
}

.batch-log-item.warning {
    color: #fbbf24;
}

.batch-log-item.info {
    color: #60a5fa;
}

.batch-log-time {
    color: #6b7280;
    margin-right: 8px;
}

/* ============================================
   Queue Stats - 队列统计
   ============================================ */
.queue-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.queue-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.queue-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.queue-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

/* ============================================
   Export Dialog Enhancements - 导出对话框增强
   ============================================ */
#exportDialogOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    backdrop-filter: blur(2px);
}

#exportDialogOverlay.active {
    opacity: 1;
    visibility: visible;
}

.export-dialog {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.15), 0 8px 16px -4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

#exportDialogOverlay.active .export-dialog {
    transform: scale(1);
}

.export-dialog-header {
    margin-bottom: 24px;
}

.export-dialog-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.export-dialog-desc {
    font-size: 14px;
    color: var(--text-muted);
}

.export-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-hover);
    border-radius: var(--border-radius-sm);
}

.export-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.export-info-label {
    font-size: 12px;
    color: var(--text-muted);
}

.export-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   Clear Data Dialog - 清除数据对话框
   ============================================ */
#clearDataDialogOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    backdrop-filter: blur(2px);
}

#clearDataDialogOverlay.active {
    opacity: 1;
    visibility: visible;
}

.clear-dialog {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.15), 0 8px 16px -4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    text-align: center;
}

/* Clear Warning Icon - Large centered icon */
.clear-warning {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    margin-bottom: 24px;
}

.clear-warning svg {
    width: 120px;
    height: 120px;
    color: var(--text-muted);
    opacity: 0.4;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.clear-warning-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    text-align: center;
}

.clear-dialog-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-dialog-icon svg {
    width: 120px;
    height: 120px;
    color: var(--text-muted);
    opacity: 0.4;
}

.clear-dialog-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.clear-dialog-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.clear-dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Clear Dialog Input */
.clear-dialog input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: all 0.2s ease;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.clear-dialog input[type="text"]::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
}

.clear-dialog input[type="text"]:hover {
    border-color: var(--text-muted);
}

.clear-dialog input[type="text"]:focus {
    outline: none;
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px var(--danger-light);
    background: var(--bg-card);
}

.clear-dialog input[type="text"].valid {
    border-color: var(--danger-color);
    background: var(--danger-light);
    color: var(--danger-color);
}

/* ============================================
   Scrollbar Styling - 滚动条样式
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   Animation Classes - 动画类
   ============================================ */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Responsive Adjustments - 响应式调整
   ============================================ */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .video-detail-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-left,
    .filter-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    .batch-actions-bar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .batch-actions-bar > div {
        justify-content: center;
    }
}

/* ============================================
   Cleanup Dialog - 清理数据对话框
   ============================================ */
.cleanup-type-options {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.cleanup-type-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-card);
}

.cleanup-type-option:hover {
    border-color: var(--primary-color);
    background: var(--primary-lighter);
}

.cleanup-type-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.cleanup-type-option input {
    display: none;
}

.cleanup-type-option svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.cleanup-type-option.selected svg {
    color: var(--primary-color);
}

.cleanup-type-option span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.cleanup-date-input-wrapper {
    margin-bottom: 16px;
}

.cleanup-date-input-wrapper input[type="date"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: all 0.2s ease;
    font-family: inherit;
}

.cleanup-date-input-wrapper input[type="date"]:hover {
    border-color: var(--text-muted);
}

.cleanup-date-input-wrapper input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.cleanup-date-input-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    padding: 4px;
    border-radius: 4px;
}

.cleanup-date-input-wrapper input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background: var(--bg-hover);
}

.cleanup-date-shortcuts {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.cleanup-shortcut-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 500;
}

.cleanup-shortcut-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-lighter);
}

.cleanup-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: var(--bg-hover);
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    min-height: 200px;
    text-align: center;
}

.cleanup-preview-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.cleanup-preview-icon svg {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    opacity: 0.5;
}

.cleanup-preview-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.cleanup-preview-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--info-color);
    margin-bottom: 8px;
}

.cleanup-preview-content {
    font-size: 13px;
    color: var(--text-secondary);
}

.clear-files-option {
    padding: 14px;
    background: var(--warning-light);
    border: 1px solid #fde68a;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
}

.clear-files-option .checkbox-label {
    padding: 0;
    margin: 0;
}

/* ============================================
   Browse Search - 浏览记录搜索
   ============================================ */
#browseSearchInput {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    background: var(--bg-card);
    transition: all 0.2s ease;
    color: var(--text-primary);
}

#browseSearchInput:hover {
    border-color: var(--text-muted);
}

#browseSearchInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

#browseSearchInput::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* ============================================
   Batch Download Textarea - 批量下载输入框
   ============================================ */
#batchUrlsInput {
    width: 100%;
    min-height: 200px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    line-height: 1.6;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    resize: vertical;
    transition: all 0.2s ease;
}

#batchUrlsInput:hover {
    border-color: var(--text-muted);
}

#batchUrlsInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

#batchUrlsInput::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Batch URL Counter */
.batch-url-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.batch-url-counter-valid {
    color: var(--success-color);
    font-weight: 600;
}

.batch-url-counter-invalid {
    color: var(--danger-color);
    font-weight: 600;
}

/* ============================================
   Select Dropdown - 下拉选择框
   ============================================ */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select:hover {
    border-color: var(--text-muted);
    cursor: pointer;
}

select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2322c55e' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

select option {
    padding: 10px;
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Page Size Selector */
#browsePageSize,
#downloadPageSize {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.2s ease;
    min-width: 80px;
}

#browsePageSize:hover,
#downloadPageSize:hover {
    border-color: var(--primary-color);
}

#browsePageSize:focus,
#downloadPageSize:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ============================================
   Range Slider - 滑块控件
   ============================================ */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

input[type="range"]:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Webkit (Chrome, Safari, Edge) */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

/* Firefox */
input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.15s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

input[type="range"]::-moz-range-thumb:active {
    transform: scale(1.1);
}

input[type="range"]::-moz-range-track {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    height: 4px;
}

/* Volume Slider Specific */
.video-volume-slider {
    width: 80px;
    margin: 0 4px;
}

/* ============================================
   Enhanced Visual Effects - 增强视觉效果
   ============================================ */

/* 侧边栏和主内容区的分隔线光泽效果 */
.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(34, 197, 94, 0.2), transparent);
    pointer-events: none;
}

/* 卡片悬停渐变动画已移除 */

/* 按钮点击效果 */
.btn:active {
    transform: scale(0.98);
}

/* 导航项激活时的动画 */
.nav-item.active {
    position: relative;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--primary-color);
    border-radius: 0 4px 4px 0;
}

/* 统计卡片图标的脉冲效果 */
@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.stat-icon {
    animation: iconPulse 3s ease-in-out infinite;
}

.stat-card:hover .stat-icon {
    animation: none;
    transform: scale(1.1);
}

/* 页面内容区域的淡入动画 */
.page-content {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 表格行悬停渐变效果已移除 */

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-hover), #15803d);
}

/* 连接状态点的增强动画 */
@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.status-dot.connected {
    animation: statusPulse 2s ease-in-out infinite;
}

/* 输入框聚焦时的光晕效果 */
input:focus,
textarea:focus,
select:focus {
    position: relative;
}

/* 批量操作栏的渐变动画 */
.batch-actions-bar {
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 下载进度条的动画 */
.queue-progress-fill {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover), var(--primary-color));
    background-size: 200% 100%;
    animation: progressShine 2s linear infinite;
}

@keyframes progressShine {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 空状态图标的浮动效果 */
.empty-state svg,
.table-empty-state svg {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 消息提示的入场动画增强 */
@keyframes slideIn {
    from {
        transform: translateX(100%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* 对话框的背景模糊增强 */
.dialog-overlay,
.lightbox-overlay,
.video-player-overlay,
#exportDialogOverlay,
#clearDataDialogOverlay {
    backdrop-filter: blur(8px);
}

/* 页面标题的渐变文字效果 */
.page-title {
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Table Enhancements - 表格增强效果
   ============================================ */

/* 表格行动画已移除 */

/* Checkbox 样式优化 - 已在上方定义，此处移除重复 */

/* 表格加载状态 */
.table-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.table-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

/* 表格数据徽章 */
.table-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.table-badge.primary {
    background: var(--primary-light);
    color: var(--primary-color);
}

.table-badge.success {
    background: var(--success-light);
    color: var(--success-color);
}

.table-badge.warning {
    background: var(--warning-light);
    color: var(--warning-color);
}

.table-badge.danger {
    background: var(--danger-light);
    color: var(--danger-color);
}

.table-badge.info {
    background: var(--info-light);
    color: var(--info-color);
}

/* 表格排序指示器 */
.table-sort-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
}

.table-sort-indicator:hover {
    color: var(--primary-color);
}

.table-sort-icon {
    width: 12px;
    height: 12px;
    opacity: 0.4;
    transition: all 0.2s ease;
}

.table-sort-indicator.active .table-sort-icon {
    opacity: 1;
    color: var(--primary-color);
}

/* 表格工具提示 */
.table-tooltip {
    position: relative;
}

.table-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1000;
}

.table-tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}


/* ============================================
   Help Page - 帮助页面
   ============================================ */
.help-content {
    padding: 32px;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--text-primary);
}

.help-content h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 16px;
}

.help-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.help-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.help-content p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.help-content ul, .help-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.help-content li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.help-content code {
    background: var(--bg-hover);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: var(--primary-color);
}

.help-content pre {
    background: var(--bg-hover);
    padding: 16px;
    border-radius: var(--border-radius-sm);
    overflow-x: auto;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.help-content pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

.help-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.help-content table th,
.help-content table td {
    padding: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.help-content table th {
    background: var(--bg-hover);
    font-weight: 600;
}

.help-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.help-content a:hover {
    text-decoration: underline;
}

.help-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 16px;
    margin: 16px 0;
    color: var(--text-secondary);
    font-style: italic;
}
