        * { margin: 0; padding: 0; box-sizing: border-box; }
        :root {
            /* =================================
               BACKGROUNDS - Deep Void Palette
               Consistent with design system
               ================================= */
            --bg-void: #030205;
            --bg-primary: #0a080f;
            --bg-surface: #0f0d15;
            --bg-secondary: #0f0d15;
            --bg-tertiary: #15131d;
            --bg-elevated: #1b1825;
            --glass-bg: rgba(21, 19, 29, 0.85);
            --glass-bg-light: rgba(27, 24, 37, 0.7);

            /* =================================
               TEXT - Refined Hierarchy (WCAG AA)
               ================================= */
            --text-primary: #f8f7fc;
            --text-secondary: #b8b4c8;
            --text-tertiary: #8a8599;
            --text-muted: #5d586b;

            /* =================================
               PRIMARY - Electric Purple
               Vibrant, high-energy purple
               ================================= */
            --accent-purple: #a855f7;
            --accent-purple-light: #c084fc;
            --accent-purple-dark: #9333ea;
            --accent-purple-glow: rgba(168, 85, 247, 0.25);
            --primary: var(--accent-purple);
            --primary-hover: var(--accent-purple-light);

            /* =================================
               SECONDARY - Electric Cyan
               Complementary to purple (split-complementary)
               ================================= */
            --accent-cyan: #22d3ee;
            --accent-cyan-light: #67e8f9;
            --accent-cyan-dark: #06b6d4;
            --accent-cyan-glow: rgba(34, 211, 238, 0.2);
            --accent-blue: var(--accent-cyan);

            /* =================================
               TERTIARY - Warm Gold
               For CTAs, rewards, highlights
               ================================= */
            --accent-gold: #fbbf24;
            --accent-gold-light: #fcd34d;
            --accent-gold-dark: #f59e0b;
            --accent-gold-glow: rgba(251, 191, 36, 0.2);

            /* =================================
               FUNCTIONAL COLORS
               ================================= */
            --accent-green: #10b981;
            --accent-green-light: #34d399;
            --accent-green-dark: #059669;
            --accent-green-glow: rgba(16, 185, 129, 0.2);
            --accent-orange: #f59e0b;
            --accent-red: #f43f5e;
            --accent-red-glow: rgba(244, 63, 94, 0.2);

            /* =================================
               PREMIUM GRADIENTS
               Purple-cyan synergy
               ================================= */
            --gradient-primary: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
            --gradient-purple: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-purple-dark) 100%);
            --gradient-cyan: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-cyan-dark) 100%);
            --gradient-gold: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-dark) 100%);
            --gradient-glow: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(168, 85, 247, 0.12) 0%, transparent 60%);

            /* =================================
               BORDERS - Purple-tinted
               ================================= */
            --border-subtle: rgba(168, 85, 247, 0.06);
            --border: rgba(168, 85, 247, 0.12);
            --border-default: rgba(168, 85, 247, 0.12);
            --border-strong: rgba(168, 85, 247, 0.2);

            /* =================================
               Z-INDEX SCALE
               ================================= */
            --z-dropdown: 100;
            --z-sticky: 200;
            --z-fixed: 300;
            --z-modal-backdrop: 400;
            --z-modal: 500;
            --z-popover: 600;
            --z-tooltip: 700;
            --z-toast: 800;

            /* =================================
               INTERACTION STATES
               ================================= */
            --focus-ring: 0 0 0 3px rgba(168, 85, 247, 0.4);
            --hover-lift: translateY(-2px);
            --active-press: scale(0.98);

            /* =================================
               SOCIAL / BRAND COLORS
               ================================= */
            --color-telegram: #0088cc;
            --color-telegram-dark: #006699;
            --color-telegram-glow: rgba(0, 136, 204, 0.3);
            --color-discord: #5865F2;
            --color-discord-dark: #4752c4;
            --color-discord-glow: rgba(88, 101, 242, 0.3);

            /* Aliases for compatibility */
            --surface: var(--bg-surface);
        }

        /* ==================== Accessibility Utilities ==================== */

        /* Skip link for keyboard navigation */
        .skip-link {
            position: absolute;
            top: -100%;
            left: 50%;
            transform: translateX(-50%);
            background: var(--accent-purple);
            color: white;
            padding: 12px 24px;
            border-radius: 0 0 8px 8px;
            text-decoration: none;
            font-weight: 600;
            z-index: var(--z-toast);
            transition: top 0.2s;
        }
        .skip-link:focus {
            top: 0;
            outline: none;
        }

        /* Visually hidden but accessible to screen readers */
        .visually-hidden,
        .sr-only {
            position: absolute !important;
            width: 1px !important;
            height: 1px !important;
            padding: 0 !important;
            margin: -1px !important;
            overflow: hidden !important;
            clip: rect(0, 0, 0, 0) !important;
            white-space: nowrap !important;
            border: 0 !important;
        }

        /* Focus visible styles */
        :focus-visible {
            outline: none;
            box-shadow: var(--focus-ring);
        }

        /* Remove outline for mouse users */
        :focus:not(:focus-visible) {
            outline: none;
            box-shadow: none;
        }

        /* Ensure focus is visible on buttons and interactive elements */
        button:focus-visible,
        a:focus-visible,
        input:focus-visible,
        select:focus-visible,
        textarea:focus-visible,
        [tabindex]:focus-visible {
            outline: none;
            box-shadow: var(--focus-ring);
        }

        /* Tab focus styles */
        .tab:focus-visible {
            outline: none;
            box-shadow: var(--focus-ring);
            border-radius: 8px;
        }

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

        /* High contrast mode support */
        @media (prefers-contrast: high) {
            :root {
                --border-subtle: rgba(139, 93, 255, 0.5);
                --text-muted: #8a8a9a;
            }
        }
        body {
            font-family: var(--font-body);
            background: var(--bg-void);
            color: var(--text-primary);
            min-height: 100vh;
            padding-bottom: env(safe-area-inset-bottom, 0px);
        }
        .container { max-width: 1200px; margin: 0 auto; padding: 24px; }
        header { padding: 44px 0 32px; }
        .page-header {
            display: flex;
            flex-direction: column;
            gap: 24px;
        }
        .header-top {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 24px;
            flex-wrap: wrap;
        }
        .title-wrap {
            text-align: left;
        }
        .title-eyebrow {
            display: inline-block;
            font-size: 0.75rem;
            letter-spacing: 0.2em;
            text-transform: uppercase;
            color: var(--text-tertiary);
            margin-bottom: 8px;
        }
        .page-title {
            font-family: var(--font-display);
            font-size: 3.4rem;
            font-weight: 700;
            letter-spacing: -0.02em;
            background: var(--gradient-primary);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 8px;
            position: relative;
        }
        .page-title::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: -12px;
            width: 60px;
            height: 3px;
            border-radius: 999px;
            background: var(--gradient-primary);
            box-shadow: 0 0 20px var(--accent-purple-glow);
        }
        .subtitle {
            color: var(--text-secondary);
            font-size: 1.05rem;
            font-weight: 500;
            text-shadow: none;
            margin-top: 18px;
        }

        /* Uncensored Callout */
        .uncensored-callout {
            background: rgba(31, 31, 46, 0.55);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            padding: 14px 20px;
            margin-bottom: 20px;
            text-align: left;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 12px;
        }
        .uncensored-callout .callout-icon { flex-shrink: 0; }
        .uncensored-callout p { color: var(--text-secondary); font-size: 0.95rem; margin: 0; }
        .uncensored-callout .highlight { color: var(--accent-blue); font-weight: 600; }

        .competition-banner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            text-decoration: none;
            background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(34, 211, 238, 0.04));
            border: 1px solid rgba(168, 85, 247, 0.2);
            border-radius: 12px;
            padding: 16px 22px;
            margin-bottom: 24px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        .competition-banner::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: var(--gradient-primary);
            opacity: 0.5;
        }
        .competition-banner:hover {
            border-color: rgba(168, 85, 247, 0.4);
            transform: var(--hover-lift);
            box-shadow: 0 8px 32px var(--accent-purple-glow);
        }
        .competition-banner .banner-title {
            color: var(--text-primary);
            font-weight: 600;
            font-size: 1rem;
            margin-bottom: 4px;
        }
        .competition-banner .banner-subtitle {
            color: var(--text-secondary);
            font-size: 0.85rem;
        }
        .competition-banner .banner-cta {
            background: rgba(168, 85, 247, 0.15);
            color: var(--accent-purple-light);
            padding: 8px 14px;
            border-radius: 999px;
            font-weight: 600;
            font-size: 0.8rem;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            border: 1px solid rgba(168, 85, 247, 0.25);
            transition: all 0.2s ease;
        }
        .competition-banner:hover .banner-cta {
            background: var(--accent-purple);
            color: white;
            border-color: var(--accent-purple);
        }

        /* Referral Banner */
        .referral-banner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            text-decoration: none;
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.05));
            border: 1px solid rgba(251, 191, 36, 0.25);
            border-radius: 12px;
            padding: 16px 22px;
            margin-bottom: 24px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        .referral-banner::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, var(--accent-gold-glow), transparent);
            animation: referral-shimmer 3s ease-in-out infinite;
        }
        @keyframes referral-shimmer {
            0% { left: -100%; }
            100% { left: 100%; }
        }
        .referral-banner:hover {
            border-color: rgba(251, 191, 36, 0.5);
            transform: var(--hover-lift);
            box-shadow: 0 8px 32px var(--accent-gold-glow);
        }
        .referral-banner .banner-title {
            color: var(--accent-gold);
            font-weight: 700;
            font-size: 1rem;
            margin-bottom: 4px;
        }
        .referral-banner .banner-subtitle {
            color: var(--text-secondary);
            font-size: 0.85rem;
        }
        .referral-banner .banner-cta {
            background: rgba(251, 191, 36, 0.15);
            color: var(--accent-gold);
            padding: 8px 14px;
            border-radius: 999px;
            font-weight: 600;
            font-size: 0.8rem;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            border: 1px solid rgba(251, 191, 36, 0.3);
            transition: all 0.2s ease;
        }
        .referral-banner:hover .banner-cta {
            background: var(--accent-gold);
            color: #0a080f;
            border-color: var(--accent-gold);
        }

        /* Uncensored Badge - Cyan accent for "freedom" feel */
        .uncensored-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(34, 211, 238, 0.04));
            border: 1px solid rgba(34, 211, 238, 0.25);
            color: var(--accent-cyan);
            font-size: 0.7rem;
            font-weight: 600;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            padding: 4px 10px;
            border-radius: 15px;
            margin-left: 10px;
        }
        
        /* Auth Panel */
        .auth-panel { background: var(--glass-bg); border-radius: 18px; padding: 34px; border: 1px solid var(--border-subtle); margin-bottom: 30px; text-align: center; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); }
        .auth-panel.logged-in { display: flex; justify-content: space-between; align-items: center; text-align: left; }
        .auth-panel h2 { margin-bottom: 12px; font-size: 1.5rem; font-weight: 600; color: var(--text-primary); }
        .auth-panel p { color: var(--text-secondary); margin-bottom: 20px; }
        .auth-input-group { display: flex; gap: 12px; max-width: 520px; margin: 0 auto; }
        .auth-input {
            flex: 1;
            padding: 12px 15px;
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 1rem;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .auth-input::placeholder { color: var(--text-muted); }
        .auth-input:focus {
            outline: none;
            border-color: var(--accent-purple);
            box-shadow: 0 0 0 3px rgba(139, 93, 255, 0.15);
        }
        
        .user-info { display: flex; align-items: center; gap: 20px; }
        .user-badge { display: flex; align-items: center; gap: 10px; }
        .credits-display {
            background: linear-gradient(135deg, rgba(155, 109, 255, 0.2), rgba(74, 179, 255, 0.15));
            border: 1px solid rgba(155, 109, 255, 0.3);
            padding: 10px 20px;
            border-radius: 25px;
            font-weight: bold;
            font-size: 1.1rem;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            box-shadow: 0 4px 15px rgba(155, 109, 255, 0.15);
        }
        .free-user-badge { background: var(--accent-orange); color: #000; padding: 5px 15px; border-radius: 15px; font-size: 0.85rem; font-weight: 600; }
        .premium-badge { background: var(--accent-green); color: #000; padding: 5px 15px; border-radius: 15px; font-size: 0.85rem; font-weight: 600; }
        .account-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
        .icon-svg.icon-sm { width: 16px; height: 16px; }
        
        .tabs { display: flex; gap: 10px; margin: 30px 0; border-bottom: 2px solid var(--border-subtle); flex-wrap: wrap; }
        .tab { padding: 15px 30px; background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 1rem; transition: all 0.3s; border-bottom: 3px solid transparent; position: relative; display: inline-flex; align-items: center; gap: 8px; }
        .tab.active { color: var(--text-primary); border-bottom-color: var(--accent-purple); }
        .tab:hover { color: var(--text-primary); }
        .tab.locked::after { content: '🔒'; position: absolute; top: 5px; right: 5px; font-size: 0.8rem; }

        /* SVG Icons */
        .icon-svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
        .tab.active .icon-svg { stroke: var(--accent-purple); }
        .icon-svg.icon-lg { width: 24px; height: 24px; }
        .panel-title .icon-svg { stroke: var(--accent-blue); }
        .btn .icon-svg { width: 18px; height: 18px; vertical-align: middle; margin-right: 6px; }
        
        .tab-content { display: none; padding: 30px 0; }
        .tab-content.active { display: block; }
        
        .panel { background: var(--glass-bg); border-radius: 16px; padding: 30px; border: 1px solid var(--border-subtle); }
        .panel-title { font-size: 1.5rem; margin-bottom: 20px; color: var(--text-primary); display: flex; align-items: center; gap: 10px; }
        .cost-badge { background: var(--accent-purple); padding: 5px 12px; border-radius: 15px; font-size: 0.85rem; font-weight: 500; }
        .free-badge { background: var(--accent-green); color: #000; padding: 5px 12px; border-radius: 15px; font-size: 0.85rem; font-weight: 600; }
        
        .form-group { margin: 20px 0; }
        .form-label { display: block; margin-bottom: 10px; color: var(--text-primary); font-weight: 500; }
        .form-input, .form-textarea, .form-select {
            width: 100%;
            padding: 12px;
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 1rem;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
        .form-textarea { min-height: 100px; resize: vertical; }
        .form-input:focus, .form-textarea:focus, .form-select:focus {
            outline: none;
            border-color: var(--accent-purple);
            box-shadow: 0 0 0 3px rgba(139, 93, 255, 0.15);
        }
        
        .file-upload { border: 2px dashed var(--border-subtle); padding: 40px; text-align: center; border-radius: 12px; cursor: pointer; transition: all 0.3s; display: flex; flex-direction: column; align-items: center; gap: 12px; }
        .file-upload:hover { border-color: var(--accent-purple); background: rgba(139, 93, 255, 0.05); }
        .file-upload.has-file { border-color: var(--accent-purple); background: rgba(139, 93, 255, 0.1); padding: 15px; }
        .file-upload img { max-width: 100%; max-height: 300px; border-radius: 8px; }
        .file-upload .upload-icon { width: 48px; height: 48px; stroke: var(--text-secondary); stroke-width: 1.5; fill: none; opacity: 0.6; }
        .file-upload:hover .upload-icon { stroke: var(--accent-purple); opacity: 1; }
        .file-upload p { margin: 0; color: var(--text-secondary); }
        
        .slider-group { display: flex; flex-direction: column; gap: 8px; margin: 15px 0; }
        .slider-row { display: flex; align-items: center; gap: 15px; }
        .slider-row input[type="range"] { flex: 1; accent-color: var(--accent-purple); }
        .slider-row span { min-width: 60px; text-align: right; color: var(--accent-blue); font-weight: 500; }
        
        .btn { padding: 12px 24px; border: none; border-radius: 8px; cursor: pointer; font-size: 1rem; transition: all 0.2s ease; font-family: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 500; }
        .btn-primary { background: var(--gradient-primary); color: white; width: 100%; padding: 15px; font-weight: bold; font-size: 1.1rem; }
        .btn-primary:hover { transform: var(--hover-lift); box-shadow: 0 8px 24px var(--accent-purple-glow); }
        .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

        /* Account action buttons - Legacy styles (use BEM classes from components.css instead) */
        /* .btn-success, .btn-warning, .btn-ghost deprecated in favor of .btn--glass-success, .btn--primary, .btn--ghost */
        .btn-sm { padding: 8px 16px; font-size: 0.9rem; }
        .btn-telegram { background: linear-gradient(135deg, var(--color-telegram, #0088cc), var(--color-telegram-dark, #0077b5)); color: white; }
        .btn-telegram:hover { transform: translateY(-1px); box-shadow: 0 4px 12px var(--color-telegram-glow, rgba(0, 136, 204, 0.3)); }

        .discord-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; background: linear-gradient(135deg, var(--color-discord, #5865F2) 0%, #7289da 100%); border: none; border-radius: 10px; color: white; font-weight: 600; font-size: 0.95rem; text-decoration: none; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; }
        .discord-btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: left 0.5s ease; }
        .discord-btn:hover { background: linear-gradient(135deg, #6d7bf2 0%, #8ea1e1 100%); transform: var(--hover-lift); box-shadow: 0 8px 25px var(--color-discord-glow, rgba(88, 101, 242, 0.4)); }
        .discord-btn:hover::before { left: 100%; }
        .discord-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

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

        .loading { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 32px; }
        .loading.active { display: flex; }
        .spinner {
            width: 48px;
            height: 48px;
            border: 3px solid var(--border-subtle);
            border-top-color: var(--accent-purple);
            border-right-color: var(--accent-cyan);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            box-shadow: 0 0 24px var(--accent-purple-glow);
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        .loading-text {
            color: var(--text-primary);
            font-size: 1rem;
            font-weight: 500;
            animation: loading-text-pulse 2s ease-in-out infinite;
        }
        @keyframes loading-text-pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.6; }
        }
        .loading-estimate {
            color: var(--text-secondary);
            font-size: 0.85rem;
            margin-top: 2px;
            padding: 6px 12px;
            background: rgba(155, 109, 255, 0.1);
            border-radius: 20px;
        }

        /* Retry button */
        .retry-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; background: transparent; border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-secondary); cursor: pointer; font-size: 0.9rem; margin-top: 10px; transition: all 0.3s; }
        .retry-btn:hover { border-color: var(--accent-purple); color: var(--text-primary); }
        .retry-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }

        /* Prompt Actions */
        .prompt-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
        .enhance-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(34, 211, 238, 0.1)); border: 1px solid rgba(168, 85, 247, 0.25); border-radius: 8px; color: var(--accent-purple-light); cursor: pointer; font-size: 0.85rem; font-weight: 500; transition: all 0.3s; }
        .enhance-btn:hover { background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(34, 211, 238, 0.2)); border-color: var(--accent-purple); transform: translateY(-1px); }
        .enhance-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
        .enhance-btn svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }
        .motion-badge { font-size: 0.8rem; padding: 4px 10px; border-radius: 12px; background: var(--accent-green-glow); color: var(--accent-green); border: 1px solid rgba(16, 185, 129, 0.3); }
        .motion-badge.warning { background: var(--accent-gold-glow); color: var(--accent-gold); border-color: rgba(251, 191, 36, 0.3); }
        
        .result-area { margin-top: 30px; text-align: center; }
        .result-area img, .result-area video { max-width: 100%; max-height: 600px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
        .download-btn { display: inline-block; margin-top: 15px; padding: 10px 25px; background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-primary); text-decoration: none; transition: all 0.3s; }
        .download-btn:hover { background: var(--accent-purple); border-color: var(--accent-purple); }

        /* Share/Comparison View */
        .result-actions { display: flex; gap: 10px; justify-content: center; margin-top: 15px; flex-wrap: wrap; }
        .result-actions .download-btn { margin-top: 0; }
        .share-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 25px; background: var(--gradient-primary); border: none; border-radius: 8px; color: white; cursor: pointer; font-size: 1rem; transition: all 0.3s; }
        .share-btn:hover { transform: var(--hover-lift); box-shadow: 0 8px 24px var(--accent-purple-glow); }
        .share-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }
        .competition-submit-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 25px; background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark)); border: none; border-radius: 8px; color: #0a080f; font-weight: 600; cursor: pointer; font-size: 1rem; transition: all 0.3s; }
        .competition-submit-btn:hover { transform: var(--hover-lift); box-shadow: 0 8px 24px var(--accent-gold-glow); }
        .comparison-container { display: flex; gap: 20px; justify-content: center; align-items: flex-start; flex-wrap: wrap; margin-bottom: 15px; }
        .comparison-item { text-align: center; flex: 1; min-width: 200px; max-width: 400px; }
        .comparison-item img { max-width: 100%; max-height: 400px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
        .comparison-label { display: block; margin-bottom: 10px; font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; }
        .comparison-arrow { display: flex; align-items: center; justify-content: center; padding: 20px 0; color: var(--accent-purple); }
        .comparison-arrow svg { width: 32px; height: 32px; stroke: currentColor; stroke-width: 2; fill: none; }
        @media (max-width: 600px) { .comparison-arrow svg { transform: rotate(90deg); } }

        /* MICo Result Layout - Responsive */
        .mico-result-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 16px;
            margin-bottom: 15px;
        }
        .mico-inputs {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            flex-wrap: wrap;
        }
        .mico-inputs .comparison-item {
            flex: 0 1 auto;
            min-width: 120px;
            max-width: 180px;
        }
        .mico-inputs .comparison-item img {
            max-width: 100%;
            max-height: 200px;
            border-radius: 10px;
            box-shadow: 0 6px 20px rgba(0,0,0,0.4);
        }
        .mico-plus {
            font-size: 28px;
            font-weight: 600;
            color: var(--accent-purple);
            padding: 0 4px;
        }
        .mico-arrow {
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--accent-purple);
        }
        .mico-arrow svg {
            width: 28px;
            height: 28px;
            stroke: currentColor;
            stroke-width: 2;
            fill: none;
            transform: rotate(90deg);
        }
        .mico-output .comparison-item {
            max-width: 350px;
        }
        .mico-output .comparison-item img {
            max-width: 100%;
            max-height: 350px;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.5);
        }
        @media (min-width: 769px) {
            .mico-result-container {
                flex-direction: row;
                flex-wrap: wrap;
                justify-content: center;
            }
            .mico-arrow svg {
                transform: rotate(0deg);
            }
        }
        @media (max-width: 400px) {
            .mico-inputs .comparison-item {
                min-width: 100px;
                max-width: 140px;
            }
            .mico-inputs .comparison-item img {
                max-height: 150px;
            }
            .mico-plus {
                font-size: 22px;
            }
            .mico-output .comparison-item img {
                max-height: 280px;
            }
        }

        .status { padding: 10px; margin-top: 10px; border-radius: 8px; font-size: 0.9rem; }
        .status.success { background: var(--accent-green-glow); color: var(--accent-green); }
        .status.error { background: var(--accent-red-glow); color: var(--accent-red); }
        .status.info { background: var(--accent-cyan-glow); color: var(--accent-cyan); }

        /* Enhanced Error Display */
        .error-context { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
        .error-code { font-family: monospace; font-size: 0.7rem; color: var(--text-muted); background: rgba(0,0,0,0.2); padding: 2px 6px; border-radius: 4px; }
        .error-message { font-weight: 500; }
        .error-suggestion { display: flex; align-items: flex-start; gap: 6px; font-size: 0.85rem; color: var(--text-secondary); margin-top: 6px; }
        .error-suggestion svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; flex-shrink: 0; margin-top: 2px; }
        .error-action-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 14px; background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue)); border: none; border-radius: 6px; color: white; font-size: 0.85rem; text-decoration: none; cursor: pointer; transition: all 0.2s; }
        .error-action-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(139, 93, 255, 0.3); }

        /* Model Recommendation Badges */
        .model-recommendation {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 0.7rem;
            padding: 3px 10px;
            border-radius: 12px;
            font-weight: 600;
            margin-left: 8px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }
        .model-recommendation.best-quality {
            background: rgba(139, 93, 255, 0.15);
            color: var(--accent-purple);
            border: 1px solid rgba(139, 93, 255, 0.3);
        }
        .model-recommendation.fastest {
            background: rgba(77, 159, 255, 0.15);
            color: var(--accent-blue);
            border: 1px solid rgba(77, 159, 255, 0.3);
        }
        .model-recommendation.best-value {
            background: rgba(74, 222, 128, 0.15);
            color: var(--accent-green);
            border: 1px solid rgba(74, 222, 128, 0.3);
        }
        .capability-hint {
            display: flex;
            align-items: center;
            gap: 6px;
            color: var(--text-muted);
            font-size: 0.8rem;
            margin-top: 6px;
        }
        .capability-hint svg {
            width: 12px;
            height: 12px;
            stroke: currentColor;
            stroke-width: 2;
            fill: none;
            flex-shrink: 0;
        }

        /* Cost Preview */
        .cost-preview {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px;
            margin-bottom: 12px;
            background: rgba(139, 93, 255, 0.08);
            border: 1px solid rgba(139, 93, 255, 0.2);
            border-radius: 10px;
            font-size: 0.85rem;
        }
        .cost-preview-left {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .cost-preview-item {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .cost-preview-label {
            font-size: 0.7rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .cost-preview-value {
            font-weight: 600;
            color: var(--text-primary);
        }
        .cost-preview-value.cost { color: var(--accent-purple); }
        .cost-preview-value.remaining { color: var(--accent-green); }
        .cost-preview-value.insufficient { color: var(--accent-red); }
        .cost-preview-arrow {
            color: var(--text-muted);
            font-size: 1.2rem;
        }

        /* Model Tooltips */
        .model-tooltip {
            position: relative;
            cursor: help;
        }
        .model-tooltip::after {
            content: attr(data-tooltip);
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%) translateY(-8px);
            padding: 8px 12px;
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            font-size: 0.8rem;
            font-weight: 400;
            color: var(--text-secondary);
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
            z-index: 100;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            max-width: 250px;
            white-space: normal;
            text-align: center;
        }
        .model-tooltip:hover::after {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(-4px);
        }
        @media (max-width: 768px) {
            .model-tooltip::after {
                display: none; /* Hide on mobile - use capability hints instead */
            }
        }
        
        .row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

        /* Mobile Responsive */
        @media (max-width: 768px) {
            .row { grid-template-columns: 1fr; }
            .container { padding: 12px; }
            header { padding: 24px 0; }
            h1 { font-size: 2rem; }
            .subtitle { font-size: 1rem; }
            .uncensored-callout { padding: 12px 16px; flex-direction: column; gap: 8px; }
            .auth-panel { padding: 20px; }
            .auth-panel.logged-in { flex-direction: column; gap: 15px; text-align: center; }
            .user-info { flex-direction: column; gap: 10px; }
            .auth-input-group { flex-direction: column; }
            .auth-input-group .btn { width: 100%; }
            .tabs { gap: 5px; justify-content: center; }
            .tab { padding: 10px 12px; font-size: 0.85rem; flex-direction: column; gap: 4px; }
            .tab .icon-svg { width: 18px; height: 18px; }
            .tab .uncensored-badge { display: none; }
            .tab .cost-badge { font-size: 0.7rem; padding: 3px 8px; }
            .panel { padding: 20px; }
            .panel-title { font-size: 1.2rem; flex-wrap: wrap; }
            .panel-title .uncensored-badge { font-size: 0.6rem; }
            .file-upload { padding: 30px 15px; }
            .file-upload .upload-icon { width: 36px; height: 36px; }
            .btn-primary { padding: 12px; font-size: 1rem; }
            .comparison-container { gap: 10px; }
            .comparison-item { min-width: 120px; }
            .comparison-label { font-size: 0.8rem; }
            .comparison-arrow { padding: 10px 0; }
            .comparison-arrow svg { width: 24px; height: 24px; transform: rotate(90deg); }
            .result-actions { flex-direction: column; gap: 8px; }
            .result-actions .download-btn, .result-actions .share-btn { width: 100%; justify-content: center; }
            .slider-group label { font-size: 0.9rem; }
        }

        @media (max-width: 400px) {
            .tab { padding: 8px 10px; font-size: 0.8rem; }
            .cost-badge { font-size: 0.6rem; padding: 2px 5px; }
            h1 { font-size: 1.75rem; }
        }
        
        /* Toast System */
        .toast-container { position: fixed; z-index: 9999; pointer-events: none; }
        .toast {
            position: fixed;
            right: 24px;
            bottom: 24px;
            padding: 14px 44px 14px 16px;
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            z-index: 2000;
            display: flex;
            align-items: center;
            gap: 12px;
            max-width: min(400px, calc(100vw - 48px));
            box-shadow: 0 8px 32px rgba(0,0,0,0.4);
            opacity: 0;
            transform: translateX(100%);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            pointer-events: auto;
        }
        .toast.visible { opacity: 1; transform: translateX(0); }
        .toast.exiting { animation: toastExit 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
        @keyframes toastExit { to { opacity: 0; transform: translateX(100%) scale(0.95); } }
        .toast.success { border-color: rgba(74, 222, 128, 0.5); background: linear-gradient(135deg, rgba(74,222,128,0.15), var(--bg-elevated)); }
        .toast.error { border-color: rgba(239, 68, 68, 0.5); background: linear-gradient(135deg, rgba(239,68,68,0.15), var(--bg-elevated)); }
        .toast.info { border-color: rgba(77, 159, 255, 0.5); background: linear-gradient(135deg, rgba(77,159,255,0.1), var(--bg-elevated)); }
        .toast-icon { font-size: 18px; flex-shrink: 0; }
        .toast-message { flex: 1; font-size: 14px; line-height: 1.4; }
        .toast-close { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: transparent; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; padding: 4px 8px; border-radius: 4px; opacity: 0.7; transition: all 0.2s; }
        .toast-close:hover { opacity: 1; background: rgba(255,255,255,0.1); color: var(--text-primary); }

        /* Mobile toast positioning */
        @media (max-width: 640px) {
            .toast { left: 16px; right: 16px; max-width: none; transform: translateY(-100%); bottom: auto; top: 16px; }
            .toast.visible { transform: translateY(0); }
            .toast.exiting { animation: toastExitMobile 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
            @keyframes toastExitMobile { to { opacity: 0; transform: translateY(-100%); } }
        }
        
        .paywall-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; z-index: 1000; }
        .paywall-modal { background: var(--bg-surface); border: 1px solid var(--accent-orange); border-radius: 16px; padding: 40px; max-width: 400px; text-align: center; }
        .paywall-modal h2 { color: var(--accent-orange); margin-bottom: 15px; }
        .paywall-modal p { color: var(--text-secondary); margin-bottom: 25px; line-height: 1.6; }
        .paywall-modal .btn { margin-top: 10px; }
        
        .hidden { display: none !important; }

        .help-link { color: var(--accent-blue); text-decoration: none; font-size: 0.9rem; }
        .help-link:hover { text-decoration: underline; }

        /* Google Sign-In */
        .auth-divider { display: flex; align-items: center; margin: 20px 0; color: var(--text-secondary); font-size: 0.9rem; }
        .auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-subtle); }
        .auth-divider span { padding: 0 15px; }
        #google-signin-btn { display: flex; justify-content: center; margin-bottom: 10px; }
        .google-loading { padding: 12px; background: rgba(139, 93, 255, 0.1); border: 1px dashed var(--border-subtle); border-radius: 8px; font-size: 0.9rem; color: var(--text-secondary); }

        .daily-limits { font-size: 0.9rem; color: var(--text-secondary); margin-top: 5px; }
        .daily-limits span { color: var(--accent-green); font-weight: 500; }

        .refund-status {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 0.85rem;
            color: var(--accent-green);
            background: rgba(16, 185, 129, 0.1);
            padding: 4px 10px;
            border-radius: 6px;
            margin-left: 10px;
        }
        .refund-status svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
        }

        /* Progress Bar Styles */
        .progress-container {
            width: 100%;
            background: var(--bg-elevated);
            border-radius: 10px;
            overflow: hidden;
            margin: 15px 0;
            position: relative;
            height: 30px;
            border: 1px solid var(--border-subtle);
        }
        .progress-bar {
            height: 100%;
            background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
            transition: width 0.3s ease;
            border-radius: 10px;
        }
        .progress-bar.stalled {
            animation: pulse-stall 1.5s ease-in-out infinite;
        }
        @keyframes pulse-stall {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.6; }
        }
        .progress-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-weight: bold;
            font-size: 0.9rem;
            color: var(--text-primary);
            text-shadow: 0 1px 2px rgba(0,0,0,0.5);
        }
        .progress-step {
            font-size: 0.85rem;
            color: var(--text-secondary);
            text-align: center;
            margin-top: 8px;
        }
        .progress-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 8px;
            font-size: 0.8rem;
            color: var(--text-secondary);
        }
        .progress-phase {
            text-transform: capitalize;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 4px;
            background: var(--bg-elevated);
        }
        .progress-phase[data-phase="queued"] { color: var(--text-tertiary); }
        .progress-phase[data-phase="initializing"] { color: var(--accent-cyan); }
        .progress-phase[data-phase="loading_model"] { color: var(--accent-gold); }
        .progress-phase[data-phase="loading_loras"] { color: var(--accent-gold-dark); }
        .progress-phase[data-phase="generating"] { color: var(--accent-green); }
        .progress-phase[data-phase="encoding"] { color: var(--accent-purple-light); }
        .progress-phase[data-phase="completed"] { color: var(--accent-green); }
        .progress-phase[data-phase="error"] { color: var(--accent-red); }
        .progress-eta {
            color: var(--text-secondary);
            font-size: 0.75rem;
        }
        .progress-message {
            flex: 1;
            text-align: center;
            color: var(--text-secondary);
            font-size: 0.8rem;
            margin: 0 10px;
        }

        /* Cancel Button */
        .cancel-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 16px;
            background: transparent;
            border: 1px solid rgba(244, 63, 94, 0.4);
            border-radius: 8px;
            color: var(--accent-red);
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            margin-top: 12px;
        }
        .cancel-btn:hover {
            background: var(--accent-red-glow);
            border-color: var(--accent-red);
        }
        .cancel-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        .cancel-btn .cancel-spinner {
            width: 14px;
            height: 14px;
            border: 2px solid rgba(244, 63, 94, 0.3);
            border-top-color: var(--accent-red);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            display: none;
        }
        .cancel-btn.cancelling .cancel-spinner {
            display: inline-block;
        }
        .cancel-btn.cancelling .cancel-text {
            display: none;
        }

        /* ============================================
           TEXT-TO-VIDEO (T2V) STYLES
           ============================================ */

        /* Duration Selector */
        .duration-selector {
            display: flex;
            gap: 12px;
        }
        .duration-option {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 12px 16px;
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .duration-option:hover {
            border-color: var(--accent-purple);
        }
        .duration-option input[type="radio"] {
            display: none;
        }
        .duration-option input[type="radio"]:checked + .duration-label {
            color: var(--accent-purple);
        }
        .duration-option:has(input:checked) {
            border-color: var(--accent-purple);
            background: rgba(168, 85, 247, 0.1);
        }
        .duration-label {
            font-weight: 500;
            color: var(--text-primary);
        }

        /* Advanced Settings */
        .advanced-settings {
            margin: 16px 0;
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            overflow: hidden;
        }
        .advanced-toggle {
            padding: 12px 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--text-secondary);
            background: var(--bg-elevated);
            transition: all 0.2s ease;
        }
        .advanced-toggle:hover {
            color: var(--text-primary);
        }
        .advanced-toggle .icon-svg {
            width: 16px;
            height: 16px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
        }
        .advanced-content {
            padding: 16px;
            background: var(--bg-surface);
            border-top: 1px solid var(--border-subtle);
        }
        .advanced-settings.open .advanced-content {
            display: block !important;
        }
        .advanced-settings.open .advanced-toggle svg:last-child {
            transform: rotate(180deg);
        }


        /* ============================================
           HISTORY TAB STYLES
           ============================================ */

        /* Skeleton Loaders */
        .skeleton-card {
            background: var(--glass-bg);
            border: 1px solid var(--border-subtle);
            border-radius: 16px;
            overflow: hidden;
            break-inside: avoid;
            margin-bottom: 16px;
        }
        .skeleton-media {
            width: 100%;
            aspect-ratio: 1;
            background: linear-gradient(90deg, var(--bg-elevated) 0%, var(--bg-surface) 50%, var(--bg-elevated) 100%);
            background-size: 200% 100%;
            animation: shimmer 1.5s ease-in-out infinite;
        }
        .skeleton-media.landscape { aspect-ratio: 16/9; }
        .skeleton-media.portrait { aspect-ratio: 9/16; }
        .skeleton-content { padding: 14px; }
        .skeleton-text {
            height: 12px;
            background: linear-gradient(90deg, var(--bg-elevated) 0%, rgba(139,93,255,0.1) 50%, var(--bg-elevated) 100%);
            background-size: 200% 100%;
            border-radius: 6px;
            margin-bottom: 10px;
            animation: shimmer 1.5s ease-in-out infinite;
        }
        .skeleton-text:last-child { margin-bottom: 0; }
        .skeleton-badge-row { display: flex; gap: 8px; margin-bottom: 12px; }
        .skeleton-badge {
            height: 22px;
            width: 60px;
            background: linear-gradient(90deg, var(--bg-elevated) 0%, rgba(139,93,255,0.08) 50%, var(--bg-elevated) 100%);
            background-size: 200% 100%;
            border-radius: 6px;
            animation: shimmer 1.5s ease-in-out infinite;
        }
        @keyframes shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }

        .history-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            flex-wrap: wrap;
            margin: 6px 0 12px;
        }

        .history-search {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            min-width: 240px;
            flex: 1;
        }

        .history-search svg {
            width: 18px;
            height: 18px;
            stroke: var(--text-tertiary);
            stroke-width: 2;
            fill: none;
        }

        .history-search input {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-size: 0.95rem;
            outline: none;
        }

        .history-search input::placeholder {
            color: var(--text-muted);
        }

        .history-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .history-count {
            font-size: 0.85rem;
            color: var(--text-tertiary);
            padding: 6px 10px;
            border-radius: 999px;
            border: 1px solid var(--border-subtle);
            background: rgba(255, 255, 255, 0.02);
        }

        .history-sort {
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            color: var(--text-primary);
            border-radius: 10px;
            padding: 8px 12px;
            font-size: 0.9rem;
        }

        .history-filters {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            margin-bottom: 16px;
        }

        .refresh-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .refresh-btn svg {
            width: 16px;
            height: 16px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
        }

        /* History Grid - CSS Grid for better performance than columns */
        .history-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 16px;
            margin-top: 20px;
            align-items: start;
        }
        @media (max-width: 600px) {
            .history-grid { grid-template-columns: 1fr; }
        }

        /* History Card - Optimized with containment */
        .history-card {
            background: var(--glass-bg);
            border: 1px solid var(--border-subtle);
            border-radius: 16px;
            overflow: hidden;
            cursor: pointer;
            position: relative;
            /* Performance optimizations */
            content-visibility: auto;
            contain-intrinsic-size: auto 350px;
            contain: layout style paint;
            /* Simpler transition - only transform and box-shadow */
            transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
        }
        .history-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 32px rgba(139, 93, 255, 0.2);
            border-color: rgba(139, 93, 255, 0.4);
            /* Only apply will-change on hover */
            will-change: transform;
        }

        /* Card Media Container */
        .card-media {
            position: relative;
            overflow: hidden;
            background: var(--bg-surface);
            /* Default aspect ratio for images (most AI gens are square) */
            aspect-ratio: 1 / 1;
        }
        /* Video aspect ratio (16:9) */
        .card-media.media-video {
            aspect-ratio: 16 / 9;
        }
        /* Landscape images */
        .card-media.media-landscape {
            aspect-ratio: 16 / 9;
        }
        /* Portrait images */
        .card-media.media-portrait {
            aspect-ratio: 3 / 4;
        }
        .card-media img, .card-media video {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
            transition: opacity 0.3s ease;
        }
        .card-media.loading img, .card-media.loading video {
            opacity: 0;
        }
        .card-media.loaded img, .card-media.loaded video {
            opacity: 1;
        }
        /* Loading shimmer effect */
        .card-media.loading::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, var(--bg-surface) 0%, var(--bg-elevated) 50%, var(--bg-surface) 100%);
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
        }
        @keyframes shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
        /* Media error placeholder */
        .media-placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            min-height: 150px;
            background: var(--bg-surface);
            color: var(--text-secondary);
        }
        /* Removed scale/brightness on hover - causes repaint on every card */

        /* SVG Icon via <use> - inherits color from parent */
        .icon-use {
            width: 1em;
            height: 1em;
            vertical-align: middle;
            fill: currentColor;
            stroke: currentColor;
        }
        .card-action-btn .icon-use {
            width: 16px;
            height: 16px;
        }
        .card-badge .icon-use {
            width: 12px;
            height: 12px;
            stroke-width: 2.5;
        }
        .icon-credits {
            width: 10px;
            height: 10px;
            stroke: #ffffff;
            fill: none;
        }

        /* Video Play Overlay */
        .video-overlay {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0,0,0,0.3);
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .history-card:hover .video-overlay { opacity: 1; }
        .video-overlay svg {
            width: 48px;
            height: 48px;
            fill: white;
            filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
            transition: transform 0.2s ease;
        }
        .history-card:hover .video-overlay svg { transform: scale(1.1); }
        .card-media.media-video.streaming-ready .video-overlay {
            background: rgba(0, 0, 0, 0.45);
        }

        .encoding-overlay {
            position: absolute;
            left: 12px;
            right: 12px;
            bottom: 12px;
            padding: 8px 10px;
            border-radius: 10px;
            background: rgba(0, 0, 0, 0.65);
            color: #f8fafc;
            display: flex;
            flex-direction: column;
            gap: 6px;
            z-index: 2;
        }
        .encoding-overlay .encoding-title {
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }
        .encoding-overlay .encoding-progress {
            font-size: 11px;
            opacity: 0.85;
        }
        .encoding-bar {
            width: 100%;
            height: 4px;
            background: rgba(148, 163, 184, 0.3);
            border-radius: 999px;
            overflow: hidden;
        }
        .encoding-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
            width: 0%;
            transition: width 0.3s ease;
        }

        /* Video Thumbnail (for i2v videos using source image) */
        .video-thumbnail {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: 1;
            transition: opacity 0.3s ease;
        }
        .card-media.media-video.has-thumbnail {
            background: var(--bg-secondary);
        }
        .card-media.media-video.has-thumbnail video {
            z-index: 2;
        }
        .card-media.media-video.playing .video-thumbnail {
            opacity: 0;
        }
        .card-media.media-video.playing video {
            opacity: 1 !important;
            position: relative !important;
        }
        /* T2V video placeholder (no thumbnail available) */
        .card-media.media-video:not(.has-thumbnail)::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 48px;
            height: 48px;
            margin: -24px 0 0 -24px;
            background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%239b6dff' stroke-width='1.5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='23 7 16 12 23 17 23 7'/%3E%3Crect x='1' y='5' width='15' height='14' rx='2' ry='2'/%3E%3C/svg%3E") center/contain no-repeat;
            opacity: 0.3;
            z-index: 0;
        }

        /* Card Content */
        .card-content { padding: 14px; }

        /* Badges Row */
        .card-badges {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            margin-bottom: 10px;
        }
        .card-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 10px;
            border-radius: 8px;
            font-size: 11px;
            font-weight: 600;
            line-height: 1;
        }
        .card-badge svg { width: 12px; height: 12px; stroke-width: 2.5; }
        .card-badge.type-video {
            background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(34, 211, 238, 0.15));
            color: var(--accent-purple-light);
        }
        .card-badge.type-image {
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(34, 211, 238, 0.1));
            color: var(--accent-green);
        }
        .card-badge.model {
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            color: var(--text-secondary);
            font-weight: 500;
        }
        .card-badge.status-processing {
            background: var(--accent-gold-glow);
            color: var(--accent-gold);
        }
        .card-badge.status-failed {
            background: var(--accent-red-glow);
            color: var(--accent-red);
        }
        .card-badge.status-cancelled {
            background: rgba(138, 133, 153, 0.15);
            color: var(--text-tertiary);
        }
        .card-badge.status-refunded {
            background: var(--accent-green-glow);
            color: var(--accent-green);
        }
        /* Mini progress bar for history cards */
        .mini-progress-container {
            width: 80%;
            max-width: 150px;
            height: 6px;
            background: var(--bg-elevated);
            border-radius: 3px;
            overflow: hidden;
            margin-bottom: 10px;
        }
        .mini-progress-bar {
            height: 100%;
            background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
            transition: width 0.3s ease;
            border-radius: 3px;
        }
        .card-badge.credits {
            background: rgba(77, 159, 255, 0.15);
            color: var(--accent-blue);
        }

        /* Card Prompt */
        .card-prompt {
            color: var(--text-primary);
            font-size: 13px;
            line-height: 1.5;
            margin-bottom: 8px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        /* Card Timestamp */
        .card-timestamp {
            color: var(--text-muted);
            font-size: 11px;
            margin-bottom: 12px;
        }

        /* Card Actions - Icon Buttons */
        .card-actions {
            display: flex;
            gap: 8px;
            padding-top: 10px;
            border-top: 1px solid var(--border-subtle);
        }
        .card-action-btn {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 8px 10px;
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .card-action-btn:hover {
            background: rgba(139, 93, 255, 0.15);
            border-color: var(--accent-purple);
            color: var(--text-primary);
        }
        .card-action-btn svg { width: 14px; height: 14px; stroke-width: 2; }
        .card-action-btn.primary {
            background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
            border-color: transparent;
            color: white;
        }
        .card-action-btn.primary:hover { opacity: 0.9; transform: translateY(-1px); }
        .card-action-btn.competition {
            background: linear-gradient(135deg, #ec4899, var(--accent-purple));
            border-color: transparent;
            color: white;
            flex: 0;
            padding: 8px 12px;
        }
        .card-action-btn.competition:hover { opacity: 0.9; }
        .card-action-btn.danger {
            background: rgba(239, 68, 68, 0.15);
            border-color: rgba(239, 68, 68, 0.4);
            color: #ef4444;
        }
        .card-action-btn.danger:hover {
            background: rgba(239, 68, 68, 0.25);
        }
        .card-action-btn.refund {
            background: rgba(16, 185, 129, 0.15);
            border-color: rgba(16, 185, 129, 0.4);
            color: #10b981;
            flex: 0;
            padding: 8px 12px;
        }
        .card-action-btn.refund:hover {
            background: rgba(16, 185, 129, 0.25);
        }

        /* Pending/Failed Card States */
        .card-placeholder {
            width: 100%;
            min-height: 180px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 10px;
            background: linear-gradient(135deg, var(--bg-elevated), var(--bg-surface));
        }
        .card-placeholder.failed {
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), var(--bg-surface));
        }
        .card-placeholder.expired {
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), var(--bg-surface));
        }
        .card-placeholder svg { width: 32px; height: 32px; }
        .card-placeholder .placeholder-text {
            color: var(--text-muted);
            font-size: 12px;
        }
        .card-placeholder .retry-btn {
            margin-top: 8px;
            padding: 6px 12px;
            font-size: 11px;
            background: var(--glass-bg);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s;
        }
        .card-placeholder .retry-btn:hover {
            background: var(--accent-purple);
            color: white;
            border-color: var(--accent-purple);
        }
        /* Image loading shimmer */
        .card-media.loading::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-elevated) 50%, var(--bg-surface) 75%);
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
            z-index: 1;
        }

        /* Empty State */
        .history-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 60px 20px;
            text-align: center;
        }
        .history-empty svg {
            width: 80px;
            height: 80px;
            stroke: var(--text-muted);
            stroke-width: 1;
            margin-bottom: 20px;
            opacity: 0.5;
        }
        .history-empty h3 {
            color: var(--text-secondary);
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 8px;
        }
        .history-empty p {
            color: var(--text-muted);
            font-size: 14px;
            margin-bottom: 20px;
            max-width: 280px;
        }
        .history-empty .btn {
            background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
            padding: 12px 24px;
            border-radius: 10px;
            color: white;
            font-weight: 600;
        }

        /* Infinite Scroll Sentinel */
        .history-sentinel {
            height: 1px;
            width: 100%;
        }
        .history-loading-more {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 20px;
            color: var(--text-muted);
            font-size: 13px;
        }
        .history-loading-more .spinner { width: 20px; height: 20px; }

        /* View All History Link */
        .history-view-all {
            display: flex;
            justify-content: center;
            margin-top: 24px;
            padding-top: 20px;
            border-top: 1px solid var(--border-subtle);
        }
        .history-view-all a {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 12px 24px;
            font-size: 15px;
        }
        .history-total-badge {
            background: rgba(255, 255, 255, 0.2);
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 600;
            margin-left: 4px;
        }

        /* Filter Buttons Enhanced */
        .filter-btn {
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            color: var(--text-secondary);
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .filter-btn:hover {
            border-color: var(--accent-purple);
            color: var(--text-primary);
        }
        .filter-btn.active {
            background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
            border-color: transparent;
            color: white;
        }

        /* Email Linking Styles */
        .email-link-section {
            margin-top: 15px;
            border-top: 1px solid var(--border);
            padding-top: 10px;
        }
        .email-link-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            padding: 8px 0;
            color: var(--text-secondary);
            font-size: 0.9rem;
        }
        .email-link-header:hover {
            color: var(--text-primary);
        }
        .expand-btn {
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 0.7rem;
            padding: 4px 8px;
            border-radius: 4px;
            transition: all 0.2s ease;
        }
        .expand-btn:hover {
            background: var(--accent-purple);
            border-color: var(--accent-purple);
            color: white;
        }
        .expand-btn.expanded {
            transform: rotate(180deg);
        }
        .email-link-content {
            padding: 10px 0;
        }
        .email-benefit {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 10px;
        }
        .email-input-group {
            display: flex;
            gap: 8px;
            margin-bottom: 10px;
        }
        .email-input {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--surface);
            color: var(--text-primary);
            font-size: 0.9rem;
        }
        .email-input:focus {
            outline: none;
            border-color: var(--primary);
        }
        .btn-small {
            padding: 8px 12px;
            font-size: 0.85rem;
            white-space: nowrap;
        }
        .code-hint {
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-top: 5px;
        }
        .email-link-status {
            font-size: 0.85rem;
            margin-top: 10px;
        }
        .email-link-status.success {
            color: #4caf50;
        }
        .email-link-status.error {
            color: #f44336;
        }
        .email-status {
            font-size: 0.9rem;
            color: var(--text-primary);
            margin-bottom: 10px;
        }
        .referral-info {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 8px;
        }
        .referral-link-input {
            width: 100%;
            padding: 8px;
            margin: 5px 0;
            border: 1px solid var(--border);
            border-radius: 4px;
            background: var(--surface);
            color: var(--text-primary);
            font-size: 0.8rem;
        }
        .copy-btn {
            padding: 6px 12px;
            font-size: 0.8rem;
            background: var(--accent-purple);
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.2s ease;
        }
        .copy-btn:hover {
            background: var(--primary-hover);
            transform: translateY(-1px);
        }
        .referral-note {
            font-size: 0.8rem;
            color: var(--accent-green);
        }

        /* Notification Center */
        .notification-center {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 1500;
        }
        .notification-bell {
            position: relative;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: var(--glass-bg);
            border: 1px solid var(--border-subtle);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s;
        }
        .notification-bell:hover {
            background: var(--bg-elevated);
            border-color: var(--accent-purple);
        }
        .notification-bell svg {
            width: 20px;
            height: 20px;
            stroke: var(--text-primary);
            fill: none;
            stroke-width: 2;
        }
        .notification-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            min-width: 18px;
            height: 18px;
            background: #ef4444;
            color: white;
            font-size: 11px;
            font-weight: 600;
            border-radius: 9px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 5px;
        }
        .notification-dropdown {
            position: absolute;
            top: 54px;
            right: 0;
            width: 340px;
            max-height: 450px;
            background: var(--bg-surface);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.5);
            overflow: hidden;
        }
        .notification-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 14px 16px;
            border-bottom: 1px solid var(--border-subtle);
            background: var(--bg-elevated);
        }
        .notification-header span {
            font-weight: 600;
            color: var(--text-primary);
        }
        .notification-header button {
            background: none;
            border: none;
            color: var(--accent-blue);
            cursor: pointer;
            font-size: 0.85rem;
        }
        .notification-list {
            max-height: 380px;
            overflow-y: auto;
        }
        .notification-item {
            display: flex;
            gap: 12px;
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-subtle);
            cursor: pointer;
            transition: background 0.2s;
        }
        .notification-item:hover {
            background: var(--bg-elevated);
        }
        .notification-item.unread {
            background: rgba(139, 93, 255, 0.05);
        }
        .notification-icon {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 16px;
        }
        .notification-icon.success { background: rgba(74, 222, 128, 0.15); }
        .notification-icon.error { background: rgba(239, 68, 68, 0.15); }
        .notification-icon.info { background: rgba(77, 159, 255, 0.15); }
        .notification-icon.progress { background: rgba(139, 93, 255, 0.15); }
        .notification-content {
            flex: 1;
            min-width: 0;
        }
        .notification-title {
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 2px;
        }
        .notification-message {
            font-size: 0.8rem;
            color: var(--text-secondary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .notification-time {
            font-size: 0.75rem;
            color: var(--text-secondary);
            margin-top: 4px;
        }
        .notification-empty {
            padding: 40px 20px;
            text-align: center;
            color: var(--text-secondary);
        }

        /* Queue Indicator - Enhanced */
        .queue-indicator {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 18px;
            background: linear-gradient(135deg, rgba(139, 93, 255, 0.15), rgba(77, 159, 255, 0.1));
            border: 1px solid rgba(139, 93, 255, 0.4);
            border-radius: 24px;
            margin-left: 15px;
            animation: queueGlow 2s ease-in-out infinite;
        }
        @keyframes queueGlow {
            0%, 100% { box-shadow: 0 0 10px rgba(139, 93, 255, 0.2); }
            50% { box-shadow: 0 0 20px rgba(139, 93, 255, 0.4); }
        }
        .queue-pulse {
            width: 10px;
            height: 10px;
            background: var(--accent-green);
            border-radius: 50%;
            animation: pulse 1.5s ease-in-out infinite;
        }
        @keyframes pulse {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(1.2); }
        }
        .queue-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .queue-text {
            font-size: 0.95rem;
            color: var(--text-primary);
            font-weight: 600;
        }
        .queue-position {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
        .queue-mini-progress {
            width: 80px;
            height: 6px;
            background: var(--bg-elevated);
            border-radius: 3px;
            overflow: hidden;
        }
        .queue-mini-bar {
            height: 100%;
            background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
            transition: width 0.3s ease;
        }

        /* Active Generations Section in History */
        .active-generations-section {
            margin-bottom: 24px;
            display: none;
        }
        .active-generations-section.has-items {
            display: block;
        }
        .active-generations-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border-subtle);
        }
        .active-generations-header h3 {
            font-size: 1rem;
            color: var(--text-primary);
            margin: 0;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .active-generations-header .pulse-dot {
            width: 8px;
            height: 8px;
            background: var(--accent-green);
            border-radius: 50%;
            animation: pulse 1.5s ease-in-out infinite;
        }
        .active-generations-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 16px;
        }
        .active-gen-card {
            background: var(--glass-bg);
            border: 1px solid rgba(139, 93, 255, 0.3);
            border-radius: 16px;
            padding: 20px;
            position: relative;
            overflow: hidden;
        }
        .active-gen-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
            animation: shimmer-border 2s ease-in-out infinite;
        }
        @keyframes shimmer-border {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        .active-gen-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 12px;
        }
        .active-gen-type {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 600;
            color: var(--text-primary);
        }
        .active-gen-type svg {
            width: 18px;
            height: 18px;
            stroke: var(--accent-purple);
        }
        .active-gen-phase {
            font-size: 0.75rem;
            padding: 4px 10px;
            border-radius: 12px;
            font-weight: 600;
            text-transform: capitalize;
        }
        .active-gen-phase[data-phase="queued"] { background: rgba(138, 133, 153, 0.15); color: var(--text-tertiary); }
        .active-gen-phase[data-phase="initializing"] { background: var(--accent-cyan-glow); color: var(--accent-cyan); }
        .active-gen-phase[data-phase="loading_model"] { background: var(--accent-gold-glow); color: var(--accent-gold); }
        .active-gen-phase[data-phase="loading_loras"] { background: rgba(245, 158, 11, 0.2); color: var(--accent-gold-dark); }
        .active-gen-phase[data-phase="generating"] { background: var(--accent-green-glow); color: var(--accent-green); }
        .active-gen-phase[data-phase="encoding"] { background: rgba(192, 132, 252, 0.15); color: var(--accent-purple-light); }
        .active-gen-prompt {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 16px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .active-gen-progress {
            background: var(--bg-elevated);
            border-radius: 8px;
            height: 24px;
            overflow: hidden;
            position: relative;
        }
        .active-gen-progress-bar {
            height: 100%;
            background: var(--gradient-primary);
            transition: width 0.3s ease;
            position: relative;
        }
        .active-gen-progress-bar::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            animation: progress-shine 1.5s ease-in-out infinite;
        }
        @keyframes progress-shine {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }
        .active-gen-progress-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-primary);
            text-shadow: 0 1px 2px rgba(0,0,0,0.5);
        }
        .active-gen-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 12px;
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .active-gen-time {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .active-gen-cancel {
            background: transparent;
            border: 1px solid rgba(239, 68, 68, 0.3);
            color: #ef4444;
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 0.7rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .active-gen-cancel:hover {
            background: rgba(239, 68, 68, 0.15);
            border-color: #ef4444;
        }

        /* Competition Modal */
        .competition-modal {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.85);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            padding: 20px;
        }
        .competition-modal-content {
            background: var(--bg-surface);
            border: 1px solid var(--border-subtle);
            border-radius: 16px;
            max-width: 480px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
        }
        .competition-modal-header {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 20px;
            border-bottom: 1px solid var(--border-subtle);
        }
        .competition-modal-header h3 {
            flex: 1;
            margin: 0;
            font-size: 1.2rem;
            color: var(--text-primary);
        }
        .competition-modal-close {
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 4px;
        }
        .competition-modal-preview {
            padding: 20px;
            text-align: center;
            background: var(--bg-elevated);
        }
        .competition-modal-preview img,
        .competition-modal-preview video {
            max-width: 100%;
            max-height: 250px;
            border-radius: 8px;
        }
        .competition-modal-form {
            padding: 20px;
        }
        .competition-modal-form .form-group {
            margin-bottom: 16px;
        }
        .competition-modal-form label {
            display: block;
            margin-bottom: 6px;
            font-size: 0.9rem;
            color: var(--text-primary);
            font-weight: 500;
        }
        .competition-modal-rules {
            padding: 16px 20px;
            background: rgba(245, 158, 11, 0.1);
            border-top: 1px solid var(--border-subtle);
        }
        .competition-modal-rules p {
            font-size: 0.85rem;
            color: var(--accent-orange);
            margin-bottom: 8px;
        }
        .competition-modal-rules ul {
            margin: 0;
            padding-left: 20px;
            font-size: 0.8rem;
            color: var(--text-secondary);
        }
        .competition-modal-rules li {
            margin-bottom: 4px;
        }
        .competition-modal-actions {
            display: flex;
            gap: 12px;
            padding: 20px;
            border-top: 1px solid var(--border-subtle);
        }
        .competition-modal-actions button {
            flex: 1;
            padding: 12px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }
        .competition-modal-actions .btn-cancel {
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            color: var(--text-secondary);
        }
        .competition-modal-actions .btn-submit {
            background: linear-gradient(135deg, #ec4899, var(--accent-purple));
            border: none;
            color: white;
        }
        .competition-modal-actions .btn-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(236, 72, 153, 0.4);
        }

        /* Preset Selector Styles */
        .preset-selector {
            display: flex;
            gap: 12px;
            margin-bottom: 24px;
            padding: 4px;
            background: var(--bg-surface);
            border-radius: 12px;
            border: 1px solid var(--border-subtle);
        }
        .preset-btn {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 16px;
            background: transparent;
            border: 2px solid transparent;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
        }
        .preset-btn:hover {
            background: var(--bg-elevated);
        }
        .preset-btn.active {
            background: var(--bg-elevated);
            border-color: var(--accent-purple);
            box-shadow: 0 0 20px rgba(139, 93, 255, 0.15);
        }
        .preset-icon {
            width: 28px;
            height: 28px;
            stroke: var(--text-secondary);
            fill: none;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
            flex-shrink: 0;
        }
        .preset-btn.active .preset-icon {
            stroke: var(--accent-purple);
        }
        .preset-info {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 2px;
        }
        .preset-name {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        .preset-desc {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }
        .preset-btn.active .preset-name {
            color: var(--accent-purple);
        }
        .preset-badge {
            position: absolute;
            top: 8px;
            right: 8px;
            background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
            color: white;
            font-size: 0.65rem;
            font-weight: 600;
            text-transform: uppercase;
            padding: 3px 8px;
            border-radius: 10px;
            letter-spacing: 0.5px;
        }

        /* Hide mode grid when using Quick/Quality presets */
        .video-mode-grid.preset-hidden {
            display: none;
        }

        @media (max-width: 768px) {
            .preset-selector {
                flex-direction: column;
                gap: 8px;
            }
            .preset-btn {
                padding: 12px 14px;
            }
            .preset-badge {
                position: static;
                margin-left: auto;
            }
        }

        /* Enhanced Progress Display */
        .enhanced-progress {
            display: flex;
            align-items: center;
            gap: 20px;
            padding: 20px 24px;
            background: linear-gradient(135deg, rgba(32, 28, 42, 0.95), rgba(26, 23, 36, 0.9));
            border-radius: 16px;
            border: 1px solid rgba(155, 109, 255, 0.2);
            margin: 16px 0;
            box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 40px rgba(155, 109, 255, 0.05);
            animation: progress-glow 3s ease-in-out infinite;
        }
        @keyframes progress-glow {
            0%, 100% { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 40px rgba(155, 109, 255, 0.05); }
            50% { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 60px rgba(155, 109, 255, 0.15); }
        }
        .progress-spinner {
            position: relative;
            width: 64px;
            height: 64px;
            flex-shrink: 0;
        }
        .spinner-svg {
            width: 100%;
            height: 100%;
            transform: rotate(-90deg);
        }
        .spinner-track {
            stroke: var(--bg-surface);
        }
        .spinner-fill {
            stroke: var(--accent-purple);
            stroke-linecap: round;
            transition: stroke-dashoffset 0.3s ease;
            filter: drop-shadow(0 0 6px var(--accent-purple));
        }
        .spinner-percent {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-primary);
            animation: percent-pulse 2s ease-in-out infinite;
        }
        @keyframes percent-pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }
        .progress-details {
            flex: 1;
            min-width: 0;
        }
        .progress-phase {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 6px;
        }
        .progress-time {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.9rem;
            margin-bottom: 10px;
        }
        .elapsed-time {
            color: var(--accent-purple);
            font-weight: 600;
            font-variant-numeric: tabular-nums;
        }
        .time-separator {
            color: var(--text-muted);
        }
        .eta-time {
            color: var(--text-secondary);
            font-variant-numeric: tabular-nums;
        }
        .progress-bar-wrapper {
            height: 8px;
            background: var(--bg-surface);
            border-radius: 4px;
            overflow: hidden;
            margin-bottom: 8px;
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
        }
        .progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue), var(--accent-purple));
            background-size: 200% 100%;
            border-radius: 4px;
            transition: width 0.3s ease;
            animation: progress-shimmer 2s ease-in-out infinite;
            box-shadow: 0 0 10px rgba(155, 109, 255, 0.5);
        }
        @keyframes progress-shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
        .progress-queue {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.8rem;
            color: var(--text-secondary);
        }
        .progress-queue svg {
            opacity: 0.7;
        }
        .progress-queue.hidden {
            display: none;
        }

        /* Loading state with enhanced progress */
        .loading.has-progress {
            display: block;
            padding: 0;
            background: none;
        }
        .loading.has-progress .spinner,
        .loading.has-progress .loading-text,
        .loading.has-progress .loading-estimate {
            display: none;
        }

        @media (max-width: 480px) {
            .enhanced-progress {
                flex-direction: column;
                text-align: center;
                gap: 12px;
            }
            .progress-time {
                justify-content: center;
            }
        }

        /* Prompt Library Modal */
        .prompt-library-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(4px);
            z-index: var(--z-modal, 1000);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.2s, visibility 0.2s;
        }
        .prompt-library-modal.active {
            opacity: 1;
            visibility: visible;
        }
        .prompt-library-content {
            background: var(--bg-surface);
            border-radius: 16px;
            border: 1px solid var(--border-subtle);
            width: 100%;
            max-width: 700px;
            max-height: 80vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        }
        .prompt-library-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 24px;
            border-bottom: 1px solid var(--border-subtle);
        }
        .prompt-library-header h3 {
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 0;
            font-size: 1.25rem;
            color: var(--text-primary);
        }
        .prompt-library-header h3 svg {
            stroke: var(--accent-purple);
            fill: none;
            stroke-width: 2;
        }
        .prompt-library-close {
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 8px;
            border-radius: 8px;
            transition: all 0.2s;
        }
        .prompt-library-close:hover {
            background: var(--bg-elevated);
            color: var(--text-primary);
        }
        .prompt-library-toolbar {
            padding: 16px 24px;
            border-bottom: 1px solid var(--border-subtle);
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .prompt-library-search {
            position: relative;
        }
        .prompt-library-search .search-icon {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            stroke: var(--text-muted);
            fill: none;
            stroke-width: 2;
        }
        .prompt-library-search input {
            width: 100%;
            padding: 10px 12px 10px 40px;
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.95rem;
        }
        .prompt-library-search input:focus {
            outline: none;
            border-color: var(--accent-purple);
        }
        .prompt-library-filters {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }
        .prompt-library-filters .filter-btn {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 6px 12px;
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 20px;
            color: var(--text-secondary);
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .prompt-library-filters .filter-btn:hover {
            border-color: var(--accent-purple);
            color: var(--text-primary);
        }
        .prompt-library-filters .filter-btn.active {
            background: var(--accent-purple);
            border-color: var(--accent-purple);
            color: white;
        }
        .prompt-library-filters .filter-btn svg {
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
        }
        .prompt-library-filters .filter-btn.active svg {
            fill: currentColor;
        }
        .prompt-library-list {
            flex: 1;
            overflow-y: auto;
            padding: 16px 24px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .prompt-library-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 40px 20px;
            color: var(--text-muted);
            text-align: center;
        }
        .prompt-library-empty svg {
            stroke: var(--text-muted);
            fill: none;
            stroke-width: 1.5;
            margin-bottom: 16px;
            opacity: 0.5;
        }
        .prompt-library-empty p {
            font-size: 1.1rem;
            color: var(--text-secondary);
            margin-bottom: 4px;
        }
        .prompt-library-footer {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 16px 24px;
            border-top: 1px solid var(--border-subtle);
            background: var(--bg-elevated);
        }
        .prompt-library-footer .prompt-count {
            color: var(--text-muted);
            font-size: 0.85rem;
            margin-right: auto;
        }

        /* Prompt Item */
        .prompt-item {
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            padding: 16px;
            transition: all 0.2s;
        }
        .prompt-item:hover {
            border-color: var(--accent-purple);
        }
        .prompt-item-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
        }
        .prompt-category-badge {
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            padding: 3px 8px;
            border-radius: 10px;
            background: rgba(139, 93, 255, 0.15);
            color: var(--accent-purple);
        }
        .prompt-category-badge.edit { background: rgba(77, 159, 255, 0.15); color: var(--accent-blue); }
        .prompt-category-badge.video { background: rgba(74, 222, 128, 0.15); color: var(--accent-green); }
        .prompt-favorite-btn {
            background: none;
            border: none;
            padding: 4px;
            cursor: pointer;
            color: var(--text-muted);
            transition: all 0.2s;
        }
        .prompt-favorite-btn:hover, .prompt-favorite-btn.active {
            color: #fbbf24;
        }
        .prompt-favorite-btn.active svg {
            fill: #fbbf24;
        }
        .prompt-favorite-btn svg {
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
        }
        .prompt-item-title {
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 6px;
            font-size: 0.95rem;
        }
        .prompt-item-text {
            color: var(--text-secondary);
            font-size: 0.85rem;
            line-height: 1.5;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin-bottom: 8px;
        }
        .prompt-item-negative {
            font-size: 0.8rem;
            color: var(--text-muted);
            font-style: italic;
            margin-bottom: 8px;
            padding: 6px 10px;
            background: rgba(239, 68, 68, 0.1);
            border-radius: 6px;
        }
        .prompt-item-footer {
            display: flex;
            gap: 12px;
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-bottom: 12px;
        }
        .prompt-item-actions {
            display: flex;
            gap: 8px;
        }
        .prompt-item-actions .btn {
            flex: 1;
        }
        .prompt-item-actions .btn svg {
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
        }
        .prompt-delete-btn:hover {
            color: var(--accent-red) !important;
            border-color: var(--accent-red) !important;
        }

        /* Prompt Toolbar (for textarea) */
        .prompt-toolbar {
            display: flex;
            gap: 6px;
            margin-top: 8px;
        }
        .prompt-toolbar-btn {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 6px 10px;
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 6px;
            color: var(--text-secondary);
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .prompt-toolbar-btn:hover {
            border-color: var(--accent-purple);
            color: var(--accent-purple);
        }
        .prompt-toolbar-btn svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
        }

        @media (max-width: 600px) {
            .prompt-library-content {
                max-height: 90vh;
                margin: 10px;
            }
            .prompt-library-header, .prompt-library-toolbar, .prompt-library-list, .prompt-library-footer {
                padding-left: 16px;
                padding-right: 16px;
            }
            .prompt-item-actions {
                flex-wrap: wrap;
            }
        }

        /* Video Mode Hub Styles */
        .video-mode-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 16px;
            margin-bottom: 24px;
        }
        .video-mode-card {
            background: var(--bg-elevated);
            border: 2px solid var(--border-subtle);
            border-radius: 12px;
            padding: 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        .video-mode-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
            opacity: 0;
            transition: opacity 0.3s;
        }
        .video-mode-card:hover {
            border-color: var(--accent-purple);
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(139, 93, 255, 0.15);
        }
        .video-mode-card:hover::before {
            opacity: 1;
        }
        .video-mode-card.active {
            border-color: var(--accent-purple);
            background: linear-gradient(135deg, rgba(139, 93, 255, 0.1), rgba(77, 159, 255, 0.05));
        }
        .video-mode-card.active::before {
            opacity: 1;
        }
        .mode-icon {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 12px;
        }
        .mode-icon svg {
            width: 28px;
            height: 28px;
            stroke: var(--text-secondary);
            stroke-width: 1.5;
            fill: none;
        }
        .mode-icon .arrow-icon {
            width: 20px;
            height: 20px;
            stroke: var(--accent-purple);
            opacity: 0.6;
        }
        .video-mode-card.active .mode-icon svg {
            stroke: var(--accent-purple);
        }
        .mode-info h3 {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-primary);
            margin: 0 0 6px 0;
        }
        .mode-info p {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin: 0;
            line-height: 1.4;
        }
        .mode-meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 14px;
            padding-top: 12px;
            border-top: 1px solid var(--border-subtle);
        }
        .mode-badge {
            font-size: 0.75rem;
            font-weight: 600;
            padding: 4px 10px;
            border-radius: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .mode-badge.unfiltered {
            background: rgba(139, 93, 255, 0.2);
            color: var(--accent-purple);
        }
        .mode-badge.pipeline {
            background: rgba(77, 159, 255, 0.2);
            color: var(--accent-blue);
        }
        .mode-badge.soft {
            background: rgba(74, 222, 128, 0.2);
            color: var(--accent-green);
        }
        .mode-badge.uncensored {
            background: rgba(245, 158, 11, 0.2);
            color: var(--accent-orange);
        }
        .mode-cost {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        /* Video Mode Forms */
        .video-mode-forms {
            margin-top: 24px;
            border-top: 1px solid var(--border-subtle);
            padding-top: 24px;
        }
        .video-mode-form {
            display: none;
        }
        .video-mode-form.active {
            display: block;
            animation: fadeIn 0.3s ease;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .mode-form-title {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--text-primary);
            margin: 0 0 20px 0;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border-subtle);
        }
        .mode-form-title .icon-svg {
            width: 24px;
            height: 24px;
            stroke: var(--accent-purple);
            stroke-width: 2;
            fill: none;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .video-mode-grid {
                grid-template-columns: 1fr;
            }
            .video-mode-card {
                padding: 16px;
            }
        }

        /* Onboarding Tooltip System */
        .onboarding-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 9998;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        .onboarding-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        .onboarding-highlight {
            position: relative;
            z-index: 9999;
            box-shadow: 0 0 0 4px var(--accent-purple), 0 0 30px rgba(139, 93, 255, 0.6);
            border-radius: 12px;
        }
        .onboarding-tooltip {
            position: fixed;
            background: linear-gradient(135deg, var(--bg-elevated), rgba(30, 20, 50, 0.95));
            border: 1px solid var(--border-subtle);
            border-radius: 16px;
            padding: 20px 24px;
            max-width: 320px;
            z-index: 10000;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 93, 255, 0.3);
            backdrop-filter: blur(8px);
            animation: tooltipFadeIn 0.3s ease;
        }
        @keyframes tooltipFadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .onboarding-tooltip::before {
            content: '';
            position: absolute;
            width: 12px;
            height: 12px;
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-right: none;
            border-bottom: none;
            transform: rotate(45deg);
        }
        .onboarding-tooltip.arrow-top::before { top: -7px; left: 24px; }
        .onboarding-tooltip.arrow-bottom::before { bottom: -7px; left: 24px; transform: rotate(225deg); }
        .onboarding-tooltip.arrow-left::before { left: -7px; top: 24px; transform: rotate(-45deg); }
        .onboarding-tooltip.arrow-right::before { right: -7px; top: 24px; transform: rotate(135deg); }
        .onboarding-tooltip h4 {
            color: var(--text-primary);
            font-size: 16px;
            font-weight: 700;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .onboarding-tooltip h4 .step-badge {
            background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
            color: white;
            font-size: 11px;
            padding: 2px 8px;
            border-radius: 10px;
            font-weight: 600;
        }
        .onboarding-tooltip p {
            color: var(--text-secondary);
            font-size: 14px;
            line-height: 1.6;
            margin-bottom: 16px;
        }
        .onboarding-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }
        .onboarding-btn {
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .onboarding-btn.skip {
            background: transparent;
            border: 1px solid rgba(148, 163, 184, 0.3);
            color: var(--text-secondary);
        }
        .onboarding-btn.skip:hover {
            background: rgba(148, 163, 184, 0.1);
            color: var(--text-primary);
        }
        .onboarding-btn.next {
            background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
            border: none;
            color: white;
            box-shadow: 0 4px 15px rgba(139, 93, 255, 0.3);
        }
        .onboarding-btn.next:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(139, 93, 255, 0.4);
        }
        .onboarding-progress {
            display: flex;
            gap: 6px;
            justify-content: center;
            margin-top: 16px;
        }
        .onboarding-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: rgba(139, 93, 255, 0.3);
            transition: all 0.2s ease;
        }
        .onboarding-dot.active {
            background: var(--accent-purple);
            box-shadow: 0 0 10px var(--accent-purple);
        }
        .onboarding-dot.completed {
            background: var(--accent-green);
        }
    </style>
