 /* =========================================
    LIST RANDOMIZER — PREMIUM UI
    ========================================= */
 .da-wrapper {
     --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
     --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
     display: flex;
     justify-content: center;
         padding: clamp(0px, 5vw, 0px) 20px;
 }

 .da-panel {
     position: relative;                
     width: 100%;
     max-width: 1200px;
     border-radius: 28px;
     padding: clamp(28px, 5vw, 56px);
 }

 

 /* ---------- OPTIONS BAR ---------- */
 .options-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 16px 24px; margin-bottom: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.02); }
 .ob-label { font-size: 12px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
 .ob-sep { width: 1px; height: 24px; background: var(--border-color); margin: 0 4px; }
 
 /* ---------- CUSTOM DROPDOWN ---------- */
 .custom-dropdown { position: relative; display: inline-block; user-select: none; margin-left: auto; }
 .cd-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card-bg); border: 1px solid var(--border-color); padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 800; color: var(--text-main); cursor: pointer; transition: all 0.2s; min-width: 140px; }
 .cd-header:hover, .custom-dropdown.active .cd-header { border-color: var(--primary-color); }
 .cd-value { display: flex; align-items: center; gap: 8px; }
 .cd-body { position: absolute; bottom: calc(100% + 8px); right: 0; width: 220px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); padding: 8px; z-index: 100; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.2s; display: flex; flex-direction: column; gap: 8px; }
 .custom-dropdown.active .cd-body { opacity: 1; visibility: visible; transform: translateY(0); }
 .cd-search input { width: 100%; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 8px; padding: 8px 12px; font-size: 12px; color: var(--text-main); outline: none; }
 .cd-list { max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
 .cd-list::-webkit-scrollbar { width: 4px; }
 .cd-list::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
 .cd-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--text-main); cursor: pointer; transition: background 0.2s; }
 .cd-item:hover { background: var(--bg-body); }
 .cd-item.active { background: rgba(var(--primary-color-rgb), 0.05); color: var(--primary-color); }
 
 .f-btn { background: transparent; border: none; padding: 6px 12px; font-size: 12px; font-weight: 800; color: var(--text-muted); border-radius: 6px; cursor: pointer; transition: all 0.2s; }
 .f-btn.on { background: var(--bg-body); color: var(--text-main); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }

 .dir-toggle { display: flex; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 8px; padding: 2px; margin-left: auto; }
 .dir-btn { background: transparent; border: none; padding: 4px 8px; font-size: 11px; font-weight: 800; color: var(--text-muted); border-radius: 6px; cursor: pointer; transition: all 0.2s; }
 .dir-btn.active { background: var(--card-bg); color: var(--primary-color); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }

 .usage-meter { display: flex; align-items: center; gap: 12px; background: rgba(var(--primary-color-rgb), 0.05); padding: 8px 16px; border-radius: 100px; }
 .usage-pips { display: flex; gap: 4px; }
 .pip { width: 6px; height: 14px; background: var(--primary-color); border-radius: 2px; opacity: 0.3; }
 .pip.active { opacity: 1; }
 .usage-lbl { font-size: 11px; font-weight: 800; color: var(--primary-color); text-transform: uppercase; letter-spacing: 0.5px; }

 /* ---------- BANNER ---------- */
 .banner-container { margin-bottom: 24px; }
 .upgrade-banner { background: linear-gradient(135deg, #1e293b, #0f172a); border-radius: 16px; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #fff; position: relative; overflow: hidden; display: none; }
 .upgrade-banner.show { display: flex; animation: slideDown 0.5s var(--ease-out); }
 @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
 .ub-ico { width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fbbf24; flex-shrink: 0; }
 .ub-text { flex: 1; }
 .ub-title { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
 .ub-sub { font-size: 13px; color: rgba(255,255,255,0.7); line-height: 1.5; }
 .ub-cta { background: #fff; color: #0f172a; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 800; text-decoration: none; display: flex; align-items: center; gap: 8px; transition: all 0.2s; white-space: nowrap; }
 .ub-cta:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(255,255,255,0.2); }
 .ub-close { background: transparent; border: none; color: rgba(255,255,255,0.5); cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: all 0.2s; }
 .ub-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

 /* ---------- WORKSPACE ---------- */
 .engine-workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 40px; }
 @media(max-width: 900px) { .engine-workspace { grid-template-columns: 1fr; } }
 
 .cw-panel { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.02); }
 .panel-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border-color); background: var(--bg-body); }
 .ph-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--text-main); }
 .ep-btn { background: transparent; border: none; font-size: 12px; font-weight: 800; color: var(--text-muted); display: flex; align-items: center; gap: 6px; cursor: pointer; transition: all 0.2s; }
 .ep-btn:hover { color: #ef4444; }
 .ep-btn:disabled { opacity: 0.5; pointer-events: none; }

 .panel-body { padding: 20px; display: flex; flex-direction: column; gap: 20px; flex: 1; }
 
 .input-group { display: flex; flex-direction: column; gap: 8px; }
 .input-lbl { font-size: 12px; font-weight: 800; color: var(--text-muted); display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
 
 .c-input { width: 100%; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px; font-size: 14px; font-family: 'Space Mono', monospace; color: var(--text-main); outline: none; transition: all 0.2s; }
 .c-input:focus { border-color: var(--primary-color); background: var(--card-bg); box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1); }
 textarea.c-input { min-height: 180px; resize: vertical; line-height: 1.6; }
 select.c-input { font-family: var(--font-primary); font-weight: 700; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }

 .radio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
 .rg-input { display: none; }
 .rg-label { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px; font-size: 13px; font-weight: 800; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: all 0.2s; text-align: center; }
 .rg-input:checked + .rg-label { background: rgba(var(--primary-color-rgb), 0.05); border-color: var(--primary-color); color: var(--primary-color); }
 
 .teams-config { display: none; background: rgba(var(--primary-color-rgb), 0.02); border: 1px dashed var(--border-color); border-radius: 12px; padding: 16px; margin-top: -8px; }
 .teams-config.active { display: block; animation: fadeIn 0.3s var(--ease-out); }
 @keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

 .generate-btn { margin-top: auto; width: 100%; background: var(--text-main); border: none; border-radius: 12px; padding: 16px; font-size: 15px; font-weight: 800; color: var(--bg-body); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: all 0.3s; position: relative; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
 .generate-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.15); background: var(--primary-color); color: #fff; }
 .generate-btn:disabled { opacity: 0.5; cursor: not-allowed; }
 .generate-btn .ri { transition: transform 0.3s; }
 .generate-btn:hover:not(:disabled) .ri { transform: rotate(180deg); }
 .generate-btn.loading { color: transparent; pointer-events: none; }
 .generate-btn.loading::after { content: ''; position: absolute; width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
 @keyframes spin { to { transform: rotate(360deg); } }

 /* ---------- MATRIX PANEL (OUTPUT) ---------- */
 .matrix-panel { position: relative; display: flex; flex-direction: column; }
 .mp-body { position: relative; flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-body); }
 
 .overlay-state { position: absolute; inset: 0; background: rgba(var(--bg-body-rgb), 0.9); backdrop-filter: blur(4px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; z-index: 10; transition: opacity 0.3s; }
 .overlay-state.hidden { opacity: 0; pointer-events: none; }
 .chaos-ring { display: none; width: 60px; height: 60px; border-radius: 50%; border: 4px dashed var(--primary-color); animation: chaosSpin 2s linear infinite; }
 .overlay-state.shuffling .chaos-ring { display: block; }
 .overlay-state.shuffling i { display: none; }
 @keyframes chaosSpin { to { transform: rotate(360deg); } }
 .overlay-text { font-family: 'Space Mono', monospace; font-size: 12px; font-weight: 800; color: var(--text-muted); letter-spacing: 1px; }
 .overlay-state.shuffling .overlay-text { color: var(--primary-color); animation: pulse 1s infinite; }
 @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

 .output-view { position: absolute; inset: 0; overflow-y: auto; padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
 .output-view.active { opacity: 1; pointer-events: auto; position: relative; inset: auto; flex: 1; }

 /* Output: List */
 .list-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--border-color); font-family: 'Space Mono', monospace; font-size: 14px; color: var(--text-main); animation: slideIn 0.3s var(--ease-out) backwards; }
 .list-item:last-child { border-bottom: none; }
 .li-num { width: 32px; height: 32px; background: rgba(0,0,0,0.03); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--text-muted); flex-shrink: 0; }
 @keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

 /* Output: Teams */
 .teams-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
 .team-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; animation: popIn 0.4s var(--ease-spring) backwards; box-shadow: 0 4px 12px rgba(0,0,0,0.02); }
 .tc-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: rgba(var(--primary-color-rgb), 0.05); border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.1); font-size: 13px; font-weight: 900; color: var(--primary-color); }
 .tc-list { display: flex; flex-direction: column; padding: 8px; }
 .tc-item { padding: 8px 12px; font-family: 'Space Mono', monospace; font-size: 13px; color: var(--text-main); border-bottom: 1px dashed var(--border-color); }
 .tc-item:last-child { border-bottom: none; }
 @keyframes popIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

 /* Output: Winner */
 .winner-view { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: 300px; padding: 20px; text-align: center; }
 .winner-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; color: #f59e0b; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 24px; animation: fadeIn 0.5s var(--ease-out) 0.2s backwards; }
 .winner-card { background: linear-gradient(135deg, var(--card-bg), var(--bg-body)); border: 2px solid #fbbf24; border-radius: 24px; padding: 40px; box-shadow: 0 20px 40px rgba(251, 191, 36, 0.1); animation: winnerTada 1s var(--ease-spring); }
 .winner-name { font-size: clamp(24px, 4vw, 40px); font-weight: 900; color: var(--text-main); word-break: break-word; }
 @keyframes winnerTada { 0% { transform: scale(0.8); opacity: 0; } 40% { transform: scale(1.1) rotate(-2deg); opacity: 1; } 60% { transform: scale(0.95) rotate(2deg); } 80% { transform: scale(1.02) rotate(-1deg); } 100% { transform: scale(1) rotate(0); } }

 /* ---------- STATS STRIP ---------- */
 .stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 40px; }
 .sc { background: var(--card-bg); border-radius: 16px; padding: 20px; border: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform 0.2s; }
 .sc:hover { transform: translateY(-2px); }
 .sc-ico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
 .sc-ico.red { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
 .sc-ico.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
 .sc-ico.green { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
 .sc-ico.purple { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
 .sc-val { font-size: 28px; font-weight: 900; color: var(--text-main); line-height: 1; margin-bottom: 4px; transition: transform 0.3s; }
 .sc-lbl { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
 .sc-val.popped { transform: scale(1.3); color: var(--primary-color); }
 
 /* TOAST */
 /* ── Comparison Panel & Analytics ── */
 .comparison-panel {
     background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 24px;
     padding: 28px; margin-top: 32px; box-shadow: 0 10px 30px rgba(0,0,0,0.02); margin-bottom: 40px;
 }
 .cp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
 .cp-title { font-size: 16px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 10px; }
 .cp-badge { font-size: 12px; font-weight: 800; padding: 6px 14px; border-radius: 100px; }
 .badge-high { background: color-mix(in srgb, var(--success, #10b981) 15%, transparent); color: var(--success, #10b981); border: 1px solid color-mix(in srgb, var(--success, #10b981) 30%, transparent); }

 .cp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
 .cp-card { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
 .cpc-header { display: flex; justify-content: space-between; align-items: center; }
 .cpc-title { font-size: 13.5px; font-weight: 800; color: var(--text-main); }
 .cpc-tag { font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 6px; }
 .cpc-tag.success { background: color-mix(in srgb, var(--success, #10b981) 15%, transparent); color: var(--success, #10b981); }

 .cpc-body { display: flex; flex-direction: column; gap: 10px; }
 .cpc-stat-row { font-size: 13px; color: var(--text-muted); display: flex; justify-content: space-between; }
 .cpc-stat-row strong { color: var(--text-main); font-weight: 700; }
 .cpc-progress-bar { width: 100%; height: 8px; background: var(--border-color); border-radius: 100px; overflow: hidden; margin-top: 4px; }
 .cpc-progress-fill { height: 100%; background: var(--primary-color); border-radius: 100px; transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
 .cpc-progress-fill.bg-gradient { background: linear-gradient(90deg, var(--primary-color), var(--primary-gradient-end)); }

/* Zero-Inline Enhancements */
#bgCv { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.rw-hero-badge i { width: 14px; height: 14px; }
.cd-value i, .cd-item i { width: 16px; height: 16px; color: var(--text-muted); }
.cd-header i.cd-chevron { width: 14px; height: 14px; }
.ph-title i { width: 16px; height: 16px; }
.ep-btn i { width: 12px; height: 12px; }
.ep-btn.primary-btn { color: var(--primary-color); }
.input-lbl i { width: 14px; height: 14px; }
.rg-label i { width: 14px; height: 14px; }
.generate-btn .ri { width: 18px; height: 18px; }
.matrix-header { border-bottom-color: rgba(var(--primary-color-rgb), 0.1); }
.overlay-state i { width: 48px; height: 48px; opacity: 0.2; }
.tc-header i { width: 12px; height: 12px; }
.winner-badge i { width: 16px; height: 16px; }
.cp-title i { color: var(--primary-color); }
.sc.border-red { border-top: 2px solid #ef4444; }
.sc.border-blue { border-top: 2px solid #3b82f6; }
.sc.border-green { border-top: 2px solid #22c55e; }
.sc.border-purple { border-top: 2px solid #a855f7; }
.sc-ico i { width: 18px; height: 18px; }
.info-div-t { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--text-main); margin-bottom: 20px; margin-top: 40px; }
.info-div-t i { width: 16px; height: 16px; color: var(--primary-color); }