/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border-radius: var(--radius-sm);
    font-size: 0.9em; font-weight: 500; transition: all 0.2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { border: 1px solid var(--border-color); color: var(--text-primary); }
.btn-outline:hover { background: var(--bg-tertiary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 6px 14px; font-size: 0.8em; }
.btn-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 1.1em; }
.btn-icon:hover { background: var(--bg-tertiary); }

/* Progress Bar */
.progress-bar { width: 100%; height: 6px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s; width: 0%; }

/* Search Input */
.search-input {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); background: var(--bg-primary); color: var(--text-primary);
}
.search-input:focus { outline: none; border-color: var(--accent); }

/* Sort Select */
.sort-select {
    padding: 8px 12px; border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); background: var(--bg-primary); color: var(--text-primary);
}

/* Setting Row */
.setting-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; border-bottom: 1px solid var(--border-color);
}
.setting-row select {
    padding: 6px 12px; border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); background: var(--bg-primary); color: var(--text-primary);
}

/* Word Frequency Badge */
.word-freq-badge {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    font-size: 0.7em; font-weight: 600; margin-left: 8px;
}
.freq-high-badge { background: var(--freq-high); color: #fff; }
.freq-mid-badge { background: var(--freq-mid); color: #fff; }
.freq-low-badge { background: var(--freq-low); color: #fff; }

/* Overlay */
.sidebar-overlay, .drawer-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4); z-index: 99; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.sidebar-overlay.open, .drawer-overlay.open { opacity: 1; pointer-events: auto; }

/* Toasts */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; padding: 10px 24px; background: var(--text-primary); color: var(--bg-primary); border-radius: 20px; font-size: 0.85em; animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }
