/* base.css */
        /* Import Google Font - Inter for a modern, professional look */
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        :root {
            --bg-primary: #ffffff; --bg-secondary: #f8f9fa; --bg-tertiary: #e9ecef;
            --text-primary: #212529; --text-secondary: #6c757d; --text-muted: #adb5bd;
            --border-color: #dee2e6; --shadow: rgba(0, 0, 0, 0.1);
            --accent-red: #dc3545; --accent-orange: #fd7e14; --accent-blue: #007bff;
            --accent-green: #198754; --accent-purple: #6f42c1;
        }
        
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg-primary); color: var(--text-primary); }
.container { display: flex; height: 100vh; }

/* --- Professional Chat Bubble Styling --- */
.message-text {
    line-height: 1.6; /* More breathable line spacing */
    color: var(--text-primary); /* Ensure consistent text color */
}

.message.user .message-text {
    color: white; /* Set user message text to white */
}

.message-text h3 {
    margin-top: 1.5em; /* Space above headers */
    margin-bottom: 0.8em;
    font-size: 1.2em; /* Slightly larger headers */
    font-weight: 700; /* Bolder headers */
    color: #1e293b; /* Darker color for emphasis */
}

.message-text p {
    margin-bottom: 0.5em; /* Reduced space between paragraphs */
}

/* Custom Bullet Points */
.message-text ul {
    list-style: none; /* Remove default bullets */
    padding-left: 1.5em;
    margin-top: 0.8em;
    margin-bottom: 1em;
}

.message-text li {
    position: relative;
    margin-bottom: 0.3em; /* Reduced space between list items */
    padding-left: 0.5em; /* Space for custom bullet */
}

.message-text li::before {
    content: '•'; /* Custom bullet character */
    color: var(--accent-blue); /* Use your brand's blue */
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

/* Code Block Styling */
.message-text pre {
    background-color: #e9ecef; /* Light gray background */
    border-radius: 8px;
    padding: 12px;
    overflow-x: auto;
    margin: 1em 0;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; /* Monospace font for code */
    font-size: 0.9em;
    color: #343a40;
    line-height: 1.4;
}

.message-text code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
    color: #343a40;
}
        /* New Sidebar Styles */
        .hamburger-btn {
            position: fixed;
            left: 280px;
            top: 80px;
            width: 32px;
            height: 40px;
            border: none;
            background: transparent;
            border-radius: 0 8px 8px 0;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #202124;
            transition: all 0.3s ease;
            z-index: 500;
            box-shadow: none;
            border: 1px solid #e8eaed;
            border-left: none;
            background: #f8f9fa;
        }
        
        .hamburger-btn:hover {
            background: #e3f2fd;
            color: #1565c0;
        }
        
        .hamburger-btn.active {
            left: 0px;
            background: #f8f9fa;
            color: #202124;
            border-radius: 0 8px 8px 0;
        }

        
        .sidebar-branding {
            padding: 12px 16px;
            border-bottom: 1px solid #e8eaed;
            min-height: 64px;
            display: flex;
            align-items: center;
            transition: opacity 0.3s ease;
        }
        
        
        .sidebar-branding-text {
            font-size: 18px;
            font-weight: 500;
            color: #202124;
        }
        
        .sidebar-section {
            padding: 16px;
            border-bottom: 1px solid #e8eaed;
        }
        
        .start-chat-btn {
            width: 100%;
            padding: 10px 14px;
            background: #1a73e8;
            border: none;
            border-radius: 8px;
            color: white;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        
        .start-chat-btn:hover {
            background: #1765cc;
        }
        
        .nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 8px 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.2s;
            color: #5f6368;
            font-size: 14px;
            margin-bottom: 1px;
        }
        
        .nav-item svg {
            width: 18px;
            height: 18px;
            stroke-width: 1.5;
            flex-shrink: 0;
        }
        
        .nav-item:hover {
            background: #e8eaed;
        }
        
        .nav-item.active {
            background: #e8f0fe;
            color: #1a73e8;
        }
        
        .library-section {
            margin-bottom: 4px;
        }
        
        .library-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.2s;
            color: #202124;
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 4px;
        }
        
        .library-header:hover {
            background: #e8eaed;
        }
        
        .library-header svg {
            width: 18px;
            height: 18px;
            stroke-width: 2;
            transition: transform 0.2s;
        }
        
        .library-header.collapsed svg {
            transform: rotate(-90deg);
        }
        
        .library-items {
            margin-left: 12px;
            border-left: 2px solid #e8eaed;
            padding-left: 8px;
            overflow: hidden;
            transition: max-height 0.3s ease, opacity 0.3s ease;
        }
        
        .library-items.collapsed {
            max-height: 0;
            opacity: 0;
        }
        
        .library-items:not(.collapsed) {
            max-height: 500px;
            opacity: 1;
        }
        
        .nav-item.sub-item {
            font-size: 13px;
            padding: 6px 12px;
        }
        
        .search-box {
            width: 100%;
            padding: 10px 14px;
            border: 1px solid #dadce0;
            border-radius: 8px;
            font-size: 14px;
            outline: none;
        }
        
        .search-box:focus {
            border-color: #1a73e8;
        }
        
        .sidebar-content {
            flex: 1;
            overflow-y: auto;
            padding: 0 8px;
        }
        
        .section-label {
            font-size: 11px;
            font-weight: 600;
            color: #5f6368;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            padding: 12px 12px 8px 12px;
            margin-top: 8px;
        }
        
        .chat-item {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            padding: 10px 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.2s;
            position: relative;
            margin-bottom: 2px;
            border-left: 3px solid transparent;
        }
        
        .chat-item:hover {
            background: #f1f3f4;
        }
        
        .chat-item-content {
            flex: 1;
            min-width: 0;
        }
        
        .chat-item-title {
            font-size: 13px;
            font-weight: 500;
            color: #202124;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .chat-item-time {
            font-size: 11px;
            color: #5f6368;
        }

        .sidebar-footer {
            padding: 12px;
            border-top: 1px solid #e8eaed;
        }
        
        .campaign-card {
            background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
            border-radius: 12px;
            padding: 12px;
            cursor: pointer;
            transition: all 0.2s;
            border: 1px solid #dadce0;
        }
        
        .campaign-card:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }
        
        .campaign-icon {
            font-size: 28px;
            flex-shrink: 0;
        }
        
        .campaign-title {
            font-size: 13px;
            font-weight: 600;
            color: #202124;
            margin-bottom: 2px;
            line-height: 1.2;
        }
        
        .campaign-description {
            font-size: 11px;
            color: #5f6368;
            line-height: 1.3;
        }
        
        .campaign-progress-bar {
            height: 4px;
            background: #dadce0;
            border-radius: 2px;
            overflow: hidden;
        }
        
        .campaign-progress-fill {
            height: 100%;
            background: linear-gradient(to right, #1a73e8, #00bcd4);
            border-radius: 2px;
            transition: width 0.3s;
        }
        
        .campaign-progress-text {
            font-size: 11px;
            font-weight: 600;
            color: #5f6368;
            white-space: nowrap;
        }
        
        .campaign-action-btn {
            width: 100%;
            margin-top: 8px;
            padding: 6px 12px;
            background: #1a73e8;
            border: none;
            border-radius: 6px;
            color: white;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .campaign-action-btn:hover {
            background: #1765cc;
        }
        
        .feed-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
        .feed-type { background: var(--accent-red); color: white; font-size: 10px; font-weight: 600; padding: 4px 8px; border-radius: 12px; text-transform: uppercase; }
        .feed-type.missing { background: var(--accent-purple); }
        .feed-type.safe { background: var(--accent-green); }
        .feed-type.weather { background: var(--accent-blue); }
        .feed-type.utility { background: var(--accent-orange); }
        .feed-type.moderate { background: #ffc107; }
        .feed-type.catastrophic { background: #ff1493; }
        .feed-type.alert { background: var(--accent-red); }
        .feed-type.story { background: #4ecdc4; }
        .feed-time { font-size: 12px; color: var(--text-muted); }
        .feed-title-text { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
        .feed-location { font-size: 12px; color: var(--text-secondary); }
        
        .main-content { flex: 1; display: flex; flex-direction: column; background: var(--bg-primary); }
        
        /* Image Viewer Modal */
        .image-viewer-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.9);
            z-index: 2000;
            align-items: center;
            justify-content: center;
        }
        .image-viewer-modal.show {
            display: flex;
        }
        .viewer-content {
            position: relative;
            max-width: 90%;
            max-height: 90%;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .viewer-image {
            max-width: 100%;
            max-height: 80vh;
            object-fit: contain;
            border-radius: 8px;
        }
        .viewer-close {
            position: absolute;
            top: 20px;
            right: 40px;
            color: white;
            font-size: 40px;
            font-weight: bold;
            cursor: pointer;
            background: rgba(0, 0, 0, 0.5);
            border-radius: 50%;
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: none;
            transition: transform 0.2s ease;
        }
        .viewer-close:hover {
            transform: scale(1.1);
            background: rgba(0, 0, 0, 0.7);
        }
        .viewer-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            color: white;
            font-size: 30px;
            cursor: pointer;
            background: rgba(0, 0, 0, 0.5);
            border: none;
            padding: 20px 15px;
            border-radius: 4px;
            transition: background 0.2s ease;
        }
        .viewer-nav:hover {
            background: rgba(0, 0, 0, 0.7);
        }
        .viewer-prev {
            left: 20px;
        }
        .viewer-next {
            right: 20px;
        }
        .viewer-thumbnails {
            display: flex;
            gap: 10px;
            margin-top: 20px;
            padding: 10px;
            overflow-x: auto;
            max-width: 100%;
        }
        .viewer-thumb {
            width: 60px;
            height: 60px;
            object-fit: cover;
            border-radius: 4px;
            cursor: pointer;
            border: 2px solid transparent;
            opacity: 0.6;
            transition: all 0.2s ease;
        }
        .viewer-thumb.active {
            border-color: white;
            opacity: 1;
        }
        .viewer-thumb:hover {
            opacity: 1;
        }
        /* Enhanced Image Effects for Full-Page Layout */
        .page-image {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            overflow: hidden;
            position: relative;
        }
        
        .page-image:hover {
            transform: scale(1.02);
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
            z-index: 5;
        }
        
        .page-image img {
            transition: all 0.4s ease;
            filter: blur(5px);
            transform: scale(1.05);
        }
        
        .page-image img.loaded {
            filter: blur(0px);
            transform: scale(1);
        }
        
        /* Text animations */
        .page-text {
            opacity: 0;
            animation: fadeInText 1s ease forwards;
        }
        
        @keyframes fadeInText {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .text-line {
            opacity: 0;
            animation: fadeInLine 0.8s ease forwards;
        }
        
        @keyframes fadeInLine {
            from { opacity: 0; transform: translateX(-20px); }
            to { opacity: 1; transform: translateX(0); }
        }
        
        /* Simple Background */
        #bookPages {
            perspective: 1200px;
            transform-style: preserve-3d;
            position: relative;
        }
        
        .page-layer {
            position: absolute;
            width: 100%;
            height: 100%;
            background: white;
            border-radius: 0 12px 12px 0;
            box-shadow: inset -10px 0 20px rgba(0,0,0,0.1);
            transform-style: preserve-3d;
            transform-origin: left center;
            transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            backface-visibility: hidden;
        }
        
        .page-layer.turning-right {
            transform: rotateY(-180deg);
        }
        
        .page-layer.turning-left {
            transform: rotateY(180deg);
        }
        
        .page-back {
            position: absolute;
            width: 100%;
            height: 100%;
            background: #f8f9fa;
            border-radius: 0 12px 12px 0;
            transform: rotateY(180deg);
            backface-visibility: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ccc;
            font-size: 14px;
        }
        
        /* Remove old animations that weren't working */
        .book-page {
            /* Remove the broken animation */
        }
        
        .page-flip-enter, .page-flip-exit {
            /* Remove these - they weren't working properly */
        }
        
        @keyframes pageFlipIn {
            /* Remove - replacing with real 3D flip */
        }
        
        @keyframes pageFlipOut {
            /* Remove - replacing with real 3D flip */
        }
        .feed-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
        .feed-type { background: var(--accent-red); color: white; font-size: 10px; font-weight: 600; padding: 4px 8px; border-radius: 12px; text-transform: uppercase; }
        .feed-type.missing { background: var(--accent-purple); }
        .feed-type.safe { background: var(--accent-green); }
        .feed-type.weather { background: var(--accent-blue); }
        .feed-type.utility { background: var(--accent-orange); }
        .feed-type.moderate { background: #ffc107; }
        .feed-type.catastrophic { background: #ff1493; }
        .feed-type.alert { background: var(--accent-red); }
        .feed-type.story { background: #4ecdc4; }
        .feed-time { font-size: 12px; color: var(--text-muted); }
        .feed-title-text { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
        .feed-location { font-size: 12px; color: var(--text-secondary); }
        
.main-content { flex: 1; display: flex; flex-direction: column; background: var(--bg-primary); overflow: hidden; }
.top-nav { background: var(--bg-primary); border-bottom: 1px solid var(--border-color); padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; position: sticky; top: 0; z-index: 100; }
        .nav-left { display: flex; align-items: center; gap: 12px; }
        .sidebar-toggle { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 4px; padding: 8px 10px; font-size: 16px; cursor: pointer; color: var(--text-secondary); transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; }
        .sidebar-toggle:hover { background: var(--bg-tertiary); color: var(--text-primary); }
        .sidebar-toggle span { line-height: 1; }
        .nav-right { display: flex; align-items: center; gap: 20px; flex-wrap: nowrap; }
        .nav-center { display: flex; gap: 8px; flex-wrap: nowrap; }
        .nav-actions { font-size: 11px; color: #999; display: flex; align-items: center; flex-wrap: nowrap; white-space: nowrap; }
        .nav-actions a { color: #999; text-decoration: none; font-size: 11px; }
        .nav-actions a:hover { color: #333; text-decoration: none; }
        .action-btn { background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 4px; padding: 6px 12px; font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; text-transform: uppercase; letter-spacing: 0.5px; }
        .action-btn:hover { background: var(--bg-tertiary); box-shadow: 0 2px 8px var(--shadow); transform: translateY(-1px); }
        .nav-link { color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; cursor: pointer; transition: color 0.2s ease; }
        .menu-btn { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 4px; padding: 8px 12px; font-size: 16px; cursor: pointer; }
        
        /* Modal Styles */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
        }

        .modal-overlay.show {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .modal {
            background: white;
            border-radius: 12px;
            width: 90%;
            max-width: 500px;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            /* Fix for modal jumping from left to center */
            position: relative;
            margin: 0 auto;
        }
        .modal-header {
            padding: 20px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .modal-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
        }
        
        .modal-close {
            background: none;
            border: none;
            font-size: 24px;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
            transition: all 0.2s ease;
        }
        
        .modal-close:hover {
            background: var(--bg-secondary);
            color: var(--text-primary);
        }
        
        .modal-body {
            padding: 20px;
        }
        
        .form-group {
            margin-bottom: 16px;
        }
        
        .form-label {
            display: block;
            margin-bottom: 6px;
            font-size: 13px;
            font-weight: 500;
            color: var(--text-primary);
        }
        
        .form-label.required::after {
            content: ' *';
            color: var(--accent-red);
        }
        
        .form-input,
        .form-select,
        .form-textarea {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 14px;
            font-family: inherit;
            transition: all 0.2s ease;
        }
        
        .form-input:focus,
        .form-select:focus,
        .form-textarea:focus {
            outline: none;
            border-color: var(--accent-blue);
            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
        }
        
        .form-textarea {
            min-height: 100px;
            resize: vertical;
        }
        
        .form-checkbox-group {
            display: flex;
            align-items: flex-start;
            gap: 8px;
        }
        
        .form-checkbox {
            margin-top: 2px;
        }
        
        .form-checkbox-label {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.4;
        }
        
        .form-radio-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        
        .form-radio-item {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .form-help {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 4px;
        }
        
        .form-actions {
            display: flex;
            gap: 12px;
            justify-content: flex-end;
            margin-top: 24px;
            padding-top: 20px;
            border-top: 1px solid var(--border-color);
        }
        
        .btn {
            padding: 10px 20px;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
        }
        
        .btn-primary {
            background: var(--accent-blue);
            color: white;
        }
        
        .btn-primary:hover {
            background: #0056b3;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
        }
        
        .btn-secondary {
            background: var(--bg-secondary);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
        }
        
        .btn-secondary:hover {
            background: var(--bg-tertiary);
        }
        
        .severity-options {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }
        
        .severity-btn {
            padding: 12px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            background: white;
            cursor: pointer;
            text-align: center;
            transition: all 0.2s ease;
        }
        
        .severity-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }
        
        .severity-btn.active {
            border-color: var(--accent-blue);
            background: rgba(0, 123, 255, 0.1);
        }
        
        .severity-btn.low:hover { border-color: var(--accent-green); }
        .severity-btn.medium:hover { border-color: var(--accent-orange); }
        .severity-btn.high:hover { border-color: var(--accent-red); }
        
        .upload-area {
            border: 2px dashed var(--border-color);
            border-radius: 8px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .upload-area:hover {
            border-color: var(--accent-blue);
            background: rgba(0, 123, 255, 0.02);
        }
        
        .upload-icon {
            font-size: 32px;
            margin-bottom: 8px;
            opacity: 0.5;
        }
        
        .upload-text {
            font-size: 13px;
            color: var(--text-secondary);
        }
        
        .map-container { 
            flex: 1; 
            position: relative; 
            background: var(--bg-secondary); 
            display: flex; 
            align-items: center; 
            justify-content: center; 
            padding: 10px; 
            overflow: hidden; 
        }
        .ai-query-section { 
            position: relative; 
            width: 95%; 
            max-width: 900px; 
            z-index: 5; 
            display: flex;
            flex-direction: column;
            max-height: 95vh;
            overflow: hidden;
        }
        .tag-container {
            background: transparent;
            border: none;
            border-radius: 8px;
            padding: 10px;
            height: 150px;
            overflow-y: scroll;
            overflow-x: hidden;
            margin-bottom: 16px;
            animation: slideInUp 0.6s ease-out;
        }
        
        .tag-container::-webkit-scrollbar {
            width: 6px;
        }
        
        .tag-container::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 3px;
        }
        
        .tag-container::-webkit-scrollbar-thumb {
            background: #c0c0c0;
            border-radius: 3px;
        }
        
        .tag-list {
            text-align: center;
            line-height: 1.8;
        }
        
        .tag {
            display: inline-block;
            margin: 4px;
            padding: 8px 10px;
            background: #ffffff;
            border: 1px solid #e0e0e0;
            border-radius: 12px;
            font-size: 9px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.2px;
            color: #4a5568;
            cursor: pointer;
            transition: all 0.15s;
            white-space: nowrap;
            user-select: none;
        }
        
        .tag:hover {
            background: #fafafa;
            border-color: #c0c0c0;
        }
        
        .tag.selected {
            background: #f0f7ff;
            border-color: #4a90e2;
            border-width: 1.5px;
            color: #4a90e2;
        }
        
        .tag .icon {
            display: inline-block;
            margin-right: 2px;
            font-size: 11px;
        }
        
        .ai-query-container { 
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
            backdrop-filter: blur(25px);
            -webkit-backdrop-filter: blur(25px);
            border: 1px solid rgba(203, 213, 225, 0.4); 
            border-radius: 24px; 
            padding: 12px 18px; 
            display: flex; 
            align-items: center; 
            gap: 16px; 
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); 
            transition: border-color 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        .ai-query-container:focus-within { 
            border-color: #3b82f6; 
            border-width: 2px;
            padding: 17px 23px; /* Adjust padding to compensate for thicker border */
        }
        .ai-query-container.has-categories {
            border-color: #3b82f6; 
            border-width: 2px;
            padding: 17px 23px; /* Adjust padding to compensate for thicker border */
        }
        .query-input { 
            flex: 1; 
            background: transparent; 
            border: none; 
            outline: none; 
            font-size: 17px; 
            color: #1e293b; 
            padding: 6px 0; 
            font-weight: 500;
            position: relative;
            z-index: 2;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
        }
        .query-input::placeholder { 
            color: #9ca3af; 
            font-weight: 400;
            transition: all 0.3s ease;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
        }
        .query-input:focus::placeholder { 
            color: #94a3b8; 
            transform: translateY(-1px);
        }
        .attachment-btn { 
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); 
            border: 1px solid rgba(148, 163, 184, 0.3); 
            border-radius: 16px; 
            padding: 12px; 
            cursor: pointer; 
            color: #475569; 
            font-size: 18px; 
            transition: all 0.3s ease; 
            display: flex; 
            align-items: center; 
            justify-content: center; 
            width: 44px; 
            height: 44px; 
            position: relative;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
            z-index: 2;
        }
        .attachment-btn:hover { 
            background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); 
            color: white; 
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
            border-color: rgba(59, 130, 246, 0.5);
        }
        .attachment-menu { 
            position: absolute; 
            bottom: 60px; 
            left: 0; 
            background: rgba(255, 255, 255, 0.95); 
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.2); 
            border-radius: 20px; 
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 30px rgba(0, 0, 0, 0.1); 
            padding: 12px; 
            display: none; 
            flex-direction: column; 
            gap: 8px; 
            min-width: 200px; 
            z-index: 100;
            animation: menuSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .attachment-menu.show { display: flex; }
        .attachment-option { 
            display: flex; 
            align-items: center; 
            gap: 14px; 
            padding: 16px 20px; 
            border-radius: 14px; 
            cursor: pointer; 
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
            border: none; 
            background: none; 
            text-align: left; 
            font-size: 15px; 
            color: #1e293b;
            font-weight: 500;
        }
        .attachment-option:hover { 
            background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%); 
            transform: translateX(4px);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }
        .attachment-icon { font-size: 20px; width: 22px; }
        .attachment-title { font-weight: 600; font-size: 14px; }
        .send-btn { 
            background: linear-gradient(90deg, #1E88E5 0%, #42A5F5 30%, #64B5F6 60%, #90CAF9 100%); 
            color: white; 
            border: none; 
            border-radius: 16px; 
            padding: 12px 20px; 
            cursor: not-allowed; 
            font-size: 15px; 
            font-weight: 600; 
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            min-width: 80px;
            z-index: 2;
            position: relative;
            opacity: 0.6;
        }
        .send-btn.active { 
            background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
            cursor: pointer;
            opacity: 1;
            transform: translateY(-1px) scale(1.02);
            box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4), 0 4px 12px rgba(0, 0, 0, 0.1);
        }
        .send-btn:not(.active):hover {
            background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
            opacity: 0.6;
        }
        .send-btn.active:hover {
            background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
            transform: translateY(-1px) scale(1.02);
        }
        
        @keyframes slideInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        @keyframes menuSlideIn {
            from {
                opacity: 0;
                transform: translateY(10px) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }
        
        .view-selector { 
            display: flex; 
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
            backdrop-filter: blur(25px);
            -webkit-backdrop-filter: blur(25px);
            border: 1px solid rgba(203, 213, 225, 0.4); 
            border-radius: 16px; 
            padding: 2px; 
            gap: 1px; 
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03); 
            animation: slideInUp 0.6s ease-out 0.2s both;
            position: relative;
            overflow: hidden;
        }
        .view-selector::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(220, 53, 69, 0.1), transparent);
            transform: translateX(-100%);
            transition: transform 0.6s ease;
            pointer-events: none;
        }
        .view-selector:hover::before {
            transform: translateX(100%);
        }
        .view-tab { 
            padding: 8px 14px; 
            border-radius: 14px; 
            background: transparent; 
            border: none; 
            color: #64748b; 
            font-size: 10px; 
            font-weight: 600; 
            cursor: pointer; 
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
            display: flex; 
            align-items: center; 
            gap: 6px; 
            min-width: 60px; 
            justify-content: center; 
            text-transform: uppercase; 
            letter-spacing: 0.6px;
            position: relative;
            overflow: hidden;
            z-index: 2;
        }
        .view-tab::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, #00B8D4 0%, #00E5FF 33%, #1DE9B6 66%, #64FFDA 100%);
            opacity: 0;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            border-radius: 20px;
            z-index: -1;
        }
        .view-tab:hover { 
            color: #00B8D4;
            transform: translateY(-2px) scale(1.02); 
            box-shadow: 0 4px 15px rgba(0, 184, 212, 0.2);
        }
        .view-tab:hover::before {
            opacity: 0.1;
        }
        .view-tab.active { 
            background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important; 
            color: white !important;
            box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4), 0 4px 12px rgba(0, 0, 0, 0.1);
            transform: translateY(-1px) scale(1.02);
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
            font-weight: 700;
            letter-spacing: 0.7px;
        }
        .view-tab.active::before {
            opacity: 1;
            background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
        }
        .view-tab.active svg { 
            stroke: white !important; 
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
        }
        .view-tab.active span {
            color: white !important;
        }
        .view-tab svg { width: 14px; height: 14px; transition: all 0.3s ease; }
        
.response-container { flex: 1; display: none; flex-direction: column; height: 100%; overflow: hidden; }
        .response-container.active { display: flex; }
        .response-content { flex: 1; overflow-y: auto; padding: 20px; padding-bottom: 30px; }
        .response-input-area { position: sticky; bottom: 0; background: var(--bg-primary); border-top: 1px solid var(--border-color); padding: 16px 20px 24px 20px; flex-shrink: 0; }
        .response-input-container { max-width: 800px; margin: 0 auto; }
        .response-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 20px;
            border-bottom: 1px solid var(--border-color);
            background: var(--bg-primary);
            flex-shrink: 0;
        }

        .response-header-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .response-title { font-size: 18px; font-weight: 600; color: var(--text-primary); }
        .new-search-btn { background: var(--accent-blue); color: white; border: none; border-radius: 4px; padding: 8px 16px; font-size: 12px; cursor: pointer; transition: all 0.2s ease; }
        .new-search-btn:hover { background: #0056b3; }
        .chat-response { display: flex; flex-direction: column; gap: 16px; }
        
        .message { display: flex; gap: 12px; margin-bottom: 16px; }
        .message.user { flex-direction: row-reverse; }
        .message-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex-shrink: 0; }
        .message.user .message-avatar { background: var(--accent-blue); color: white; }
        .message.assistant .message-avatar { background: linear-gradient(135deg, var(--accent-red), var(--accent-orange)); color: white; }
.message-content { flex: 1; max-width: 70%; position: relative; }
        .message.user .message-content { text-align: right; }
        
        /* Full-width content for maps and special messages */
        .message-content-full { 
            flex: 1; 
            max-width: 95%; 
            width: 100%; 
        }
.message-bubble { 
    background: var(--bg-secondary); 
    border-radius: 16px; 
    padding: 12px 16px; 
    display: inline-block; 
    max-width: 100%; 
    word-wrap: break-word;
}
        .message.user .message-bubble { background: var(--accent-blue); color: white; border-bottom-right-radius: 4px; }
        .message.assistant .message-bubble { background: var(--bg-secondary); color: var(--text-primary); border-bottom-left-radius: 4px; }
        .message-text { font-size: 14px; line-height: 1.4; }
        .message-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
        .message.user .message-time { text-align: right; }
        
        .crisis-alert { background: rgba(220, 53, 69, 0.1); border: 1px solid var(--accent-red); border-radius: 4px; padding: 12px; margin: 8px 0; }
        .crisis-alert .alert-title { font-weight: 600; color: var(--accent-red); margin-bottom: 4px; }
        
        .map-response { width: 100%; height: 500px; border-radius: 4px; overflow: hidden; position: relative; background: #f8f9fa; margin: 16px 0; }
        .map-background { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(120, 219, 226, 0.3) 0%, transparent 50%); }
        
        /* Google Maps container styling */
        .google-map-container { 
            width: 100%; 
            height: 400px; 
            border-radius: 8px; 
            overflow: hidden; 
            border: 2px solid rgba(255, 255, 255, 0.8);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }
        
        /* Enhanced interactive map styling */
        .interactive-map-container {
            width: 100%;
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid var(--border-color, #e5e7eb);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            margin: 8px 0;
        }
        
        .map-header {
            background: var(--bg-secondary, #f8f9fa);
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-color, #e5e7eb);
        }
        
        .map-header h3 {
            margin: 0 0 4px 0;
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary, #333);
        }
        
        .map-subtitle {
            margin: 0;
            font-size: 12px;
            color: var(--text-muted, #666);
        }
        
        .map-legend {
            background: rgba(255, 255, 255, 0.95);
            padding: 8px 12px;
            border-bottom: 1px solid var(--border-color, #e5e7eb);
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            align-items: center;
            font-size: 12px;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .legend-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        
        .severity-legend {
            display: flex;
            gap: 12px;
            margin-left: auto;
        }
        
        .enhanced-google-map {
            width: 100%;
            height: 400px;
            border: none;
        }
        
        .map-summary {
            background: var(--bg-secondary, #f8f9fa);
            padding: 10px 16px;
            border-top: 1px solid var(--border-color, #e5e7eb);
            font-size: 12px;
            line-height: 1.4;
        }
        
        .map-summary p {
            margin: 0 0 4px 0;
        }
        
        .map-summary p:last-child {
            margin: 0;
        }
        
        /* Map message specific styling */
        .map-message .message-content-full {
            max-width: 100%;
            width: 100%;
        }
        .map-pin { position: absolute; width: 24px; height: 24px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); cursor: pointer; transition: all 0.2s ease; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); z-index: 10; }
        .map-pin:hover { transform: rotate(-45deg) scale(1.2); }
        .map-pin.emergency { background: var(--accent-red); top: 25%; left: 30%; }
        .map-pin.weather { background: var(--accent-blue); top: 60%; left: 70%; }
        .map-pin.utility { background: var(--accent-orange); top: 45%; left: 80%; }
        .map-pin.safe { background: var(--accent-green); top: 70%; left: 25%; }
        .map-pin.shelter { background: var(--accent-purple); top: 35%; left: 60%; }
        .map-pin.story { background: #4ecdc4; top: 40%; left: 45%; }
        .map-pin.podcast { background: #ff9f43; top: 55%; left: 55%; }
        .map-legend { position: absolute; bottom: 16px; left: 16px; background: rgba(255, 255, 255, 0.95); border-radius: 4px; padding: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
        .map-legend { position: absolute; bottom: 16px; left: 16px; background: rgba(255, 255, 255, 0.95); border-radius: 4px; padding: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); max-width: 180px; }
        .legend-item { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 11px; }
        .legend-item:last-child { margin-bottom: 0; }
        .legend-color { width: 12px; height: 12px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
        .map-info { position: absolute; top: 16px; right: 16px; background: rgba(255, 255, 255, 0.95); border-radius: 4px; padding: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); font-size: 12px; color: var(--text-primary); }
        
        @media (min-width: 769px) { .menu-btn { display: none; } }
        @media (max-width: 768px) { 
            .sidebar { position: fixed; top: 0; left: -100%; width: 80%; height: 100vh; z-index: 1000; transition: left 0.3s ease; background: var(--bg-secondary); }
            .sidebar.show { left: 0; }
            .sidebar-toggle { display: none !important; }
            .mobile-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 999; display: none; }
            .mobile-overlay.show { display: block; }
            .container { flex-direction: column; }
            .main-content { width: 100%; height: 100vh; }
            .top-nav { padding: 8px 12px; flex-direction: column; gap: 12px; }
            .nav-left { width: 100%; }
            .nav-right { width: 100%; flex-direction: column; gap: 12px; }
            .nav-center { width: 100%; justify-content: center; margin-right: 0; }
            .nav-actions { width: 100%; justify-content: center; }
            .menu-btn { display: block !important; padding: 6px 10px; font-size: 14px; }
            .response-input-area { padding: 12px 16px 20px 16px; }
            .ai-query-section { 
                width: 95%; 
                margin-top: 10px; 
            }
            .map-container { 
                padding: 20px 10px; 
            }
            .ai-query-container { padding: 8px 12px; border-radius: 0; }
            .query-input { font-size: 14px; padding: 2px 0; }
            .attachment-btn { width: 28px; height: 28px; padding: 6px; }
            .send-btn { padding: 6px 10px; font-size: 12px; }
            .tag-container { height: 115px; padding: 8px; }
            .tag { padding: 6px 8px; font-size: 8px; margin: 3px; }
            .tag .icon { font-size: 10px; }
            .view-tab { padding: 4px 6px; font-size: 9px; min-width: 45px; }
            .view-tab svg { width: 8px; height: 8px; }
            .view-selector { gap: 2px; padding: 2px; }
            .modal { width: 95%; }
        }
        @media (max-width: 480px) { 
            .main-content { height: calc(100vh - 160px); } 
            .top-nav { padding: 8px 12px; gap: 8px; } 
            .nav-center { gap: 4px; } 
            .action-btn { padding: 4px 8px; font-size: 10px; } 
            .ai-query-section { 
                width: 98%; 
                margin-top: 5px; 
            } 
            .map-container { 
                padding: 15px 5px; 
            }
            .tag-container { height: 105px; padding: 6px; }
            .tag { padding: 5px 6px; font-size: 7px; margin: 2px; }
            .tag .icon { font-size: 9px; } 
            .ai-query-container { padding: 10px 14px; } 
            .query-input { font-size: 16px; } 
            .view-selector { flex-wrap: wrap; justify-content: center; } 
            .view-tab { padding: 4px 6px; font-size: 9px; min-width: 40px; } 
            .stats { grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 10px; } 
            .section-content { max-height: 120px; } 
            .chat-item { font-size: 10px; padding: 4px 8px; } 
            .filter-chip { padding: 2px 6px; font-size: 8px; } 
            .feed-item { padding: 10px; margin-bottom: 8px; } 
            .feed-title-text { font-size: 11px; } 
.logo-icon { width: 28px; height: 28px; }
.logo-name { font-size: 16px; }
        }
        /* Credit System Animations */
        @keyframes fadeUp {
            from {
                opacity: 1;
                transform: translateY(0);
            }
            to {
                opacity: 0;
                transform: translateY(-20px);
            }
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: scale(0.95);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }
        
        .credits-indicator {
            display: flex;
            align-items: center;
            transition: all 0.3s ease;
        }
        
        .credits-indicator:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
        }
        
        .credits-badge {
            position: relative;
        }
        
        .credits-amount {
            transition: color 0.3s ease, transform 0.2s ease;
        }
        
        .credit-deduction {
            position: absolute;
            pointer-events: none;
        }
        
        .cost-preview {
            pointer-events: none;
        }
        
        /* Loading animation */
        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        /* Feed animations */
        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

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

        .feed-item-new {
            animation: slideInFade 0.5s ease forwards;
            opacity: 0;
        }

        .feed-refresh-btn:hover {
            color: var(--text-primary) !important;
            transform: rotate(180deg);
            transition: all 0.3s ease;
        }
        
        /* Feed loading skeleton styles */
        .feed-loading-skeleton {
            padding: 8px 0;
        }
        
        .skeleton-item {
            padding: 12px;
            margin-bottom: 12px;
            border-bottom: 1px solid var(--border-color);
        }
        
        .skeleton-item:last-child {
            border-bottom: none;
        }
        
        .skeleton-image {
            width: 100%;
            height: 120px;
            background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
            background-size: 200% 100%;
            animation: skeleton-pulse 1.5s ease-in-out infinite;
            border-radius: 4px;
            margin-bottom: 8px;
        }
        
        .skeleton-line {
            height: 12px;
            background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
            background-size: 200% 100%;
            animation: skeleton-pulse 1.5s ease-in-out infinite;
            border-radius: 4px;
            margin-bottom: 6px;
        }
        
        .skeleton-time {
            width: 30%;
            height: 10px;
        }
        
        .skeleton-title {
            width: 90%;
            height: 14px;
            margin-bottom: 8px;
        }
        
        .skeleton-desc {
            width: 100%;
            height: 11px;
        }
        
        .skeleton-location {
            width: 50%;
            height: 10px;
            margin-top: 4px;
        }
        
        @keyframes skeleton-pulse {
            0% {
                background-position: 200% 0;
            }
            100% {
                background-position: -200% 0;
            }
        }
        
        /* Smooth fade transition when content loads */
        .feed-item {
            animation: fadeInSmooth 0.4s ease-out;
        }
        
        @keyframes fadeInSmooth {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Code Execution Block Styles */
        .code-execution-container {
            width: 100%;
            margin-top: 8px;
        }

        .code-block {
            background-color: var(--accent-blue); /* Changed to blue */
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid var(--accent-blue); /* Changed to blue */
        }

        .code-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background-color: #1565C0;
            padding: 8px 12px;
            color: #90CAF9;
            font-size: 12px;
        }

        .code-header button {
            background: #555;
            color: #fff;
            border: none;
            padding: 4px 8px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
        }

        .code-block pre {
            margin: 0;
            padding: 12px;
            overflow-x: auto;
        }

        .code-block code {
            font-family: 'Courier New', Courier, monospace;
            font-size: 14px;
            color: #d4d4d4;
        }

        .output-block {
            margin-top: 12px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            overflow: hidden;
        }

        .text-output {
            background: var(--bg-secondary);
            padding: 12px;
            font-family: 'Courier New', Courier, monospace;
            font-size: 14px;
            color: var(--text-primary);
            white-space: pre-wrap;
            margin: 0;
        }

        .plot-output {
            display: block;
            max-width: 100%;
            background: white;
        }

        .ai-narrative {
            margin-top: 12px;
            font-size: 14px;
            line-height: 1.5;
        }

        /* Location Toaster Styles */
        .location-toaster {
            position: fixed;
            bottom: -100%;
            left: 50%;
            transform: translateX(-50%);
            width: 90%;
            max-width: 500px;
            background: #2d3748;
            color: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            z-index: 2000;
            transition: bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .location-toaster.show {
            bottom: 20px;
        }

        .reactions-container {
            margin-top: 8px;
        }

        .reaction-emoji {
            display: inline-block;
            padding: 2px 6px;
            background-color: var(--bg-tertiary);
            border-radius: 12px;
            font-size: 12px;
            margin-right: 4px;
            cursor: pointer;
        }

        .toaster-notification {
            position: fixed;
            top: 20px;
            right: -400px;
            width: 300px;
            padding: 16px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            z-index: 10000;
            font-size: 14px;
            font-weight: 500;
            transition: right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .toaster-notification.show {
            right: 20px;
        }

        .toaster-notification.success {
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }

        .toaster-notification.error {
            background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

        .toaster-notification.info {
            background-color: #d1ecf1;
            color: #0c5460;
            border: 1px solid #bee5eb;
        }

        .reactions-container {
            margin-top: 8px;
        }

        .reaction-emoji {
            display: inline-block;
            padding: 2px 6px;
            background-color: var(--bg-tertiary);
            border-radius: 12px;
            font-size: 12px;
            margin-right: 4px;
            cursor: pointer;
        }

        .toaster-notification {
            position: fixed;
            top: 20px;
            right: -400px;
            width: 300px;
            padding: 16px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            z-index: 10000;
            font-size: 14px;
            font-weight: 500;
            transition: right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .toaster-notification.show {
            right: 20px;
        }

        .toaster-notification.success {
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }

        .toaster-notification.error {
            background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

        .toaster-notification.info {
            background-color: #d1ecf1;
            color: #0c5460;
            border: 1px solid #bee5eb;
        }

        .toaster-header {
            font-size: 16px;
            font-weight: 600;
        }

        .toaster-body {
            font-size: 13px;
            line-height: 1.5;
            opacity: 0.9;
        }

        .toaster-actions {
            display: flex;
            gap: 12px;
            margin-top: 8px;
        }

        .toaster-btn {
            flex: 1;
            padding: 10px;
            border-radius: 8px;
            border: none;
            cursor: pointer;
            font-weight: 600;
            font-size: 14px;
            transition: all 0.2s;
        }

        .toaster-btn.primary {
            background: #3b82f6;
            color: white;
        }
        .toaster-btn.primary:hover {
            background: #2563eb;
        }

        .toaster-btn.secondary {
            background: #4a5568;
            color: white;
        }
        .toaster-btn.secondary:hover {
            background: #2d3748;
        }

        /* Thinking Container Styles */
        .thinking-container {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(248, 250, 252, 0.1) 100%);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            border: 1px solid rgba(203, 213, 225, 0.2);
            border-radius: 16px;
            padding: 15px 20px;
            margin-bottom: 16px;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
            color: var(--text-primary);
            animation: fadeInScale 0.4s ease-out;
            overflow: hidden;
        }

        .thinking-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid rgba(203, 213, 225, 0.3);
        }

        .thinking-icon {
            font-size: 24px;
            animation: pulse 1.5s infinite ease-in-out;
            display: inline-block;
        }

        .thinking-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .thinking-steps {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .thinking-step {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            color: var(--text-secondary);
            opacity: 0;
            transform: translateY(10px);
            animation: fadeInSlideUp 0.5s ease-out forwards;
        }

        .thinking-step .step-icon {
            font-size: 18px;
            flex-shrink: 0;
            width: 24px; /* Ensure consistent icon width */
            text-align: center;
        }

        /* Specific step type animations */
        .thinking-step.search .step-icon {
            animation: spin 1.5s linear infinite;
        }

        .thinking-step.map .step-icon {
            animation: bounceIn 0.8s ease-out;
        }

        .thinking-step.media .step-icon {
            animation: pulse 1s infinite alternate;
        }

        .thinking-step.feed .step-icon {
            animation: fadeIn 0.5s ease-out;
        }

        .thinking-step.code .step-icon {
            animation: typing 1.5s steps(20, end) infinite;
        }

        .thinking-step.error .step-icon {
            color: var(--accent-red);
            animation: shake 0.5s;
        }

        .search-query-box {
            background: rgba(0, 0, 0, 0.05);
            border: 1px solid rgba(0, 0, 0, 0.1);
            border-radius: 8px;
            padding: 8px 12px;
            font-family: 'Fira Code', 'Consolas', monospace;
            font-size: 13px;
            color: #333;
            margin-top: 5px;
            animation: shimmer 2s infinite linear;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }

        /* Keyframe Animations */
        @keyframes fadeInScale {
            from { opacity: 0; transform: scale(0.95); }
            to { opacity: 1; transform: scale(1); }
        }

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

        @keyframes pulse {
            0% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.1); opacity: 0.8; }
            100% { transform: scale(1); opacity: 1; }
        }

        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        @keyframes bounceIn {
            0% { transform: scale(0.3); opacity: 0; }
            50% { transform: scale(1.05); opacity: 1; }
            70% { transform: scale(0.9); }
            100% { transform: scale(1); }
        }

        @keyframes shimmer {
            0% { background-position: -1000px 0; }
            100% { background-position: 1000px 0; }
        }

        @keyframes typing {
            from { width: 0; }
            to { width: 100%; }
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            20%, 60% { transform: translateX(-5px); }
            40%, 80% { transform: translateX(5px); }
        }

        /* Timestamp Styling */
        .timestamp {
            font-size: 12px;
            color: #86868b;
            padding-left: 4px; /* Add a small padding to align with the bubble */
            margin-top: 4px; /* Space above the timestamp */
        }

        /* New styles for single-line thinking process */
        .thinking-process-single-line {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: var(--bg-secondary);
            border-radius: 18px;
            font-size: 0.9rem;
            color: var(--text-primary);
            box-shadow: var(--shadow-sm);
            max-width: fit-content;
            margin-left: 50px; /* Align with AI messages */
            margin-bottom: 8px;
            animation: fadeIn 0.3s ease-out;
        }

        .thinking-process-single-line .thinking-icon {
            font-size: 1.1rem;
            animation: pulse 1.5s infinite;
        }

        .thinking-process-single-line .thinking-text {
            font-weight: 500;
        }

        @keyframes pulse {
            0% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.05); opacity: 0.8; }
            100% { transform: scale(1); opacity: 1; }
        }
