/* ============================================
   INTEGRATED HOME + CHAT LAYOUT
   Two-panel layout with navigation sidebar and chat panel
   ============================================ */

/* Hide scrollbars but keep scroll functionality */
.home-sidebar,
.chat-messages {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.home-sidebar::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

/* ============================================
   AFFIRMATION CARD
   ============================================ */
.affirmation-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.affirmation-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.affirmation-icon {
    width: 18px;
    height: 18px;
    color: #fbbf24;
    flex-shrink: 0;
}

.affirmation-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    font-style: italic;
}

/* Light theme (Cloud) */
.theme-cloud .affirmation-card {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.15);
}

.theme-cloud .affirmation-card:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.25);
}

.theme-cloud .affirmation-text {
    color: #475569;
}

/* Main Layout Container */
.home-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    height: calc(100vh - 60px); /* Account for header */
    gap: 0;
    position: relative;
    overflow: hidden;
}

/* Left Sidebar - Navigation & Stats */
.home-sidebar {
    background: var(--theme-surface);
    border-right: 1px solid var(--theme-border);
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
    transition: all 0.3s ease;
    height: 100%;
}

/* Mobile Panel Toggle - only visible on mobile */
.mobile-panel-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-accent));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
}

.mobile-panel-toggle svg {
    fill: currentColor;
}

/* Compact Hero Section */
.hero-section-compact {
    margin-bottom: 20px;
}

.hero-title-compact {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--theme-text-primary);
}

.search-wrapper-compact {
    margin-bottom: 8px;
}

/* Minimal search box styling for sidebar */
.search-wrapper-compact .unified-search-wrapper {
    max-width: 100%;
}

.search-wrapper-compact .unified-search-container {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: none;
    backdrop-filter: blur(8px);
}

.search-wrapper-compact .unified-search-container.focused {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--theme-accent, rgba(255, 255, 255, 0.3));
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.search-wrapper-compact .unified-search-container.expanded {
    border-radius: 12px 12px 0 0;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.search-wrapper-compact .search-input-wrapper {
    padding: 8px 4px;
}

.search-wrapper-compact .unified-search-input {
    font-size: 1rem;
}

/* Compact Stats */
.quick-stats-section-compact {
    margin-bottom: 20px;
}

.quick-stats-row {
    display: flex;
    gap: 8px;
}

.stat-chip {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stat-chip:hover {
    background: var(--theme-primary-soft);
    border-color: var(--theme-primary);
    transform: translateY(-2px);
}

.stat-chip .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--theme-primary);
    line-height: 1;
}

.stat-chip .stat-label {
    font-size: 0.7rem;
    color: var(--theme-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Compact Tools Section */
.tools-section-compact {
    margin-bottom: 12px;
}

.section-title-compact {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--theme-text-secondary);
    margin: 0 0 8px;
}

.tools-grid-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.tool-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tool-chip-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.tool-chip-icon svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.tool-chip-name {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--theme-text-primary);
    text-align: center;
    line-height: 1.2;
}

/* Compact Categories */
.categories-section-compact {
    margin-bottom: 20px;
}

.categories-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-chip-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--theme-text-primary);
    transition: all 0.2s ease;
}

.category-chip-compact:hover {
    background: var(--theme-primary-soft);
    border-color: var(--theme-primary);
}

.category-chip-compact svg {
    width: 16px;
    height: 16px;
    fill: var(--theme-primary);
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--theme-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-link-compact {
    font-size: 0.85rem;
    color: var(--theme-primary);
    text-decoration: none;
    font-weight: 500;
}

.dashboard-link-compact:hover {
    text-decoration: underline;
}

/* ============================================
   RIGHT PANEL - CHAT
   ============================================ */
.chat-panel {
    display: flex;
    flex-direction: column;
    background: var(--theme-page-bg);
    min-height: 0;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Chat Header - Integrated Version */
.chat-header-integrated {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--theme-surface);
    border-bottom: 1px solid var(--theme-border);
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-avatar svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.chat-header-info h2 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: var(--theme-text-primary);
}

.provider-badge {
    font-size: 0.65rem;
    color: var(--theme-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.provider-select {
    padding: 6px 12px;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-bg-secondary);
    color: var(--theme-text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.provider-select:focus {
    outline: none;
    border-color: var(--theme-primary);
}

.provider-select option {
    background: #1e293b;
    color: #f1f5f9;
    padding: 8px 12px;
}

.provider-select option:hover,
.provider-select option:checked {
    background: #334155;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--theme-bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: var(--theme-primary-soft);
}

.icon-btn svg {
    fill: var(--theme-text-secondary);
}

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================
   CHAT MESSAGE BUBBLES
   ============================================ */
.message-wrapper {
    display: flex;
    gap: 12px;
    max-width: 85%;
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-wrapper.user {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message-wrapper.assistant {
    margin-right: auto;
}

.avatar-container {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.assistant-avatar {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
}

.user-avatar {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
}

.message-sender {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--theme-text-secondary);
    padding-left: 4px;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9375rem;
    line-height: 1.6;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.user-bubble {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    border-bottom-right-radius: 6px;
}

.assistant-bubble {
    background: var(--theme-surface, white);
    color: var(--theme-text-primary, #1e293b);
    border: 1px solid var(--theme-border, #e2e8f0);
    border-bottom-left-radius: 6px;
}

.message-time {
    font-size: 0.7rem;
    color: var(--theme-text-muted, #94a3b8);
    padding-left: 4px;
}

.message-text {
    white-space: pre-wrap;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 16px 20px !important;
    min-width: 70px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Image Message */
.image-message {
    position: relative;
}

.image-message img {
    max-width: 100%;
    border-radius: 12px;
    display: block;
}

.image-action {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    color: white;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-message:hover .image-action {
    opacity: 1;
}

/* Image Error Placeholder */
.image-error-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: var(--theme-surface-secondary, #f1f5f9);
    border: 2px dashed var(--theme-border, #e2e8f0);
    border-radius: 12px;
    text-align: center;
    min-width: 200px;
    min-height: 150px;
    gap: 8px;
    color: var(--theme-text-muted, #94a3b8);
}

.error-icon {
    color: var(--theme-text-muted, #94a3b8);
    fill: currentColor;
}

.error-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--theme-text-secondary, #64748b);
}

.error-desc {
    font-size: 0.8rem;
}

/* JSON Message */
.json-message {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
}

.json-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #2d2d2d;
    color: #9cdcfe;
    font-size: 0.75rem;
    font-weight: 600;
}

.json-header svg {
    fill: currentColor;
}

.copy-btn {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #9cdcfe;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.copy-btn svg {
    fill: currentColor;
}

.json-message pre {
    margin: 0;
    padding: 14px;
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.5;
}

.json-message code {
    color: #ce9178;
    font-family: 'Cascadia Code', 'Fira Code', Consolas, monospace;
}

/* Dark Theme Chat Adjustments */
.theme-space .assistant-bubble,
.theme-winter .assistant-bubble,
.theme-nature .assistant-bubble,
.theme-ocean .assistant-bubble {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.theme-space .image-error-placeholder,
.theme-winter .image-error-placeholder,
.theme-nature .image-error-placeholder,
.theme-ocean .image-error-placeholder {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Cloud Theme Chat Adjustments */
.theme-cloud .assistant-bubble {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(30, 58, 95, 0.1);
    color: #1e293b;
    box-shadow: 0 2px 12px rgba(30, 58, 95, 0.08);
}

.theme-cloud .message-sender {
    color: #475569;
}

.theme-cloud .image-error-placeholder {
    background: rgba(241, 245, 249, 0.9);
    border-color: rgba(30, 58, 95, 0.15);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 900px) {
    .home-layout {
        grid-template-columns: 1fr;
        height: calc(100vh - 60px);
    }
    
    /* On mobile, show either sidebar OR chat based on toggle */
    .home-sidebar {
        display: none;
        height: 100%;
    }
    
    .home-sidebar.mobile-visible {
        display: flex;
    }
    
    .chat-panel {
        display: flex;
        height: 100%;
    }
    
    .chat-panel.mobile-hidden {
        display: none;
    }
    
    .mobile-panel-toggle {
        display: flex;
    }
}

@media (max-width: 480px) {
    .tools-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-stats-row {
        flex-wrap: wrap;
    }
    
    .stat-chip {
        flex: 1 1 calc(33% - 8px);
        min-width: 80px;
    }
}

/* ============================================
   DARK THEME ADJUSTMENTS
   ============================================ */
.theme-space .home-sidebar,
.theme-winter .home-sidebar,
.theme-nature .home-sidebar,
.theme-ocean .home-sidebar {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
}

.theme-space .chat-header-integrated,
.theme-winter .chat-header-integrated,
.theme-nature .chat-header-integrated,
.theme-ocean .chat-header-integrated {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
}

.theme-space .stat-chip,
.theme-space .tool-chip,
.theme-space .category-chip-compact,
.theme-winter .stat-chip,
.theme-winter .tool-chip,
.theme-winter .category-chip-compact,
.theme-nature .stat-chip,
.theme-nature .tool-chip,
.theme-nature .category-chip-compact,
.theme-ocean .stat-chip,
.theme-ocean .tool-chip,
.theme-ocean .category-chip-compact {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-space .stat-chip:hover,
.theme-space .tool-chip:hover,
.theme-space .category-chip-compact:hover,
.theme-winter .stat-chip:hover,
.theme-winter .tool-chip:hover,
.theme-winter .category-chip-compact:hover,
.theme-nature .stat-chip:hover,
.theme-nature .tool-chip:hover,
.theme-nature .category-chip-compact:hover,
.theme-ocean .stat-chip:hover,
.theme-ocean .tool-chip:hover,
.theme-ocean .category-chip-compact:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   ☁️ CLOUD THEME - Light Mode Contrast Fixes
   Enhanced text visibility on light backgrounds
   ============================================ */
.theme-cloud .home-sidebar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
}

.theme-cloud .section-title-compact {
    color: #1e3a5f;
}

.theme-cloud .tool-chip {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(30, 58, 95, 0.15);
}

.theme-cloud .tool-chip:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.15);
}

.theme-cloud .tool-chip-name {
    color: #1e293b;
}

.theme-cloud .stat-chip {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(30, 58, 95, 0.15);
}

.theme-cloud .stat-chip:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.15);
}

.theme-cloud .stat-value {
    color: #1e3a5f;
}

.theme-cloud .stat-label {
    color: #475569;
}

.theme-cloud .category-chip-compact {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(30, 58, 95, 0.15);
    color: #1e293b;
}

.theme-cloud .category-chip-compact:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.theme-cloud .affirmation-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(30, 58, 95, 0.1);
}

.theme-cloud .affirmation-text {
    color: #334155;
}

.theme-cloud .hero-title-compact {
    color: #1e3a5f;
}

.theme-cloud .gradient-text {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   ☁️ CLOUD THEME - UnifiedSearchBar Overrides
   Force light mode styling for search dropdown
   ============================================ */
.theme-cloud .unified-search-container,
.theme-cloud .unified-search-wrapper .unified-search-container {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 24px rgba(30, 58, 95, 0.12), 0 0 0 1px rgba(30, 58, 95, 0.08) !important;
}

.theme-cloud .unified-search-container.focused {
    box-shadow: 0 12px 48px rgba(30, 58, 95, 0.18), 0 0 0 2px #3b82f6 !important;
}

.theme-cloud .search-results-dropdown {
    background: rgba(255, 255, 255, 0.98) !important;
    border-top: 1px solid rgba(30, 58, 95, 0.1) !important;
}

.theme-cloud .unified-search-input {
    color: #1e3a5f !important;
}

.theme-cloud .unified-search-input::placeholder {
    color: #64748b !important;
}

.theme-cloud .search-icon {
    color: #3b82f6 !important;
}

.theme-cloud .section-header {
    color: #1e3a5f !important;
    background: rgba(59, 130, 246, 0.06) !important;
}

.theme-cloud .section-header span {
    color: #1e3a5f !important;
}

.theme-cloud .section-icon {
    color: #3b82f6 !important;
    fill: #3b82f6 !important;
}

.theme-cloud .result-item {
    background: transparent !important;
}

.theme-cloud .result-item .tool-name {
    color: #1e293b !important;
}

.theme-cloud .result-item .tool-category {
    color: #64748b !important;
}

.theme-cloud .result-item:hover,
.theme-cloud .result-item.selected {
    background: rgba(59, 130, 246, 0.08) !important;
}

.theme-cloud .keyboard-hints {
    background: rgba(59, 130, 246, 0.04) !important;
    border-top: 1px solid rgba(30, 58, 95, 0.08) !important;
}

.theme-cloud .keyboard-hints span {
    color: #475569 !important;
}

.theme-cloud .keyboard-hints kbd {
    background: #ffffff !important;
    border-color: rgba(30, 58, 95, 0.15) !important;
    color: #1e3a5f !important;
}

/* ============================================
   🔮 MYSTIC THEME - Enhanced Readability
   Improved contrast and font styling for 
   better visibility on dark purple backgrounds
   ============================================ */

/* Sidebar Background */
.theme-mystic .home-sidebar {
    background: rgba(26, 10, 46, 0.95);
    backdrop-filter: blur(16px);
    border-right: 1px solid rgba(249, 115, 22, 0.2);
}

/* Hero Title - Larger, bolder, better contrast */
.theme-mystic .hero-title-compact {
    font-size: 1.35rem;
    font-weight: 700;
    color: #faf5ff;
    text-shadow: 0 2px 12px rgba(249, 115, 22, 0.3);
    letter-spacing: -0.01em;
}

/* Gradient text - Orange/gold magical glow */
.theme-mystic .gradient-text {
    background: linear-gradient(135deg, #f97316 0%, #fbbf24 50%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.4));
}

/* Stats Section */
.theme-mystic .stat-chip {
    background: rgba(45, 27, 78, 0.8);
    border: 1px solid rgba(249, 115, 22, 0.25);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.theme-mystic .stat-chip:hover {
    background: rgba(60, 35, 100, 0.9);
    border-color: rgba(249, 115, 22, 0.5);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.2);
    transform: translateY(-3px);
}

.theme-mystic .stat-chip .stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #f97316;
    text-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
}

.theme-mystic .stat-chip .stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #e9d5ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 1;
}

/* Section Titles */
.theme-mystic .section-title-compact {
    font-size: 0.75rem;
    font-weight: 700;
    color: #c4b5fd;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 12px rgba(196, 181, 253, 0.3);
}

/* Tool Chips */
.theme-mystic .tool-chip {
    background: rgba(45, 27, 78, 0.8);
    border: 1px solid rgba(124, 58, 237, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-mystic .tool-chip:hover {
    background: rgba(60, 35, 100, 0.9);
    border-color: rgba(249, 115, 22, 0.5);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.2);
    transform: translateY(-2px);
}

.theme-mystic .tool-chip-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: #faf5ff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Affirmation Card */
.theme-mystic .affirmation-card {
    background: rgba(45, 27, 78, 0.7);
    border: 1px solid rgba(249, 115, 22, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.theme-mystic .affirmation-card:hover {
    background: rgba(60, 35, 100, 0.8);
    border-color: rgba(249, 115, 22, 0.4);
}

.theme-mystic .affirmation-text {
    font-size: 0.9rem;
    color: #e9d5ff;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Chat Header */
.theme-mystic .chat-header-integrated {
    background: rgba(26, 10, 46, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(249, 115, 22, 0.2);
}

.theme-mystic .chat-header-info h2 {
    color: #faf5ff;
    font-weight: 600;
}

.theme-mystic .provider-badge {
    color: #c4b5fd;
}

/* Chat Avatar */
.theme-mystic .chat-avatar {
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 0 16px rgba(249, 115, 22, 0.4);
}

/* Provider Select */
.theme-mystic .provider-select {
    background: rgba(45, 27, 78, 0.8);
    border-color: rgba(124, 58, 237, 0.3);
    color: #faf5ff;
}

.theme-mystic .provider-select:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

/* Icon Buttons */
.theme-mystic .icon-btn {
    background: rgba(45, 27, 78, 0.8);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.theme-mystic .icon-btn:hover {
    background: rgba(249, 115, 22, 0.2);
    border-color: rgba(249, 115, 22, 0.4);
}

.theme-mystic .icon-btn svg {
    fill: #c4b5fd;
}

.theme-mystic .icon-btn:hover svg {
    fill: #f97316;
}

/* Assistant Chat Bubble */
.theme-mystic .assistant-bubble {
    background: rgba(45, 27, 78, 0.9);
    border: 1px solid rgba(124, 58, 237, 0.2);
    color: #faf5ff;
}

/* Search wrapper adjustments */
.theme-mystic .search-wrapper-compact .unified-search-container {
    background: rgba(45, 27, 78, 0.8);
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.theme-mystic .search-wrapper-compact .unified-search-container.focused {
    background: rgba(60, 35, 100, 0.9);
    border-color: #f97316;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.theme-mystic .unified-search-input {
    color: #faf5ff;
}

.theme-mystic .unified-search-input::placeholder {
    color: #a78bfa;
}

/* Mobile Toggle Button */
.theme-mystic .mobile-panel-toggle {
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
}

.theme-mystic .mobile-panel-toggle:hover {
    box-shadow: 0 6px 24px rgba(249, 115, 22, 0.5);
}
