        /* ═══════════════════════════════════════════════
           RESET & CSS TOKENS
        ═══════════════════════════════════════════════ */
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        :root {
            --bg-base:       #07070f;
            --bg-elevated:   #0d0d1a;
            --bg-card:       rgba(255,255,255,0.03);
            --bg-card-hover: rgba(255,255,255,0.055);
            --border:        rgba(255,255,255,0.07);
            --border-strong: rgba(255,255,255,0.12);
            --text-primary:  #e8e8f4;
            --text-muted:    rgba(255,255,255,0.45);
            --text-faint:    rgba(255,255,255,0.22);
            --accent:        #65d69e;
            --accent-dim:    rgba(101,214,158,0.12);
            --accent-border: rgba(101,214,158,0.3);
            --indigo:        #6366f1;
            --indigo-dim:    rgba(99,102,241,0.14);
            --indigo-border: rgba(99,102,241,0.32);
            --gold:          #f5c842;
            --red:           #f87171;
            --green:         #34d399;
        }

        html { background: var(--bg-base); }
        body {
            background: var(--bg-base);
            color: var(--text-primary);
            font-family: 'Geist', 'Inter', sans-serif;
            -webkit-font-smoothing: antialiased;
            overflow: hidden;
        }

        /* ── Scrollbar ── */
        ::-webkit-scrollbar { width: 4px; height: 4px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }
        ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
        .no-scrollbar::-webkit-scrollbar { display: none; }
        .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

        /* ── Noise overlay ── */
        body::before {
            content: '';
            position: fixed; inset: 0;
            background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
            pointer-events: none; z-index: 1; opacity: 0.5;
        }

        /* ── Ambient orbs ── */
        .orb { position: fixed; border-radius: 50%; filter: blur(130px); pointer-events: none; z-index: 0; }
        .orb-1 { width: 700px; height: 700px; background: radial-gradient(circle, rgba(99,102,241,0.11) 0%, transparent 70%); top: -280px; right: -160px; }
        .orb-2 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(101,214,158,0.07) 0%, transparent 70%); bottom: -160px; left: 40px; }
        .orb-3 { width: 350px; height: 350px; background: radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%); top: 38%; left: 32%; }

        /* ═══════════════════════════════════════════════
           MODAL — Login
        ═══════════════════════════════════════════════ */
        #login-modal {
            display: none; position: fixed; inset: 0;
            background: rgba(7,7,15,0.88); backdrop-filter: blur(24px);
            z-index: 99999; align-items: center; justify-content: center;
            opacity: 0; transition: opacity .3s;
        }
        #login-modal.show { display: flex; opacity: 1; }
        .modal-content {
            background: linear-gradient(145deg, #111120 0%, #0d0d1c 100%);
            border: 1px solid var(--border-strong); border-radius: 26px;
            padding: 48px 40px 40px; text-align: center; max-width: 420px; width: 90%;
            transform: translateY(28px); transition: .4s cubic-bezier(0.16,1,0.3,1);
            box-shadow: 0 50px 100px -20px rgba(0,0,0,0.7), 0 0 0 1px rgba(101,214,158,0.08);
            position: relative;
        }
        #login-modal.show .modal-content { transform: translateY(0); }

        /* ═══════════════════════════════════════════════
           NAV
        ═══════════════════════════════════════════════ */
        .nav-glass {
            background: rgba(10,10,20,0.82); border: 1px solid var(--border);
            backdrop-filter: blur(24px); border-radius: 20px;
        }

        /* ═══════════════════════════════════════════════
           SIDEBAR
        ═══════════════════════════════════════════════ */
        .sidebar-glass {
            background: rgba(9,9,18,0.97);
            border: 1px solid var(--border);
            backdrop-filter: blur(20px);
        }
        .panel-s { border-bottom: 1px solid var(--border); padding: 16px 20px; overflow: visible; }
        .panel-s:last-child { border-bottom: none; }

        .field-label {
            font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
            letter-spacing: 0.1em; color: var(--text-faint);
            margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
        }
        .field-label i { color: var(--accent); font-size: 0.62rem; }

        /* ═══════════════════════════════════════════════
           MODE TABS
        ═══════════════════════════════════════════════ */
        .mode-tab {
            padding: 9px 14px; border-radius: 10px; font-size: 0.76rem; font-weight: 700;
            cursor: pointer; transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
            display: flex; align-items: center; justify-content: center; gap: 7px;
            border: 1px solid transparent; background: none; color: var(--text-faint);
            line-height: 1; overflow: hidden; position: relative;
        }
        .mode-tab.active {
            background: var(--accent-dim); color: var(--accent);
            border-color: var(--accent-border); box-shadow: 0 0 20px rgba(101,214,158,0.1);
        }
        .mode-tab:not(.active):hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
        #tab-video.active {
            background: var(--indigo-dim); color: #a5a8ff;
            border-color: var(--indigo-border); box-shadow: 0 0 20px rgba(99,102,241,0.1);
        }

        /* ═══════════════════════════════════════════════
           MODEL SELECT
        ═══════════════════════════════════════════════ */
        .styled-select {
            background: var(--bg-card); border: 1px solid var(--border);
            border-radius: 13px; padding: 11px 36px 11px 14px;
            font-size: 0.84rem; font-weight: 600; color: var(--text-primary);
            outline: none; width: 100%; -webkit-appearance: none; cursor: pointer;
            transition: all 0.2s; font-family: 'Geist', 'Inter', sans-serif;
        }
        .styled-select:focus {
            border-color: var(--accent-border); background: var(--accent-dim);
            box-shadow: 0 0 0 3px rgba(101,214,158,0.07);
        }
        .styled-select option { background: #111120; color: var(--text-primary); padding: 8px; }
        .styled-select optgroup { background: #111120; color: var(--accent); font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
        .select-wrap { position: relative; }
        .select-wrap::after {
            content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
            position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
            color: var(--text-faint); font-size: 0.6rem; pointer-events: none;
        }

        /* ── Model Info Card ── */
        #model-info-card {
            margin-top: 10px; border-radius: 13px;
            border: 1px solid var(--border); background: var(--bg-card);
            overflow: hidden; transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
        }
        .mic-header {
            padding: 10px 13px 9px; display: flex; align-items: center; gap: 9px;
            border-bottom: 1px solid var(--border);
        }
        .mic-icon {
            width: 30px; height: 30px; border-radius: 9px;
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0; font-size: 0.75rem;
        }
        .mic-name  { font-size: 0.8rem; font-weight: 800; color: var(--text-primary); line-height: 1.2; }
        .mic-provider { font-size: 0.58rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }
        .mic-body  { padding: 10px 13px 12px; }
        .mic-desc  { font-size: 0.72rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 9px; }
        .mic-tags  { display: flex; flex-wrap: wrap; gap: 5px; }
        .mic-tag {
            padding: 3px 9px; border-radius: 99px; font-size: 0.6rem; font-weight: 700;
            display: flex; align-items: center; gap: 4px;
        }
        .mic-tag-accent { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-border); }
        .mic-tag-indigo { background: var(--indigo-dim); color: #a5a8ff; border: 1px solid var(--indigo-border); }
        .mic-tag-gold   { background: rgba(245,200,66,0.1); color: var(--gold); border: 1px solid rgba(245,200,66,0.22); }
        .mic-tag-muted  { background: rgba(255,255,255,0.04); color: var(--text-muted); border: 1px solid var(--border); }
        .mic-tag-red    { background: rgba(248,113,113,0.1); color: #fca5a5; border: 1px solid rgba(248,113,113,0.22); }
        .mic-tag-violet { background: rgba(167,139,250,0.1); color: #c4b5fd; border: 1px solid rgba(167,139,250,0.25); }

        /* ── ETA Chip ── */
        #model-eta-chip .eta-chip {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 5px 12px; border-radius: 99px; font-size: 0.67rem; font-weight: 700;
            background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
        }
        #model-eta-chip .eta-chip i { color: var(--accent); font-size: 0.58rem; }

        /* ═══════════════════════════════════════════════
           PROMPT
        ═══════════════════════════════════════════════ */
        .prompt-wrap {
            border: 1px solid var(--border); border-radius: 13px;
            background: var(--bg-card); transition: all 0.25s;
        }
        .prompt-wrap:focus-within {
            border-color: var(--accent-border); background: rgba(101,214,158,0.03);
            box-shadow: 0 0 0 3px rgba(101,214,158,0.06), 0 0 28px rgba(101,214,158,0.07);
        }
        #prompt-in {
            color: var(--text-primary); font-family: 'Geist', 'Inter', sans-serif;
            font-size: 0.87rem; line-height: 1.65;
            max-height: 50vh; min-height: 90px;
            overflow-y: auto; resize: none;
        }
        #prompt-in::placeholder { color: var(--text-faint); }
        /* scrollbar discret pentru prompt */
        #prompt-in::-webkit-scrollbar { width: 4px; }
        #prompt-in::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 99px; }
        #char-count { font-family: 'JetBrains Mono', monospace; }

        /* ═══════════════════════════════════════════════
           RATIO PILLS
        ═══════════════════════════════════════════════ */
        .ratio-pill input[type=radio] { display: none; }
        .ratio-pill input:checked + span {
            background: var(--accent-dim); color: var(--accent);
            border-color: var(--accent-border); box-shadow: 0 0 12px rgba(101,214,158,0.1);
        }
        .ratio-pill span {
            display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
            padding: 8px 4px; border-radius: 9px; font-size: 0.63rem; font-weight: 700;
            color: var(--text-faint); cursor: pointer; transition: all 0.2s;
            border: 1px solid transparent; user-select: none;
        }
        .ratio-pill span:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }

        /* ═══════════════════════════════════════════════
           COUNT BUTTONS
        ═══════════════════════════════════════════════ */
        .count-btn {
            width: 34px; height: 34px; border-radius: 10px;
            background: var(--bg-card); border: 1px solid var(--border);
            font-size: 1.1rem; font-weight: 700; color: var(--text-muted);
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; transition: all 0.15s;
        }
        .count-btn:hover { background: var(--accent-dim); border-color: var(--accent-border); color: var(--accent); }
        .count-btn:active { transform: scale(0.9); }
        #count-val, #vcount-val { font-family: 'JetBrains Mono', monospace; }

        /* ═══════════════════════════════════════════════
           GENERATE BUTTON
        ═══════════════════════════════════════════════ */
        .gen-btn {
            background: linear-gradient(135deg, #3ecf8e 0%, #65d69e 50%, #4ade80 100%);
            background-size: 200% 200%; animation: genGrad 5s ease infinite;
            transition: all 0.3s; position: relative; overflow: hidden; color: #072215;
        }
        @keyframes genGrad { 0%,100%{ background-position:0% 50%; } 50%{ background-position:100% 50%; } }
        .gen-btn::before {
            content: ''; position: absolute; inset: 0;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
            transform: translateX(-100%); transition: transform 0.6s;
        }
        .gen-btn:not(:disabled):hover::before { transform: translateX(100%); }
        .gen-btn:not(:disabled):hover {
            box-shadow: 0 20px 40px rgba(101,214,158,0.35), 0 0 0 1px rgba(255,255,255,0.1);
            transform: translateY(-2px);
        }
        .gen-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

        /* ═══════════════════════════════════════════════
           JOB CARDS
        ═══════════════════════════════════════════════ */
        .job-card {
            background: var(--bg-card); border: 1px solid var(--border);
            border-radius: 20px; overflow: hidden; margin-bottom: 14px;
            animation: cardIn 0.5s cubic-bezier(0.16,1,0.3,1) forwards;
        }
        @keyframes cardIn { from{ opacity:0; transform:translateY(16px) scale(0.98); } to{ opacity:1; transform:translateY(0) scale(1); } }
        .job-card.processing { border-color: rgba(101,214,158,0.2); background: rgba(101,214,158,0.03); }
        .job-card.done       { border-color: rgba(52,211,153,0.22); background: rgba(52,211,153,0.03); }
        .job-card.error      { border-color: rgba(248,113,113,0.22); background: rgba(248,113,113,0.03); }

        .shimmer-box {
            background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 100%);
            background-size: 200% 100%; animation: shimmer 1.8s ease-in-out infinite; border-radius: 12px;
        }
        @keyframes shimmer { 0%{ background-position:200% 0; } 100%{ background-position:-200% 0; } }

        .pulse-ring { position: relative; }
        .pulse-ring::before, .pulse-ring::after {
            content: ''; position: absolute; inset: -4px; border-radius: 50%;
            border: 1px solid rgba(101,214,158,0.5); animation: pulseRing 2s ease-out infinite;
        }
        .pulse-ring::after { animation-delay: 1s; }
        @keyframes pulseRing { 0%{ opacity:1; transform:scale(1); } 100%{ opacity:0; transform:scale(1.8); } }

        /* ═══════════════════════════════════════════════
           RESULT CARD
        ═══════════════════════════════════════════════ */
        .result-card {
            border-radius: 14px; overflow: hidden; border: 1px solid var(--border);
            transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
            background: var(--bg-card); position: relative;
        }
        .result-card:hover {
            transform: translateY(-4px) scale(1.01);
            border-color: var(--accent-border);
            box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 28px rgba(101,214,158,0.1);
        }
        .card-overlay {
            position: absolute; inset: 0;
            background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, transparent 60%);
            opacity: 0; transition: opacity 0.3s;
            display: flex; align-items: flex-end; justify-content: center; padding: 14px; gap: 8px;
        }
        .result-card:hover .card-overlay { opacity: 1; }

        /* ═══════════════════════════════════════════════
           CONTENT AREA
        ═══════════════════════════════════════════════ */
        .content-glass {
            background: rgba(9,9,18,0.6); border: 1px solid var(--border); backdrop-filter: blur(12px);
        }

        /* ═══════════════════════════════════════════════
           DROPZONE
        ═══════════════════════════════════════════════ */
        .dropzone {
            border: 1.5px dashed rgba(255,255,255,0.09); border-radius: 13px;
            background: var(--bg-card); transition: all 0.2s; cursor: pointer;
        }
        .dropzone:hover { border-color: var(--accent-border); background: var(--accent-dim); }
        .dropzone.has-file { border-color: var(--accent-border); background: var(--accent-dim); border-style: solid; }

        .frame-preview { position: relative; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1.5px solid var(--accent-border); }
        .frame-preview img { width: 100%; height: 100%; object-fit: cover; }
        .frame-preview .remove-btn { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; background: rgba(239,68,68,0.88); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.55rem; cursor: pointer; opacity: 0; transition: opacity 0.2s; }
        .frame-preview:hover .remove-btn { opacity: 1; }

        /* ═══════════════════════════════════════════════
           TOAST
        ═══════════════════════════════════════════════ */
        #toast {
            position: fixed; bottom: 30px; left: 50%;
            transform: translateX(-50%) translateY(100px);
            background: rgba(12,12,22,0.96); backdrop-filter: blur(20px);
            border: 1px solid var(--border-strong); color: white;
            padding: 12px 24px; border-radius: 99px; font-size: 0.86rem; font-weight: 600;
            z-index: 200000; transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s;
            opacity: 0; box-shadow: 0 20px 40px rgba(0,0,0,0.5);
        }
        #toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

        /* ═══════════════════════════════════════════════
           LIGHTBOX
        ═══════════════════════════════════════════════ */
        #lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.97); backdrop-filter: blur(20px); z-index: 300000; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; }
        #lightbox.show { display: flex; opacity: 1; }

        /* ═══════════════════════════════════════════════
           CREDITS BADGE
        ═══════════════════════════════════════════════ */
        .credits-badge {
            background: rgba(245,200,66,0.1); border: 1px solid rgba(245,200,66,0.22);
            color: var(--gold); border-radius: 99px; padding: 2px 10px;
            font-size: 0.66rem; font-weight: 800; font-family: 'JetBrains Mono', monospace;
        }

        /* ═══════════════════════════════════════════════
           AUTOCOMPLETE
        ═══════════════════════════════════════════════ */
        #autocomplete-menu { display: none; position: absolute; bottom: calc(100% + 5px); left: 10px; background: #111120; border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.6); z-index: 50; max-height: 200px; overflow-y: auto; width: max-content; min-width: 150px; }
        #autocomplete-menu.show { display: block; }
        .autocomplete-item { padding: 8px 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: background 0.2s; border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 0.82rem; }
        .autocomplete-item:last-child { border-bottom: none; }
        .autocomplete-item:hover { background: var(--accent-dim); color: var(--accent); }

        /* ═══════════════════════════════════════════════
           ANIMATIONS
        ═══════════════════════════════════════════════ */
        @keyframes spin { to{ transform:rotate(360deg); } }
        .spin { animation: spin 1s linear infinite; }
        @keyframes slideUp { from{ opacity:0; transform:translateY(20px); } to{ opacity:1; transform:translateY(0); } }
        .animate-slide-up { animation: slideUp 0.5s cubic-bezier(0.16,1,0.3,1) forwards; }
        @keyframes fadeInUp { from{ opacity:0; transform:translateY(12px) scale(0.96); } to{ opacity:1; transform:translateY(0) scale(1); } }
        .animate-fade-in { animation: fadeInUp 0.4s cubic-bezier(0.16,1,0.3,1) forwards; }
        @keyframes float { 0%,100%{ transform:translateY(0px); } 50%{ transform:translateY(-8px); } }
        .float { animation: float 4s ease-in-out infinite; }

        /* ═══════════════════════════════════════════════
           HISTORY
        ═══════════════════════════════════════════════ */
        .history-group { background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 16px; }

        /* ═══════════════════════════════════════════════
           THEME TOGGLE
        ═══════════════════════════════════════════════ */
        #theme-toggle {
            width: 38px; height: 38px; border-radius: 11px;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
            border: 1px solid var(--border); background: var(--bg-card);
            color: var(--text-muted); flex-shrink: 0; position: relative; overflow: hidden;
        }
        #theme-toggle:hover { background: var(--accent-dim); border-color: var(--accent-border); color: var(--accent); transform: scale(1.05); }
        #theme-toggle .icon-sun, #theme-toggle .icon-moon { transition: all 0.3s; position: absolute; }
        #theme-toggle .icon-sun  { opacity: 0; transform: rotate(90deg) scale(0.5); }
        #theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }

        /* ═══════════════════════════════════════════════
           VEO MODE TABS
        ═══════════════════════════════════════════════ */
        .veo-tab {
            padding: 7px 10px; border-radius: 9px; font-size: 0.7rem; font-weight: 700; cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16,1,0.3,1);
            display: flex; align-items: center; justify-content: center; gap: 5px;
            border: 1px solid transparent; background: none; color: var(--text-faint); line-height: 1;
        }
        .veo-tab.active { background: var(--indigo-dim); color: #c4b5fd; border-color: var(--indigo-border); box-shadow: 0 0 14px rgba(139,92,246,0.12); }
        .veo-tab:hover:not(.active) { color: var(--text-primary); background: rgba(255,255,255,0.05); }

        /* ═══════════════════════════════════════════════
           TOGGLE SWITCH
        ═══════════════════════════════════════════════ */
        .toggle-switch { position: relative; width: 42px; height: 24px; display: inline-block; flex-shrink: 0; }
        .toggle-switch input { display: none; }
        .toggle-slider { position: absolute; inset: 0; background: rgba(255,255,255,0.08); border-radius: 12px; cursor: pointer; transition: all 0.25s; border: 1px solid var(--border); }
        .toggle-slider:before { content: ''; position: absolute; width: 17px; height: 17px; border-radius: 50%; background: rgba(255,255,255,0.4); top: 2.5px; left: 3px; transition: all 0.25s cubic-bezier(0.16,1,0.3,1); }
        .toggle-switch input:checked + .toggle-slider { background: var(--accent-dim); border-color: var(--accent-border); }
        .toggle-switch input:checked + .toggle-slider:before { transform: translateX(18px); background: var(--accent); }

        /* ── Agent select options ── */
        .agent-styled-sel { color: #e8e8f4; }
        .agent-styled-sel option { background: #111120 !important; color: #e8e8f4 !important; padding: 8px; font-weight: 600; }
        .agent-styled-sel option:checked { background: rgba(101,214,158,0.15) !important; color: var(--accent) !important; }

        /* ── Agent storyboard scene cards ── */
        .agent-sb-card {
            padding: 11px 13px;
            border-radius: 12px;
            background: rgba(255,255,255,0.025);
            border: 1px solid rgba(255,255,255,0.06);
            transition: all 0.2s;
            text-align: left;
        }
        .agent-sb-card:hover {
            background: rgba(255,255,255,0.045);
            border-color: rgba(101,214,158,0.2);
        }
        .agent-sb-card .sb-head {
            display: flex; align-items: center; justify-content: space-between;
            gap: 8px;
            margin-bottom: 8px;
        }
        .agent-sb-card .sb-num {
            display: inline-flex; align-items: center; justify-content: center;
            width: 22px; height: 22px; border-radius: 6px;
            background: var(--accent-dim);
            color: var(--accent);
            font-size: 0.66rem; font-weight: 900;
            font-family: 'JetBrains Mono', monospace;
            flex-shrink: 0;
        }
        .agent-sb-card .sb-label {
            font-size: 0.78rem; font-weight: 700; color: white;
            flex: 1; min-width: 0;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        .agent-sb-card .sb-duration {
            font-size: 0.6rem; font-weight: 700;
            color: rgba(255,255,255,0.4);
            font-family: 'JetBrains Mono', monospace;
        }
        .agent-sb-card .sb-row {
            display: flex; gap: 8px; margin-top: 5px;
            font-size: 0.7rem; line-height: 1.4;
        }
        .agent-sb-card .sb-icon {
            flex-shrink: 0;
            width: 16px; height: 16px;
            display: flex; align-items: center; justify-content: center;
            color: rgba(255,255,255,0.35);
            font-size: 0.6rem;
            margin-top: 2px;
        }
        .agent-sb-card .sb-text {
            flex: 1; min-width: 0;
            color: rgba(255,255,255,0.55);
            word-wrap: break-word;
        }
        .agent-sb-card .sb-icon.img { color: rgba(245,200,66,0.6); }
        .agent-sb-card .sb-icon.vid { color: rgba(165,168,255,0.7); }

        /* ── Agent chat bubbles ── */
        .agent-chat-msg {
            max-width: 88%;
            padding: 8px 12px;
            border-radius: 14px;
            font-size: 0.8rem;
            line-height: 1.45;
            word-wrap: break-word;
            animation: fadeInUp 0.3s ease forwards;
        }
        .agent-chat-msg.user {
            align-self: flex-end;
            background: linear-gradient(135deg, rgba(101,214,158,0.18), rgba(74,222,128,0.12));
            border: 1px solid rgba(101,214,158,0.25);
            color: white;
            border-bottom-right-radius: 4px;
        }
        .agent-chat-msg.agent {
            align-self: flex-start;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            color: rgba(255,255,255,0.85);
            border-bottom-left-radius: 4px;
        }
        .agent-chat-msg.thinking {
            color: rgba(255,255,255,0.5);
            font-style: italic;
        }
        .agent-chat-msg.thinking .dots::after {
            content: '';
            animation: thinkDots 1.4s infinite;
        }
        @keyframes thinkDots {
            0%   { content: ''; }
            25%  { content: '.'; }
            50%  { content: '..'; }
            75%  { content: '...'; }
            100% { content: ''; }
        }

        /* ── Agent production scene flow (vertical, connected) ── */
        .agent-pp-scene {
            position: relative;
            display: flex;
            gap: 10px;
            padding: 10px 12px;
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 12px;
            margin-bottom: 12px;
            transition: all 0.3s;
        }
        .agent-pp-scene:not(:last-child)::after {
            content: '';
            position: absolute;
            left: 28px; bottom: -12px;
            width: 2px; height: 12px;
            background: linear-gradient(to bottom, var(--accent-border, rgba(101,214,158,0.4)), transparent);
        }
        .agent-pp-scene.processing {
            border-color: rgba(101,214,158,0.25);
            background: rgba(101,214,158,0.03);
            box-shadow: 0 0 18px rgba(101,214,158,0.06);
        }
        .agent-pp-scene.done {
            border-color: rgba(52,211,153,0.25);
        }
        .agent-pp-scene.error {
            border-color: rgba(248,113,113,0.3);
            background: rgba(248,113,113,0.04);
        }
        .agent-pp-scene .pp-num {
            flex-shrink: 0;
            width: 32px; height: 32px;
            border-radius: 8px;
            background: var(--accent-dim);
            color: var(--accent);
            display: flex; align-items: center; justify-content: center;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.76rem; font-weight: 900;
        }
        .agent-pp-scene.processing .pp-num {
            animation: ppPulse 1.6s ease-in-out infinite;
        }
        @keyframes ppPulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(101,214,158,0.5); }
            50%      { box-shadow: 0 0 0 8px rgba(101,214,158,0); }
        }
        .agent-pp-scene .pp-body {
            flex: 1;
            min-width: 0;
            display: flex; flex-direction: column; gap: 4px;
        }
        .agent-pp-scene .pp-label {
            font-size: 0.78rem; font-weight: 700; color: white;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        .agent-pp-scene .pp-status {
            font-size: 0.66rem; color: rgba(255,255,255,0.5);
            display: flex; align-items: center; gap: 5px;
        }
        .agent-pp-scene .pp-status i {
            font-size: 0.6rem;
        }
        .agent-pp-scene.processing .pp-status { color: var(--accent); }
        .agent-pp-scene.done .pp-status { color: #34d399; }
        .agent-pp-scene.error .pp-status { color: #fca5a5; }
        .agent-pp-scene .pp-preview {
            margin-top: 4px;
            display: flex; gap: 6px;
            align-items: flex-start;
        }
        .agent-pp-scene .pp-thumb {
            width: 64px; aspect-ratio: 9/16;
            border-radius: 8px;
            overflow: hidden;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.06);
            flex-shrink: 0;
            position: relative;
        }
        .agent-pp-scene .pp-thumb img,
        .agent-pp-scene .pp-thumb video {
            width: 100%; height: 100%; object-fit: cover;
            display: block;
        }
        .agent-pp-scene .pp-thumb.skeleton {
            background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 100%);
            background-size: 200% 100%;
            animation: shimmer 1.6s linear infinite;
        }
        .agent-pp-scene .pp-thumb-label {
            position: absolute; bottom: 3px; left: 3px;
            font-size: 0.52rem; font-weight: 800;
            padding: 1px 5px; border-radius: 99px;
            background: rgba(0,0,0,0.6); color: white;
            backdrop-filter: blur(4px);
        }

        /* ═══════════════════════════════════════════════
           AGENT TAB / MODAL
        ═══════════════════════════════════════════════ */
        .agent-tab.active { background: linear-gradient(135deg, rgba(99,102,241,0.22) 0%, rgba(236,72,153,0.22) 100%) !important; color: #f3a8ff !important; border-color: rgba(236,72,153,0.38) !important; box-shadow: 0 0 22px rgba(236,72,153,0.14) !important; }
        .agent-tab.active i { color: #ec4899 !important; }
        .agent-tab-pulse { position: absolute; top: 6px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: #ec4899; box-shadow: 0 0 8px #ec4899; animation: agentPulse 1.6s ease-in-out infinite; }
        @keyframes agentPulse { 0%,100%{ opacity:1; transform:scale(1); } 50%{ opacity:0.4; transform:scale(0.6); } }
        .mode-tab.agent-tab-soon { cursor: not-allowed !important; opacity: 0.5; pointer-events: none; }
        .agent-soon-badge { position: absolute; top: -7px; right: -6px; padding: 2px 6px; font-size: 0.5rem; font-weight: 900; letter-spacing: 0.08em; line-height: 1; color: white; background: linear-gradient(135deg, #ec4899, #f5c842); border: 1px solid rgba(255,255,255,0.18); border-radius: 99px; box-shadow: 0 3px 8px rgba(236,72,153,0.4); text-transform: uppercase; animation: agentSoonPulse 2s ease-in-out infinite; }
        @keyframes agentSoonPulse { 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.06); } }
        #agent-modal { position: fixed; inset: 0; z-index: 9998; display: none; background: rgba(4,4,10,0.82); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); opacity: 0; transition: opacity .35s cubic-bezier(0.16,1,0.3,1); }
        #agent-modal.show { display: flex; opacity: 1; }
        #agent-modal .agent-canvas { position: relative; width: 100%; height: 100%; overflow: hidden; display: flex; align-items: center; justify-content: center; }
        .agent-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 80%); animation: gridDrift 26s linear infinite; pointer-events: none; }
        @keyframes gridDrift { 0%{ background-position:0 0,0 0; } 100%{ background-position:44px 44px,44px 44px; } }
        .agent-grid-dots { position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(101,214,158,0.2) 1.2px, transparent 1.5px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.7) 10%, rgba(0,0,0,0) 65%); pointer-events: none; }
        .agent-orb { position: absolute; border-radius: 50%; filter: blur(110px); pointer-events: none; opacity: 0.5; }
        .agent-orb-a { width: 480px; height: 480px; background: radial-gradient(circle, rgba(101,214,158,0.5) 0%, transparent 70%); top: -120px; left: -80px; }
        .agent-orb-b { width: 420px; height: 420px; background: radial-gradient(circle, rgba(236,72,153,0.45) 0%, transparent 70%); bottom: -100px; right: -60px; }
        .agent-close { position: absolute; top: 22px; right: 22px; width: 42px; height: 42px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border-strong); color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; z-index: 10; }
        .agent-close:hover { background: rgba(255,255,255,0.1); color: #fff; transform: rotate(90deg); }
        .agent-header { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 99px; font-size: 0.7rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; backdrop-filter: blur(10px); z-index: 5; }
        .agent-header .badge { font-size: 0.58rem; padding: 3px 8px; border-radius: 99px; background: linear-gradient(135deg, var(--accent), #4ade80); color: #072215; font-weight: 900; }
        .agent-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
        .agent-line { fill: none; stroke: url(#agentLineGrad); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; filter: drop-shadow(0 0 4px rgba(101,214,158,0.5)); }
        .agent-line.drawn { animation: drawLine 1.1s cubic-bezier(0.65,0,0.35,1) forwards; }
        @keyframes drawLine { to{ stroke-dashoffset:0; } }
        .agent-line-pulse { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 8 1000; opacity: 0; }
        .agent-line-pulse.active { opacity: 1; animation: pulseAlong 2.4s linear infinite; }
        @keyframes pulseAlong { 0%{ stroke-dashoffset:1000; } 100%{ stroke-dashoffset:0; } }
        .agent-core { position: relative; z-index: 5; width: min(520px, 88vw); padding: 28px 28px 22px; background: rgba(12,12,22,0.9); border: 1px solid var(--border-strong); border-radius: 24px; box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8), 0 0 0 1px rgba(101,214,158,0.08); backdrop-filter: blur(20px); transform: translateY(20px) scale(0.96); opacity: 0; transition: all 0.45s cubic-bezier(0.16,1,0.3,1); }
        #agent-modal.show .agent-core { transform: translateY(0) scale(1); opacity: 1; }
        .agent-core-icon { width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg, #3ecf8e, #65d69e, #4ade80); background-size: 200% 200%; animation: genGrad 5s ease infinite; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: #072215; box-shadow: 0 12px 28px -8px rgba(101,214,158,0.4); margin: 0 auto 16px; }
        .agent-core h2 { text-align: center; font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 700; color: #fff; margin-bottom: 6px; letter-spacing: -0.01em; }
        .agent-core .sub { text-align: center; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 18px; }
        .agent-prompt-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; transition: all 0.25s; }
        .agent-prompt-wrap:focus-within { border-color: var(--accent-border); background: var(--accent-dim); }
        #agent-prompt-in { width: 100%; background: transparent; border: none; outline: none; resize: none; color: var(--text-primary); font-size: 0.92rem; font-weight: 500; font-family: 'Geist', 'Inter', sans-serif; padding: 14px 16px; line-height: 1.5; }
        #agent-prompt-in::placeholder { color: var(--text-faint); }
        .agent-launch-btn { margin-top: 14px; width: 100%; padding: 13px; border-radius: 14px; background: linear-gradient(135deg, #3ecf8e, #65d69e, #4ade80); background-size: 200% 200%; animation: genGrad 4s ease infinite; color: #072215; font-weight: 800; font-size: 0.88rem; border: none; cursor: pointer; transition: all 0.25s; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 14px 30px -10px rgba(101,214,158,0.4); }
        .agent-launch-btn:hover { transform: translateY(-1px); box-shadow: 0 18px 36px -10px rgba(101,214,158,0.55); }
        .agent-launch-btn:disabled { opacity: 0.55; cursor: not-allowed; }
        .agent-node { position: absolute; z-index: 3; width: 132px; background: rgba(12,12,22,0.9); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; backdrop-filter: blur(14px); box-shadow: 0 10px 26px -10px rgba(0,0,0,0.6); transform: scale(0.7); opacity: 0; transition: all 0.5s cubic-bezier(0.16,1,0.3,1); }
        .agent-node.appear { transform: scale(1); opacity: 1; }
        .agent-node.thinking { border-color: var(--accent-border); box-shadow: 0 0 22px rgba(101,214,158,0.2); }
        .agent-node.done     { border-color: rgba(52,211,153,0.4); box-shadow: 0 0 22px rgba(52,211,153,0.18); }
        .agent-node .scene-num { font-size: 0.58rem; font-weight: 800; color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 4px; display: flex; align-items: center; gap: 5px; }
        .agent-node .scene-num .dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(101,214,158,0.5); }
        .agent-node.thinking .scene-num .dot { background: var(--accent); animation: nodePulse 1.4s ease-in-out infinite; }
        .agent-node.done .scene-num { color: rgba(110,231,183,0.95); }
        .agent-node.done .scene-num .dot { background: #34d399; animation: none; }
        @keyframes nodePulse { 0%,100%{ opacity:1; transform:scale(1); } 50%{ opacity:0.5; transform:scale(0.7); } }
        .agent-node .scene-label { font-size: 0.72rem; font-weight: 600; color: var(--text-primary); line-height: 1.35; min-height: 28px; }
        .agent-node .scene-skeleton { height: 10px; border-radius: 4px; background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.04) 100%); background-size: 200% 100%; animation: shimmerSlide 1.4s linear infinite; margin-top: 4px; }
        .agent-node .scene-skeleton.short { width: 60%; }
        @keyframes shimmerSlide { 0%{ background-position:-200% 0; } 100%{ background-position:200% 0; } }
        .agent-footer { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 14px; align-items: center; font-size: 0.7rem; color: var(--text-faint); z-index: 5; }
        .agent-footer kbd { padding: 3px 8px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; font-family: 'JetBrains Mono', monospace; font-size: 0.62rem; font-weight: 700; color: var(--text-muted); }

        /* ═══════════════════════════════════════════════
           SUPPORT PILL
        ═══════════════════════════════════════════════ */
        .support-pill { background: rgba(9,9,18,0.92); backdrop-filter: blur(20px); border: 1px solid var(--border); }

        /* ═══════════════════════════════════════════════
           CHIP BAR — Higgsfield-style settings row
        ═══════════════════════════════════════════════ */
        .chip-bar {
            display: flex !important;
            gap: 8px;
            padding: 0;
            background: transparent;
            border: none;
            overflow: visible;
        }
        /* .chip-btn = WRAPPER (div) — relative positioning context for popover */
        .chip-btn {
            position: relative;
            flex: 1 1 0;
            min-width: 0;
            overflow: visible;
        }
        /* ratio chip: center popover under/over chip */
        .chip-btn[data-chip="ratio-image"] .chip-pop,
        .chip-btn[data-chip="ratio-video"] .chip-pop {
            left: 50%;
            transform: translateX(-50%) translateY(4px);
        }
        .chip-btn[data-chip="ratio-image"].chip-open .chip-pop,
        .chip-btn[data-chip="ratio-video"].chip-open .chip-pop {
            transform: translateX(-50%) translateY(0);
        }
        /* quality chip: align popover to right edge */
        .chip-btn[data-chip="quality"] .chip-pop {
            left: auto;
            right: 0;
        }
        .chip-btn.chip-disabled { display: none !important; }

        /* .chip-trigger = actual clickable button */
        .chip-trigger {
            display: flex !important;
            align-items: center; justify-content: center;
            gap: 7px;
            width: 100%;
            height: 40px;
            padding: 0 10px;
            border-radius: 10px;
            background: rgba(255,255,255,0.04);
            border: 1px solid transparent;
            color: var(--text-primary);
            font-size: 0.78rem; font-weight: 600;
            cursor: pointer;
            transition: background 0.2s ease, border-color 0.2s ease;
            font-family: 'Geist','Inter',sans-serif;
            line-height: 1;
            white-space: nowrap;
            outline: none;
        }
        .chip-trigger:hover { background: rgba(255,255,255,0.08); }
        .chip-btn.chip-open .chip-trigger {
            background: rgba(101,214,158,0.1);
            border-color: var(--accent-border);
        }
        .chip-trigger .chip-icon {
            font-size: 0.82rem; flex-shrink: 0;
            color: var(--text-primary);
        }
        .chip-trigger .chip-val {
            font-size: 0.78rem; font-weight: 600;
            color: var(--text-primary);
            text-overflow: ellipsis; overflow: hidden; max-width: 100%;
        }

        /* Popover — absolute positioning relative to .chip-btn (already position:relative) */
        .chip-pop {
            position: absolute;
            bottom: calc(100% + 8px);
            left: 0;
            min-width: 160px;
            padding: 6px;
            display: flex !important;
            flex-direction: column !important;
            background: rgba(15,15,26,0.97);
            backdrop-filter: blur(24px);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 14px;
            box-shadow: 0 20px 50px -10px rgba(0,0,0,0.7), 0 8px 22px -6px rgba(0,0,0,0.5);
            opacity: 0; pointer-events: none;
            transform: translateY(4px);
            transition: opacity 0.15s ease, transform 0.18s cubic-bezier(0.16,1,0.3,1);
            z-index: 9999;
            visibility: hidden;
        }
        .chip-btn.chip-open .chip-pop {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
            visibility: visible;
        }
        .chip-pop-arrow {
            position: absolute;
            bottom: -5px; left: 50%; transform: translateX(-50%) rotate(45deg);
            width: 10px; height: 10px;
            background: rgba(15,15,26,0.97);
            border-right: 1px solid rgba(255,255,255,0.08);
            border-bottom: 1px solid rgba(255,255,255,0.08);
        }
        .chip-pop-item {
            display: flex !important;
            align-items: center; justify-content: space-between;
            gap: 10px;
            width: 100%;
            padding: 10px 11px;
            border-radius: 9px;
            font-size: 0.8rem; font-weight: 500;
            color: var(--text-primary);
            cursor: pointer;
            transition: background 0.12s ease;
            font-family: 'Geist','Inter',sans-serif;
            line-height: 1.1;
            text-align: left;
            background: transparent; border: none;
        }
        .chip-pop-item:hover { background: rgba(255,255,255,0.06); }
        .chip-pop-item.chip-pop-active {
            background: rgba(101,214,158,0.12);
            color: var(--accent);
        }
        .chip-pop-item .ci-glyph {
            display: flex; align-items: center; gap: 9px;
            font-size: 0.8rem;
        }
        .chip-pop-item .ci-glyph .ci-box {
            border: 1.5px solid currentColor; border-radius: 2px; opacity: 0.55;
            flex-shrink: 0;
        }
        .chip-pop-item .ci-check {
            font-size: 0.7rem; color: var(--accent);
            opacity: 0;
        }
        .chip-pop-item.chip-pop-active .ci-check { opacity: 1; }
        .chip-pop-title {
            font-size: 0.56rem; font-weight: 800;
            letter-spacing: 0.16em; text-transform: uppercase;
            color: var(--text-faint);
            padding: 6px 11px 8px;
        }

        /* ═══════════════════════════════════════════════
           VARIANT PILLS (legacy — kept for back-compat) hidden when chip bar active
        ═══════════════════════════════════════════════ */
        .variant-label {
            display: flex; align-items: center; justify-content: space-between;
            font-size: 0.6rem; font-weight: 800;
            letter-spacing: 0.12em; text-transform: uppercase;
            color: var(--text-faint);
            margin-bottom: 7px; padding: 0 2px;
        }
        .variant-hint {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.58rem; font-weight: 700;
            letter-spacing: 0.04em; color: var(--text-muted);
            text-transform: none;
        }
        .variant-row {
            display: flex; gap: 5px;
            padding: 4px; border-radius: 12px;
            background: var(--bg-card); border: 1px solid var(--border);
        }
        .variant-pill {
            flex: 1; padding: 9px 10px; border-radius: 8px;
            font-size: 0.74rem; font-weight: 700; letter-spacing: -0.005em;
            color: var(--text-muted); cursor: pointer;
            background: transparent; border: 1px solid transparent;
            transition: all 0.2s cubic-bezier(0.16,1,0.3,1);
            text-align: center; line-height: 1;
            font-family: 'Geist', 'Inter', sans-serif;
        }
        .variant-pill:hover:not(.active) {
            color: var(--text-primary); background: rgba(255,255,255,0.04);
        }
        .variant-pill.active {
            color: var(--accent);
            background: var(--accent-dim);
            border-color: var(--accent-border);
            box-shadow: 0 0 14px -4px rgba(101,214,158,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
        }

        /* ═══════════════════════════════════════════════
           STUDIO TABS (top of content area: History | How it works)
        ═══════════════════════════════════════════════ */
        .studio-tabs-wrap {
            display: flex; align-items: center; gap: 4px;
            padding: 5px; border-radius: 14px;
            background: rgba(255,255,255,0.025);
            border: 1px solid var(--border);
            backdrop-filter: blur(8px);
            width: fit-content;
        }
        .studio-tab {
            display: inline-flex; align-items: center; gap: 8px;
            padding: 9px 18px; border-radius: 10px;
            font-size: 0.78rem; font-weight: 700; letter-spacing: -0.005em;
            color: var(--text-faint); cursor: pointer;
            background: transparent; border: 1px solid transparent;
            transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
            position: relative; line-height: 1;
        }
        .studio-tab i { font-size: 0.72rem; opacity: 0.85; }
        .studio-tab:hover:not(.active) { color: var(--text-primary); background: rgba(255,255,255,0.04); }
        .studio-tab.active {
            background: rgba(255,255,255,0.07);
            border-color: rgba(255,255,255,0.1);
            color: var(--text-primary);
            box-shadow: 0 4px 16px -8px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
        }
        .studio-tab.active i { color: var(--accent); opacity: 1; }

        /* ═══════════════════════════════════════════════
           HOW IT WORKS — Premium 3-step panel
        ═══════════════════════════════════════════════ */
        .howto-panel {
            position: relative;
            border-radius: 24px;
            background: linear-gradient(180deg, rgba(255,255,255,0.022) 0%, rgba(255,255,255,0.008) 100%);
            border: 1px solid var(--border);
            padding: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 2.75rem) clamp(2.25rem, 4vw, 3rem);
            overflow: hidden;
            backdrop-filter: blur(6px);
        }
        .howto-panel::before {
            content: ''; position: absolute; inset: 0;
            background:
                radial-gradient(circle at 18% 12%, rgba(101,214,158,0.06), transparent 38%),
                radial-gradient(circle at 82% 88%, rgba(99,102,241,0.05), transparent 42%);
            pointer-events: none;
        }
        .howto-panel > * { position: relative; z-index: 1; }

        .howto-header { margin-bottom: 2.5rem; }
        .howto-eyebrow {
            display: inline-flex; align-items: center; gap: 8px;
            padding: 5px 11px; border-radius: 99px;
            font-size: 0.58rem; font-weight: 900;
            letter-spacing: 0.18em; text-transform: uppercase;
            color: var(--accent);
            background: var(--accent-dim);
            border: 1px solid var(--accent-border);
            margin-bottom: 1.1rem;
        }
        .howto-eyebrow .dot {
            width: 6px; height: 6px; border-radius: 50%;
            background: var(--accent); box-shadow: 0 0 8px var(--accent);
        }
        .howto-title {
            font-family: 'Fraunces', serif;
            font-size: clamp(1.85rem, 3.5vw, 2.85rem);
            font-weight: 900; line-height: 1.0;
            letter-spacing: -0.035em;
            color: var(--text-primary);
            margin-bottom: 0.7rem;
        }
        .howto-title em {
            font-style: normal;
            background: linear-gradient(120deg, var(--accent) 0%, #4ade80 55%, #60a5fa 100%);
            -webkit-background-clip: text; -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .howto-sub {
            font-size: 0.88rem; line-height: 1.55;
            color: var(--text-muted);
            max-width: 600px;
        }

        .howto-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.25rem;
        }
        .howto-grid.howto-grid-2 {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            max-width: 720px;
            margin: 0 auto;
        }
        .howto-step {
            position: relative;
            border-radius: 18px;
            background: transparent;
            border: none;
            padding: 0 0 0.5rem;
            transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
            overflow: visible;
        }
        .howto-step:hover { transform: translateY(-3px); }
        .howto-step-visual {
            position: relative;
            aspect-ratio: 4/3;
            border-radius: 13px;
            background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.015) 100%);
            border: 1px solid var(--border);
            margin-bottom: 1rem;
            overflow: hidden;
            display: flex; align-items: center; justify-content: center;
        }
        .howto-step-visual::after {
            content: ''; position: absolute; inset: 0;
            background-image: radial-gradient(circle, rgba(101,214,158,0.05) 1px, transparent 1px);
            background-size: 16px 16px;
            -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6), transparent 70%);
            mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6), transparent 70%);
            pointer-events: none;
        }
        /* Media (img / video) umple slotul — contain ca să se vadă complet */
        .howto-step-media {
            position: absolute; inset: 0;
            width: 100%; height: 100%;
            object-fit: contain;
            z-index: 1;
            border-radius: inherit;
        }
        /* Dacă există media în slot: ascunde icon fallback, dot-grid, border și background */
        .howto-step-visual:has(.howto-step-media) .howto-step-icon-fallback { display: none; }
        .howto-step-visual:has(.howto-step-media)::after { opacity: 0; }
        .howto-step-visual:has(.howto-step-media) {
            border: none;
            background: transparent;
        }
        /* Subtilă vignettă în jurul badge-ului 01/02 când există media */
        .howto-step-visual:has(.howto-step-media) .howto-step-num {
            box-shadow: 0 4px 14px rgba(0,0,0,0.5);
        }
        .howto-step-num {
            position: absolute; top: 12px; left: 12px;
            z-index: 2;
            width: 26px; height: 26px; border-radius: 8px;
            display: flex; align-items: center; justify-content: center;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem; font-weight: 800;
            background: rgba(9,9,18,0.85); backdrop-filter: blur(8px);
            border: 1px solid var(--border-strong);
            color: var(--text-primary);
        }
        .howto-step-icon {
            position: relative; z-index: 1;
            width: 58px; height: 58px; border-radius: 16px;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.5rem;
            background: linear-gradient(135deg, var(--accent-dim) 0%, rgba(101,214,158,0.04) 100%);
            border: 1px solid var(--accent-border);
            color: var(--accent);
            box-shadow: 0 8px 30px -10px rgba(101,214,158,0.4);
        }
        .howto-step:nth-child(2) .howto-step-icon {
            background: linear-gradient(135deg, rgba(99,102,241,0.15) 0%, rgba(99,102,241,0.04) 100%);
            border-color: var(--indigo-border); color: #a5a8ff;
            box-shadow: 0 8px 30px -10px rgba(99,102,241,0.4);
        }
        .howto-step:nth-child(3) .howto-step-icon {
            background: linear-gradient(135deg, rgba(245,200,66,0.15) 0%, rgba(245,200,66,0.04) 100%);
            border-color: rgba(245,200,66,0.3); color: var(--gold);
            box-shadow: 0 8px 30px -10px rgba(245,200,66,0.4);
        }
        .howto-step-title {
            font-size: 0.88rem; font-weight: 800; letter-spacing: -0.01em;
            color: var(--text-primary); margin-bottom: 0.35rem;
            display: flex; align-items: center; gap: 8px;
        }
        .howto-step-kind {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.54rem; font-weight: 800; letter-spacing: 0.12em;
            text-transform: uppercase;
            padding: 3px 7px; border-radius: 5px;
        }
        .howto-step-kind.kind-image { color: var(--accent); background: var(--accent-dim); border: 1px solid var(--accent-border); }
        .howto-step-kind.kind-preset { color: #a5a8ff; background: var(--indigo-dim); border: 1px solid var(--indigo-border); }
        .howto-step-kind.kind-video { color: var(--gold); background: rgba(245,200,66,0.1); border: 1px solid rgba(245,200,66,0.3); }
        .howto-step-desc {
            font-size: 0.75rem; line-height: 1.55;
            color: var(--text-muted);
        }
        .howto-arrow {
            position: absolute; top: 50%; transform: translateY(-50%);
            right: -16px; z-index: 3;
            width: 28px; height: 28px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            background: var(--bg-elevated);
            border: 1px solid var(--border-strong);
            color: var(--text-faint);
            font-size: 0.6rem;
        }

        .howto-footer {
            margin-top: 2.25rem; padding-top: 1.75rem;
            border-top: 1px solid var(--border);
            display: flex; align-items: center; justify-content: space-between;
            gap: 1rem; flex-wrap: wrap;
        }
        .howto-stats {
            display: flex; align-items: center; gap: 1.4rem;
        }
        .howto-stat-val {
            font-family: 'JetBrains Mono', monospace;
            font-size: 1.15rem; font-weight: 900;
            color: var(--text-primary); line-height: 1;
            letter-spacing: -0.025em;
        }
        .howto-stat-lbl {
            font-size: 0.55rem; font-weight: 800;
            color: var(--text-faint);
            text-transform: uppercase; letter-spacing: 0.14em;
            margin-top: 4px;
        }
        .howto-stat-sep { width: 1px; height: 28px; background: var(--border); }

        @media (max-width: 900px) {
            .howto-grid { grid-template-columns: 1fr; }
            .howto-arrow { display: none; }
            .howto-stats { gap: 1rem; }
            .howto-footer { flex-direction: column; align-items: flex-start; }
        }

        /* ═══════════════════════════════════════════════
           MODE TABS — Premium underline style override
        ═══════════════════════════════════════════════ */
        .mode-tab {
            position: relative;
            background: transparent !important;
            border: none !important;
            border-radius: 0;
            padding: 11px 6px 13px;
            color: var(--text-faint);
            box-shadow: none !important;
            transition: color 0.2s ease;
        }
        .mode-tab::after {
            content: ''; position: absolute;
            left: 50%; bottom: 0;
            width: 0; height: 2px;
            background: var(--accent);
            transform: translateX(-50%);
            transition: width 0.3s cubic-bezier(0.16,1,0.3,1);
            border-radius: 2px;
            box-shadow: 0 0 12px var(--accent);
        }
        .mode-tab:not(.active):hover { color: var(--text-primary); background: transparent !important; }
        .mode-tab.active {
            background: transparent !important;
            color: var(--text-primary) !important;
            font-weight: 800;
        }
        .mode-tab.active::after { width: calc(100% - 14px); }
        #tab-video.active {
            background: transparent !important;
            color: var(--text-primary) !important;
        }
        #tab-video.active::after { background: #a5a8ff; box-shadow: 0 0 12px #a5a8ff; }

        /* container wrapper for new look — premium underline bar */
        .mode-tabs-bar {
            display: flex; gap: 8px;
            background: transparent !important;
            border: none !important;
            border-bottom: 1px solid var(--border) !important;
            padding: 0 !important;
            border-radius: 0 !important;
        }

        /* ═══════════════════════════════════════════════
           LIGHT THEME
        ═══════════════════════════════════════════════ */
        html.light {
            --bg-base:#f0f0f8; --bg-elevated:#ffffff; --bg-card:rgba(0,0,0,0.04);
            --bg-card-hover:rgba(0,0,0,0.07); --border:rgba(0,0,0,0.08);
            --border-strong:rgba(0,0,0,0.13); --text-primary:#1a1a2e;
            --text-muted:rgba(0,0,0,0.5); --text-faint:rgba(0,0,0,0.3);
            --indigo-dim:rgba(79,70,229,0.1); --indigo-border:rgba(79,70,229,0.3);
            --accent:#1a9e5c; --accent-dim:rgba(26,158,92,0.1); --accent-border:rgba(26,158,92,0.3);
            --gold:#b8860b; --red:#dc2626;
        }
        html.light body { background: #f0f0f8; color: #1a1a2e; }
        html.light body::before { opacity: 0.15; }
        html.light .orb-1 { background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%); }
        html.light .orb-2 { background: radial-gradient(circle, rgba(45,170,100,0.1) 0%, transparent 70%); }
        html.light .nav-glass { background: rgba(255,255,255,0.88); border-color: rgba(0,0,0,0.07); }
        html.light .sidebar-glass { background: rgba(255,255,255,0.96); }
        html.light .content-glass { background: rgba(255,255,255,0.65); }
        html.light .styled-select { background: rgba(255,255,255,0.88); color: #1a1a2e; }
        html.light .styled-select option, html.light .styled-select optgroup { background: #fff; }
        html.light .job-card { background: rgba(255,255,255,0.55); }
        html.light .history-group { background: rgba(255,255,255,0.45); }
        html.light .support-pill { background: rgba(255,255,255,0.9); }
        html.light #toast { background: rgba(0,0,0,0.88); }
        html.light #login-modal { background: rgba(240,240,248,0.88); }
        html.light .modal-content { background: linear-gradient(145deg,#fff 0%,#f5f5ff 100%); }
        html.light .modal-content h2, html.light .modal-content .text-white { color: #1a1a2e !important; }
        html.light #theme-toggle .icon-sun  { opacity: 1; transform: rotate(0deg) scale(1); }
        html.light #theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
        html.light #agent-modal { background: rgba(245,245,255,0.78); }
        html.light .agent-core { background: rgba(255,255,255,0.96); }
        html.light .agent-core h2, html.light .agent-node .scene-label { color: #1a1a2e; }
        html.light .agent-node { background: rgba(255,255,255,0.96); }
        html.light .agent-header { background: rgba(255,255,255,0.78); color: rgba(0,0,0,0.55); }
        html.light #char-count { color: rgba(0,0,0,0.3) !important; }
        html.light #count-val, html.light #vcount-val { color: #1a1a2e !important; }
        html.light #gen-bar { background: rgba(245,245,255,0.97) !important; border-top-color: rgba(0,0,0,0.07) !important; }
        html.light #st-empty h2 { color: #1a1a2e !important; }
        html.light #mobile-settings-btn { background: var(--accent) !important; color: #072215 !important; border-color: var(--accent) !important; }
        html.light .toggle-slider { background: rgba(0,0,0,0.1); border-color: rgba(0,0,0,0.12); }
        html.light .toggle-slider:before { background: rgba(0,0,0,0.4); }
        html.light .veo-tab { color: rgba(0,0,0,0.35); }
        html.light .veo-tab.active { background: rgba(109,40,217,0.12); color: #6d28d9; border-color: rgba(109,40,217,0.3); }
        html.light .job-close-btn { background: rgba(0,0,0,0.06) !important; border-color: rgba(0,0,0,0.1) !important; color: rgba(0,0,0,0.45) !important; }
        html.light .dropzone { border-color: rgba(0,0,0,0.1); background: rgba(0,0,0,0.02); }
        html.light #autocomplete-menu { background: #fff; border-color: rgba(0,0,0,0.1); }
        html.light .autocomplete-item { color: rgba(0,0,0,0.7); border-bottom-color: rgba(0,0,0,0.05); }
        html.light .mode-tab.agent-tab-soon { opacity: 0.5; }
        html.light .mic-tag-muted  { background: rgba(0,0,0,0.04); color: rgba(0,0,0,0.5); }
        html.light .mic-tag-accent { background: rgba(26,158,92,0.1); color: #1a9e5c; border-color: rgba(26,158,92,0.3); }
        html.light .mic-tag-gold   { background: rgba(184,134,11,0.1); color: #b8860b; border-color: rgba(184,134,11,0.28); }
        html.light .mic-tag-red    { background: rgba(220,38,38,0.08); color: #dc2626; border-color: rgba(220,38,38,0.22); }
        html.light .mic-tag-indigo { background: rgba(79,70,229,0.1); color: #4f46e5; border-color: rgba(79,70,229,0.3); }
        html.light .mic-tag-violet { background: rgba(124,58,237,0.1); color: #7c3aed; border-color: rgba(124,58,237,0.28); }
        html.light #model-info-card { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }
        html.light .mic-name  { color: #1a1a2e; }
        html.light .mic-desc  { color: rgba(0,0,0,0.55); }
        html.light #sidebar-settings .text-white { color: #1a1a2e !important; }

        /* — Support pill: fix text-white pe fundal alb — */
        html.light #support-buttons .support-pill { background: rgba(255,255,255,0.96); border-color: rgba(0,0,0,0.09); box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
        html.light #support-buttons [class*="text-white"] { color: #1a1a2e !important; }
        html.light #support-buttons .text-red-400 { color: #dc2626 !important; }
        html.light #support-buttons [style*="color:var(--text-faint)"] { color: rgba(0,0,0,0.4) !important; }

        /* — Empty state pe light — */
        html.light #st-empty [style*="color:var(--text-primary)"] { color: #1a1a2e; }
        html.light #st-empty [style*="color:var(--text-faint)"]    { color: rgba(0,0,0,0.38); }
        html.light #st-empty [style*="background:radial-gradient(circle,rgba(101,214,158"] { opacity: 0.5; }

        /* — Mode tab active pe light — */
        html.light .mode-tab.active { color: #1a9e5c; }
        html.light #tab-video.active { color: #4f46e5; }

        /* — Prompt area pe light — */
        html.light .prompt-wrap { background: rgba(255,255,255,0.9); border-color: rgba(0,0,0,0.1); }
        html.light .prompt-wrap:focus-within { border-color: rgba(26,158,92,0.4); background: rgba(26,158,92,0.04); }

        /* — Count buttons pe light — */
        html.light .count-btn { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); color: rgba(0,0,0,0.5); }
        html.light .count-btn:hover { background: rgba(26,158,92,0.12); border-color: rgba(26,158,92,0.3); color: #1a9e5c; }

        /* — Gen bar pe light — */
        html.light .gen-btn > span:last-child { background: rgba(255,255,255,0.25) !important; border-color: rgba(255,255,255,0.3) !important; }

        /* — Veo upscale pe light — */
        html.light .toggle-switch input:checked + .toggle-slider { background: rgba(26,158,92,0.15); border-color: rgba(26,158,92,0.35); }

        /* ═══════════════════════════════════════════════
           MOBILE
        ═══════════════════════════════════════════════ */
        @media (max-width: 720px) {
            .agent-node { width: 108px; padding: 8px 10px; }
            .agent-node .scene-label { font-size: 0.66rem; }
            .agent-core { width: 92vw; padding: 22px 20px 18px; }
        }

        /* ═══════════════════════════════════════════════
           ✦ ANIMAȚII ULTRA-MODERNE
        ═══════════════════════════════════════════════ */

        /* — Sidebar glass shimmer pe hover — */
        .sidebar-glass {
            position: relative;
        }
        .sidebar-glass::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: linear-gradient(135deg, rgba(101,214,158,0.03) 0%, transparent 50%, rgba(99,102,241,0.03) 100%);
            pointer-events: none;
            z-index: 0;
        }

        /* — Panel hover highlight — */
        .panel-s {
            position: relative;
            transition: background 0.2s;
        }
        .panel-s:hover {
            background: rgba(101,214,158,0.015);
        }

        /* — Mode tabs: slide indicator — */
        .mode-tabs-wrap {
            position: relative;
        }

        /* — Buton Generate: glow pulse când e activ — */
        .gen-btn:not(:disabled) {
            box-shadow: 0 0 0 0 rgba(101,214,158,0);
            animation: genGrad 5s ease infinite, genGlow 3s ease-in-out infinite;
        }
        @keyframes genGlow {
            0%, 100% { box-shadow: 0 4px 20px rgba(101,214,158,0.2); }
            50%       { box-shadow: 0 4px 32px rgba(101,214,158,0.42); }
        }

        /* — Result cards: entrance stagger — */
        .result-card {
            animation: resultIn 0.45s cubic-bezier(0.16,1,0.3,1) both;
        }
        @keyframes resultIn {
            from { opacity:0; transform: translateY(10px) scale(0.97); }
            to   { opacity:1; transform: translateY(0) scale(1); }
        }

        /* — Model info card: fade slide-in la schimbare — */
        #model-info-card {
            animation: micIn 0.3s cubic-bezier(0.16,1,0.3,1);
        }
        @keyframes micIn {
            from { opacity:0.4; transform: translateY(6px); }
            to   { opacity:1;   transform: translateY(0); }
        }
        .mic-swap {
            animation: micIn 0.28s cubic-bezier(0.16,1,0.3,1);
        }

        /* — Tags bounce-in — */
        .mic-tag {
            animation: tagIn 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
        }
        .mic-tag:nth-child(1) { animation-delay: 0.05s; }
        .mic-tag:nth-child(2) { animation-delay: 0.12s; }
        .mic-tag:nth-child(3) { animation-delay: 0.19s; }
        @keyframes tagIn {
            from { opacity:0; transform: scale(0.7) translateY(4px); }
            to   { opacity:1; transform: scale(1) translateY(0); }
        }

        /* — Accent glow pe focus textarea — */
        .prompt-wrap:focus-within::before {
            content: '';
            position: absolute;
            inset: -1px;
            border-radius: 14px;
            background: transparent;
            animation: promptGlow 2s ease-in-out infinite;
            pointer-events: none;
            z-index: -1;
        }
        @keyframes promptGlow {
            0%, 100% { box-shadow: 0 0 0 3px rgba(101,214,158,0.06); }
            50%       { box-shadow: 0 0 0 5px rgba(101,214,158,0.14); }
        }

        /* — Cost badge: count-up shimmer — */
        #total-cost {
            transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
            display: inline-block;
        }
        .cost-pop {
            animation: costPop 0.4s cubic-bezier(0.34,1.56,0.64,1);
        }
        @keyframes costPop {
            0%  { transform: scale(1); }
            50% { transform: scale(1.35); color: var(--accent); }
            100%{ transform: scale(1); }
        }

        /* — Ratio pill check-in — */
        .ratio-pill input:checked + span {
            animation: pillCheck 0.3s cubic-bezier(0.34,1.56,0.64,1);
        }
        @keyframes pillCheck {
            0%  { transform: scale(0.88); }
            60% { transform: scale(1.08); }
            100%{ transform: scale(1); }
        }

        /* — Dropzone pulse când dragover — */
        .dropzone.drag-over {
            border-color: var(--accent) !important;
            background: rgba(101,214,158,0.1) !important;
            animation: dropPulse 0.8s ease-in-out infinite;
        }
        @keyframes dropPulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(101,214,158,0); }
            50%       { box-shadow: 0 0 0 6px rgba(101,214,158,0.12); }
        }

        /* — Mode tab transition — */
        .mode-tab {
            transition: all 0.22s cubic-bezier(0.16,1,0.3,1);
        }
        .mode-tab.active {
            animation: tabActive 0.3s cubic-bezier(0.34,1.56,0.64,1);
        }
        @keyframes tabActive {
            0%  { transform: scale(0.94); }
            60% { transform: scale(1.03); }
            100%{ transform: scale(1); }
        }

        /* — History group: fade-in on load — */
        .history-group {
            animation: histIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
        }
        @keyframes histIn {
            from { opacity:0; transform: translateY(8px); }
            to   { opacity:1; transform: translateY(0); }
        }

        /* — Sidebar scrollbar accent — */
        .sidebar-glass ::-webkit-scrollbar-thumb {
            background: rgba(101,214,158,0.18);
        }
        .sidebar-glass ::-webkit-scrollbar-thumb:hover {
            background: rgba(101,214,158,0.35);
        }

        /* — Count btn micro-bounce — */
        .count-btn:active {
            animation: btnPress 0.18s cubic-bezier(0.34,1.56,0.64,1);
        }
        @keyframes btnPress {
            0%  { transform: scale(0.82); }
            100%{ transform: scale(1); }
        }

        /* — Empty state: dots float animation — */
        @keyframes dotsFloat {
            0%, 100% { transform: translateY(0px);   opacity: 1;    }
            50%       { transform: translateY(-8px);  opacity: 0.75; }
        }
        /* — Empty state heading: gradient shimmer loop — */
        #st-empty [style*="background:linear-gradient(120deg"] {
            animation: gradShimmer 5s ease-in-out infinite;
            background-size: 200% 100%;
        }
        @keyframes gradShimmer {
            0%, 100% { background-position: 0% 50%; }
            50%       { background-position: 100% 50%; }
        }

        /* — Accent scanning line pe sidebar la hover — */
        @keyframes scanLine {
            0%   { transform: translateY(-100%); opacity:0; }
            10%  { opacity: 0.6; }
            90%  { opacity: 0.6; }
            100% { transform: translateY(100vh); opacity:0; }
        }

        /* — Job card processing: border trace — */
        .job-card.processing::before {
            content: '';
            position: absolute;
            inset: -1px;
            border-radius: 20px;
            background: conic-gradient(from var(--_a, 0deg), transparent 60%, var(--accent) 100%);
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            padding: 1px;
            animation: borderTrace 2.5s linear infinite;
        }
        @property --_a { syntax:'<angle>'; initial-value:0deg; inherits:false; }
        @keyframes borderTrace { to { --_a: 360deg; } }

        /* — Gen bar accent line top — */
        #gen-bar {
            position: relative;
        }
        #gen-bar::before {
            content: '';
            position: absolute;
            top: 0; left: 20%; right: 20%;
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--accent-border), transparent);
        }

        /* — Smooth fade pentru model info card la swap — */
        @keyframes micFadeSwap {
            0%  { opacity:0; transform: scale(0.97) translateY(4px); }
            100%{ opacity:1; transform: scale(1) translateY(0); }
        }
