/* Ale Noa • YouTube Automation - Ultra Light Premium Theme */
/* Apple Design Language with Enhanced Light Mode */

:root {
    /* Ultra Light Background System */
    --bg-primary: #fbfbfd;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f5f5f7;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-hover: rgba(0, 0, 0, 0.02);
    
    /* Text Colors - High Contrast */
    --text-primary: #000000;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --text-muted: #a1a1a6;
    
    /* Apple System Colors - Vibrant */
    --accent-blue: #007aff;
    --accent-blue-light: rgba(0, 122, 255, 0.1);
    --accent-blue-glow: rgba(0, 122, 255, 0.25);
    --accent-green: #34c759;
    --accent-green-light: rgba(52, 199, 89, 0.1);
    --accent-orange: #ff9500;
    --accent-orange-light: rgba(255, 149, 0, 0.1);
    --accent-red: #ff3b30;
    --accent-red-light: rgba(255, 59, 48, 0.1);
    --accent-purple: #af52de;
    --accent-purple-light: rgba(175, 82, 222, 0.1);
    --accent-pink: #ff2d55;
    --accent-teal: #5ac8fa;
    --accent-yellow: #ffcc00;
    --accent-indigo: #5856d6;
    
    /* Borders & Separators */
    --border-color: rgba(0, 0, 0, 0.06);
    --border-light: rgba(0, 0, 0, 0.03);
    --border-strong: rgba(0, 0, 0, 0.1);
    
    /* Shadows - Soft & Layered */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 24px var(--accent-blue-glow);
    
    /* Radius - Apple Style */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions - Smooth */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Layout */
    --sidebar-width: 280px;
    --max-content-width: 1400px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    /* Dark Background System - Easy on eyes */
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2d2d2d;
    --bg-glass: rgba(30, 30, 30, 0.85);
    --bg-hover: rgba(255, 255, 255, 0.05);
    
    /* Text Colors - High Contrast for Dark */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #808080;
    --text-muted: #666666;
    
    /* Borders & Separators - Dark Mode */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.05);
    --border-strong: rgba(255, 255, 255, 0.15);
    
    /* Shadows - Dark Mode */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.7);
}

/* Smooth theme transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Page Load Animation */
@keyframes pageLoad {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 40px 48px;
    min-height: 100vh;
    max-width: calc(100% - var(--sidebar-width));
    animation: pageLoad 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Glassmorphism Sidebar - Ultra Light */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-glass);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-right: 1px solid var(--border-color);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-slow);
}

/* Logo with Animated Gradient */
.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 12px;
    margin-bottom: 36px;
}

.logo-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 100%);
    background-size: 200% 200%;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 12px var(--accent-blue-glow);
    animation: gradientShift 10s ease infinite;
    transition: all var(--transition-base);
}

.logo:hover .logo-icon {
    transform: scale(1.08) rotate(4deg);
    box-shadow: 0 6px 20px var(--accent-blue-glow);
}

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

.logo-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.021em;
}

.logo-text span {
    color: var(--text-secondary);
    font-weight: 400;
}

/* Navigation Sections with Stagger */
.nav-section {
    margin-bottom: 28px;
    opacity: 0;
    animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.nav-section:nth-child(2) { animation-delay: 0.1s; }
.nav-section:nth-child(3) { animation-delay: 0.15s; }
.nav-section:nth-child(4) { animation-delay: 0.2s; }
.nav-section:nth-child(5) { animation-delay: 0.25s; }
.nav-section:nth-child(6) { animation-delay: 0.3s; }

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Nav Items - Premium Hover */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    margin-bottom: 2px;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 20px;
    background: var(--accent-blue);
    border-radius: 0 2px 2px 0;
    transition: transform var(--transition-base);
}

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

.nav-item:hover::before {
    transform: translateY(-50%) scaleY(1);
}

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

.nav-item.active::before {
    transform: translateY(-50%) scaleY(1);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: all var(--transition-fast);
}

.nav-item:hover svg {
    transform: scale(1.12);
    opacity: 1;
}

.nav-item.active svg {
    opacity: 1;
    color: var(--accent-blue);
}

/* Badge with Soft Pulse */
.nav-badge {
    margin-left: auto;
    background: var(--accent-blue);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
    animation: softPulse 3s ease-in-out infinite;
}

@keyframes softPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3); }
    50% { transform: scale(1.03); box-shadow: 0 3px 12px rgba(0, 122, 255, 0.4); }
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 20px 14px;
    border-top: 1px solid var(--border-color);
}

.system-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-green);
    position: relative;
}

.status-indicator::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: var(--accent-green);
    opacity: 0.3;
    animation: ripple 2s ease-out infinite;
}

@keyframes ripple {
    0% { transform: scale(1); opacity: 0.3; }
    100% { transform: scale(2.5); opacity: 0; }
}

.status-indicator.paused {
    background: var(--accent-orange);
    animation: none;
}

.status-indicator.paused::after {
    display: none;
}

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

.status-text strong {
    color: var(--accent-green);
    font-weight: 600;
}

.status-text.paused strong {
    color: var(--accent-orange);
}

/* Page Header */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 40px;
    animation: slideInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.021em;
    line-height: 1.1;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: -0.014em;
}

.header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 2px 12px rgba(0, 122, 255, 0.35);
}

.btn-primary:hover {
    background: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.35);
}

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

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

.btn svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast);
}

.btn:hover svg {
    transform: scale(1.1);
}

/* Stats Grid with Stagger */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    opacity: 0;
    animation: cardAppear 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: relative;
    overflow: hidden;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.25s; }
.stat-card:nth-child(5) { animation-delay: 0.3s; }
.stat-card:nth-child(6) { animation-delay: 0.35s; }

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 0, 0, 0.08);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-teal));
    transform: scaleX(0);
    transition: transform var(--transition-base);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: all var(--transition-base);
}

.stat-card:hover .stat-icon {
    transform: scale(1.12) rotate(6deg);
}

.stat-icon.blue {
    background: linear-gradient(135deg, var(--accent-blue-light) 0%, rgba(0, 122, 255, 0.05) 100%);
    color: var(--accent-blue);
}

.stat-icon.green {
    background: linear-gradient(135deg, var(--accent-green-light) 0%, rgba(52, 199, 89, 0.05) 100%);
    color: var(--accent-green);
}

.stat-icon.orange {
    background: linear-gradient(135deg, var(--accent-orange-light) 0%, rgba(255, 149, 0, 0.05) 100%);
    color: var(--accent-orange);
}

.stat-icon.purple {
    background: linear-gradient(135deg, var(--accent-purple-light) 0%, rgba(175, 82, 222, 0.05) 100%);
    color: var(--accent-purple);
}

.stat-icon.red {
    background: linear-gradient(135deg, var(--accent-red-light) 0%, rgba(255, 59, 48, 0.05) 100%);
    color: var(--accent-red);
}

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

.stat-value {
    font-size: 38px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.021em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

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

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: 8px;
}

.stat-change.up {
    background: var(--accent-green-light);
    color: var(--accent-green);
}

.stat-change.down {
    background: var(--accent-red-light);
    color: var(--accent-red);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
}

/* Cards */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition-base);
    opacity: 0;
    animation: cardAppear 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.card:nth-child(1) { animation-delay: 0.4s; }
.card:nth-child(2) { animation-delay: 0.45s; }

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 0, 0, 0.08);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(250,250,250,0.6) 0%, transparent 100%);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.021em;
}

.card-action {
    font-size: 14px;
    color: var(--accent-blue);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-action:hover {
    opacity: 0.8;
    transform: translateX(3px);
}

.card-action::after {
    content: '→';
    transition: transform var(--transition-fast);
}

.card-action:hover::after {
    transform: translateX(4px);
}

.card-body {
    padding: 26px;
}

/* Uploads Table */
.uploads-table {
    width: 100%;
}

.upload-row {
    display: grid;
    grid-template-columns: 60px 1fr 140px 100px 80px;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    opacity: 0;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.upload-row:nth-child(1) { animation-delay: 0.1s; }
.upload-row:nth-child(2) { animation-delay: 0.15s; }
.upload-row:nth-child(3) { animation-delay: 0.2s; }
.upload-row:nth-child(4) { animation-delay: 0.25s; }
.upload-row:nth-child(5) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.upload-row:hover {
    background: var(--bg-tertiary);
    margin: 0 -26px;
    padding: 16px 26px;
    border-radius: var(--radius-md);
}

.upload-row:last-child {
    border-bottom: none;
}

.upload-thumb {
    width: 60px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.upload-row:hover .upload-thumb {
    transform: scale(1.08);
    box-shadow: var(--shadow-sm);
}

.upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-thumb svg {
    width: 20px;
    height: 20px;
    color: white;
    opacity: 0.9;
}

.upload-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.upload-channel {
    display: flex;
    align-items: center;
    gap: 8px;
}

.channel-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: white;
    transition: all var(--transition-fast);
}

.upload-row:hover .channel-avatar {
    transform: scale(1.15);
}

.channel-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.upload-time {
    font-size: 13px;
    color: var(--text-secondary);
}

.upload-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.upload-status.success {
    background: var(--accent-green-light);
    color: var(--accent-green);
}

.upload-status.failed {
    background: var(--accent-red-light);
    color: var(--accent-red);
}

/* Next Upload Card - Premium Gradient */
.next-upload-card {
    padding: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    border-radius: var(--radius-lg);
    color: white;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: cardAppear 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.5s;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.35);
}

.next-upload-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 50%);
    animation: shimmer 12s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(5%, 5%) rotate(180deg); }
}

.next-upload-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    opacity: 0.85;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.next-upload-time {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.021em;
    font-variant-numeric: tabular-nums;
}

.next-upload-channel {
    font-size: 15px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.countdown {
    display: flex;
    gap: 14px;
    margin-top: 24px;
    position: relative;
    z-index: 1;
}

.countdown-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    min-width: 70px;
    transition: all var(--transition-fast);
}

.countdown-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.25);
}

.countdown-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    opacity: 0.85;
    margin-top: 6px;
    font-weight: 600;
}

/* Schedule List */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.schedule-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    opacity: 0;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.schedule-item:nth-child(1) { animation-delay: 0.1s; }
.schedule-item:nth-child(2) { animation-delay: 0.15s; }
.schedule-item:nth-child(3) { animation-delay: 0.2s; }

.schedule-item:hover {
    background: var(--accent-blue-light);
    transform: translateX(6px);
}

.schedule-time {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 65px;
    font-variant-numeric: tabular-nums;
}

.schedule-channel {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.schedule-clip {
    font-size: 12px;
    color: var(--accent-blue);
    font-weight: 600;
    background: white;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xs);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    opacity: 0;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.empty-state svg {
    width: 68px;
    height: 68px;
    color: var(--text-muted);
    opacity: 0.35;
    margin-bottom: 20px;
    transition: all var(--transition-base);
}

.empty-state:hover svg {
    opacity: 0.5;
    transform: scale(1.08);
}

.empty-state h3 {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Channels Grid */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.channel-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 22px;
    transition: all var(--transition-base);
    opacity: 0;
    animation: cardAppear 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.channel-card:nth-child(1) { animation-delay: 0.1s; }
.channel-card:nth-child(2) { animation-delay: 0.15s; }
.channel-card:nth-child(3) { animation-delay: 0.2s; }
.channel-card:nth-child(4) { animation-delay: 0.25s; }

.channel-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-blue);
}

.channel-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-teal));
    transform: scaleX(0);
    transition: transform var(--transition-base);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.channel-card:hover::after {
    transform: scaleX(1);
}

.channel-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.channel-card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
    transition: all var(--transition-base);
    box-shadow: 0 4px 12px var(--accent-blue-glow);
}

.channel-card:hover .channel-card-avatar {
    transform: scale(1.12) rotate(6deg);
    box-shadow: 0 6px 20px var(--accent-blue-glow);
}

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

.channel-card-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.channel-card-status {
    margin-left: auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-green);
    position: relative;
}

.channel-card-status::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--accent-green);
    opacity: 0.3;
    animation: ripple 2s ease-out infinite;
}

.channel-card-status.inactive {
    background: var(--text-muted);
}

.channel-card-status.inactive::after {
    display: none;
}

.channel-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.channel-stat {
    text-align: center;
}

.channel-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    transition: color var(--transition-fast);
    font-variant-numeric: tabular-nums;
}

.channel-card:hover .channel-stat-value {
    color: var(--accent-blue);
}

.channel-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 4px;
    font-weight: 500;
}

/* Settings Page */
.settings-container {
    max-width: 800px;
}

.settings-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 28px;
    overflow: hidden;
    opacity: 0;
    animation: cardAppear 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.settings-section:nth-child(1) { animation-delay: 0.1s; }
.settings-section:nth-child(2) { animation-delay: 0.15s; }
.settings-section:nth-child(3) { animation-delay: 0.2s; }

.settings-section-header {
    padding: 22px 26px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(250,250,250,0.6) 0%, transparent 100%);
}

.settings-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.settings-section-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.settings-row:hover {
    background: var(--bg-tertiary);
}

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

.settings-label h4 {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 3px;
}

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

/* Toggle Switch */
.toggle {
    width: 54px;
    height: 34px;
    background: var(--border-strong);
    border-radius: var(--radius-full);
    position: relative;
    cursor: pointer;
    transition: all var(--transition-base);
    -webkit-tap-highlight-color: transparent;
}

.toggle.active {
    background: var(--accent-green);
}

.toggle::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform var(--transition-spring);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.toggle.active::after {
    transform: translateX(20px);
}

/* Input Groups */
.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-field {
    width: 90px;
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    text-align: center;
    transition: all var(--transition-fast);
    background: var(--bg-secondary);
    font-weight: 500;
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px var(--accent-blue-glow);
}

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

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

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

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: inherit;
    transition: all var(--transition-fast);
    background: var(--bg-secondary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px var(--accent-blue-glow);
}

.form-group input:read-only {
    background: var(--bg-tertiary);
    cursor: not-allowed;
    color: var(--text-secondary);
}

.form-group small {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* History Filters */
.history-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-strong);
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.filter-btn.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.filter-btn:hover:not(.active) {
    background: var(--bg-tertiary);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Clips Page */
.clips-header {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
}

.folder-card {
    flex: 1;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 26px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all var(--transition-base);
    cursor: pointer;
    opacity: 0;
    animation: cardAppear 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.folder-card:nth-child(1) { animation-delay: 0.1s; }
.folder-card:nth-child(2) { animation-delay: 0.15s; }

.folder-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 0, 0, 0.08);
}

.folder-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.folder-card:hover .folder-icon {
    transform: scale(1.12) rotate(-6deg);
}

.folder-icon.fan {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

.folder-icon.main {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.35);
}

.folder-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.folder-info h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.folder-info p {
    font-size: 14px;
    color: var(--text-secondary);
}

.folder-count {
    margin-left: auto;
    text-align: right;
}

.folder-count-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.folder-count-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Clips Table */
.clips-table {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.clips-table-header {
    display: grid;
    grid-template-columns: 80px 1fr 140px 120px 100px;
    gap: 16px;
    padding: 18px 26px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.clip-row {
    display: grid;
    grid-template-columns: 80px 1fr 140px 120px 100px;
    gap: 16px;
    align-items: center;
    padding: 18px 26px;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    opacity: 0;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.clip-row:hover {
    background: var(--bg-tertiary);
}

.clip-row:last-child {
    border-bottom: none;
}

.clip-thumb {
    width: 80px;
    height: 50px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.clip-row:hover .clip-thumb {
    transform: scale(1.08);
    box-shadow: var(--shadow-sm);
}

.clip-thumb svg {
    width: 24px;
    height: 24px;
    color: white;
    opacity: 0.6;
}

.clip-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.clip-duration {
    font-size: 14px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.clip-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.clip-status.available {
    background: var(--accent-green-light);
    color: var(--accent-green);
}

.clip-status.cooldown {
    background: var(--accent-orange-light);
    color: var(--accent-orange);
}

.clip-status.used {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.cooldown-timer {
    font-size: 14px;
    color: var(--accent-orange);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* History Table */
.history-table {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.history-table-header {
    display: grid;
    grid-template-columns: 160px 1fr 180px 120px 140px 100px;
    gap: 16px;
    padding: 18px 26px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.history-row {
    display: grid;
    grid-template-columns: 160px 1fr 180px 120px 140px 100px;
    gap: 16px;
    align-items: center;
    padding: 18px 26px;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    opacity: 0;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.history-row:hover {
    background: var(--bg-tertiary);
}

.history-row:last-child {
    border-bottom: none;
}

.history-date {
    font-size: 14px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.history-clip {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.history-channel {
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-link {
    color: var(--accent-blue);
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    transition: opacity var(--transition-fast);
}

.history-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Loading States */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.spinner.dark {
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--accent-blue);
}

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

/* Button Loading State */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.btn-secondary.loading::after {
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--accent-blue);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-content {
    background: var(--bg-secondary);
    padding: 48px 64px;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform var(--transition-spring);
}

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

.loading-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid var(--bg-tertiary);
    border-radius: 50%;
    border-top-color: var(--accent-blue);
    animation: spin 0.8s linear infinite;
    margin: 0 auto 24px;
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.loading-subtext {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, rgba(0,0,0,0.02) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.6s ease-in-out infinite;
    border-radius: 6px;
}

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

.skeleton-text {
    height: 16px;
    margin-bottom: 10px;
}

.skeleton-title {
    height: 26px;
    width: 60%;
    margin-bottom: 14px;
}

.skeleton-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 101;
    width: 48px;
    height: 48px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

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

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 420px;
}

.toast {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    animation: toastSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.toast.toast-exit {
    animation: toastSlideOut 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toastSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
    }
}

.toast-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon.success {
    background: var(--accent-green-light);
    color: var(--accent-green);
}

.toast-icon.error {
    background: var(--accent-red-light);
    color: var(--accent-red);
}

.toast-icon.info {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
}

.toast-icon.warning {
    background: var(--accent-orange-light);
    color: var(--accent-orange);
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    flex-shrink: 0;
    margin-top: -2px;
}

.toast-close:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

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

/* Modal Container */
.modal-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95) translateY(20px);
    transition: all var(--transition-spring);
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(250,250,250,0.6) 0%, transparent 100%);
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-header h3 svg {
    width: 22px;
    height: 22px;
    color: var(--accent-blue);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

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

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

/* Modal Body */
.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* Modal Form Elements */
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    transition: all var(--transition-fast);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px var(--accent-blue-glow);
}

.form-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--bg-tertiary);
}

.form-hint {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Channel Preview in Modal */
.channel-preview {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.preview-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.channel-handle {
    font-size: 14px;
    color: var(--text-secondary);
}

.channel-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    width: fit-content;
}

.channel-status.verified {
    background: var(--accent-green-light);
    color: var(--accent-green);
}

.channel-status.unverified {
    background: var(--accent-orange-light);
    color: var(--accent-orange);
}

/* Clip Preview in Modal */
.clip-preview {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.clip-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.clip-theme {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--accent-blue-light);
    color: var(--accent-blue);
    margin-top: 6px;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.modal-footer .btn {
    min-width: 100px;
}

.modal-footer .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.modal-footer .btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-width: none;
        border-radius: var(--radius-md);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 18px;
    }

    .modal-header h3 {
        font-size: 16px;
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* ============================================================================
   UPLOAD PROGRESS BAR STYLES
   ============================================================================ */

/* Upload Progress Container */
.upload-progress {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* Progress Header - Status and Percentage */
.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

#progressStatus {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

#progressPercent {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-blue);
}

/* Progress Bar Container */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Progress Fill - Animated */
.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-blue) 0%, var(--accent-teal) 100%);
    border-radius: var(--radius-full);
    transition: width 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

/* Animated shimmer effect on progress fill */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    transform: translateX(-100%);
    animation: shimmer 1.5s infinite;
}

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

/* Progress Details - Additional Info */
.progress-details {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
}

/* Stage-based Colors */
.upload-progress[data-stage="downloading"] .progress-fill {
    background: linear-gradient(90deg, var(--accent-purple) 0%, var(--accent-indigo) 100%);
}

.upload-progress[data-stage="uploading"] .progress-fill {
    background: linear-gradient(90deg, var(--accent-blue) 0%, var(--accent-teal) 100%);
}

.upload-progress[data-stage="processing"] .progress-fill {
    background: linear-gradient(90deg, var(--accent-orange) 0%, var(--accent-yellow) 100%);
}

.upload-progress[data-stage="complete"] .progress-fill {
    background: linear-gradient(90deg, var(--accent-green) 0%, #30d158 100%);
}

/* Complete state styling */
.upload-progress[data-stage="complete"] #progressStatus {
    color: var(--accent-green);
}

/* Error state styling */
.upload-progress[data-stage="error"] .progress-fill {
    background: var(--accent-red);
}

.upload-progress[data-stage="error"] #progressStatus {
    color: var(--accent-red);
}

/* Pulse animation for active upload */
.progress-bar.active .progress-fill {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-row {
        grid-template-columns: 60px 1fr 100px;
        gap: 12px;
    }
    
    .upload-channel,
    .upload-time {
        display: none;
    }
}

@media (max-width: 1024px) {
    .main-content {
        padding: 32px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .channels-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-title {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 300px;
        box-shadow: var(--shadow-xl);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 80px 20px 20px;
        max-width: 100%;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-overlay {
        display: block;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .stat-card {
        padding: 22px;
    }
    
    .stat-value {
        font-size: 32px;
    }
    
    .channels-grid {
        grid-template-columns: 1fr;
    }
    
    .clips-header {
        flex-direction: column;
    }
    
    .folder-card {
        padding: 22px;
    }
    
    .clips-table-header,
    .history-table-header {
        display: none;
    }
    
    .clip-row,
    .history-row {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 18px;
        background: var(--bg-tertiary);
        border-radius: var(--radius-md);
        margin-bottom: 14px;
        border-bottom: none;
    }
    
    .clip-thumb {
        width: 100%;
        height: 180px;
    }
    
    .upload-row {
        grid-template-columns: 1fr;
        padding: 18px;
        background: var(--bg-tertiary);
        border-radius: var(--radius-md);
        margin-bottom: 14px;
        border-bottom: none;
    }
    
    .upload-thumb {
        width: 100%;
        height: 180px;
    }
    
    .upload-channel,
    .upload-time {
        display: flex;
    }
    
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    
    .input-group {
        width: 100%;
    }
    
    .input-field {
        flex: 1;
    }
    
    .history-filters {
        flex-wrap: wrap;
    }
    
    .filter-btn {
        flex: 1;
        min-width: calc(50% - 4px);
        text-align: center;
    }
    
    .next-upload-time {
        font-size: 28px;
    }
    
    .countdown {
        gap: 10px;
    }
    
    .countdown-value {
        font-size: 24px;
    }
    
    .toast-container {
        left: 16px;
        right: 16px;
        max-width: none;
    }
    
    .toast {
        padding: 16px 18px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 76px 16px 16px;
    }
    
    .page-title {
        font-size: 26px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    .stat-card {
        padding: 18px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-icon {
        width: 44px;
        height: 44px;
    }
    
    .btn {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .card-header {
        padding: 18px;
    }
    
    .card-body {
        padding: 18px;
    }
    
    .upload-thumb,
    .clip-thumb {
        height: 160px;
    }
    
    .next-upload-time {
        font-size: 24px;
    }
    
    .countdown-value {
        font-size: 22px;
    }
    
    .filter-btn {
        min-width: 100%;
    }
    
    .folder-icon {
        width: 52px;
        height: 52px;
    }
    
    .folder-count-value {
        font-size: 28px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Selection */
::selection {
    background: var(--accent-blue);
    color: white;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Smooth Scrollbar for Sidebar */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
}

/* Theme Selector Styles */
.theme-selector-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    width: 100%;
}

.theme-option {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.theme-option:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.theme-option.active {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-glow), var(--shadow-md);
}

.theme-option.active::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--accent-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.theme-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 12px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.theme-option:hover .theme-icon {
    transform: scale(1.1) rotate(5deg);
}

.theme-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.theme-colors {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.theme-colors span {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive Theme Selector */
@media (max-width: 1200px) {
    .theme-selector-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .theme-selector-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .theme-option {
        padding: 16px 12px;
    }
    
    .theme-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .theme-name {
        font-size: 13px;
    }
    
    .theme-colors span {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .theme-selector-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .theme-option {
        padding: 14px 10px;
    }
    
    .theme-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
        margin-bottom: 10px;
    }
    
    .theme-name {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .theme-colors {
        gap: 4px;
    }
    
    .theme-colors span {
        width: 14px;
        height: 14px;
        border-width: 1.5px;
    }
    
    .theme-option.active::after {
        width: 20px;
        height: 20px;
        font-size: 12px;
        top: 6px;
        right: 6px;
    }
}

/* Dark Mode Toggle Button */
/* Header Controls Container */
.header-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

/* Theme Dropdown Container */
.theme-dropdown-container {
    position: relative;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    width: 44px;
    height: 44px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.theme-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.theme-toggle-btn svg {
    width: 22px;
    height: 22px;
    color: var(--accent-blue);
    transition: all var(--transition-base);
}

.theme-toggle-btn.active {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-glow);
}

/* Theme Dropdown */
.theme-dropdown {
    position: absolute;
    top: 54px;
    right: 0;
    width: 280px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: 1001;
}

.theme-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.theme-dropdown-header span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.theme-dropdown-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.theme-dropdown-close:hover {
    color: var(--text-primary);
}

.theme-dropdown-grid {
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.theme-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-dropdown-item:hover {
    background: var(--bg-tertiary);
}

.theme-dropdown-item.active {
    background: var(--accent-blue-light);
}

.theme-dropdown-item.active span {
    color: var(--accent-blue);
    font-weight: 600;
}

.theme-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.theme-dropdown-item span {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    width: 44px;
    height: 44px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.dark-mode-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.dark-mode-toggle svg {
    width: 22px;
    height: 22px;
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.dark-mode-toggle .sun-icon {
    display: block;
}

.dark-mode-toggle .moon-icon {
    display: none;
}

.dark-mode-toggle.dark .sun-icon {
    display: none;
}

.dark-mode-toggle.dark .moon-icon {
    display: block;
}

/* Mobile responsive for header controls */
@media (max-width: 768px) {
    .header-controls {
        top: 16px;
        right: 16px;
    }
    
    .theme-toggle-btn,
    .dark-mode-toggle {
        width: 40px;
        height: 40px;
    }
    
    .theme-toggle-btn svg,
    .dark-mode-toggle svg {
        width: 20px;
        height: 20px;
    }
    
    .theme-dropdown {
        width: 260px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .header-controls {
        top: 12px;
        right: 12px;
        gap: 8px;
    }
    
    .theme-toggle-btn,
    .dark-mode-toggle {
        width: 36px;
        height: 36px;
    }
    
    .theme-toggle-btn svg,
    .dark-mode-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    .theme-dropdown {
        width: 240px;
        right: -5px;
    }
    
    .theme-dropdown-grid {
        grid-template-columns: 1fr;
    }
}

/* Mode Selection Buttons */
.mode-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mode-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-strong);
}

.mode-btn.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
    box-shadow: 0 2px 8px var(--accent-blue-glow);
}

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

/* Sidebar Floating Action Buttons */
.sidebar-actions {
    padding: 0 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Floating Action Button (Twitter/X style) */
.fab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 9999px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.fab-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.fab-btn:active {
    transform: translateY(0);
}

.fab-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Primary FAB (Start/Pause System) */
.fab-primary {
    background: var(--accent-blue);
    color: white;
}

.fab-primary:hover {
    background: var(--accent-blue);
    filter: brightness(1.1);
    box-shadow: 0 6px 20px var(--accent-blue-glow);
}

.fab-primary .play-icon {
    display: block;
}

.fab-primary .pause-icon {
    display: none;
}

.fab-primary.running .play-icon {
    display: none;
}

.fab-primary.running .pause-icon {
    display: block;
}

/* Secondary FAB (Upload) */
.fab-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.fab-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

/* Mobile responsive for FABs */
@media (max-width: 768px) {
    .sidebar-actions {
        padding: 0 16px 16px;
        gap: 10px;
    }
    
    .fab-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .fab-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .sidebar-actions {
        padding: 0 12px 12px;
        gap: 8px;
    }
    
    .fab-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .fab-btn svg {
        width: 16px;
        height: 16px;
    }
}
