/* Shared original Samurai theme, extracted unchanged from index.php. */
:root {
            --bg-base: #050505; --surface: #121212; --surface-hover: #1a1a1a; --border: #262626;
            --primary: #e50914; --primary-hover: #f40612; --text-main: #f5f5f5; --text-muted: #888888;
            --success: #10b981; --radius-md: 12px; --radius-lg: 20px;
            --shadow-glow: 0 0 20px rgba(229, 9, 20, 0.2); --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            --surface-2: #171717; --radius-sm: 8px; --radius-xl: 28px;
            --ease: cubic-bezier(0.4, 0, 0.2, 1);
            --font-mono: 'JetBrains Mono', 'Courier New', monospace;
        }
        * { box-sizing: border-box; }
        html { scroll-behavior: smooth; }
        body {
            font-family: 'Inter', sans-serif; background-color: var(--bg-base);
            background-image:
                radial-gradient(circle at 50% -10%, rgba(229, 9, 20, 0.14) 0%, rgba(229,9,20,0) 45%),
                radial-gradient(circle at 90% 100%, rgba(229, 9, 20, 0.05) 0%, rgba(0,0,0,0) 40%);
            color: var(--text-main); margin: 0; min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-start;
            align-items: center; padding: 40px 20px; position: relative;
        }
        body::after {
            content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 999; opacity: 0.035;
            mix-blend-mode: overlay;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
        }
        .container { width: 100%; max-width: 800px; position: relative; z-index: 1; }

        /* --- Brand mark / equalizer signature --- */
        .brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding: 0 4px; flex-wrap: wrap; }
        .brand-word { font-weight: 800; font-size: 15px; letter-spacing: 0.5px; color: var(--text-muted); text-transform: uppercase; }
        .brand-word .brand-red { color: var(--primary); }
        .eq-bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 22px; }
        .eq-bars span { display: block; width: 4px; background: linear-gradient(180deg, var(--primary), var(--primary-hover)); border-radius: 2px; animation: eq 1.1s ease-in-out infinite; box-shadow: 0 0 8px rgba(229,9,20,0.5); }
        .eq-bars span:nth-child(1) { height: 40%; animation-delay: -0.9s; }
        .eq-bars span:nth-child(2) { height: 80%; animation-delay: -0.6s; }
        .eq-bars span:nth-child(3) { height: 55%; animation-delay: -1.1s; }
        .eq-bars span:nth-child(4) { height: 95%; animation-delay: -0.3s; }
        .eq-bars span:nth-child(5) { height: 65%; animation-delay: -0.5s; }
        .eq-bars.mini { height: 15px; gap: 2px; }
        .eq-bars.mini span { width: 3px; }
        @keyframes eq { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }

        .glass-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 35px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8); position: relative; overflow: hidden; margin-bottom: 20px; }
        .glass-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--primary), transparent); background-size: 200% 100%; animation: sheen 7s linear infinite; }
        @keyframes sheen { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
        h2 { margin: 0 0 8px 0; font-weight: 800; font-size: 28px; letter-spacing: -0.5px; display: flex; align-items: center; gap: 12px; }
        .brand-red { color: var(--primary); }
        .subtitle { color: var(--text-muted); margin-top: 0; font-size: 15px; margin-bottom: 30px; font-weight: 400; }
        input[type="text"], input[type="password"], input[type="url"], select { width: 100%; padding: 14px 16px; background: rgba(255,255,255,0.03); color: var(--text-main); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 15px; font-family: 'Inter', sans-serif; outline: none; transition: var(--transition); appearance: none; }
        select { background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10L12 15L17 10' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
        input:focus, select:focus { border-color: var(--primary); background: rgba(229, 9, 20, 0.02); box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.1); }
        :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
        option { background: var(--surface); color: var(--text-main); }
        .form-group { margin-bottom: 20px; }
        .form-group label { display: block; margin-bottom: 8px; color: #aaa; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
        button { background: var(--primary); color: white; padding: 16px 24px; border: none; border-radius: var(--radius-md); cursor: pointer; font-weight: 700; width: 100%; font-size: 16px; font-family: 'Inter', sans-serif; transition: var(--transition); text-transform: uppercase; letter-spacing: 1px; }
        button:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
        button:active { transform: translateY(0) scale(0.98); }
        button:disabled { background: #333; color: #666; cursor: not-allowed; transform: none; box-shadow: none; }
        .btn-secondary { background: #222; border: 1px solid #444; margin-top: 10px; }
        .btn-secondary:hover { background: #2a2a2a; border-color: #555; box-shadow: none; }
        .cancel-action { margin-top: 18px; background: transparent; border: 1px solid rgba(229,9,20,.45); color: #ff7b82; }
        .cancel-action:hover { background: rgba(229,9,20,.09); border-color: var(--primary); box-shadow: none; }
        .user-panel { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: rgba(255,255,255,0.02); border-radius: var(--radius-md); margin-bottom: 30px; border: 1px solid var(--border); }
        .user-info strong { font-size: 18px; display: block; margin-bottom: 4px; }
        .user-info .credits { color: var(--text-muted); font-size: 14px; }
        .user-info .credits span { color: white; font-weight: 700; font-family: var(--font-mono); }
        .user-info .vip-badge { display: inline-block; margin-top: 6px; padding: 4px 8px; background: rgba(229, 9, 20, 0.1); color: var(--primary); border: 1px solid rgba(229, 9, 20, 0.3); border-radius: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; position: relative; overflow: hidden; }
        .vip-badge.badge-shimmer::after { content: ''; position: absolute; top: 0; left: -60%; width: 45%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent); animation: shimmerSweep 2.8s ease-in-out infinite; }
        @keyframes shimmerSweep { 0% { left: -60%; } 100% { left: 130%; } }
        .user-actions { display: flex; gap: 15px; align-items: center; }
        .admin-link { color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: var(--transition); }
        .admin-link:hover { color: white; }
        .logout-btn { padding: 8px 16px; width: auto; font-size: 13px; background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
        .logout-btn:hover { background: #222; color: white; box-shadow: none; }
        .settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
        @media (max-width: 600px) { .settings-grid { grid-template-columns: 1fr; } }

        .file-drop-zone { border: 2px dashed var(--border); border-radius: var(--radius-md); padding: 40px 20px; text-align: center; background: rgba(255,255,255,0.01); transition: var(--transition); cursor: pointer; margin-bottom: 20px; position: relative; }
        .file-drop-zone:hover { border-color: var(--primary); background: rgba(229, 9, 20, 0.02); }
        .file-drop-zone.drag-active { border-color: var(--primary); background: rgba(229, 9, 20, 0.06); box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.12); transform: scale(1.005); }
        .file-drop-zone input[type="file"] { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
        .file-drop-zone .icon { font-size: 32px; margin-bottom: 10px; display: block; opacity: 0.5; }
        .file-drop-zone .text { color: var(--text-muted); font-size: 15px; font-weight: 500; }
        .file-drop-zone .text span { color: var(--primary); }
        .source-tabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:8px;margin:10px 0 16px}.source-tab{padding:11px 14px;background:#171717;border:1px solid var(--border);color:#999;font-size:12px;border-radius:10px;text-transform:none;letter-spacing:0}.source-tab:hover{transform:none;box-shadow:none}.source-tab.active{background:rgba(229,9,20,.1);border-color:rgba(229,9,20,.55);color:#fff}.source-tab.batch-tab{color:#d9bd70;border-color:rgba(240,182,61,.28)}.source-tab.batch-tab.active{color:#ffe4a0;border-color:rgba(240,182,61,.72);background:rgba(240,182,61,.1);box-shadow:0 0 20px rgba(240,182,61,.08)}.batch-hint{display:none;align-items:flex-start;gap:10px;margin:-4px 0 14px;padding:12px 14px;border:1px solid rgba(240,182,61,.3);border-radius:11px;background:rgba(240,182,61,.065);color:#d7c58e;font-size:12px;line-height:1.5}.batch-hint.show{display:flex}.batch-hint strong{color:#ffe09a}.url-source,.reuse-source{display:none}.url-source.show,.reuse-source.show{display:block}.url-source input{width:100%}.reuse-source{padding:16px;border:1px solid rgba(16,185,129,.3);background:rgba(16,185,129,.06);border-radius:12px;color:#b9e8d8;font-size:13px;line-height:1.5}
        .preview-card { background: rgba(229, 9, 20, 0.05); border: 1px solid rgba(229, 9, 20, 0.2); border-radius: var(--radius-md); padding: 20px; margin-bottom: 25px; display: none; animation: slideDown 0.3s ease; }
        @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
        .preview-card h4 { margin: 0 0 15px 0; color: var(--primary); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
        .preview-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; color: #aaa; }
        .preview-row span { color: white; font-weight: 600; text-align: right; word-break: break-all; max-width: 60%; font-family: var(--font-mono); }
        .cost-row { margin-top: 15px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.1); color: white; font-weight: 700; }
        .cost-row span { color: var(--primary); font-size: 16px; }
        .dimmed-state { opacity: 0.3; pointer-events: none; filter: grayscale(40%); transition: all 0.5s ease; }
        #processingUI { display: none; margin-top: -10px; opacity: 0; transform: translateY(20px); transition: all 0.5s ease; }
        #processingUI.active { opacity: 1; transform: translateY(0); }

        /* --- GPU core visual --- */
        .core-stage { display: flex; flex-direction: column; align-items: center; margin-bottom: 6px; }
        .core-visual { position: relative; width: 168px; height: 168px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
        .core-rings { position: absolute; inset: 0; }
        .core-rings .ring { position: absolute; inset: 0; margin: auto; width: 68%; height: 68%; border-radius: 50%; border: 1px solid rgba(229, 9, 20, 0.35); animation: ringPulse 2.6s ease-out infinite; }
        .core-rings .ring.r2 { animation-delay: 0.75s; }
        .core-rings .ring.r3 { animation-delay: 1.5s; }
        @keyframes ringPulse { 0% { transform: scale(0.7); opacity: 0.55; } 100% { transform: scale(2); opacity: 0; } }
        .core-chip { position: relative; z-index: 2; width: 112px; height: 112px; filter: drop-shadow(0 0 16px rgba(229, 9, 20, 0.3)); transition: filter 0.6s var(--ease); }
        .chip-frame { fill: var(--surface-2); stroke: var(--border); stroke-width: 2; }
        .chip-traces { stroke: var(--border); }
        .fan-group { transform-origin: 60px 60px; animation: spin 3.4s linear infinite; transition: animation-duration 0.4s var(--ease); }
        .blade { fill: var(--primary); opacity: 0.85; transition: fill 0.4s var(--ease); }
        .fan-hub { fill: var(--text-main); }
        .fan-hub-ring { fill: none; stroke: var(--border); stroke-width: 1.5; }
        @keyframes spin { to { transform: rotate(360deg); } }
        .core-badge { position: absolute; bottom: -2px; right: -2px; width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; z-index: 3; box-shadow: 0 4px 14px rgba(0,0,0,0.55); }
        .core-badge svg { width: 18px; height: 18px; stroke: var(--text-main); display: none; }
        .core-badge .icon-render { display: block; }
        .core-visual.mode-prep .icon-render { display: none; } .core-visual.mode-prep .icon-prep { display: block; stroke: var(--primary); }
        .core-visual.mode-upload .icon-render { display: none; } .core-visual.mode-upload .icon-upload { display: block; stroke: var(--primary); }
        .core-visual.mode-queue .icon-render { display: none; } .core-visual.mode-queue .icon-queue { display: block; stroke: var(--text-muted); }
        .core-visual.mode-render .icon-render { stroke: var(--primary); }
        .core-visual.mode-done .icon-render { display: none; } .core-visual.mode-done .icon-done { display: block; stroke: var(--success); }

        .core-visual.turbo .fan-group { animation-duration: 0.5s; }
        .core-visual.turbo .blade { fill: var(--primary-hover); }
        .core-visual.turbo .core-chip { filter: drop-shadow(0 0 30px rgba(229, 9, 20, 0.65)); }
        .core-visual.turbo .ring { animation-duration: 1.1s; border-color: rgba(229, 9, 20, 0.55); }
        .core-visual.mode-queue .fan-group { animation-duration: 5s; }
        .core-visual.mode-done .fan-group { animation-play-state: paused; }
        .core-visual.mode-done .blade { fill: var(--success); }
        .core-visual.mode-done .core-chip { filter: drop-shadow(0 0 22px rgba(16, 185, 129, 0.55)); }
        .core-visual.mode-error .core-chip { filter: drop-shadow(0 0 26px rgba(229, 9, 20, 0.85)); }
        .core-visual.mode-error .fan-group { animation-play-state: paused; }
        .core-visual.mode-error .ring { border-color: rgba(229, 9, 20, 0.7); animation-duration: 0.9s; }

        .gpu-badge { display: inline-flex; align-items: center; gap: 8px; background: #1a1a1a; border: 1px solid #333; padding: 8px 16px; border-radius: 30px; font-size: 14px; font-weight: 600; color: var(--text-muted); margin-bottom: 22px; font-family: var(--font-mono); }
        .gpu-badge span { color: var(--primary); }
        .pulse-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; box-shadow: 0 0 10px var(--primary); animation: pulse 1.5s infinite; }
        @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }

        /* --- Stage tracker --- */
        .stage-tracker { display: flex; align-items: flex-start; margin: 4px 0 24px; }
        .stage-step { display: flex; flex-direction: column; align-items: center; gap: 8px; }
        .stage-node { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; transition: var(--transition); flex-shrink: 0; }
        .stage-node svg { width: 15px; height: 15px; stroke: var(--text-muted); transition: var(--transition); }
        .stage-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; text-align: center; white-space: nowrap; }
        .stage-connector { flex: 1; height: 1px; background: var(--border); margin-top: 17px; transition: background 0.4s var(--ease); }
        .stage-step.active .stage-node { border-color: var(--primary); animation: nodePulse 1.6s ease-in-out infinite; }
        .stage-step.active .stage-node svg { stroke: var(--primary); }
        .stage-step.active .stage-label { color: var(--text-main); }
        .stage-step.complete .stage-node { background: rgba(16, 185, 129, 0.12); border-color: var(--success); }
        .stage-step.complete .stage-node svg { stroke: var(--success); }
        .stage-step.complete + .stage-connector { background: var(--success); opacity: 0.4; }
        .stage-step.error .stage-node { border-color: var(--primary); background: rgba(229, 9, 20, 0.18); animation: none; }
        @keyframes nodePulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(229,9,20,0.15), 0 0 14px rgba(229,9,20,0.4); } 50% { box-shadow: 0 0 0 8px rgba(229,9,20,0.04), 0 0 22px rgba(229,9,20,0.6); } }
        @media (max-width: 600px) { .stage-label { font-size: 8.5px; } .core-visual { width: 140px; height: 140px; } .core-chip { width: 96px; height: 96px; } }

        .progress-wrapper { margin-bottom: 20px; }
        .status-text { font-size: 15px; font-weight: 500; margin-bottom: 10px; display: flex; justify-content: space-between; }
        .status-subtext { font-size: 13px; color: var(--text-muted); font-weight: 400; }
        .progress-track { background: #1a1a1a; border: 1px solid #333; height: 12px; border-radius: 6px; overflow: hidden; position: relative; }
        .progress-fill { background: linear-gradient(90deg, #900, var(--primary)); height: 100%; width: 0%; transition: width 0.4s ease; position: relative; }
        .progress-fill::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); animation: shimmer 1.5s infinite; }
        @keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

        /* --- GPU Grid (parallel processing) --- */
        .gpu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 20px; }
        .gpu-cell { padding: 12px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.02); border: 1px solid var(--border); transition: var(--transition); min-height: 70px; }
        .gpu-cell.gpu-active { border-color: rgba(229,9,20,0.4); background: rgba(229,9,20,0.05); }
        .gpu-cell.gpu-done { border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.05); }
        .gpu-cell-name { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.3px; }
        .gpu-cell-chunk { font-size: 13px; font-weight: 600; color: var(--text-main); }
        .gpu-cell-bar { height: 4px; background: #1a1a1a; border-radius: 2px; margin-top: 8px; overflow: hidden; }
        .gpu-cell-bar-fill { height: 100%; border-radius: 2px; background: var(--primary); transition: width 0.4s ease; }

        /* --- Activity feed --- */
        .activity-feed { background: #0a0a0a; border: 1px solid #1c1c1c; border-radius: var(--radius-md); padding: 6px; height: 180px; overflow-y: auto; }
        .activity-feed::-webkit-scrollbar { width: 6px; }
        .activity-feed::-webkit-scrollbar-track { background: transparent; }
        .activity-feed::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }
        .feed-entry { display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px; font-size: 13px; line-height: 1.5; color: #c4c4c4; animation: feedIn 0.35s var(--ease) both; }
        .feed-entry + .feed-entry { border-top: 1px solid #161616; }
        .feed-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); margin-top: 6px; flex-shrink: 0; }
        .feed-time { font-family: var(--font-mono); color: #555; font-size: 11px; flex-shrink: 0; margin-top: 1px; }
        .feed-msg { color: #d4d4d4; flex: 1; }
        .feed-error .feed-dot { background: var(--primary); box-shadow: 0 0 6px var(--primary); }
        .feed-success .feed-dot { background: var(--success); box-shadow: 0 0 6px var(--success); }
        .feed-highlight .feed-msg { color: #fff; font-weight: 600; }
        @keyframes feedIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
        .log-high { color: #fff; font-weight: 700; }
        .log-red { color: var(--primary); font-weight: 600; }
        .log-green { color: var(--success); font-weight: 600; }

        /* Standard minutes bar in user panel */
        .std-minutes-bar { margin-top: 4px; display: flex; align-items: center; gap: 8px; }
        .std-bar-track { width: 80px; height: 5px; background: #1a1a1a; border-radius: 3px; overflow: hidden; }
        .std-bar-fill { height: 100%; border-radius: 3px; background: #607d8b; transition: width 0.4s ease; }

        #resultsContainer { margin-top: 30px; display: none; }
        #results { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
        @media (max-width: 600px) { #results { grid-template-columns: 1fr; } }
        .result-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; background: #1a1a1a; border: 1px solid #333; border-radius: var(--radius-md); color: white; text-decoration: none; font-weight: 600; font-size: 14px; transition: var(--transition); animation: feedIn 0.4s var(--ease) both; }
        .result-btn:hover { background: #222; border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 8px 20px -8px rgba(229,9,20,0.5); }
        .auth-error { background: rgba(229, 9, 20, 0.1); color: var(--primary); padding: 12px; border-radius: 6px; margin-bottom: 20px; font-size: 14px; font-weight: 500; display: none; border: 1px solid rgba(229, 9, 20, 0.2); }

        /* Fallback toast */
        .fallback-toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-100px); background: #f59e0b; color: #000; padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; z-index: 2000; transition: transform 0.4s ease; white-space: nowrap; }
        .fallback-toast.show { transform: translateX(-50%) translateY(0); }
        .verification-gate{margin:0 0 24px;padding:17px 18px;border:1px solid rgba(36,129,204,.5);border-radius:14px;background:linear-gradient(135deg,rgba(36,129,204,.13),rgba(229,9,20,.04));display:flex;align-items:center;justify-content:space-between;gap:18px}.verification-gate strong{display:block;margin-bottom:5px}.verification-gate p{margin:0;color:#a8a8a8;font-size:13px;line-height:1.5}.verification-gate a{flex:0 0 auto;padding:11px 15px;border-radius:9px;background:#2481cc;color:#fff;text-decoration:none;font-weight:800;font-size:13px}

        @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; }
        }
        /* --- выбор модели: свой выпадающий список с описаниями --- */
        .algorithm-group{grid-column:1/-1}
        .algorithm-mirror{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;left:-9999px}
        .algorithm-picker{position:relative;margin-top:8px}
        .algorithm-trigger{display:flex;width:100%;gap:12px;align-items:center;padding:12px 14px;border:1px solid #303030;border-radius:12px;background:#171717;color:inherit;cursor:pointer;text-align:left;font:inherit;transition:border-color .16s,background .16s}
        .algorithm-trigger:hover{border-color:#404040;background:#1b1b1b}
        .algorithm-picker.open .algorithm-trigger{border-color:rgba(237,17,28,.55);background:#1c1414}
        .algorithm-trigger:focus-visible{outline:2px solid rgba(237,17,28,.6);outline-offset:2px}
        .algorithm-caret{flex:none;margin-left:auto;width:9px;height:9px;border-right:2px solid #7a7a82;border-bottom:2px solid #7a7a82;transform:rotate(45deg) translate(-2px,-2px);transition:transform .18s}
        .algorithm-picker.open .algorithm-caret{transform:rotate(-135deg) translate(-3px,-3px)}
        .algorithm-menu{position:absolute;z-index:40;left:0;right:0;top:calc(100% + 6px);max-height:min(420px,60vh);overflow:auto;padding:6px;border:1px solid #303030;border-radius:13px;background:#131313;box-shadow:0 22px 60px rgba(0,0,0,.6);display:grid;gap:4px}
        /* display:grid выше перебивает display:none из атрибута hidden — возвращаем явно */
        .algorithm-menu[hidden]{display:none}
        .algorithm-option{display:flex;gap:12px;align-items:flex-start;padding:11px 12px;border-radius:10px;cursor:pointer;transition:background .14s}
        .algorithm-option:hover,.algorithm-option.active{background:#1e1e1e}
        .algorithm-option.selected{background:linear-gradient(150deg,#241717,#181414)}
        .algorithm-option.premium{border:1px solid rgba(240,182,61,.35);background:rgba(240,182,61,.05)}
        .algorithm-icon{flex:none;width:34px;height:34px;border-radius:9px;background:#202020;display:grid;place-items:center;color:#9a9aa2}
        .algorithm-option.selected .algorithm-icon,.algorithm-trigger .algorithm-icon{background:rgba(237,17,28,.14);color:#ff6a72}
        .algorithm-option.premium .algorithm-icon{color:#f0b63d;background:rgba(240,182,61,.12)}
        .algorithm-icon svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
        .algorithm-body{display:grid;gap:3px;min-width:0}
        .algorithm-name{font-size:13px;font-weight:700;letter-spacing:-.01em}
        .algorithm-hint{font-size:11.5px;color:#8b8b93;line-height:1.45}
        .algorithm-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:3px}
        .algorithm-tag{font-size:9px;font-weight:750;letter-spacing:.05em;text-transform:uppercase;padding:3px 7px;border-radius:5px;background:#242424;color:#9a9aa2}
        .algorithm-tag.tag-best{background:rgba(237,17,28,.16);color:#ff8087}
        .algorithm-tag.tag-multi{background:rgba(101,167,255,.14);color:#8fc0ff}
        .algorithm-tag.tag-premium{background:rgba(240,182,61,.16);color:#f0b63d}
        .algorithm-check{flex:none;margin-left:auto;width:16px;height:16px;opacity:0}
        .algorithm-option.selected .algorithm-check{opacity:1;background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff6a72' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E")}
        @media(prefers-reduced-motion:reduce){.algorithm-caret,.algorithm-trigger,.algorithm-option{transition:none}}
