        /* Top Navigation Bar */
        .top-nav {
            display: flex;
            justify-content: flex-end;
            gap: 1rem;
            padding: 1rem 0;
            animation: fadeInDown 0.8s ease-out;
        }

        .nav-btn {
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
            padding: 0.6rem 1.2rem;
            border-radius: 12px;
            cursor: pointer;
            font-family: 'Outfit', sans-serif;
            font-size: 0.9rem;
            font-weight: 500;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .nav-btn:hover {
            background: var(--bg-tertiary);
            border-color: var(--accent-primary);
            color: var(--text-primary);
        }

        .nav-btn.active {
            background: var(--accent-primary);
            color: white;
            border-color: var(--accent-primary);
        }

        /* Theme Toggle Switch */
        .theme-toggle {
            position: relative;
            width: 60px;
            height: 30px;
            background: var(--bg-tertiary);
            border-radius: 15px;
            cursor: pointer;
            border: 2px solid var(--border-color);
            transition: all 0.3s ease;
        }

        .theme-toggle::before {
            content: '🌙';
            position: absolute;
            top: 2px;
            left: 3px;
            width: 22px;
            height: 22px;
            background: var(--accent-primary);
            border-radius: 50%;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
        }

        body.light-mode .theme-toggle::before {
            content: '☀️';
            transform: translateX(28px);
        }

        /* Download Progress Bar */
        .progress-container {
            margin-top: 1.5rem;
            display: none;
        }

        .progress-container.active {
            display: block;
            animation: slideIn 0.3s ease;
        }

        .progress-bar-wrapper {
            background: var(--bg-tertiary);
            border-radius: 12px;
            height: 8px;
            overflow: hidden;
            margin-bottom: 0.75rem;
            position: relative;
        }

        .progress-bar {
            height: 100%;
            background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
            background-size: 200% 100%;
            border-radius: 12px;
            transition: width 0.3s ease;
            animation: gradientFlow 2s linear infinite;
        }

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

        .progress-info {
            display: flex;
            justify-content: space-between;
            font-size: 0.85rem;
            color: var(--text-secondary);
        }

        /* Download History Panel */
        .history-panel {
            position: fixed;
            right: -400px;
            top: 0;
            width: 400px;
            height: 100vh;
            background: var(--bg-secondary);
            border-left: 1px solid var(--border-color);
            padding: 2rem;
            overflow-y: auto;
            transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            z-index: 1000;
            box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
        }

        .history-panel.active {
            right: 0;
        }

        .history-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
        }

        .history-header h2 {
            font-size: 1.5rem;
            font-weight: 600;
        }

        .close-history {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 1.5rem;
            cursor: pointer;
            transition: color 0.3s ease;
        }

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

        .history-item {
            background: var(--bg-tertiary);
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 1rem;
            border: 1px solid var(--border-color);
            transition: all 0.3s ease;
        }

        .history-item:hover {
            border-color: var(--accent-primary);
            transform: translateX(-4px);
        }

        .history-item-title {
            font-weight: 600;
            font-size: 0.95rem;
            margin-bottom: 0.5rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .history-item-meta {
            display: flex;
            justify-content: space-between;
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .clear-history {
            width: 100%;
            padding: 0.75rem;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            color: var(--text-secondary);
            cursor: pointer;
            font-family: 'Outfit', sans-serif;
            font-weight: 500;
            transition: all 0.3s ease;
            margin-top: 1rem;
        }

        .clear-history:hover {
            background: var(--error);
            color: white;
            border-color: var(--error);
        }

        /* Playlist Download Mode */
        .batch-mode {
            display: none;
            margin-top: 1.5rem;
            padding: 2rem;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
            border-radius: 20px;
            border: 2px solid var(--accent-primary);
            position: relative;
            overflow: hidden;
        }

        .batch-mode::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
            background-size: 200% 100%;
            animation: gradientFlow 3s linear infinite;
        }

        .batch-mode.active {
            display: block;
            animation: fadeInUp 0.5s ease;
        }

        .playlist-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }

        .playlist-icon {
            width: 56px;
            height: 56px;
            background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            box-shadow: 0 8px 24px var(--accent-glow);
        }

        .playlist-title {
            flex: 1;
        }

        .playlist-title h3 {
            font-size: 1.3rem;
            font-weight: 600;
            margin-bottom: 0.25rem;
        }

        .playlist-title p {
            font-size: 0.9rem;
            color: var(--text-secondary);
        }

        .batch-textarea {
            width: 100%;
            min-height: 120px;
            padding: 1.25rem;
            background: var(--bg-secondary);
            border: 2px solid var(--border-color);
            border-radius: 16px;
            color: var(--text-primary);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.95rem;
            resize: vertical;
            margin-bottom: 1.25rem;
            transition: all 0.3s ease;
        }

        .batch-textarea:focus {
            outline: none;
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 4px var(--accent-glow);
        }

        .batch-textarea::placeholder {
            color: var(--text-muted);
        }

        .batch-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.25rem;
            padding: 1rem;
            background: var(--bg-secondary);
            border-radius: 12px;
            border: 1px solid var(--border-color);
        }

        .playlist-stats {
            display: flex;
            gap: 2rem;
        }

        .playlist-stat {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .playlist-stat-number {
            font-size: 1.5rem;
            font-weight: 700;
            background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .playlist-stat-label {
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-top: 0.25rem;
        }

        .url-counter {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            background: var(--bg-tertiary);
            padding: 0.6rem 1.2rem;
            border-radius: 10px;
            border: 1px solid var(--border-color);
        }

        .url-counter-number {
            font-weight: 700;
            color: var(--accent-primary);
            font-size: 1.2rem;
        }

        /* Quick Actions Bar */
        .quick-actions {
            display: flex;
            gap: 0.75rem;
            margin-top: 1rem;
            flex-wrap: wrap;
        }

        .quick-action-btn {
            flex: 1;
            min-width: 140px;
            padding: 0.75rem 1rem;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            color: var(--text-secondary);
            cursor: pointer;
            font-family: 'Outfit', sans-serif;
            font-size: 0.85rem;
            font-weight: 500;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }

        .quick-action-btn:hover {
            background: var(--bg-secondary);
            border-color: var(--accent-primary);
            color: var(--text-primary);
            transform: translateY(-2px);
        }

        /* Stats Counter */
        .stats-bar {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            margin: 2rem 0;
            animation: fadeInUp 0.8s ease-out 0.3s both;
        }

        .stat-card {
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            padding: 1.5rem;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
        }

        .stat-number {
            font-size: 2rem;
            font-weight: 700;
            background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 0.25rem;
        }

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

        /* Keyboard Shortcuts Hint */
        .shortcuts-hint {
            position: fixed;
            bottom: 2rem;
            left: 2rem;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 1rem 1.5rem;
            font-size: 0.85rem;
            color: var(--text-secondary);
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.3s ease;
            z-index: 100;
        }

        .shortcuts-hint.show {
            opacity: 1;
            transform: translateY(0);
        }

        .kbd {
            background: var(--bg-tertiary);
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.8rem;
            border: 1px solid var(--border-color);
            margin: 0 0.2rem;
        }

        /* URL Validator Indicator */
        .url-validator {
            position: absolute;
            right: 80px;
            top: 50%;
            transform: translateY(-50%);
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .url-validator.valid {
            opacity: 1;
            background: rgba(16, 185, 129, 0.2);
            color: var(--success);
        }

        .url-validator.invalid {
            opacity: 1;
            background: rgba(239, 68, 68, 0.2);
            color: var(--error);
        }
