* {
    font-family: "Heebo", "Noto Sans Hebrew", "Noto Sans Arabic", "Plus Jakarta Sans", "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    box-sizing: border-box;
}

/* Ensure proper scaling at 100% zoom */
html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Prevent horizontal scrolling */
.container {
    max-width: 100%;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    display: none;
}

/* New Design Styles */
.ai-avatar {
    position: relative;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

/* Improved spacing for better visual hierarchy */
main {
    padding: 2rem 1rem;
}

#medical-field-screen {
    padding: 2rem 1rem;
}

/* Add more breathing room to sections */
.w-full.max-w-4xl,
.w-full.max-w-6xl {
    padding: 1rem 0;
}

/* Enhanced header logo styling */
header .w-12.h-12 {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
    transition: all 0.3s ease;
}

header .w-12.h-12:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
}

/* Responsive logo sizing */
@media (max-width: 640px) {
    header .w-12.h-12 {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    header .text-2xl {
        font-size: 1.25rem;
    }
}

.ai-avatar::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed, #6d28d9);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.3;
}

.separator-line {
    position: relative;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d1d5db, transparent);
}

.separator-text {
    background: white;
    padding: 0 1rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Button hover effects */
.btn-primary {
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.btn-secondary {
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Input focus effects */
.main-input:focus {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    border-color: #8b5cf6;
}

/* Improved placeholder contrast for accessibility */
.main-input::placeholder,
input[type="text"]::placeholder {
    color: #6b7280 !important; /* gray-500 - much better contrast than default */
    opacity: 1 !important; /* Ensure full opacity */
    font-weight: 500; /* Slightly bolder for better readability */
}

/* Webkit browsers (Chrome, Safari, Edge) */
.main-input::-webkit-input-placeholder,
input[type="text"]::-webkit-input-placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
    font-weight: 500;
}

/* Firefox */
.main-input::-moz-placeholder,
input[type="text"]::-moz-placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
    font-weight: 500;
}

/* Edge */
.main-input::-ms-input-placeholder,
input[type="text"]::-ms-input-placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
    font-weight: 500;
}

/* Language button styles */
.lang-btn-active {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.lang-btn-inactive {
    background: transparent;
    color: #9ca3af;
    transition: all 0.2s ease;
}

.lang-btn-inactive:hover {
    color: #6b7280;
    background: #f3f4f6;
}

/* Chat mode styles */
body.chat-mode {
    background: #f9fafb;
}

body.chat-mode main {
    display: none;
}

body.chat-mode #chat-interface {
    display: flex !important;
    height: calc(100vh - 120px); /* Account for header and footer */
    max-height: calc(100vh - 120px);
}

/* Ensure chat container doesn't overflow */
#chat-container {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}



/* Better responsive behavior for chat input */
#chat-input {
    position: sticky;
    bottom: 0;
    background: white;
    z-index: 10;
}

/* Enhanced chat input field for comfortable typing */
#chat-input input,
#chat-input textarea {
    min-height: 52px;
    font-size: 16px;
    line-height: 1.5;
    padding: 14px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

#chat-input textarea {
    min-height: 80px;
    max-height: 120px;
    overflow-y: auto;
}

#chat-input input:focus,
#chat-input textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

/* Ensure comfortable touch targets on mobile */
@media (max-width: 768px) {
    #chat-input input,
    #chat-input textarea {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 14px;
    }
    
    #chat-input textarea {
        min-height: 70px;
        max-height: 100px;
    }
    
    #chat-input button {
        min-height: 48px;
        padding: 12px 16px;
    }
    
    /* Enhanced back button sizing for mobile */
    #back-to-welcome,
    #back-to-home {
        min-height: 52px !important;
        padding: 14px 16px !important;
        font-size: 16px !important;
        border-radius: 12px !important;
    }
    
    #back-to-welcome i,
    #back-to-home i {
        font-size: 18px !important;
        margin-right: 12px !important;
    }
}

/* Medical Field Card Styles */
.medical-field-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Button text centering for RTL languages */
#select-field-btn,
#ask-question-btn,
#upload-tests-btn {
    text-align: center !important;
    direction: ltr;
}

#select-field-btn span,
#ask-question-btn span,
#upload-tests-btn span {
    display: inline-block;
    text-align: center;
    width: 100%;
}

.medical-field-card:hover {
    transform: translateY(-4px);
}

.medical-field-card .p-6 {
    transition: all 0.3s ease;
}

.medical-field-card:hover .p-6 {
    border-color: #8b5cf6;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
}

.medical-field-card .w-12.h-12 {
    transition: all 0.3s ease;
}

.medical-field-card:hover .w-12.h-12 {
    transform: scale(1.1);
}

/* Responsive chat layout */
@media (min-width: 768px) {
    body.chat-mode .container.flex.flex-col.flex-grow.gap-4.px-4.pt-8.pb-4.mx-auto.md\\:flex-row {
        display: flex !important;
        gap: 1rem;
    }
    
    body.chat-mode #sidebar {
        flex-shrink: 0;
        width: 18rem;
    }
    
    body.chat-mode #chat-container {
        flex: 1;
    }
}

@media (min-width: 1024px) {
    body.chat-mode #sidebar {
        width: 20rem;
    }
}

.highlighted-section {
    outline: 2px solid #3F20FB;
    background-color: rgba(63, 32, 251, 0.1);
}

.edit-button {
    position: absolute;
    z-index: 1000;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Prevent overlapping in chat interface */
    #chat-interface {
        padding-top: 4rem !important; /* Space for back button */
        padding-bottom: 1rem;
        gap: 1rem;
    }
    
    /* Back button positioning */
    #back-to-home {
        position: fixed !important;
        top: 1rem;
        left: 1rem;
        z-index: 1000;
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* Sidebar adjustments */
    #sidebar {
        width: 100% !important;
        margin-bottom: 1rem;
        order: 1;
    }
    
    /* Chat container adjustments */
    #chat-container {
        min-height: 500px !important;
        height: calc(100vh - 120px) !important;
        max-height: calc(100vh - 120px) !important;
        order: 2;
        margin-bottom: 1rem;
        overflow-y: auto !important;
    }
    
    /* Chat input positioning */
    #chat-input {
        position: sticky !important;
        bottom: 0;
        background: white;
        z-index: 50;
        border-top: 1px solid #e5e7eb;
        padding: 0.75rem;
    }
    
    /* Chat messages padding */
    #chat-messages {
        padding-bottom: 6rem !important; /* Space for input */
        min-height: 400px !important;
    }
    
    /* Input field adjustments */
    #chat-input input {
        font-size: 16px;
        min-height: 48px;
        padding: 12px 16px;
    }
    
    /* Button stacking in chat input */
    #chat-input .flex-col {
        gap: 0.5rem;
    }
    
    #chat-input button {
        width: 100%;
        margin: 0;
    }
    
    /* Prevent text overflow in buttons */
    #chat-input button span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Mobile menu */
    #mobile-menu {
        transition: all 0.3s ease;
        max-height: 0;
        overflow: hidden;
    }
    
    #mobile-menu.hidden {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-width: 0;
        opacity: 0;
    }
    
    #mobile-menu:not(.hidden) {
        max-height: 300px;
        opacity: 1;
    }
    
    /* Prevent overlapping in medical field cards */
    .medical-field-card {
        margin-bottom: 0.5rem;
    }
    
    .medical-field-card .p-6 {
        padding: 1rem !important;
    }
    
    /* Ensure proper spacing in action buttons */
    .flex.gap-4 {
        gap: 0.5rem !important;
    }
    
    /* Prevent header overlap */
    header {
        position: sticky;
        top: 0;
        z-index: 100;
        background: white;
    }
    
    /* Main content spacing */
    main {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    /* Footer positioning */
    footer {
        position: relative;
        z-index: 10;
    }
}

/* Improved responsive layout for better scaling */
@media (max-width: 640px) {
    .pt-20 {
        padding-top: 4rem;
    }
    
    #sidebar {
        margin-bottom: 1rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .w-full.max-w-4xl {
        max-width: 100%;
        padding: 0 1rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .w-full.max-w-4xl {
        max-width: 90%;
    }
    
    .w-full.max-w-6xl {
        max-width: 95%;
    }
}

/* Header animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

/* Modern UI elements */
.gradient-text {
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gradient-bg {
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
}

/* Content adjustments for small screens */
@media (max-width: 640px) {
    .pt-20 {
        padding-top: 4rem;
    }
    
    #sidebar {
        margin-bottom: 1rem;
    }
    
    /* Ensure proper spacing on small screens */
    .medical-field-card .p-6 {
        padding: 1rem;
    }
    
    .w-12.h-12 {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    /* Extreme mobile fixes */
    #chat-interface {
        padding-top: 5rem !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    #back-to-home {
        top: 0.5rem;
        left: 0.5rem;
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    #chat-input {
        padding: 0.5rem !important;
    }
    
    #chat-input input {
        font-size: 15px;
        padding: 10px 12px;
        min-height: 44px;
    }
    
    #chat-input button {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Prevent text wrapping issues */
    .text-sm {
        font-size: 0.875rem;
        line-height: 1.25rem;
    }
    
    /* Reduce padding in cards */
    .p-4 {
        padding: 0.75rem;
    }
    
    .p-6 {
        padding: 1rem;
    }
}

/* Ultra-small screen fixes */
@media (max-width: 480px) {
    /* Enhanced back button for very small screens */
    #back-to-welcome,
    #back-to-home {
        min-height: 56px !important;
        padding: 16px 18px !important;
        font-size: 16px !important;
        border-radius: 14px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    #back-to-welcome i,
    #back-to-home i {
        font-size: 20px !important;
        margin-right: 14px !important;
    }
    
    /* Reduce all spacing */
    .gap-4 {
        gap: 0.5rem !important;
    }
    
    .space-y-2\.5 {
        gap: 0.5rem !important;
    }
    
    /* Smaller text sizes */
    .text-lg {
        font-size: 1rem;
    }
    
    .text-xl {
        font-size: 1.125rem;
    }
    
    /* Compact button layout */
    .flex.flex-col.gap-2 {
        gap: 0.25rem !important;
    }
    
    /* Reduce padding everywhere */
    .px-4 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .py-4 {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    /* Ensure no horizontal overflow */
    body {
        overflow-x: hidden;
    }
    
    .container {
        max-width: 100vw;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Fix chat interface spacing */
    #chat-interface {
        padding: 0.5rem !important;
        gap: 0.5rem;
    }
    
    #chat-container {
        min-height: 450px !important;
        height: calc(100vh - 100px) !important;
        max-height: calc(100vh - 100px) !important;
    }
    
    #chat-messages {
        padding-bottom: 5rem !important;
        min-height: 350px !important;
    }
    
    /* Compact sidebar */
    #sidebar {
        padding: 0.5rem;
    }
    
    #sidebar .p-4 {
        padding: 0.5rem;
    }
    
    /* Smaller icons */
    .w-12.h-12 {
        width: 2rem;
        height: 2rem;
    }
    
    .text-xl {
        font-size: 1rem;
    }
} 

/* RTL utilities */
/* Text alignment helpers */
.text-start { text-align: start; }
.text-end { text-align: end; }

/* Scope RTL overrides under either html[dir="rtl"] or body.rtl */
html[dir="rtl"], body.rtl { direction: rtl; }
html[dir="rtl"] .text-left, body.rtl .text-left { text-align: right !important; }
html[dir="rtl"] .text-right, body.rtl .text-right { text-align: left !important; }

/* Margin inline flip (common Tailwind sizes used in this project) */
html[dir="rtl"] .mr-1, body.rtl .mr-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
html[dir="rtl"] .mr-2, body.rtl .mr-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
html[dir="rtl"] .mr-3, body.rtl .mr-3 { margin-right: 0 !important; margin-left: 0.75rem !important; }
html[dir="rtl"] .mr-4, body.rtl .mr-4 { margin-right: 0 !important; margin-left: 1rem !important; }
html[dir="rtl"] .mr-8, body.rtl .mr-8 { margin-right: 0 !important; margin-left: 2rem !important; }

html[dir="rtl"] .ml-1, body.rtl .ml-1 { margin-left: 0 !important; margin-right: 0.25rem !important; }
html[dir="rtl"] .ml-2, body.rtl .ml-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }
html[dir="rtl"] .ml-3, body.rtl .ml-3 { margin-left: 0 !important; margin-right: 0.75rem !important; }
html[dir="rtl"] .ml-4, body.rtl .ml-4 { margin-left: 0 !important; margin-right: 1rem !important; }
html[dir="rtl"] .ml-8, body.rtl .ml-8 { margin-left: 0 !important; margin-right: 2rem !important; }

/* Padding inline flip (common sizes) */
html[dir="rtl"] .pr-1, body.rtl .pr-1 { padding-right: 0 !important; padding-left: 0.25rem !important; }
html[dir="rtl"] .pr-2, body.rtl .pr-2 { padding-right: 0 !important; padding-left: 0.5rem !important; }
html[dir="rtl"] .pr-3, body.rtl .pr-3 { padding-right: 0 !important; padding-left: 0.75rem !important; }
html[dir="rtl"] .pr-4, body.rtl .pr-4 { padding-right: 0 !important; padding-left: 1rem !important; }
html[dir="rtl"] .pr-8, body.rtl .pr-8 { padding-right: 0 !important; padding-left: 2rem !important; }
html[dir="rtl"] .pr-10, body.rtl .pr-10 { padding-right: 0 !important; padding-left: 2.5rem !important; }

html[dir="rtl"] .pl-1, body.rtl .pl-1 { padding-left: 0 !important; padding-right: 0.25rem !important; }
html[dir="rtl"] .pl-2, body.rtl .pl-2 { padding-left: 0 !important; padding-right: 0.5rem !important; }
html[dir="rtl"] .pl-3, body.rtl .pl-3 { padding-left: 0 !important; padding-right: 0.75rem !important; }
html[dir="rtl"] .pl-4, body.rtl .pl-4 { padding-left: 0 !important; padding-right: 1rem !important; }
html[dir="rtl"] .pl-8, body.rtl .pl-8 { padding-left: 0 !important; padding-right: 2rem !important; }
html[dir="rtl"] .pl-10, body.rtl .pl-10 { padding-left: 0 !important; padding-right: 2.5rem !important; }

/* space-x flip for common gaps */
html[dir="rtl"] .space-x-1 > :not([hidden]) ~ :not([hidden]),
body.rtl .space-x-1 > :not([hidden]) ~ :not([hidden]) { margin-left: 0 !important; margin-right: 0.25rem !important; }

html[dir="rtl"] .space-x-2 > :not([hidden]) ~ :not([hidden]),
body.rtl .space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0 !important; margin-right: 0.5rem !important; }

html[dir="rtl"] .space-x-\[10px\] > :not([hidden]) ~ :not([hidden]),
html[dir="rtl"] .space-x-2\.5 > :not([hidden]) ~ :not([hidden]),
body.rtl .space-x-\[10px\] > :not([hidden]) ~ :not([hidden]),
body.rtl .space-x-2\.5 > :not([hidden]) ~ :not([hidden]) { margin-left: 0 !important; margin-right: 0.625rem !important; }

html[dir="rtl"] .space-x-3 > :not([hidden]) ~ :not([hidden]),
body.rtl .space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0 !important; margin-right: 0.75rem !important; }

html[dir="rtl"] .space-x-4 > :not([hidden]) ~ :not([hidden]),
body.rtl .space-x-4 > :not([hidden]) ~ :not([hidden]) { margin-left: 0 !important; margin-right: 1rem !important; }

/* Optional helper to flip absolute insets inside a scoped container */
.rtl-flip-inset { position: relative; }
html[dir="rtl"] .rtl-flip-inset .left-0, body.rtl .rtl-flip-inset .left-0 { left: auto !important; right: 0 !important; }
html[dir="rtl"] .rtl-flip-inset .right-0, body.rtl .rtl-flip-inset .right-0 { right: auto !important; left: 0 !important; }

/* Transform origin flips for menus/tooltips/modals */
html[dir="rtl"] .origin-top-right, body.rtl .origin-top-right { transform-origin: top left !important; }
html[dir="rtl"] .origin-top-left, body.rtl .origin-top-left { transform-origin: top right !important; }
html[dir="rtl"] .origin-right, body.rtl .origin-right { transform-origin: left center !important; }
html[dir="rtl"] .origin-left, body.rtl .origin-left { transform-origin: right center !important; }

/* Chat bubble arrow utilities (optional) */
.bubble { position: relative; }
.bubble-arrow-start::after,
.bubble-arrow-end::after {
    content: "";
    position: absolute;
    top: 14px;
    width: 0; height: 0;
    border: 8px solid transparent;
}

/* Basic prose styling for markdown */
.prose { line-height: 1.7; }
.prose h1, .prose h2, .prose h3 { font-weight: 600; color: #111827; }
.prose p { margin: 0.5rem 0; }
.prose ul { list-style: disc; padding-inline-start: 1.25rem; }
.prose ol { list-style: decimal; padding-inline-start: 1.25rem; }
.prose code { background: #f3f4f6; padding: 0.15rem 0.35rem; border-radius: 0.25rem; }
.prose pre { background: #111827; color: #e5e7eb; padding: 0.75rem; border-radius: 0.5rem; overflow-x: auto; }
.prose a { color: #0369a1; text-decoration: underline; }
.prose table { border-collapse: collapse; }
.prose table th, .prose table td { border: 1px solid #e5e7eb; padding: 0.5rem; }

/* Disabled state for action buttons in chat input */
#chat-input button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

/* Fix Hebrew punctuation mirroring in chat messages */
html[dir="rtl"] #chat-messages,
body.rtl #chat-messages {
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}

html[dir="rtl"] #chat-messages p,
html[dir="rtl"] #chat-messages div,
html[dir="rtl"] #chat-messages span,
html[dir="rtl"] #chat-messages li,
body.rtl #chat-messages p,
body.rtl #chat-messages div,
body.rtl #chat-messages span,
body.rtl #chat-messages li {
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}

/* Prevent punctuation mirroring in Hebrew text */
html[dir="rtl"] #chat-messages .bubble,
body.rtl #chat-messages .bubble {
    unicode-bidi: embed;
}

/* Ensure proper text flow for mixed content */
html[dir="rtl"] #chat-messages *,
body.rtl #chat-messages * {
    unicode-bidi: embed;
}

/* Handle direction attributes in chat messages */
#chat-messages [dir="rtl"] {
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}

#chat-messages [dir="ltr"] {
    direction: ltr;
    text-align: left;
    unicode-bidi: embed;
}

/* Ensure proper punctuation rendering in Hebrew */
#chat-messages [dir="rtl"] p,
#chat-messages [dir="rtl"] div,
#chat-messages [dir="rtl"] span {
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}
/* Start/end use logical sides so they flip with dir */
html[dir="ltr"] .bubble-arrow-start::after, body:not(.rtl) .bubble-arrow-start::after {
    left: -8px;
    border-right-color: rgba(0,0,0,0.05);
}
html[dir="rtl"] .bubble-arrow-start::after, body.rtl .bubble-arrow-start::after {
    right: -8px;
    border-left-color: rgba(0,0,0,0.05);
}
html[dir="ltr"] .bubble-arrow-end::after, body:not(.rtl) .bubble-arrow-end::after {
    right: -8px;
    border-left-color: rgba(0,0,0,0.05);
}
html[dir="rtl"] .bubble-arrow-end::after, body.rtl .bubble-arrow-end::after {
    left: -8px;
    border-right-color: rgba(0,0,0,0.05);
}

/* Typing indicator for streaming responses */
.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.typing-indicator .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #9ca3af;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

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

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

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

@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Streaming content styles */
.streaming-content {
    min-height: 1.2em;
    line-height: 1.5;
}

/* Additional responsive improvements */
@media (max-width: 480px) {
    .text-3xl {
        font-size: 1.5rem;
    }
    
    .text-lg {
        font-size: 1rem;
    }
    
    .w-24.h-24 {
        width: 4rem;
        height: 4rem;
    }
    
    .text-3xl {
        font-size: 1.25rem;
    }
}

/* Ensure proper scaling for different zoom levels */
@media screen and (max-resolution: 96dpi) {
    /* For lower DPI displays */
    .text-sm {
        font-size: 0.875rem;
    }
    
    .text-base {
        font-size: 1rem;
    }
}

/* Prevent layout breaking on very small screens */
@media (max-width: 360px) {
    .px-4 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .py-4 {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .gap-4 {
        gap: 0.5rem;
    }
}