﻿/* ============================================
   ALL NEW FEATURES â€” COMBINED STYLES
   ============================================ */

/* ==========================================
   SHARED: Card Action Buttons
   ========================================== */
.card-action-btn {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    padding: 0;
}
.card-action-btn:hover { background: rgba(255,255,255,0.06); border-color: var(--border-hover); color: var(--text-secondary); }

/* ==========================================
   SHARED: Slide Panels (History, Collections, Pack)
   ========================================== */
.side-panel {
    position: fixed;
    top: 0; right: 0;
    width: 420px; max-width: 100vw;
    height: 100vh;
    background: #111827;
    border-left: 1px solid var(--border-color);
    z-index: 1001;
    display: flex; flex-direction: column;
    transform: translateX(110%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -8px 0 40px rgba(0,0,0,0.5);
}
.side-panel.open { transform: translateX(0); }
.side-panel-left { right: auto; left: 0; border-left: none; border-right: 1px solid var(--border-color); transform: translateX(-110%); box-shadow: 8px 0 40px rgba(0,0,0,0.5); }
.side-panel-left.open { transform: translateX(0); }

.side-panel-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.side-panel-overlay.show { opacity: 1; pointer-events: all; }

.panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.panel-title {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
}
.panel-close-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-md); border: 1px solid var(--border-color);
    color: var(--text-muted); font-size: 1.1rem; cursor: pointer;
    background: transparent; transition: all var(--transition-fast); line-height: 1;
    font-family: var(--font-primary);
}
.panel-close-btn:hover { border-color: var(--text-muted); color: var(--text-primary); }

.panel-list {
    flex: 1; overflow-y: auto; padding: 16px 24px;
    display: flex; flex-direction: column; gap: 12px;
}
.panel-list::-webkit-scrollbar { width: 4px; }
.panel-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.panel-empty {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; padding: 40px; color: var(--text-muted); text-align: center;
}
.panel-empty-icon { font-size: 2.5rem; }
.panel-empty-title { font-size: 1rem; font-weight: 600; color: var(--text-secondary); }
.panel-empty-desc { font-size: 0.82rem; line-height: 1.6; }

/* ==========================================
   HISTORY + RECENTLY VIEWED
   ========================================== */
.recent-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; margin-bottom: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}
.recent-label {
    display: flex; align-items: center; gap: 5px;
    font-size: 0.72rem; font-weight: 600;
    color: var(--text-muted); white-space: nowrap; flex-shrink: 0;
}
.recent-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.recent-chip {
    padding: 4px 10px; border-radius: var(--radius-pill);
    font-size: 0.68rem; font-weight: 500;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.03);
    color: var(--text-muted); cursor: pointer;
    transition: all var(--transition-fast);
    max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.recent-chip:hover { border-color: var(--accent-1); color: var(--accent-1); }
.recent-chip.chip-copied { border-color: var(--accent-3); color: var(--accent-3); }
.recent-view-all {
    font-size: 0.7rem; font-weight: 600; color: var(--accent-1);
    background: none; border: none; cursor: pointer; white-space: nowrap;
    padding: 4px 0; transition: opacity var(--transition-fast);
}
.recent-view-all:hover { opacity: 0.7; }

/* History button badge */
.header-badge-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: var(--radius-pill);
    border: 1px solid var(--border-color); background: transparent;
    color: var(--text-muted); font-size: 0.75rem; font-weight: 600;
    font-family: var(--font-primary); cursor: pointer;
    transition: all var(--transition-fast); white-space: nowrap;
}
.header-badge-btn:hover { border-color: var(--border-hover); color: var(--text-secondary); }
.header-num-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 20px; font-size: 0.65rem; font-weight: 700; line-height: 1;
    background: var(--accent-1); color: #fff;
}

/* History item */
.hist-item {
    background: rgba(255,255,255,0.03); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 12px;
    transition: border-color var(--transition-fast);
}
.hist-item:hover { border-color: var(--border-hover); }
.hist-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.hist-tag {
    font-size: 0.62rem; font-weight: 500; padding: 2px 7px;
    border-radius: var(--radius-pill); background: rgba(168,85,247,0.1); color: var(--accent-1);
}
.hist-time { font-size: 0.62rem; color: var(--text-muted); margin-left: auto; }
.hist-text { font-size: 0.8rem; line-height: 1.5; color: var(--text-secondary); margin-bottom: 8px; }
.hist-copy-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: var(--radius-pill);
    font-size: 0.7rem; font-weight: 500; font-family: var(--font-primary);
    border: 1px solid var(--border-color); background: transparent;
    color: var(--text-muted); cursor: pointer; transition: all var(--transition-fast);
}
.hist-copy-btn:hover { border-color: var(--accent-3); color: var(--accent-3); }

/* ==========================================
   COLLECTIONS
   ========================================== */
.fav-collect-btn:hover { color: #3b82f6 !important; border-color: rgba(59,130,246,0.4) !important; background: rgba(59,130,246,0.08) !important; }

.col-dropdown {
    position: absolute; z-index: 2000;
    background: #1e2433; border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 6px;
    min-width: 180px; box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.col-dd-item {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 8px 10px;
    border-radius: 6px; border: none; background: transparent;
    color: var(--text-secondary); font-size: 0.8rem; font-family: var(--font-primary);
    cursor: pointer; text-align: left; transition: background var(--transition-fast);
}
.col-dd-item:hover { background: rgba(255,255,255,0.05); }
.col-dd-has { color: var(--text-primary); }
.col-dd-check { margin-left: auto; color: var(--accent-3); font-size: 0.75rem; }
.col-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.col-dd-empty { display: block; font-size: 0.75rem; color: var(--text-muted); padding: 8px 10px; }
.col-dd-divider { height: 1px; background: var(--border-color); margin: 4px 0; }
.col-dd-new {
    display: flex; align-items: center; gap: 6px;
    width: 100%; padding: 8px 10px;
    border-radius: 6px; border: none; background: transparent;
    color: var(--accent-1); font-size: 0.78rem; font-family: var(--font-primary);
    cursor: pointer; font-weight: 600; transition: background var(--transition-fast);
}
.col-dd-new:hover { background: rgba(168,85,247,0.08); }

/* Collections panel */
.col-panel-back {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 24px; border-bottom: 1px solid var(--border-color);
}
.col-back-btn {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
    background: none; border: none; cursor: pointer; font-family: var(--font-primary);
    transition: color var(--transition-fast);
}
.col-back-btn:hover { color: var(--text-primary); }
.col-panel-title { font-size: 0.9rem; font-weight: 700; }
.col-delete-btn {
    margin-left: auto; background: none; border: none;
    color: var(--text-muted); cursor: pointer; padding: 4px;
    transition: color var(--transition-fast);
}
.col-delete-btn:hover { color: #ef4444; }
.col-prompts-list { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 10px; }
.col-prompt-item {
    background: rgba(255,255,255,0.03); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 12px;
}
.col-prompt-text { font-size: 0.8rem; line-height: 1.5; color: var(--text-secondary); margin-bottom: 8px; }
.col-prompt-actions { display: flex; gap: 8px; }
.col-copy-p, .col-remove-p {
    padding: 4px 10px; border-radius: var(--radius-pill);
    font-size: 0.7rem; font-weight: 500; font-family: var(--font-primary);
    cursor: pointer; transition: all var(--transition-fast);
}
.col-copy-p { border: 1px solid var(--border-color); background: transparent; color: var(--text-muted); }
.col-copy-p:hover { border-color: var(--accent-3); color: var(--accent-3); }
.col-remove-p { border: 1px solid transparent; background: transparent; color: var(--text-muted); }
.col-remove-p:hover { border-color: rgba(239,68,68,0.3); color: #ef4444; }
.col-export-row { padding: 16px 24px; border-top: 1px solid var(--border-color); flex-shrink: 0; }
.col-export-btn {
    width: 100%; padding: 10px; border-radius: var(--radius-md);
    background: rgba(6,214,160,0.1); border: 1px solid rgba(6,214,160,0.3);
    color: var(--accent-3); font-size: 0.82rem; font-weight: 600;
    font-family: var(--font-primary); cursor: pointer; transition: all var(--transition-fast);
}
.col-export-btn:hover { background: rgba(6,214,160,0.18); }
.col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.col-empty { color: var(--text-muted); font-size: 0.82rem; padding: 20px; text-align: center; grid-column: 1/-1; }
.col-folder-card {
    background: rgba(255,255,255,0.03); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 16px; cursor: pointer;
    transition: all var(--transition-fast); text-align: center;
    border-top: 3px solid var(--col-color);
}
.col-folder-card:hover { background: rgba(255,255,255,0.06); transform: translateY(-2px); }
.col-folder-icon { font-size: 1.6rem; margin-bottom: 6px; }
.col-folder-name { font-size: 0.82rem; font-weight: 600; margin-bottom: 4px; }
.col-folder-count { font-size: 0.7rem; color: var(--text-muted); }
.col-create-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: calc(100% - 48px); margin: 16px 24px; padding: 10px;
    border-radius: var(--radius-md); border: 1px dashed var(--border-color);
    background: transparent; color: var(--text-muted);
    font-size: 0.82rem; font-weight: 600; font-family: var(--font-primary);
    cursor: pointer; transition: all var(--transition-fast);
}
.col-create-btn:hover { border-color: var(--accent-1); color: var(--accent-1); }
.col-panel-body { flex: 1; overflow-y: auto; padding: 16px 24px; }

/* ==========================================
   BULK SELECTION
   ========================================== */
.bulk-mode { position: relative; }
.bulk-checkbox-wrap {
    position: absolute; top: 10px; left: 10px; z-index: 10;
    width: 22px; height: 22px; cursor: pointer;
}
.bulk-checkbox-wrap .bulk-cb { display: none; }
.bulk-checkmark {
    width: 20px; height: 20px; border-radius: 5px;
    border: 2px solid var(--border-color);
    background: var(--bg-card); display: block;
    transition: all var(--transition-fast);
    position: relative;
}
.bulk-checkbox-wrap .bulk-cb:checked + .bulk-checkmark {
    background: var(--accent-1); border-color: var(--accent-1);
}
.bulk-checkbox-wrap .bulk-cb:checked + .bulk-checkmark::after {
    content: ''; position: absolute; left: 5px; top: 2px;
    width: 5px; height: 9px; border: 2px solid #fff;
    border-top: none; border-left: none; transform: rotate(45deg);
}
.bulk-selected { border-color: var(--accent-1) !important; background: rgba(168,85,247,0.06) !important; }

/* Bulk toggle button */
.btn-bulk-select {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: var(--radius-pill);
    font-size: 0.72rem; font-weight: 600; font-family: var(--font-primary);
    border: 1px solid var(--border-color); background: transparent;
    color: var(--text-muted); cursor: pointer; transition: all var(--transition-fast);
}
.btn-bulk-select:hover, .btn-bulk-select.active {
    border-color: var(--accent-1); color: var(--accent-1);
    background: rgba(168,85,247,0.08);
}

/* Floating bulk bar */
.bulk-action-bar {
    position: fixed; bottom: -80px; left: 50%; transform: translateX(-50%);
    background: #1e2433; border: 1px solid var(--border-color);
    border-radius: 50px; padding: 10px 20px;
    display: flex; align-items: center; gap: 10px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    z-index: 999; transition: bottom 0.35s cubic-bezier(0.4,0,0.2,1);
    white-space: nowrap;
}
.bulk-action-bar.show { bottom: 24px; }
.bulk-count-label { font-size: 0.8rem; font-weight: 700; color: var(--text-primary); }
.bulk-divider { width: 1px; height: 20px; background: var(--border-color); }
.bulk-bar-btn {
    padding: 6px 14px; border-radius: var(--radius-pill);
    font-size: 0.75rem; font-weight: 600; font-family: var(--font-primary);
    cursor: pointer; transition: all var(--transition-fast);
}
.bulk-bar-btn.export-txt { background: rgba(6,214,160,0.1); border: 1px solid rgba(6,214,160,0.3); color: var(--accent-3); }
.bulk-bar-btn.export-csv { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3); color: #3b82f6; }
.bulk-bar-btn.select-all { background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); }
.bulk-bar-btn.done-btn { background: transparent; border: 1px solid transparent; color: var(--text-muted); }
.bulk-bar-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* ==========================================
   DAILY PROMPT DROP
   ========================================== */
.daily-prompt-banner {
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(251,191,36,0.04));
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: var(--radius-lg); padding: 16px 20px;
    position: relative; overflow: hidden;
}
.daily-prompt-banner::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 3px; height: 100%; background: #f59e0b;
}
.daily-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.daily-badge {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 1px;
    color: #f59e0b; text-transform: uppercase;
}
.daily-badge-dot {
    width: 6px; height: 6px; border-radius: 50%; background: #f59e0b;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.daily-toggle-btn {
    margin-left: auto; background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 0.8rem; padding: 2px 6px;
    transition: color var(--transition-fast);
}
.daily-toggle-btn:hover { color: var(--text-primary); }
.daily-dismiss-btn {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-size: 0.75rem; padding: 2px 6px; transition: color var(--transition-fast);
}
.daily-dismiss-btn:hover { color: #ef4444; }
.daily-content { }
.daily-prompt-banner.collapsed .daily-content { display: none; }
.daily-text { font-size: 0.88rem; line-height: 1.65; color: var(--text-secondary); margin-bottom: 10px; }
.daily-meta-text { font-size: 0.68rem; color: var(--text-muted); margin-bottom: 12px; }
.daily-actions { display: flex; gap: 8px; }
.daily-copy-btn {
    padding: 7px 16px; border-radius: var(--radius-pill);
    background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.3);
    color: #f59e0b; font-size: 0.75rem; font-weight: 600;
    font-family: var(--font-primary); cursor: pointer; transition: all var(--transition-fast);
}
.daily-copy-btn:hover { background: rgba(245,158,11,0.25); }

/* ==========================================
   RANDOM PROMPT MODAL
   ========================================== */
.cm-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px); z-index: 1100;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
    padding: 20px;
}
.cm-modal-overlay.show { opacity: 1; pointer-events: all; }
.cm-modal {
    background: #111827; border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 28px;
    max-width: 540px; width: 100%;
    transform: translateY(20px); transition: transform 0.25s ease;
    box-shadow: 0 20px 80px rgba(0,0,0,0.7);
}
.cm-modal-overlay.show .cm-modal { transform: translateY(0); }
.cm-modal-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
}
.cm-modal-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.cm-modal-close {
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-color); border-radius: var(--radius-md);
    background: transparent; color: var(--text-muted); cursor: pointer; font-size: 1rem;
    transition: all var(--transition-fast); font-family: var(--font-primary); line-height: 1;
}
.cm-modal-close:hover { border-color: var(--text-muted); color: var(--text-primary); }
.random-prompt-box {
    background: rgba(255,255,255,0.03); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 16px; margin-bottom: 14px;
}
.random-prompt-text { font-size: 0.88rem; line-height: 1.65; color: var(--text-secondary); margin-bottom: 8px; }
.random-prompt-meta { font-size: 0.68rem; color: var(--text-muted); }
.cm-modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cm-modal-btn {
    padding: 9px 18px; border-radius: var(--radius-pill);
    font-size: 0.8rem; font-weight: 600; font-family: var(--font-primary);
    cursor: pointer; transition: all var(--transition-fast);
}
.cm-modal-btn.primary { background: var(--gradient-1); border: none; color: #fff; }
.cm-modal-btn.primary:hover { opacity: 0.9; transform: translateY(-1px); }
.cm-modal-btn.secondary { border: 1px solid var(--border-color); background: transparent; color: var(--text-muted); }
.cm-modal-btn.secondary:hover { border-color: var(--border-hover); color: var(--text-secondary); }

/* Random prompt button */
.btn-random-prompt {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: var(--radius-pill);
    border: 1px solid rgba(168,85,247,0.3); background: rgba(168,85,247,0.08);
    color: var(--accent-1); font-size: 0.72rem; font-weight: 600;
    font-family: var(--font-primary); cursor: pointer; transition: all var(--transition-fast);
}
.btn-random-prompt:hover { background: rgba(168,85,247,0.15); border-color: var(--accent-1); }

/* ==========================================
   SHARE MODAL
   ========================================== */
.share-btn:hover { color: #22d3ee !important; border-color: rgba(34,211,238,0.4) !important; background: rgba(34,211,238,0.08) !important; }
.share-modal-text {
    font-size: 0.88rem; line-height: 1.65; color: var(--text-secondary);
    background: rgba(255,255,255,0.03); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 14px; margin-bottom: 16px;
}

/* ==========================================
   REMIX
   ========================================== */
.remix-btn:hover { color: var(--accent-3) !important; border-color: rgba(6,214,160,0.4) !important; background: rgba(6,214,160,0.08) !important; }
.remix-list { display: flex; flex-direction: column; gap: 12px; max-height: 55vh; overflow-y: auto; padding-right: 4px; }
.remix-list::-webkit-scrollbar { width: 4px; }
.remix-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.remix-item {
    background: rgba(255,255,255,0.03); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 14px;
}
.remix-item-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.remix-num {
    font-family: var(--font-display); font-size: 0.65rem; font-weight: 700;
    color: var(--accent-3); opacity: 0.7;
}
.remix-niche, .remix-platform {
    font-size: 0.62rem; font-weight: 500; padding: 2px 7px;
    border-radius: var(--radius-pill); background: rgba(6,214,160,0.1); color: var(--accent-3);
}
.remix-platform { background: rgba(59,130,246,0.1); color: #3b82f6; }
.remix-item-text { font-size: 0.82rem; line-height: 1.55; color: var(--text-secondary); margin-bottom: 10px; }
.remix-copy-btn {
    padding: 4px 12px; border-radius: var(--radius-pill);
    font-size: 0.7rem; font-weight: 600; font-family: var(--font-primary);
    border: 1px solid var(--border-color); background: transparent;
    color: var(--text-muted); cursor: pointer; transition: all var(--transition-fast);
}
.remix-copy-btn:hover { border-color: var(--accent-3); color: var(--accent-3); }

/* ==========================================
   PACK BUILDER
   ========================================== */
.pack-btn:hover { color: #f97316 !important; border-color: rgba(249,115,22,0.4) !important; background: rgba(249,115,22,0.08) !important; }
.pack-btn.in-pack { color: #f97316 !important; border-color: rgba(249,115,22,0.3) !important; background: rgba(249,115,22,0.08) !important; }

.packbuilder-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: var(--radius-pill);
    border: 1px solid var(--border-color); background: transparent;
    color: var(--text-muted); font-size: 0.75rem; font-weight: 600;
    font-family: var(--font-primary); cursor: pointer; transition: all var(--transition-fast);
}
.packbuilder-btn:hover, .packbuilder-btn.has-items {
    border-color: #f97316; color: #f97316; background: rgba(249,115,22,0.08);
}
.pack-badge { background: #f97316 !important; }

.pack-name-row { padding: 14px 24px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
.pack-name-input {
    width: 100%; padding: 9px 12px;
    border-radius: var(--radius-md); border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.04); color: var(--text-primary);
    font-size: 0.88rem; font-family: var(--font-display); font-weight: 600;
    outline: none; transition: border var(--transition-fast);
}
.pack-name-input:focus { border-color: #f97316; }
.pack-item {
    display: flex; align-items: flex-start; gap: 10px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 12px;
}
.pack-item-num {
    font-family: var(--font-display); font-size: 0.65rem; font-weight: 700;
    color: #f97316; opacity: 0.7; flex-shrink: 0; padding-top: 2px;
}
.pack-item-text { font-size: 0.8rem; line-height: 1.5; color: var(--text-secondary); flex: 1; }
.pack-item-remove {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-size: 1.1rem; line-height: 1; padding: 0; flex-shrink: 0;
    transition: color var(--transition-fast);
}
.pack-item-remove:hover { color: #ef4444; }
.pack-footer {
    padding: 14px 24px; border-top: 1px solid var(--border-color);
    display: flex; gap: 8px; flex-shrink: 0;
}
.pack-export-btn {
    flex: 1; padding: 10px; border-radius: var(--radius-md);
    background: linear-gradient(135deg, #f97316, #ef4444);
    border: none; color: #fff; font-size: 0.82rem; font-weight: 700;
    font-family: var(--font-primary); cursor: pointer; transition: opacity var(--transition-fast);
}
.pack-export-btn:hover { opacity: 0.9; }
.pack-clear-btn {
    padding: 10px 14px; border-radius: var(--radius-md);
    border: 1px solid var(--border-color); background: transparent;
    color: var(--text-muted); font-size: 0.78rem; font-weight: 600;
    font-family: var(--font-primary); cursor: pointer; transition: all var(--transition-fast);
}
.pack-clear-btn:hover { border-color: #ef4444; color: #ef4444; }

/* ==========================================
   NICHE PROFILE
   ========================================== */
.profile-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: var(--radius-pill);
    font-size: 0.65rem; font-weight: 600;
    background: rgba(168,85,247,0.1); border: 1px solid rgba(168,85,247,0.25);
    color: var(--accent-1); white-space: nowrap; max-width: 160px;
    overflow: hidden; text-overflow: ellipsis;
}
.profile-reset-link {
    font-size: 0.65rem; color: var(--text-muted); background: none; border: none;
    cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 2px;
    transition: color var(--transition-fast);
}
.profile-reset-link:hover { color: var(--text-secondary); }
.profile-wrap { display: flex; align-items: center; gap: 6px; }

/* First-visit onboarding tip */
.onboarding-tip {
    position: fixed; bottom: 80px; right: 24px; z-index: 900;
    background: #1e2433; border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 14px 18px;
    max-width: 300px; box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    transform: translateY(20px) scale(0.95); opacity: 0;
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1); pointer-events: none;
}
.onboarding-tip.show { transform: translateY(0) scale(1); opacity: 1; pointer-events: all; }
.onboarding-tip-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.onboarding-tip-title { font-size: 0.82rem; font-weight: 700; }
.onboarding-tip-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; line-height: 1; }
.onboarding-tip-text { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }
.onboarding-tip-arrow { color: var(--accent-1); }

/* ==========================================
   NOTES
   ========================================== */
.note-area { margin-bottom: 8px; }
.note-toggle-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: var(--radius-pill);
    border: 1px solid var(--border-color); background: transparent;
    color: var(--text-muted); font-size: 0.7rem; font-weight: 500;
    font-family: var(--font-primary); cursor: pointer; transition: all var(--transition-fast);
}
.note-toggle-btn:hover, .note-toggle-btn.has-note {
    border-color: #f59e0b; color: #f59e0b; background: rgba(245,158,11,0.07);
}
.note-editor { margin-top: 8px; }
.note-textarea {
    width: 100%; min-height: 70px; padding: 9px 12px;
    border-radius: var(--radius-md); border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.04); color: var(--text-primary);
    font-size: 0.78rem; font-family: var(--font-primary); resize: vertical;
    outline: none; transition: border var(--transition-fast); box-sizing: border-box;
}
.note-textarea:focus { border-color: #f59e0b; }
.note-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.note-char-count { font-size: 0.65rem; color: var(--text-muted); margin-right: auto; }
.note-save-btn, .note-cancel-btn {
    padding: 4px 12px; border-radius: var(--radius-pill);
    font-size: 0.7rem; font-weight: 600; font-family: var(--font-primary); cursor: pointer;
}
.note-save-btn { background: #f59e0b; border: none; color: #000; }
.note-cancel-btn { background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); }
.note-preview {
    margin-top: 8px; padding: 8px 10px;
    background: rgba(245,158,11,0.06); border-left: 2px solid #f59e0b;
    border-radius: 0 4px 4px 0;
    font-size: 0.75rem; color: var(--text-muted); line-height: 1.5;
    white-space: pre-wrap;
}

/* ==========================================
   PANEL SEARCH BAR (Saved + Collections)
   ========================================== */
.panel-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 16px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 0 10px;
    transition: border-color 0.2s;
}
.panel-search-wrap:focus-within {
    border-color: rgba(168,85,247,0.5);
    background: rgba(168,85,247,0.05);
}
.panel-search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
    pointer-events: none;
}
.panel-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    padding: 10px 8px;
    font-size: 13px;
    color: var(--text-primary);
    font-family: inherit;
    min-width: 0;
}
.panel-search-input::placeholder { color: var(--text-muted); }
.panel-search-clear {
    display: none;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.panel-search-clear:hover { background: rgba(255,255,255,0.15); color: var(--text-primary); }
.panel-search-no-results {
    padding: 28px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}
.panel-search-no-results strong { color: var(--text-secondary); }

/* ==========================================
   KEYBOARD SHORTCUT HINT BADGE
   ========================================== */
.kb-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    letter-spacing: 0;
    line-height: 1;
}
.prompt-card:hover .kb-hint { opacity: 1; }
.kb-hint.kb-flash {
    background: rgba(168,85,247,0.3);
    border-color: rgba(168,85,247,0.7);
    color: #c084fc;
    opacity: 1;
    transform: scale(1.15);
    transition: transform 0.1s, background 0.1s, color 0.1s;
}

/* ==========================================
   HISTORY TAG FILTERS
   ========================================== */
.hist-tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 10px;
    min-height: 0;
}
.hist-tag-filters:empty { padding: 0; }
.hist-tag-chip {
    padding: 4px 11px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    font-family: inherit;
    letter-spacing: 0.01em;
}
.hist-tag-chip:hover {
    border-color: rgba(168,85,247,0.4);
    color: var(--text-secondary);
    background: rgba(168,85,247,0.08);
}
.hist-tag-chip.active {
    background: rgba(168,85,247,0.2);
    border-color: rgba(168,85,247,0.6);
    color: #c084fc;
}
.hist-tag-niche {
    background: rgba(6,214,160,0.1) !important;
    color: #06d6a0 !important;
    border-color: rgba(6,214,160,0.25) !important;
}

/* ==========================================
   PROMPT ENHANCER
   ========================================== */

.prompt-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.btn-enhance {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    font-size: 0.73rem;
    font-weight: 600;
    font-family: var(--font-primary);
    border-radius: 20px;
    border: 1px solid rgba(168,85,247,0.35);
    background: rgba(168,85,247,0.08);
    color: #a855f7;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.btn-enhance:hover:not(:disabled):not(.enhanced) {
    background: rgba(168,85,247,0.18);
    border-color: rgba(168,85,247,0.7);
    color: #c084fc;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(168,85,247,0.25);
}

.btn-enhance.enhancing {
    opacity: 0.65;
    cursor: default;
    animation: enhancePulse 0.9s ease infinite;
}

.btn-enhance.enhanced {
    border-color: rgba(6,214,160,0.45);
    background: rgba(6,214,160,0.1);
    color: #06d6a0;
    cursor: default;
}

@keyframes enhancePulse {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 0.35; }
}

/* Card in enhanced state */
.card-enhanced {
    border-color: rgba(168,85,247,0.45) !important;
    box-shadow: 0 0 20px rgba(168,85,247,0.12), 0 4px 20px rgba(168,85,247,0.08) !important;
}

.card-enhanced::after {
    content: 'âœ¨ MEGA-PROMPT';
    position: absolute;
    top: -1px;
    right: 12px;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 3px 8px;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(135deg, #a855f7, #06d6a0);
    color: #fff;
    pointer-events: none;
}

/* The card must be position:relative for the ::after to anchor */
.prompt-card { position: relative; }

/* Prompt text while enhancing */
.prompt-text.enhancing {
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

/* Enhanced prompt text â€” slightly larger, more spacing */
.prompt-text.enhanced-text {
    opacity: 1;
    transition: opacity 0.4s ease;
    font-size: 0.82rem;
    line-height: 1.65;
    white-space: pre-wrap;
}

/* ==========================================
   KEYBOARD SHORTCUTS MODAL
   ========================================== */

.kb-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.kb-modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.kb-modal {
    background: #13111a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    width: 420px;
    max-width: calc(100vw - 32px);
    box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 0 1px rgba(168,85,247,0.1);
    transform: translateY(12px) scale(0.97);
    transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
    overflow: hidden;
}

.kb-modal-overlay.open .kb-modal {
    transform: translateY(0) scale(1);
}

/* Header */
.kb-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.kb-modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.1px;
}

.kb-modal-title svg { color: #a855f7; flex-shrink: 0; }

.kb-modal-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 7px;
    border-radius: 6px;
    transition: all 0.15s;
    font-family: var(--font-primary);
    line-height: 1;
}
.kb-modal-close:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.75);
}

/* Body */
.kb-modal-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.kb-group-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kb-hover-note {
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: rgba(255,255,255,0.22);
    text-transform: none;
}

.kb-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.kb-row:last-child { border-bottom: none; }

.kb-keys {
    display: flex;
    align-items: center;
    gap: 4px;
}

kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    min-width: 28px;
    font-family: var(--font-primary);
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-bottom-width: 2px;
    border-radius: 6px;
    letter-spacing: 0.2px;
    line-height: 1;
}

.kb-desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
    text-align: right;
}

/* Footer */
.kb-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.7rem;
    color: rgba(255,255,255,0.25);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.kb-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 6px;
    font-family: var(--font-primary);
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-bottom-width: 2px;
    border-radius: 5px;
}

/* ==========================================
   PROMPT REMIXER
   ========================================== */

.btn-remix {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    font-size: 0.73rem;
    font-weight: 600;
    font-family: var(--font-primary);
    border-radius: 20px;
    border: 1px solid rgba(56,189,248,0.35);
    background: rgba(56,189,248,0.07);
    color: #38bdf8;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
    white-space: nowrap;
    margin-left: 6px;
}

.btn-remix:hover:not(.active) {
    background: rgba(56,189,248,0.16);
    border-color: rgba(56,189,248,0.65);
    color: #7dd3fc;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(56,189,248,0.18);
}

.btn-remix.active {
    background: rgba(56,189,248,0.18);
    border-color: rgba(56,189,248,0.55);
    color: #7dd3fc;
}

/* Remix panel */
.remix-panel {
    margin-top: 12px;
    border-top: 1px solid rgba(56,189,248,0.12);
    padding-top: 12px;
    animation: remixSlideIn 0.22s ease;
}

@keyframes remixSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.remix-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
}

.remix-panel-title {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: #38bdf8;
    opacity: 0.75;
}

.remix-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s;
    line-height: 1;
    font-family: var(--font-primary);
}
.remix-close-btn:hover { color: rgba(255,255,255,0.7); }

/* 2-col grid, 5th card spans full width */
.remix-angles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}
.remix-angles-grid .remix-angle-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

/* Individual angle card */
.remix-angle-card {
    border-radius: 9px;
    padding: 9px 10px 8px;
    border: 1px solid transparent;
    transition: all 0.18s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.remix-angle-card:hover { transform: translateY(-1px); }

/* Color variants */
.remix-angle-blue   { background: rgba(56,189,248,0.07);  border-color: rgba(56,189,248,0.18);  }
.remix-angle-amber  { background: rgba(251,191,36,0.07);  border-color: rgba(251,191,36,0.18);  }
.remix-angle-red    { background: rgba(248,113,113,0.07); border-color: rgba(248,113,113,0.18); }
.remix-angle-purple { background: rgba(168,85,247,0.07);  border-color: rgba(168,85,247,0.18);  }
.remix-angle-green  { background: rgba(52,211,153,0.07);  border-color: rgba(52,211,153,0.18);  }

.remix-angle-blue:hover   { border-color: rgba(56,189,248,0.48);  box-shadow: 0 2px 10px rgba(56,189,248,0.1);  }
.remix-angle-amber:hover  { border-color: rgba(251,191,36,0.48);  box-shadow: 0 2px 10px rgba(251,191,36,0.1);  }
.remix-angle-red:hover    { border-color: rgba(248,113,113,0.48); box-shadow: 0 2px 10px rgba(248,113,113,0.1); }
.remix-angle-purple:hover { border-color: rgba(168,85,247,0.48);  box-shadow: 0 2px 10px rgba(168,85,247,0.1);  }
.remix-angle-green:hover  { border-color: rgba(52,211,153,0.48);  box-shadow: 0 2px 10px rgba(52,211,153,0.1);  }

/* Angle label */
.remix-angle-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.remix-angle-blue   .remix-angle-label { color: #38bdf8; }
.remix-angle-amber  .remix-angle-label { color: #fbbf24; }
.remix-angle-red    .remix-angle-label { color: #f87171; }
.remix-angle-purple .remix-angle-label { color: #c084fc; }
.remix-angle-green  .remix-angle-label { color: #34d399; }

/* Prompt text â€” clamped to 4 lines */
.remix-angle-text {
    font-size: 0.72rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.72);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Copy button */
.remix-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.63rem;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
    font-family: var(--font-primary);
    align-self: flex-start;
}
.remix-copy-btn:hover { color: rgba(255,255,255,0.8); }

/* Mobile: single column */
@media (max-width: 600px) {
    .remix-angles-grid { grid-template-columns: 1fr; }
    .remix-angles-grid .remix-angle-card:last-child:nth-child(odd) { grid-column: auto; }
}

/* ==========================================
   MOBILE
   ========================================== */
@media (max-width: 600px) {
    .side-panel { width: 100vw; }
    .bulk-action-bar { left: 16px; right: 16px; transform: none; border-radius: 14px; flex-wrap: wrap; justify-content: center; }
    .header-badge-btn span { display: none; }
    .header-badge-btn { padding: 7px 9px; }
    .packbuilder-btn span { display: none; }
    .profile-chip { display: none; }
}

/* ==========================================
   AI GENERATE BUTTON (count bar)
   ========================================== */
.btn-ai-generate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, rgba(139,92,246,0.18) 0%, rgba(59,130,246,0.12) 100%);
    color: #c4b5fd;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.01em;
}
.btn-ai-generate:hover {
    background: linear-gradient(135deg, rgba(139,92,246,0.32) 0%, rgba(59,130,246,0.22) 100%);
    border-color: rgba(139, 92, 246, 0.8);
    color: #ddd6fe;
    box-shadow: 0 0 14px rgba(139,92,246,0.3);
    transform: translateY(-1px);
}
.btn-ai-generate svg { opacity: 0.9; }

/* ==========================================
   AI GENERATE MODAL
   ========================================== */
.ai-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}
.ai-modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}
.ai-modal {
    background: linear-gradient(145deg, #16112a 0%, #0f172a 100%);
    border: 1px solid rgba(139,92,246,0.35);
    border-radius: 18px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(139,92,246,0.15), inset 0 1px 0 rgba(255,255,255,0.06);
    transform: translateY(12px) scale(0.97);
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), opacity 0.22s ease;
    opacity: 0;
    overflow: hidden;
}
.ai-modal-overlay.open .ai-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.ai-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.ai-modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #e2d9f3;
    letter-spacing: -0.01em;
}
.ai-gemini-badge {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.ai-modal-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s ease;
}
.ai-modal-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.ai-modal-body { padding: 20px 22px; }
.ai-modal-subtitle {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin: 0 0 16px;
    line-height: 1.5;
}
.ai-topic-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(139,92,246,0.3);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 0.88rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    line-height: 1.55;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}
.ai-topic-input::placeholder { color: rgba(148,163,184,0.5); }
.ai-topic-input:focus {
    outline: none;
    border-color: rgba(139,92,246,0.7);
    box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.ai-topic-input.ai-shake {
    animation: aiShake 0.35s ease;
    border-color: rgba(239,68,68,0.6);
}
@keyframes aiShake {
    0%,100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-4px); }
}

.ai-modal-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    font-size: 0.76rem;
    color: rgba(148,163,184,0.6);
    line-height: 1.4;
}
.ai-modal-hint strong { color: rgba(196,181,253,0.85); }

.ai-modal-footer {
    padding: 0 22px 20px;
}
.ai-generate-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: 11px;
    border: none;
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}
.ai-generate-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #6d28d9 0%, #1d4ed8 100%);
    box-shadow: 0 8px 24px rgba(124,58,237,0.4);
    transform: translateY(-1px);
}
.ai-generate-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Spin animation for loading icon */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.spin-icon { animation: spin 0.9s linear infinite; }

/* ==========================================
   AI RESULT BANNER
   ========================================== */
.ai-result-banner {
    margin-bottom: 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(124,58,237,0.14) 0%, rgba(37,99,235,0.1) 100%);
    border: 1px solid rgba(139,92,246,0.3);
    padding: 12px 16px;
}
.ai-result-banner-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ai-result-badge {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.ai-result-topic {
    font-size: 0.82rem;
    color: #c4b5fd;
    flex: 1;
}
.ai-result-topic strong { color: #e2d9f3; }
.ai-result-clear {
    font-size: 0.76rem;
    color: rgba(148,163,184,0.7);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 0;
    white-space: nowrap;
    transition: color 0.15s;
}
.ai-result-clear:hover { color: #c4b5fd; }

/* ==========================================
   AI GENERATED CARD BADGE
   ========================================== */
.ai-card-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: #c4b5fd;
    background: rgba(124,58,237,0.18);
    border: 1px solid rgba(139,92,246,0.35);
    border-radius: 6px;
    padding: 2px 7px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.ai-generated-card { border-color: rgba(139,92,246,0.22) !important; }
.ai-generated-card:hover { border-color: rgba(139,92,246,0.45) !important; }

@media (max-width: 600px) {
    .ai-modal { border-radius: 14px; }
    .ai-modal-header, .ai-modal-body, .ai-modal-footer { padding-left: 16px; padding-right: 16px; }
    .btn-ai-generate span { display: none; }
    .btn-ai-generate { padding: 7px 9px; }
}

/* ==========================================
   DAILY STREAK BADGE
   ========================================== */
.streak-badge {
    display: none;
    align-items: center;
    gap: 5px;
    padding: 5px 10px 5px 8px;
    border-radius: 20px;
    border: 1px solid rgba(251,146,60,0.35);
    background: rgba(251,146,60,0.08);
    color: rgba(251,191,36,0.85);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: default;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.2s;
    white-space: nowrap;
    letter-spacing: 0.01em;
    font-family: var(--font-primary);
    user-select: none;
    position: relative;
}

.streak-badge:hover {
    background: rgba(251,146,60,0.15);
    border-color: rgba(251,146,60,0.55);
    transform: translateY(-1px);
}

.streak-num {
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1;
    color: #fbbf24;
}

.streak-label {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.8;
}

/* Tier: Warm (3â€“6) */
.streak-warm {
    border-color: rgba(251,146,60,0.5);
    background: rgba(251,146,60,0.12);
    color: #fb923c;
}
.streak-warm .streak-num { color: #fb923c; }

/* Tier: Hot (7â€“13) */
.streak-hot {
    border-color: rgba(239,68,68,0.55);
    background: rgba(239,68,68,0.12);
    color: #f87171;
    box-shadow: 0 0 10px rgba(239,68,68,0.2);
}
.streak-hot .streak-num { color: #fca5a5; }

/* Tier: Blazing (14â€“29) */
.streak-blazing {
    border-color: rgba(245,158,11,0.7);
    background: linear-gradient(135deg, rgba(239,68,68,0.15) 0%, rgba(245,158,11,0.15) 100%);
    color: #fcd34d;
    box-shadow: 0 0 16px rgba(245,158,11,0.25);
}
.streak-blazing .streak-num { color: #fde68a; }

/* Tier: Legendary (30+) */
.streak-legendary {
    border-color: rgba(167,139,250,0.7);
    background: linear-gradient(135deg, rgba(239,68,68,0.18) 0%, rgba(167,139,250,0.18) 100%);
    color: #c4b5fd;
    box-shadow: 0 0 20px rgba(167,139,250,0.3), 0 0 40px rgba(239,68,68,0.1);
}
.streak-legendary .streak-num { color: #e9d5ff; }

/* Level-up animation */
@keyframes streakLevelUp {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.2) rotate(-3deg); }
    60%  { transform: scale(1.15) rotate(2deg); }
    100% { transform: scale(1); }
}
.streak-levelup { animation: streakLevelUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

/* Pulsing glow for 7+ streaks */
@keyframes streakPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(239,68,68,0.2); }
    50%       { box-shadow: 0 0 22px rgba(239,68,68,0.45); }
}
.streak-hot    { animation: streakPulse 2.5s ease-in-out infinite; }
.streak-hot:hover { animation: none; }

@keyframes streakPulseBlaze {
    0%, 100% { box-shadow: 0 0 16px rgba(245,158,11,0.25); }
    50%       { box-shadow: 0 0 32px rgba(245,158,11,0.5); }
}
.streak-blazing    { animation: streakPulseBlaze 2s ease-in-out infinite; }
.streak-blazing:hover { animation: none; }

@keyframes streakPulseLegend {
    0%, 100% { box-shadow: 0 0 20px rgba(167,139,250,0.3), 0 0 40px rgba(239,68,68,0.1); }
    50%       { box-shadow: 0 0 36px rgba(167,139,250,0.55), 0 0 60px rgba(239,68,68,0.2); }
}
.streak-legendary    { animation: streakPulseLegend 1.8s ease-in-out infinite; }
.streak-legendary:hover { animation: none; }

@media (max-width: 600px) {
    .streak-label { display: none; }
    .streak-badge { padding: 5px 8px; }
}

/* ==========================================
   SHARE MODALS
   ========================================== */

/* Share-out modal â€” slightly wider */
.share-out-modal { max-width: 540px; }

/* Prompt preview box */
.share-prompt-preview {
    margin: 0 22px 20px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Link section */
.share-link-section { padding: 0 22px 18px; }
.share-link-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(148,163,184,0.7);
    margin-bottom: 8px;
}
.share-link-row { display: flex; gap: 8px; }
.share-link-input {
    flex: 1;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.55);
    font-size: 0.8rem;
    font-family: var(--font-primary);
    outline: none;
    cursor: text;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.share-link-input:focus { border-color: rgba(167,139,250,0.4); }
.share-link-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 8px;
    border: 1px solid rgba(167,139,250,0.4);
    background: rgba(124,58,237,0.14);
    color: #c4b5fd;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    flex-shrink: 0;
}
.share-link-copy:hover { background: rgba(124,58,237,0.28); border-color: rgba(167,139,250,0.7); }
.share-link-copy-done { color: #6ee7b7 !important; border-color: rgba(110,231,183,0.5) !important; background: rgba(16,185,129,0.12) !important; }

/* Social section */
.share-social-section {
    padding: 0 22px 18px;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 18px;
    margin-top: 2px;
}
.share-social-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(148,163,184,0.7);
    margin-bottom: 10px;
}
.share-social-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.share-social-btn:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.2); color: #fff; transform: translateY(-1px); }
/* X / Twitter */
.share-social-x:hover { border-color: rgba(255,255,255,0.35); }
/* LinkedIn */
.share-social-linkedin { color: rgba(96,165,250,0.85); border-color: rgba(96,165,250,0.25); }
.share-social-linkedin:hover { background: rgba(96,165,250,0.12); border-color: rgba(96,165,250,0.5); color: #93c5fd; }
/* WhatsApp */
.share-social-whatsapp { color: rgba(74,222,128,0.85); border-color: rgba(74,222,128,0.25); }
.share-social-whatsapp:hover { background: rgba(74,222,128,0.1); border-color: rgba(74,222,128,0.5); color: #86efac; }
/* Native / More */
.share-social-native { color: rgba(167,139,250,0.85); border-color: rgba(167,139,250,0.25); }
.share-social-native:hover { background: rgba(124,58,237,0.15); border-color: rgba(167,139,250,0.5); color: #c4b5fd; }

/* Bottom note */
.share-out-note {
    font-size: 0.72rem;
    color: rgba(148,163,184,0.45);
    text-align: center;
    padding: 0 22px 18px;
    margin: 0;
}

/* Received share modal â€” prompt text */
.share-modal-text {
    padding: 0 22px 20px;
    font-size: 0.92rem;
    line-height: 1.65;
    color: rgba(255,255,255,0.82);
    white-space: pre-wrap;
    max-height: 260px;
    overflow-y: auto;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    margin: 0 22px 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.cm-modal-actions { padding: 0 22px 22px; }

@media (max-width: 600px) {
    .share-social-row { gap: 6px; }
    .share-social-btn { padding: 7px 10px; font-size: 0.74rem; }
    .share-prompt-preview, .share-link-section, .share-social-section { padding-left: 16px; padding-right: 16px; }
    .share-out-note { padding-left: 16px; padding-right: 16px; }
    .share-modal-text { margin-left: 16px; margin-right: 16px; }
    .cm-modal-actions { padding-left: 16px; padding-right: 16px; }
}

/* ==========================================
   TOP PROMPTS LEADERBOARD PANEL
   ========================================== */

/* Reuse side-panel base â€” just add lb-panel overrides */
.lb-panel { display: flex; flex-direction: column; }

/* Stats bar under header */
.lb-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px 14px;
    font-size: 0.75rem;
    color: rgba(148,163,184,0.65);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 4px;
}
.lb-stat strong { color: rgba(255,255,255,0.75); font-weight: 700; }
.lb-stat-dot { color: rgba(255,255,255,0.2); }

/* Scrollable list */
.lb-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

/* Individual item */
.lb-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}
.lb-item:hover { background: rgba(255,255,255,0.03); }
.lb-item-top3 { background: rgba(167,139,250,0.04); }
.lb-item-top3:hover { background: rgba(167,139,250,0.08); }

/* Rank column */
.lb-rank {
    flex-shrink: 0;
    width: 26px;
    text-align: center;
    padding-top: 2px;
    font-size: 1.1rem;
    line-height: 1;
}
.lb-rank-top { font-size: 1.25rem; }
.lb-rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(148,163,184,0.7);
}

/* Body */
.lb-body { flex: 1; min-width: 0; }
.lb-text {
    margin: 0 0 5px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lb-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.lb-tag {
    display: inline-flex;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(255,255,255,0.06);
    color: rgba(148,163,184,0.7);
    border: 1px solid rgba(255,255,255,0.07);
}

/* Right column: count + copy */
.lb-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-top: 2px;
}
.lb-count {
    font-size: 0.7rem;
    font-weight: 700;
    color: #a78bfa;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.lb-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: rgba(148,163,184,0.6);
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.lb-copy-btn:hover { background: rgba(124,58,237,0.18); border-color: rgba(167,139,250,0.4); color: #c4b5fd; }
.lb-copy-btn.lb-copy-done { background: rgba(16,185,129,0.12); border-color: rgba(110,231,183,0.4); color: #6ee7b7; }

/* Footer */
.lb-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.lb-clear-btn {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(239,68,68,0.25);
    background: rgba(239,68,68,0.06);
    color: rgba(239,68,68,0.6);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.15s;
}
.lb-clear-btn:hover { background: rgba(239,68,68,0.14); border-color: rgba(239,68,68,0.5); color: #fca5a5; }

/* ==========================================
   PROMPT OF THE DAY (POTD)
   ========================================== */

.potd-card {
    margin: 36px auto 0;
    max-width: 720px;
    border-radius: 16px;
    border: 1px solid rgba(167,139,250,0.22);
    background: linear-gradient(135deg, rgba(124,58,237,0.08) 0%, rgba(56,189,248,0.05) 100%);
    backdrop-filter: blur(12px);
    padding: 0;
    overflow: hidden;
    position: relative;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    box-shadow: 0 0 0 1px rgba(167,139,250,0.1), 0 8px 32px rgba(124,58,237,0.12);
}
.potd-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #7c3aed, #38bdf8, #7c3aed);
    background-size: 200% 100%;
    animation: potdBarScroll 4s linear infinite;
}
@keyframes potdBarScroll {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}
.potd-card.potd-visible { opacity: 1; transform: translateY(0); }

/* Header row */
.potd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 10px;
    gap: 12px;
}
.potd-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
}
.potd-pulse {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #a78bfa;
    flex-shrink: 0;
    animation: potdPulse 2s ease-in-out infinite;
}
@keyframes potdPulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(167,139,250,0.6); }
    50%       { opacity: 0.8; transform: scale(1.15); box-shadow: 0 0 0 5px rgba(167,139,250,0); }
}
.potd-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a78bfa;
}
.potd-countdown {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.potd-countdown-label {
    font-size: 0.68rem;
    color: rgba(148,163,184,0.6);
    letter-spacing: 0.04em;
}
.potd-countdown-time {
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'Space Grotesk', var(--font-primary);
    color: rgba(148,163,184,0.85);
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
}

/* Prompt text */
.potd-text {
    margin: 0;
    padding: 4px 20px 16px;
    font-size: 0.92rem;
    line-height: 1.65;
    color: rgba(255,255,255,0.88);
    white-space: pre-wrap;
}

/* Footer row */
.potd-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
    gap: 12px;
    flex-wrap: wrap;
}
.potd-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.potd-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.potd-tag-category { background: rgba(124,58,237,0.18); color: #c4b5fd; border: 1px solid rgba(167,139,250,0.25); }
.potd-tag-niche     { background: rgba(56,189,248,0.1);  color: #7dd3fc;  border: 1px solid rgba(56,189,248,0.2); }
.potd-tag-platform  { background: rgba(74,222,128,0.1);  color: #86efac;  border: 1px solid rgba(74,222,128,0.2); }

/* Copy button */
.potd-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid rgba(167,139,250,0.35);
    background: rgba(124,58,237,0.15);
    color: #c4b5fd;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    flex-shrink: 0;
}
.potd-copy-btn:hover { background: rgba(124,58,237,0.3); border-color: rgba(167,139,250,0.65); transform: translateY(-1px); }
.potd-copy-btn.potd-copy-done { background: rgba(16,185,129,0.15); border-color: rgba(110,231,183,0.4); color: #6ee7b7; }

@media (max-width: 640px) {
    .potd-card { margin-top: 28px; border-radius: 12px; }
    .potd-header { padding: 12px 16px 8px; flex-direction: column; align-items: flex-start; gap: 6px; }
    .potd-text { padding: 4px 16px 14px; font-size: 0.86rem; }
    .potd-footer { padding: 10px 16px 14px; }
    .potd-copy-btn { padding: 7px 14px; font-size: 0.78rem; }
}
