 /* =========================================
   RANDOM WORD GENERATOR — 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: 1100px;
    border-radius: 28px;
    padding: clamp(28px, 5vw, 56px);
}

/* ---------- UI SHELL ---------- */
.tool-widget { display: flex; flex-direction: column; gap: 24px; margin-bottom: 50px; animation: fadeIn 0.5s ease; }

.sec-title { font-size: 14px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.sec-title span { color: var(--primary-color); }

/* Grids */
.lang-section, .cat-section { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px; padding: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.02); }

/* ---------- CUSTOM DROPDOWN ---------- */
.custom-dropdown { position: relative; display: inline-block; user-select: none; width: 100%; max-width: 300px; }
.cd-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg-body); border: 1px solid var(--border-color); padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 800; color: var(--text-muted); cursor: pointer; transition: all 0.2s; }
.cd-header:hover, .custom-dropdown.active .cd-header { border-color: var(--primary-color); color: var(--primary-color); background: var(--primary-light); }
.cd-value { display: flex; align-items: center; gap: 8px; }
.cd-body { position: absolute; top: calc(100% + 8px); left: 0; width: 100%; 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: 13px; 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: 13px; 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); }

 .cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
 .cat-btn { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px 16px; cursor: pointer; transition: all 0.2s; position: relative; display: flex; align-items: center; gap: 12px; overflow: hidden; }
 .cat-btn:hover { border-color: var(--text-main); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
 .cat-btn.active { border: 2px solid transparent; background: linear-gradient(var(--bg-body), var(--bg-body)) padding-box, var(--cat-color) border-box; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
 .cat-active-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-color); position: absolute; top: 10px; right: 10px; opacity: 0; transform: scale(0); transition: all 0.2s; }
 .cat-btn.active .cat-active-dot { opacity: 1; transform: scale(1); }
 .cat-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
 .cat-name { font-size: 14px; font-weight: 800; color: var(--text-main); }

 /* 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; 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; }
 
 .stepper { display: flex; align-items: center; background: var(--bg-body); border-radius: 8px; border: 1px solid var(--border-color); overflow: hidden; }
 .step-btn { background: transparent; border: none; padding: 6px 12px; font-size: 16px; font-weight: 700; color: var(--text-muted); cursor: pointer; transition: background 0.2s; }
 .step-btn:hover { background: rgba(0,0,0,0.05); }
 .step-num { width: 40px; text-align: center; background: transparent; border: none; font-size: 14px; font-weight: 800; color: var(--text-main); outline: none; }
 
 .sw { display: flex; align-items: center; gap: 8px; cursor: pointer; }
 .sw-t { width: 32px; height: 18px; border-radius: 18px; background: var(--border-color); position: relative; transition: background 0.3s; }
 .sw-t.on { background: var(--primary-color); }
 .sw-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; position: absolute; top: 2px; left: 2px; transition: transform 0.3s var(--ease-spring); box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
 .sw-t.on .sw-thumb { transform: translateX(14px); }
 .sw-lbl { font-size: 13px; font-weight: 800; color: var(--text-main); white-space: nowrap; }
 
 .dir-toggle { display: flex; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 8px; padding: 4px; }
 .dir-btn { background: transparent; border: none; padding: 6px 10px; 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); }

 .gen-wrap { display: flex; justify-content: center; margin: 8px 0; }
 .gen-btn { background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end)); color: #fff; border: none; border-radius: 12px; padding: 16px 40px; font-size: 16px; font-weight: 900; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 15px var(--primary-shadow); }
 .gen-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--primary-shadow); }
 .gen-btn .die { display: inline-block; transition: transform 0.3s; }
 .gen-btn:active .die { transform: rotate(180deg); }

 /* Results Section */
 .results-section { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px; padding: 32px; box-shadow: 0 10px 30px rgba(0,0,0,0.02); }
 
 .featured-card { background: rgba(var(--primary-color-rgb), 0.05); border: 1px solid var(--primary-light); border-radius: 16px; padding: 24px 32px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; margin-bottom: 24px; transition: all 0.2s; }
 .featured-card:hover { border-color: var(--primary-color); box-shadow: 0 10px 20px rgba(var(--primary-color-rgb), 0.1); }
 
 .fc-left { display: flex; flex-direction: column; gap: 8px; }
 .fc-word { font-size: clamp(32px, 5vw, 48px); font-weight: 900; color: var(--primary-color); line-height: 1.1; cursor: pointer; transition: transform 0.3s var(--ease-spring); }
 .fc-word.word-pop { transform: scale(1.05); }
 .fc-lang-tag { display: inline-block; background: var(--primary-color); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.5px; width: fit-content; }
 
 /* ── 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)); }

 .fc-right { display: flex; gap: 12px; }
 .fc-action { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 8px; padding: 10px 16px; font-size: 13px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; cursor: pointer; transition: all 0.2s; }
 .fc-action:hover { border-color: var(--primary-color); color: var(--primary-color); }
 .fc-action.primary { background: var(--primary-light); border-color: var(--primary-color); color: var(--primary-color); }
 .fc-action.copied { background: var(--success); border-color: var(--success); color: #fff; }
 
 .word-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
 .word-card { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 16px; position: relative; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
 .word-card:hover { border-color: var(--primary-color); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
 .wc-copy { position: absolute; top: 12px; right: 12px; color: var(--text-muted); opacity: 0; transition: opacity 0.2s; }
 .word-card:hover .wc-copy { opacity: 1; }
 .wc-word { font-size: 20px; font-weight: 900; color: var(--text-main); word-break: break-word; }
 .wc-meta { display: flex; justify-content: space-between; align-items: center; }
 .wc-tag { font-size: 10px; font-weight: 800; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; letter-spacing: 0.5px; }
 .tag-noun { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
 .tag-verb { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
 .tag-adj { background: rgba(16, 185, 129, 0.1); color: #10b981; }
 .tag-adv { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
 .tag-mix { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
 .wc-len { font-size: 11px; font-weight: 700; color: var(--text-muted); }
 
 .copy-bar { display: flex; align-items: center; justify-content: space-between; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px 16px; gap: 16px; }
 .cb-words { flex: 1; font-size: 13px; font-weight: 700; font-family: monospace; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
 .cb-actions { display: flex; gap: 8px; flex-shrink: 0; }
 .act-btn { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 8px 12px; font-size: 12px; font-weight: 800; color: var(--text-main); cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 6px; }
 .act-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
 .act-btn.copied { background: var(--success); border-color: var(--success); color: #fff; }

 /* History Section */
 .history-section { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px; padding: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.02); }
 .hs-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
 .hs-title { font-size: 14px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
 
 .history-chips { display: flex; flex-wrap: wrap; gap: 8px; }
 .h-chip { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 800; color: var(--text-main); cursor: pointer; transition: all 0.2s; }
 .h-chip:hover { border-color: var(--primary-color); background: rgba(var(--primary-color-rgb), 0.05); color: var(--primary-color); }
 .h-empty { font-size: 13px; font-weight: 700; color: var(--text-muted); opacity: 0.6; display: flex; align-items: center; gap: 8px; width: 100%; justify-content: center; padding: 20px; border: 1px dashed var(--border-color); border-radius: 12px; }

 /* Stats Strip */
 .stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 50px; }
 .stats-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; }
 .stats-sc:hover { transform: translateY(-2px); }
 
 .stats-ico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
 .stats-ico.red { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
 .stats-ico.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
 .stats-ico.green { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
 .stats-ico.purple { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
 
 .stats-val { font-size: 24px; font-weight: 900; color: var(--text-main); line-height: 1; margin-bottom: 4px; transition: transform 0.3s; }
 .stats-val.popped { transform: scale(1.2); color: var(--primary-color); }
 .stats-lbl { font-size: 12px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

 /* 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; }
  .sec-title i { width: 14px; height: 14px; }
  .cd-header i.cd-chevron { width: 14px; height: 14px; }
  .cat-icon i { width: 16px; height: 16px; }
  .ob-sep.ml-auto { margin-left: auto; }
  .fc-action i { width: 14px; height: 14px; }
  .wc-copy i { width: 12px; height: 12px; }
  .act-btn i { width: 14px; height: 14px; }
  .hs-title i { width: 14px; height: 14px; }
  .act-btn.btn-danger-outline { padding: 4px 10px; font-size: 12px; color: #ef4444; border-color: rgba(239,68,68,0.2); }
  .act-btn.btn-danger-outline i { width: 12px; height: 12px; }
  .h-empty i { width: 18px; height: 18px; }
  .cp-title i { color: var(--primary-color); }
  .info-div-t { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--text-main); margin-bottom: 20px; }
  .info-div-t i { width: 16px; height: 16px; color: var(--primary-color); }
