body {
            font-family: 'Inter', sans-serif;
            background-color: #020617;
            /* slate-950 */
            color: #f8fafc;
            overflow: hidden;
        }

        /* ds.html Animations & Utilities */
        .reveal {
            opacity: 0;
            transform: translateY(20px);
            transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .reveal.active {
            opacity: 1;
            transform: translateY(0);
        }

        /* Masked Text Reveal (from ds.html) */
        .text-reveal-wrapper {
            overflow: hidden;
            display: inline-block;
            vertical-align: bottom;
        }

        .text-reveal-content {
            transform: translateY(110%);
            opacity: 0;
            transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s ease;
            display: block;
        }

        .reveal-active .text-reveal-content {
            transform: translateY(0);
            opacity: 1;
        }

        .reveal.active {
            opacity: 1;
            transform: translateY(0);
        }

        .welcome-leave {
            opacity: 0;
            transform: scale(0.95) translateY(-30px);
            filter: blur(10px);
            transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
            pointer-events: none;
            position: absolute;
            left: 0;
            right: 0;
            z-index: 0;
        }

        .delay-100 {
            transition-delay: 0.1s;
        }

        .delay-200 {
            transition-delay: 0.2s;
        }

        .delay-300 {
            transition-delay: 0.3s;
        }

        /* Custom scrollbar from ds.html */
        ::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: #334155;
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #475569;
        }

        /* ds.html Flashlight Effect adapted for Dark Mode */
        .flashlight-card {
            position: relative;
            background: #1e293b;
            isolation: isolate;
            overflow: hidden;
        }

        .flashlight-card::before {
            content: "";
            position: absolute;
            inset: 0px;
            background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), rgba(37, 99, 235, 0.15), transparent 40%);
            opacity: 0;
            transition: opacity 0.5s;
            pointer-events: none;
            z-index: -1;
            border-radius: inherit;
        }

        .flashlight-card.wine-glow::before {
            background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), rgba(178, 48, 60, 0.15), transparent 40%);
        }

        .flashlight-card:hover::before {
            opacity: 1;
        }

        /* Markdown Styles */
        .markdown-body > *:first-child {
            margin-top: 0 !important;
        }
        .markdown-body > *:last-child {
            margin-bottom: 0 !important;
        }
        .markdown-body h1,
        .markdown-body h2,
        .markdown-body h3 {
            font-weight: 600;
            margin-top: 1.5em;
            margin-bottom: 0.75em;
            color: #f8fafc;
            tracking: tight;
        }

        .markdown-body h1 {
            font-size: 1.5em;
        }

        .markdown-body h2 {
            font-size: 1.25em;
        }

        .markdown-body p {
            margin-bottom: 1.25em;
            line-height: 1.7;
            color: #cbd5e1;
        }

        .markdown-body ul,
        .markdown-body ol {
            margin-bottom: 1.25em;
            padding-left: 1.5em;
            color: #cbd5e1;
        }

        .markdown-body ul {
            list-style-type: disc;
        }

        .markdown-body ol {
            list-style-type: decimal;
        }

        .markdown-body li {
            margin-bottom: 0.5em;
        }

        .markdown-body strong {
            font-weight: 600;
            color: #f8fafc;
        }

        .markdown-body table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 1.5em;
            font-size: 0.875rem;
        }

        .markdown-body th,
        .markdown-body td {
            border: 1px solid #334155;
            padding: 0.75rem 1rem;
            text-align: left;
        }

        .markdown-body th {
            background-color: #0f172a;
            font-weight: 600;
            color: #f8fafc;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            font-size: 0.75rem;
        }

        /* Code block styling */
        .markdown-body pre {
            background-color: #0f172a;
            border: 1px solid #334155;
            border-radius: 0.5rem;
            padding: 1rem;
            overflow-x: auto;
            margin-bottom: 1.5em;
        }

        .markdown-body code {
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
            font-size: 0.875rem;
            color: #38bdf8;
        }

        .markdown-body pre code {
            color: #e2e8f0;
            background-color: transparent;
            border: none;
            padding: 0;
        }

        .aibi-chart-shell {
            width: 100%;
            max-width: 100%;
            max-height: min(640px, 72vh);
            overflow-x: scroll;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            touch-action: pan-x pan-y;
            cursor: grab;
            margin: 1.5rem 0;
            padding: 1rem;
            border: 1px solid rgba(51, 65, 85, 0.7);
            border-radius: 1rem;
            background: rgba(15, 23, 42, 0.58);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 18px 40px rgba(0,0,0,0.22);
            scrollbar-gutter: stable both-edges;
            scrollbar-width: thin;
            scrollbar-color: rgba(96, 165, 250, 0.8) rgba(255,255,255,0.08);
        }

        .aibi-chart-shell.is-dragging {
            cursor: grabbing;
            user-select: none;
        }

        .aibi-chart-shell::after {
            content: '';
            position: sticky;
            right: -1rem;
            top: 0;
            float: right;
            width: 34px;
            height: 100%;
            min-height: 240px;
            margin-left: -34px;
            pointer-events: none;
            background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.82));
            border-radius: 0 1rem 1rem 0;
            z-index: 5;
        }

        .aibi-chart-shell::-webkit-scrollbar {
            height: 8px;
        }

        .aibi-chart-shell::-webkit-scrollbar-track {
            background: rgba(255,255,255,0.08);
            border-radius: 999px;
        }

        .aibi-chart-shell::-webkit-scrollbar-thumb {
            background: linear-gradient(90deg, rgba(59,130,246,0.95), rgba(178,48,60,0.95));
            border-radius: 999px;
        }

        .aibi-chart-canvas {
            width: 760px;
            min-width: 760px;
            max-width: none;
        }

        /* Thinking animation dots */
        .typing-dot {
            width: 6px;
            height: 6px;
            background-color: #60a5fa;
            border-radius: 50%;
            animation: typing 1.4s infinite ease-in-out both;
        }

        .typing-dot:nth-child(1) { animation-delay: -0.32s; }
        .typing-dot:nth-child(2) { animation-delay: -0.16s; }

        @keyframes typing {
            0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
            40% { transform: scale(1); opacity: 1; }
        }

        /* Beautiful AI Response Staggered Animations */
        @keyframes fade-in-up {
            0% { opacity: 0; transform: translateY(15px); }
            100% { opacity: 1; transform: translateY(0); }
        }

        .stagger-message > * {
            animation: fade-in-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
            opacity: 0;
        }

        .stagger-message > *:nth-child(1) { animation-delay: 0.1s; }
        .stagger-message > *:nth-child(2) { animation-delay: 0.25s; }
        .stagger-message > *:nth-child(3) { animation-delay: 0.4s; }
        .stagger-message > *:nth-child(4) { animation-delay: 0.55s; }
        .stagger-message > *:nth-child(5) { animation-delay: 0.7s; }
        .stagger-message > *:nth-child(6) { animation-delay: 0.85s; }
        .stagger-message > *:nth-child(7) { animation-delay: 1.0s; }
        .stagger-message > *:nth-child(n+8) { animation-delay: 1.1s; }

        /* Auto-resize textarea */
        textarea {
            resize: none;
            overflow: hidden;
            min-height: 44px;
            max-height: 200px;
        }

/* Responsive chat overrides */
        * {
            min-width: 0;
        }

        .markdown-body,
        #chat-container {
            overflow-wrap: anywhere;
        }

        .suggestion-carousel {
            width: 100%;
            position: relative;
        }

        .suggestion-track {
            display: flex;
            gap: 16px;
            overflow-x: auto;
            overscroll-behavior-x: contain;
            scroll-behavior: smooth;
            scroll-snap-type: x mandatory;
            padding: 4px 2px 18px;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: thin;
            scrollbar-color: rgba(59, 130, 246, 0.85) rgba(255, 255, 255, 0.08);
        }

        .suggestion-track::-webkit-scrollbar {
            height: 8px;
        }

        .suggestion-track::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.08);
            border-radius: 999px;
        }

        .suggestion-track::-webkit-scrollbar-thumb {
            background: linear-gradient(90deg, rgba(59, 130, 246, 0.95), rgba(148, 37, 48, 0.95));
            border-radius: 999px;
        }

        .suggestion-card {
            flex: 0 0 min(320px, 82vw);
            scroll-snap-align: start;
            text-align: left;
            font: inherit;
            appearance: none;
        }

        .suggestion-card:focus-visible {
            outline: 2px solid rgba(96, 165, 250, 0.85);
            outline-offset: 4px;
        }

        .suggestion-nav-btn {
            width: 38px;
            height: 38px;
            border-radius: 14px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: rgb(148 163 184);
            background: rgba(15, 23, 42, 0.72);
            border: 1px solid rgba(51, 65, 85, 0.8);
            transition: all 220ms ease;
        }

        .suggestion-nav-btn:hover {
            color: #fff;
            border-color: rgba(59, 130, 246, 0.45);
            background: rgba(37, 99, 235, 0.18);
            box-shadow: 0 0 18px rgba(59, 130, 246, 0.14);
        }

        .suggestion-dot {
            width: 7px;
            height: 7px;
            border-radius: 999px;
            background: rgba(100, 116, 139, 0.45);
            transition: all 220ms ease;
        }

        .suggestion-dot.active {
            width: 22px;
            background: linear-gradient(90deg, #60a5fa, #de727c);
            box-shadow: 0 0 14px rgba(96, 165, 250, 0.35);
        }

        @media (min-width: 768px) {
            .suggestion-card {
                flex-basis: calc((100% - 32px) / 3);
                min-width: 250px;
            }
        }

        @media (max-width: 760px) {
            html,
            body {
                height: auto !important;
                min-height: 100%;
                overflow-x: hidden;
            }

            body > header {
                padding: 12px 14px !important;
                gap: 10px !important;
            }

            body > header a {
                padding: 10px 12px !important;
            }

            body > header a span {
                display: none !important;
            }

            body > header > div:last-child {
                display: none !important;
            }

            body > header h1 {
                font-size: 11px !important;
                letter-spacing: 0.08em !important;
            }

            #chat-container {
                max-width: 100% !important;
                padding: 88px 14px 180px !important;
                gap: 20px !important;
            }

            #welcome-screen {
                min-height: auto !important;
                margin-top: 12px !important;
            }

            #welcome-screen h2 {
                font-size: clamp(1.75rem, 9vw, 2.4rem) !important;
                line-height: 1.08 !important;
            }

            #welcome-screen p {
                font-size: 0.95rem !important;
            }

            .flashlight-card {
                min-height: auto !important;
            }

            .suggestion-track {
                gap: 12px;
                padding-bottom: 14px;
            }

            .suggestion-card {
                flex-basis: min(286px, 84vw);
            }

            .suggestion-nav-btn {
                width: 34px;
                height: 34px;
                border-radius: 12px;
            }

            #chat-container [class*="max-w-[85%]"] {
                max-width: 92% !important;
            }

            #chat-container .flex.gap-4.w-full.max-w-4xl.group {
                gap: 10px !important;
            }

            .markdown-body table,
            .markdown-body pre {
                display: block;
                max-width: 100%;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .aibi-chart-shell {
                padding: 0.75rem;
                margin: 1.25rem 0;
            }

            .aibi-chart-canvas {
                width: 760px;
                min-width: 760px;
            }

            body > div.fixed.bottom-0 {
                padding: 72px 12px 16px !important;
            }

            #chat-form {
                align-items: flex-end !important;
                gap: 8px !important;
                padding: 8px 8px 8px 14px !important;
            }

            #chat-input {
                min-height: 44px !important;
                font-size: 16px !important;
            }

            #send-btn {
                width: 44px !important;
                height: 44px !important;
                border-radius: 16px !important;
            }
        }

        @media (max-width: 420px) {
            body > header {
                padding-inline: 10px !important;
            }

            body > header .flex.items-center.gap-3 {
                gap: 8px !important;
            }

            #chat-container {
                padding-inline: 10px !important;
                padding-bottom: 170px !important;
            }

            body > div.fixed.bottom-0 {
                padding-inline: 8px !important;
            }

            #chat-form {
                padding-left: 12px !important;
            }
        }

        @media (max-height: 560px) and (orientation: landscape) {
            #chat-container {
                padding-top: 76px !important;
                padding-bottom: 140px !important;
            }

            body > div.fixed.bottom-0 {
                padding-top: 44px !important;
                padding-bottom: 10px !important;
            }
        }
