html, body {
    height: 100%;
    overflow: hidden;
}
body { font-family: 'Vazirmatn', 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }
.custom-scrollbar::-webkit-scrollbar { width: 8px; height: 8px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background-color: rgba(209, 213, 219, 0.7); border-radius: 10px; }
.dark .custom-scrollbar::-webkit-scrollbar-thumb { background-color: rgba(107, 114, 128, 0.5); }
.hidden { display: none !important; }
#history-sidebar, #confirm-modal-content, #rename-modal-content, #edit-modal-content, #html-preview-content, #settings-modal-content { transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1); }
#sidebar-overlay, #confirm-modal-overlay, #rename-modal-overlay, #edit-modal-overlay, #html-preview-overlay, #settings-modal #settings-modal-overlay { transition: opacity 300ms ease-in-out; }
#modal-content { transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1); }

@keyframes fade-slide-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.message-entry { animation: fade-slide-in 300ms ease-out forwards; }
.typing-indicator span { height: 8px; width: 8px; background-color: #9ca3af; border-radius: 50%; display: inline-block; animation: typing-blink 1.4s infinite both; }
.dark .typing-indicator span { background-color: #6b7280; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-blink { 0% { opacity: 0.2; } 20% { opacity: 1; } 100% { opacity: 0.2; } }

.prose pre {
    position: relative;
    background-color: #282c34;
    border-radius: 0.75rem;
    padding-top: 2.5rem;
    overflow-x: auto;
}
.prose pre code {
    white-space: pre;
    word-break: normal;
    display: block;
    padding: 0.5rem 0.75rem;
    direction: ltr;
    text-align: left;
}

.code-button-container {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}
.prose pre:hover .code-button-container { opacity: 1; }
.code-button {
    padding: 0.25rem 0.5rem;
    background-color: rgba(75, 85, 99, 0.8);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: background-color 0.2s;
}
.code-button:hover { background-color: rgba(107, 114, 128, 0.8); }
.code-button:active { background-color: #4b5563; }

.message-actions { opacity: 0; transition: opacity 0.3s ease-in-out; position: absolute; bottom: -1rem; left: 0; display: flex; align-items: center; }
.group:hover .message-actions { opacity: 1; }
.action-button { padding: 0.375rem; border-radius: 9999px; background-color: rgba(255, 255, 255, 0.7); backdrop-filter: blur(4px); border: 1px solid #e5e7eb; color: #6b7280; transition: all 0.2s; box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.dark .action-button { background-color: rgba(55, 65, 81, 0.7); border-color: #4b5563; color: #9ca3af; }
.action-button:hover { color: #1f2937; background-color: rgba(243, 244, 246, 0.9); border-color: #d1d5db; }
.dark .action-button:hover { color: #e5e7eb; background-color: rgba(75, 85, 99, 0.9); border-color: #6b7280; }
.action-button.active { color: #3b82f6; border-color: #93c5fd; background-color: #eff6ff; }
.dark .action-button.active { color: #60a5fa; border-color: #3b82f6; background-color: #1e3a8a; }
.like-animation { animation: like-pop 0.4s ease-in-out; }
@keyframes like-pop { 0% { transform: scale(1); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } }
.action-button .copy-feedback {
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background-color: #1f2937;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    pointer-events: none;
}
.action-button .copy-feedback.visible {
    opacity: 1;
    transform: translateY(-50%) translateX(-4px);
}

.history-item-button { opacity: 1; }
#history-item-menu { transform-origin: top right; transform: scale(0.95); opacity: 0; pointer-events: none; transition: transform 150ms ease-out, opacity 150ms ease-out; }
#history-item-menu.visible { transform: scale(1); opacity: 1; pointer-events: auto; }

#message-item-menu { transition: opacity 200ms ease-in-out; }
#message-item-menu-content { transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1); transform: scale(0.95); opacity: 0; }
#message-item-menu.visible { opacity: 1; }
#message-item-menu.visible #message-item-menu-content { transform: scale(1); opacity: 1; }
.message-preview-container { padding: 0.75rem 1rem; border-bottom: 1px solid #e5e7eb; margin-bottom: 0.5rem; }
.dark .message-preview-container { border-bottom-color: #374151; }
.message-preview-text { font-size: 0.875rem; color: #6b7280; line-height: 1.5; max-height: 4.5rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; text-overflow: ellipsis; }
.dark .message-preview-text { color: #d1d5db; }

#confirm-modal-content, #rename-modal-content, #edit-modal-content, #html-preview-content { transform: scale(0.95); opacity: 0; }

#message-input, #edit-input { resize: none; overflow-y: auto; max-height: 120px; line-height: 1.5; padding-top: 10px; padding-bottom: 10px; }
#message-form { align-items: flex-end; transition: all 0.2s, border-radius 0.15s ease-out; }
#app-container { display: flex; flex-direction: column; }
#main-header, #main-footer { position: static; flex-shrink: 0; }
#chat-window { flex-grow: 1; }

#html-preview-modal { position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 60; }
#html-preview-content { background-color: #fff; border-radius: 1rem; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3); width: 100%; height: 90%; max-width: 800px; display: flex; flex-direction: column; overflow: hidden; transform: scale(0.95); opacity: 0; }
#html-preview-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-bottom: 1px solid #e2e8f0; background-color: #f8fafc; }
.dark #html-preview-header { border-bottom-color: #374151; background-color: #1f2937; }
#html-preview-iframe-container { flex-grow: 1; overflow: hidden; }
#html-preview-iframe { width: 100%; height: 100%; border: none; background-color: #fff; }

.message-entry p.whitespace-pre-wrap {
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
}

.prose {
    overflow-wrap: break-word;
    word-break: break-word;
}
.dark .prose { --tw-prose-body: #d1d5db; --tw-prose-headings: #fff; --tw-prose-lead: #9ca3af; --tw-prose-links: #fff; --tw-prose-bold: #fff; --tw-prose-counters: #9ca3af; --tw-prose-bullets: #4b5563; --tw-prose-hr: #374151; --tw-prose-quotes: #f3f4f6; --tw-prose-quote-borders: #374151; --tw-prose-captions: #9ca3af; --tw-prose-code: #fff; --tw-prose-pre-code: #d1d5db; --tw-prose-pre-bg: #1f2937; --tw-prose-th-borders: #4b5563; --tw-prose-td-borders: #374151; }

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
    margin-bottom: 1em;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    min-width: 100%;
    table-layout: auto;
}

.prose th,
.prose td {
    border: 1px solid #e2e8f0;
    padding: 0.75em 0.5em;
    text-align: right;
    vertical-align: top;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}
.dark .prose th, .dark .prose td { border-color: #4b5563; }

.prose th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #334155;
}
.dark .prose th { background-color: #374151; color: #d1d5db; }

.prose tr:nth-child(even) {
    background-color: #fcfdfe;
}
.dark .prose tr:nth-child(even) { background-color: #1f2937; }

@media (max-width: 768px) {
    .prose th,
    .prose td {
        font-size: 0.85rem;
        padding: 0.6em 0.4em;
    }
}

#file-popup-menu {
    position: absolute;
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    padding: 0.5rem;
    z-index: 50;
    width: auto;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transform-origin: bottom left;
    transition: opacity 200ms ease-out, transform 200ms ease-out;
    pointer-events: none;
    min-width: 200px;
}
#file-popup-menu.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.popup-option {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    width: 100%;
    text-align: right;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
    color: #333;
    font-size: 16px;
}
.popup-option:hover {
    background-color: #f3f4f6;
}
.dark .popup-option:hover { background-color: #374151; }
.popup-option svg {
    width: 32px;
    height: 32px;
    margin-right: 15px;
    flex-shrink: 0;
    filter: drop-shadow(0px 2px 3px rgba(0,0,0,0.2));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.popup-option:hover svg {
    transform: translateY(-3px) scale(1.05);
    filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.3));
}

.popup-option .upload-arrow {
    animation: uploadPulse 1.5s infinite alternate ease-in-out;
}

@keyframes uploadPulse {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(-3px); opacity: 0.8; }
    100% { transform: translateY(0); opacity: 1; }
}

.popup-option .magnifier-group {
    transform-origin: 12px 14px;
    animation: magnifierFloatScan 3s infinite alternate ease-in-out;
}

@keyframes magnifierFloatScan {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(1px, -1px) scale(1.02); }
    66% { transform: translate(-1px, 1px) scale(1.02); }
    100% { transform: translate(0px, 0px) scale(1); }
}

.popup-option .magnifying-lens {
    animation: lensGlow 2s infinite alternate ease-in-out;
}

@keyframes lensGlow {
    0% { fill: rgba(180, 220, 255, 0.7); }
    50% { fill: rgba(220, 240, 255, 1); }
    100% { fill: rgba(180, 220, 255, 0.7); }
}

#image-preview-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    width: fit-content;
}
#image-preview-container.hidden { display: none !important; }

#file-info-text {
    font-size: 0.875rem;
    color: #475569;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dark #file-info-text {
    color: #cbd5e1;
}

.welcome-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    overflow-x: hidden;
    box-sizing: border-box;
    background-color: #f8f9fa;
    color: #333;
}
.dark .welcome-screen { background-color: #111827; color: #d1d5db; }

.welcome-container {
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.chatbot-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #0ea5e9, #6f42c1, #fd7e14);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    display: inline-block;
    line-height: 1.2;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    animation: gradient-flow 8s linear infinite alternate;
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.main-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 3rem;
    color: #2c3e50;
    line-height: 1.5;
    opacity: 0;
    transition: opacity 0.8s ease-in;
}
.dark .main-title { color: #e5e7eb; }

.buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.action-button-welcome {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    color: #495057;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    min-height: 70px;
    opacity: 0;
    transform: translateY(20px);
}
.dark .action-button-welcome { background: #1f2937; border-color: #374151; color: #d1d5db; }

.action-button-welcome:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.dark .action-button-welcome:hover { background: #374151; border-color: #4b5563; }

.button-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.orange-icon { background: #fd7e14; color: white; }
.green-icon { background: #20c997; color: white; }
.purple-icon { background: #6f42c1; color: white; }
.blue-icon { background: #0ea5e9; color: white; }

.button-text {
    text-align: right;
    line-height: 1.3;
    flex: 1;
    margin-right: 1rem;
}

#submit-button {
    position: relative;
}
#submit-button svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}
#stop-icon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
}
#submit-button.is-loading #send-icon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
}
#submit-button.is-loading #stop-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 480px) {
    .chatbot-name, .main-title { font-size: 1.5rem; }
    .action-button-welcome { padding: 1.2rem; font-size: 0.85rem; min-height: 60px; }
    .button-icon { width: 36px; height: 36px; font-size: 1.2rem; }
}

#image-gallery-modal {
    transition: opacity 300ms ease-in-out;
}
#image-gallery-modal.hidden {
    pointer-events: none;
}
#image-gallery-modal.visible {
    opacity: 1;
}
#image-gallery-modal.visible #image-gallery-content {
    opacity: 1;
    transform: scale(1);
}
#gallery-thumbnails .gallery-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease-in-out;
    opacity: 0.6;
}
#gallery-thumbnails .gallery-thumb:hover {
    opacity: 1;
    transform: scale(1.05);
}
#gallery-thumbnails .gallery-thumb.active {
    border-color: #3b82f6;
    opacity: 1;
    transform: scale(1.1);
}

#gallery-download-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 9999px;
    background: linear-gradient(45deg, #3b82f6, #6366f1);
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    min-width: 150px;
    min-height: 48px;
    animation: download-pulse 2.5s infinite;
}
#gallery-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.45);
    animation-play-state: paused;
}
#gallery-download-btn:active {
    transform: translateY(0px) scale(0.98);
    box-shadow: 0 2px 8px 0 rgba(59, 130, 246, 0.3);
}
#gallery-download-btn .typing-indicator span {
    background-color: white;
}
@keyframes download-pulse {
  0% {
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
  }
  50% {
    box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.5);
  }
  100% {
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
  }
}

@keyframes fade-slide-in-button {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.clarification-message {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
}
.dark .clarification-message { background-color: #1f2937; border-color: #374151; color: #d1d5db; }


.clarification-button.glass-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #334155;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(200, 200, 200, 0.4);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fade-slide-in-button 0.5s ease-out forwards;
    opacity: 0;
}
.dark .clarification-button.glass-button { color: #e5e7eb; background: rgba(55, 65, 81, 0.5); border-color: rgba(107, 114, 128, 0.4); }

.clarification-button.glass-button:nth-of-type(1) {
    animation-delay: 0.1s;
}
.clarification-button.glass-button:nth-of-type(2) {
    animation-delay: 0.2s;
}

.clarification-button.glass-button:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(107, 114, 128, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}
.dark .clarification-button.glass-button:hover { background: rgba(75, 85, 99, 0.8); border-color: rgba(156, 163, 175, 0.5); }

.clarification-button.glass-button:active {
    transform: translateY(0px) scale(0.98);
    box-shadow: none;
}

.clarification-button.glass-button svg {
    flex-shrink: 0;
    color: #4f46e5;
}
.dark .clarification-button.glass-button svg { color: #818cf8; }

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #374151;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
    cursor: pointer;
    width: 100%;
}
.dark .menu-item { color: #d1d5db; }
.menu-item:hover {
    background-color: #f3f4f6;
}
.dark .menu-item:hover { background-color: #374151; }
.menu-item.danger:hover {
    background-color: #fee2e2;
    color: #b91c1c;
}
.dark .menu-item.danger:hover { background-color: #450a0a; color: #f87171; }
.menu-item svg {
    width: 1.25rem;
    height: 1.25rem;
}
.menu-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0.5rem 0;
}
.dark .menu-divider { background-color: #374151; }

.sidebar-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    width: 100%;
    text-align: right;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    color: #4b5563;
    transition: background-color 0.2s, color 0.2s;
}
.dark .sidebar-button { color: #d1d5db; }
.sidebar-button:hover { background-color: #e5e7eb; color: #1f2937; }
.dark .sidebar-button:hover { background-color: #374151; color: #f9fafb; }
.sidebar-button svg { flex-shrink: 0; }

.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 28px;
}
.dark .slider { background-color: #374151; }
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #4f46e5;
}
input:checked + .slider:before {
    transform: translateX(22px);
}

/* START: New Thinking Animation Styles */
.message-entry.model {
    align-items: start;
}

.message-entry .message-content.model-bubble {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
}

.thinking-header-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
}

.model-icon-in-bubble {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #334155;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 0.75rem;
}
.dark .model-icon-in-bubble {
    background-color: #475569;
}

.thinking-head {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}
.dark .thinking-head {
    background-color: #334151;
    border-color: #475569;
}

.thinking-atom-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.thinking-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #334151;
}
.dark .thinking-label {
    color: #cbd5e1;
}

.thinking-chevron {
    width: 1rem;
    height: 1rem;
    color: #94a3b8;
    transition: transform 0.3s;
}
.thinking-chevron.collapsed {
    transform: rotate(-180deg);
}

.thinking-body {
    max-height: 500px;
    overflow-y: auto;
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    font-size: 0.875rem;
    line-height: 1.6;
    transition: all 0.4s ease-in-out;
}
.dark .thinking-body {
    background-color: #1e293b;
    border-color: #334151;
    color: #e2e8f0;
}
.thinking-body.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    border: none;
    margin-top: 0;
    overflow: hidden;
}

.final-answer-wrapper {
     width: 100%;
     transition: opacity 0.5s, transform 0.5s;
}
/* END: New Thinking Animation Styles */
/* START: New User Multipart Message Styles */

/* Main container for user messages with both an image/video and text */
.message-content.user-bubble-multipart {
    padding: 0; /* Remove default padding to allow children to control all spacing */
    overflow: hidden; /* Ensures child elements conform to the bubble's rounded corners */
}

/* The container for just the image/video part */
.user-file-part {
    padding: 8px; /* Adds some space inside the bubble, around the media frame */
}

/* A special class for single images to give them padding without the multipart structure */
.user-file-part.single {
    padding: 0;
}

/* The actual image or video element */
.user-file-part img,
.user-file-part video {
    width: 100%;
    display: block;
    border-radius: 12px; /* A slightly smaller radius than the main bubble */
    border: 2px solid rgba(255, 255, 255, 0.6); /* The requested thin, white, translucent frame */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* A subtle shadow for a little depth */
}

/* The container for the text part below the image */
.user-text-part {
    padding: 10px 16px; /* Standard padding for the text */
    /* Adds a very subtle dark layer to help the text stand out from the gradient */
    background-color: rgba(0, 0, 0, 0.1); 
}

/* END: New User Multipart Message Styles */
