/* ========================================
   MAS TOOLS - NEW STYLES
   ======================================== */

/* Explanation boxes at top of MAS panels */
.mas-explanation {
    padding: 0.75rem 1rem;
    margin: 0.75rem 0.75rem 0;
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.06), rgba(99, 102, 241, 0.04));
    border-left: 3px solid rgba(79, 140, 255, 0.4);
    border-radius: 0 8px 8px 0;
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.mas-explanation p {
    margin: 0;
}

.mas-explanation strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Tool-specific badge colors */
.toggle-badge[data-feature="scraper"].active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4), 0 0 20px rgba(52, 152, 219, 0.3);
}

.toggle-badge[data-feature="entities"].active {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4), 0 0 20px rgba(155, 89, 182, 0.3);
}

.toggle-badge[data-feature="images"].active {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4), 0 0 20px rgba(231, 76, 60, 0.3);
}

.toggle-badge[data-feature="social"].active {
    background: linear-gradient(135deg, #1abc9c, #16a085);
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.4), 0 0 20px rgba(26, 188, 156, 0.3);
}

.toggle-badge[data-feature="research"].active {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4), 0 0 20px rgba(243, 156, 18, 0.3);
}

/* Entity Network Panel */
.entity-panel {
    grid-column: span 2;
}

.entity-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.entity-category {
    background: var(--bg-elevated);
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.entity-category h5 {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.entity-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-dark);
    border-radius: 4px;
    margin: 0.15rem 0.15rem;
}

.entity-item:last-child {
    margin-bottom: 0;
}

.entity-name {
    font-weight: 500;
    color: var(--text-primary);
}

.entity-count {
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

.relationship-graph {
    margin-top: 0.5rem;
    padding: 0.6rem;
    background: var(--bg-dark);
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    max-height: 150px;
    overflow-y: auto;
}

.relationship-graph h5 {
    font-size: 0.7rem;
    margin-bottom: 0.4rem;
}

.relationship-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    margin: 0.15rem;
    background: var(--bg-elevated);
    border-radius: 4px;
    font-size: 0.7rem;
}

.relationship-arrow {
    color: var(--accent);
    font-weight: bold;
}

/* Image Gallery Panel */
.image-panel {
    grid-column: span 2;
}

.image-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 1rem;
}

.image-card {
    background: rgba(30, 35, 50, 0.6);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.15);
    transition: all 0.3s ease;
}

.image-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.image-preview {
    width: 220px;
    height: 160px;
    object-fit: cover;
    background: var(--bg-dark);
    border-radius: 8px;
}

.image-meta {
    padding: 0.75rem;
}

.image-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.image-status.safe {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.image-status.warning {
    background: rgba(234, 179, 8, 0.15);
    color: var(--warning);
}

.image-details {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.image-colors {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.15s;
}

.color-swatch:hover {
    transform: scale(1.3);
}

/* Image type badges */
.image-type-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    backdrop-filter: blur(4px);
}

.image-type-photo {
    background: rgba(59, 130, 246, 0.85);
}

.image-type-chart {
    background: rgba(139, 92, 246, 0.85);
}

.image-type-graphic {
    background: rgba(20, 184, 166, 0.85);
}

.image-type-screenshot {
    background: rgba(249, 115, 22, 0.85);
}

.image-type-unknown {
    background: rgba(100, 116, 139, 0.85);
}

/* Social Media Panel */
.social-panel {
    grid-column: span 2;
}

.social-platforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.platform-card {
    background: var(--bg-elevated);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.platform-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.platform-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.platform-status {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.platform-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stat-item {
    background: var(--bg-dark);
    padding: 0.5rem;
    border-radius: 6px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sentiment-breakdown {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sentiment-pill {
    flex: 1;
    text-align: center;
    padding: 0.4rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.sentiment-pill.positive {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.sentiment-pill.neutral {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
}

.sentiment-pill.negative {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.top-posts {
    margin-top: 0.75rem;
}

.post-item {
    padding: 0.5rem;
    background: var(--bg-dark);
    border-radius: 6px;
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
}

.post-title {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.post-meta {
    display: flex;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* Research Library Panel */
.research-panel {
    grid-column: span 2;
}

.research-sections {
    padding: 1rem;
}

.research-section {
    margin-bottom: 1.5rem;
}

.research-section:last-child {
    margin-bottom: 0;
}

.research-section h5 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.research-count {
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.research-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.research-item {
    background: var(--bg-elevated);
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
    transition: all 0.2s ease;
}

.research-item:hover {
    background: var(--bg-dark);
    transform: translateX(2px);
}

.research-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.research-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.research-authors {
    color: var(--text-secondary);
}

.research-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.research-link {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.research-link:hover {
    background: var(--accent);
    color: white;
}

.repo-stats {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.4rem;
}

.repo-stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.repo-stat strong {
    color: var(--accent);
}

.research-summary {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0.4rem 0;
    font-style: italic;
}

.research-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0.4rem;
}

.research-tag {
    font-size: 0.65rem;
    padding: 2px 8px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent);
    border-radius: 10px;
}

/* Collapse button for panels */
.collapse-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.collapse-btn:hover {
    background: var(--bg-dark);
    color: var(--text-primary);
}

.panel-content {
    max-height: 500px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

.panel-content.collapsed {
    max-height: 0;
    overflow: hidden;
}

/* Responsive adjustments for MAS tools */
@media (max-width: 768px) {

    .entity-panel,
    .image-panel,
    .social-panel,
    .research-panel {
        grid-column: span 1;
    }

    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .social-platforms {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   V3 ENGINE CONTEXT BADGE
   ======================================== */

.v3-context-badge {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    border: 1px solid;
    backdrop-filter: blur(8px);
    animation: v3BadgeFadeIn 0.5s ease-out;
}

@keyframes v3BadgeFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.v3-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.v3-quality {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.v3-engine-tag {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.25));
    color: var(--accent);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.v3-badge-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.v3-stat {
    font-size: 0.72rem;
    color: var(--text-secondary);
    padding: 0.15rem 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.v3-retry {
    color: var(--warning);
    border-color: rgba(234, 179, 8, 0.2);
    background: rgba(234, 179, 8, 0.08);
}

/* Memory comparison context */
.v3-memory-context {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.72rem;
}

.v3-memory-label {
    color: var(--text-muted);
    font-weight: 500;
}

.v3-memory-direction {
    font-weight: 600;
    color: var(--text-primary);
}

.v3-memory-delta {
    color: var(--accent);
    padding: 0.1rem 0.4rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 3px;
}

.v3-memory-span {
    color: var(--text-muted);
    font-style: italic;
}

/* ========================================
   V3 MONITOR MODAL STYLES (NEW)
   ======================================== */
.v3-status-box {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.v3-status-indicator {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.memory-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.mem-stat {
    background: var(--bg-dark);
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border);
}

.mem-stat span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.mem-stat strong {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.monitor-add-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
    margin-bottom: 1rem;
}

.monitor-add-form input {
    flex: 1;
    padding: 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-dark);
    color: var(--text-primary);
}

.monitor-add-form select {
    padding: 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-dark);
    color: var(--text-primary);
}

.action-btn {
    background: var(--success);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0 1rem;
    cursor: pointer;
    font-weight: 600;
}

.action-btn:hover {
    background: #16a34a;
}

.monitor-list {
    background: var(--bg-dark);
    border-radius: 8px;
    border: 1px solid var(--border);
    max-height: 200px;
    overflow-y: auto;
}

.no-monitors {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.monitor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.monitor-item:last-child {
    border-bottom: none;
}

.monitor-info-topic {
    font-weight: 600;
    color: var(--text-primary);
}

.monitor-info-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.monitor-stop-btn {
    background: transparent;
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.monitor-stop-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ========================================
   QUICK ACCESS & PREVIEW & CREDITS STYLES
   ======================================== */
.github-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.top-left-quick-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 14px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-right: 15px;
}
.top-left-quick-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.header-left {
    display: flex;
    align-items: center;
}

/* Quick Access Panel */
.quick-access-panel {
    position: fixed;
    top: 80px;
    left: 20px;
    background: rgba(15, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 280px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    z-index: 1000;
    transform: translateX(-120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.quick-access-panel.visible {
    transform: translateX(0);
    opacity: 1;
}
.quick-access-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.quick-access-header h3 { font-size: 1rem; color: #fff; }
.quick-access-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.quick-menu-item {
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: 12px;
    padding: 1rem;
    color: #fff;
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.quick-menu-item:hover { background: rgba(255,255,255,0.1); transform: translateX(5px); }

/* Live Preview Bottom Right */
.live-preview-panel {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, rgba(20, 25, 35, 0.9), rgba(10, 15, 25, 0.95));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 20px rgba(99, 102, 241, 0.2);
    z-index: 50;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: default;
}
.live-preview-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5), 0 0 30px rgba(99, 102, 241, 0.4);
}
.live-preview-icon {
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
}
.live-preview-content {
    display: flex;
    flex-direction: column;
}
.preview-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}
.preview-text {
    font-size: 0.9rem;
    color: #fff;
    font-weight: 500;
    transition: opacity 0.5s;
}

/* Watermark */
.creator-watermark {
    position: fixed;
    bottom: 10px;
    left: 10px;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.2);
    pointer-events: none;
    z-index: 1000;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Credits in settings */
.settings-credits {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.settings-credits a {
    color: var(--accent);
    text-decoration: none;
}
.settings-credits a:hover {
    text-decoration: underline;
}

/* ========================================
   SELECT ALL & BADGE COLOR FIXES
   ======================================== */
.bento-nav-item {
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.bento-nav-item:active {
    transform: scale(0.92);
}

.bento-nav-item[data-feature="news"].active .icon { color: #ff3b30; text-shadow: 0 0 15px rgba(255, 59, 48, 0.8); }
.bento-nav-item[data-feature="news"].active { background: rgba(255, 59, 48, 0.15) !important; border: 1px solid rgba(255, 59, 48, 0.3); }

.bento-nav-item[data-feature="summary"].active .icon { color: #ff9500; text-shadow: 0 0 15px rgba(255, 149, 0, 0.8); }
.bento-nav-item[data-feature="summary"].active { background: rgba(255, 149, 0, 0.15) !important; border: 1px solid rgba(255, 149, 0, 0.3); }

.bento-nav-item[data-feature="sentiment"].active .icon { color: #ffcc00; text-shadow: 0 0 15px rgba(255, 204, 0, 0.8); }
.bento-nav-item[data-feature="sentiment"].active { background: rgba(255, 204, 0, 0.15) !important; border: 1px solid rgba(255, 204, 0, 0.3); }

.bento-nav-item[data-feature="trends"].active .icon { color: #34c759; text-shadow: 0 0 15px rgba(52, 199, 89, 0.8); }
.bento-nav-item[data-feature="trends"].active { background: rgba(52, 199, 89, 0.15) !important; border: 1px solid rgba(52, 199, 89, 0.3); }

.bento-nav-item[data-feature="scraper"].active .icon { color: #5ac8fa; text-shadow: 0 0 15px rgba(90, 200, 250, 0.8); }
.bento-nav-item[data-feature="scraper"].active { background: rgba(90, 200, 250, 0.15) !important; border: 1px solid rgba(90, 200, 250, 0.3); }

.bento-nav-item[data-feature="entities"].active .icon { color: #007aff; text-shadow: 0 0 15px rgba(0, 122, 255, 0.8); }
.bento-nav-item[data-feature="entities"].active { background: rgba(0, 122, 255, 0.15) !important; border: 1px solid rgba(0, 122, 255, 0.3); }

.bento-nav-item[data-feature="images"].active .icon { color: #5856d6; text-shadow: 0 0 15px rgba(88, 86, 214, 0.8); }
.bento-nav-item[data-feature="images"].active { background: rgba(88, 86, 214, 0.15) !important; border: 1px solid rgba(88, 86, 214, 0.3); }

.bento-nav-item[data-feature="social"].active .icon { color: #ff2d55; text-shadow: 0 0 15px rgba(255, 45, 85, 0.8); }
.bento-nav-item[data-feature="social"].active { background: rgba(255, 45, 85, 0.15) !important; border: 1px solid rgba(255, 45, 85, 0.3); }

.bento-nav-item[data-feature="research"].active .icon { color: #af52de; text-shadow: 0 0 15px rgba(175, 82, 222, 0.8); }
.bento-nav-item[data-feature="research"].active { background: rgba(175, 82, 222, 0.15) !important; border: 1px solid rgba(175, 82, 222, 0.3); }

/* ========================================
   MODERN SETTINGS PANEL UI
   ======================================== */
.modal-content {
    background: rgba(20, 20, 25, 0.85);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.6), inset 0 1px 1px rgba(255,255,255,0.1);
    border-radius: 24px;
}

.modal-header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h3 {
    background: linear-gradient(90deg, #fff, #a1a1aa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.3rem;
}

.setting-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    transition: background 0.3s;
}

.setting-group:hover {
    background: rgba(255, 255, 255, 0.04);
}

.setting-group label {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
}

.setting-hint {
    font-size: 0.8rem;
    color: #a1a1aa;
    margin-bottom: 1rem;
}

.toggle-row {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 12px;
}

.save-btn {
    background: linear-gradient(135deg, #007aff, #005bb5);
    border: none;
    border-radius: 100px;
    padding: 0.8rem 2rem;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
    transition: all 0.3s;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.5);
    background: linear-gradient(135deg, #0088ff, #0066cc);
}