
#demo-video {
  cursor: pointer;
}


#demo-video::-webkit-media-controls {
  display: none !important;
}

#demo-video::-webkit-media-controls-enclosure {
  display: none !important;
}

#demo-video::-webkit-media-controls-panel {
  display: none !important;
}

#demo-video::-webkit-media-controls-play-button {
  display: none !important;
}

#demo-video::-webkit-media-controls-start-playback-button {
  display: none !important;
}


#video-overlay,
#video-caption {
  transition: opacity 300ms ease-in-out;
}


.dropdown-container {
  position: static;
}

.dropdown-menu {
  z-index: 1000;
  pointer-events: none;
  transform: translateY(0);
}


.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dropdown-container.active .dropdown-icon {
  transform: rotate(180deg);
}


@keyframes slide-up-steps {
  0%, 12% {
    transform: translateY(0);
  }
  14%, 26% {
    transform: translateY(-50px);
  }
  28%, 40% {
    transform: translateY(-100px);
  }
  42%, 54% {
    transform: translateY(-150px);
  }
  56%, 68% {
    transform: translateY(-200px);
  }
  70%, 82% {
    transform: translateY(-250px);
  }
  84%, 96% {
    transform: translateY(-300px);
  }
  98%, 100% {
    transform: translateY(-350px);
  }
}

.animate-slide-up {
  animation: slide-up-steps 14s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.animate-slide-up:hover {
  animation-play-state: paused;
}


.text-carousel-item {
  transition: all 0.6s ease-in-out;
}




@keyframes avatarStopMotion {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

.chat-avatar-frame-1 {
  position: absolute;
  top: 0;
  left: 0;
  width: 50px;
  height: 50px;
  animation: avatarStopMotion 1s steps(1) infinite;
}

.chat-avatar-frame-2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 50px;
  height: 50px;
  animation: avatarStopMotion 1s steps(1) infinite;
  animation-delay: 0.5s;
  opacity: 0;
}


.chat-avatar-inner::before,
.chat-avatar-inner::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  background-image: url('../animation/idea/1.png'), url('../animation/idea/2.png');
}


.chat-model-avatar-frame-1 {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  animation: avatarStopMotion 1s steps(1) infinite;
}

.chat-model-avatar-frame-2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  animation: avatarStopMotion 1s steps(1) infinite;
  animation-delay: 0.5s;
  opacity: 0;
}


.chat-model-avatar::before,
.chat-model-avatar::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  background-image: url('../animation/writing/1.png'), url('../animation/writing/2.png');
}


.chat-assistant .lucide {
    width: 16px;
    height: 16px;
}


:root {
    --chat-bg-primary: rgba(255, 255, 255, 1);
    --chat-bg-secondary: rgba(247, 246, 243, 1);
    --chat-bg-elevated: rgba(255, 255, 255, 1);
    --chat-text-primary: rgba(55, 53, 47, 1);
    --chat-text-secondary: rgba(55, 53, 47, 0.65);
    --chat-text-tertiary: rgba(55, 53, 47, 0.45);
    --chat-icon-primary: rgba(55, 53, 47, 0.85);
    --chat-icon-secondary: rgba(55, 53, 47, 0.45);
    --chat-border-primary: rgba(0, 0, 0, 0.09);
    --chat-border-strong: rgba(0, 0, 0, 0.15);
    --chat-hover: rgba(0, 0, 0, 0.03);
    --chat-active: rgba(0, 0, 0, 0.05);
    --chat-shadow-sm: 0 0 0 0.5px rgba(0, 0, 0, 0.06), 0 1px 2px 0 rgba(0, 0, 0, 0.08);
    --chat-shadow-md: 0 0 0 0.5px rgba(0, 0, 0, 0.09), 0 4px 8px 0 rgba(0, 0, 0, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.1);
    --chat-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --chat-shadow-outline: 0 0 0 0.5px rgba(0, 0, 0, 0.09), 0 1px 2px 0 rgba(0, 0, 0, 0.12), 0 4px 16px -2px rgba(0, 0, 0, 0.6);
    --chat-blue-bg: rgba(35, 131, 226, 0.14);
    --chat-blue-text: rgb(35, 131, 226);
}


body.dark-mode {
    --chat-bg-primary: rgba(25, 25, 25, 1);
    --chat-bg-secondary: rgba(32, 32, 32, 1);
    --chat-bg-elevated: rgba(37, 37, 37, 1);
    --chat-text-primary: rgba(255, 255, 255, 0.9);
    --chat-text-secondary: rgba(255, 255, 255, 0.6);
    --chat-text-tertiary: rgba(255, 255, 255, 0.4);
    --chat-icon-primary: rgba(255, 255, 255, 0.8);
    --chat-icon-secondary: rgba(255, 255, 255, 0.45);
    --chat-border-primary: rgba(255, 255, 255, 0.09);
    --chat-border-strong: rgba(255, 255, 255, 0.15);
    --chat-hover: rgba(255, 255, 255, 0.03);
    --chat-active: rgba(255, 255, 255, 0.05);
    --chat-shadow-sm: 0 0 0 0.5px rgba(255, 255, 255, 0.06), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --chat-shadow-md: 0 0 0 0.5px rgba(255, 255, 255, 0.09), 0 4px 8px 0 rgba(0, 0, 0, 0.4), 0 8px 16px -4px rgba(0, 0, 0, 0.5);
    --chat-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --chat-shadow-outline: 0 0 0 0.5px rgba(255, 255, 255, 0.09), 0 1px 2px 0 rgba(0, 0, 0, 0.4), 0 4px 16px -2px rgba(0, 0, 0, 0.8);
}


.chat-assistant {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: 400px;
    height: 600px;
    max-height: calc(100vh - 80px);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease, visibility 300ms ease;
}

.chat-assistant.open {
    opacity: 1;
    visibility: visible;
}


.chat-assistant.fullscreen {
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
}

.chat-assistant.fullscreen .chat-container {
    border-radius: 0;
    max-height: 100vh;
}

.chat-assistant.fullscreen .chat-drag-handle {
    display: none;
}

.chat-backdrop {
    background: rgba(255, 255, 255, 1);
    position: absolute;
    inset: 0;
    border-radius: 12px;
    transition: background 200ms ease-in-out;
}

.chat-drag-handle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    z-index: 0;
    pointer-events: auto;
    cursor: grab;
}

.chat-drag-handle:active {
    cursor: grabbing;
}

.chat-container {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 1);
    border-radius: 12px;
    box-shadow: var(--chat-shadow-md);
    border: 1px solid var(--chat-border-primary);
    overflow: hidden;
}


.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem;
    gap: 0.5rem;
    pointer-events: auto;
    flex-shrink: 0;
    border-bottom: 1px solid var(--chat-border-primary);
}

.chat-header-left {
    flex: 1;
    min-width: 0;
}

.chat-title {
    color: var(--chat-text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0 0.5rem;
}

.chat-header-right {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.chat-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: var(--chat-icon-primary);
    cursor: pointer;
    transition: background 20ms ease-in;
    padding: 0;
}

.chat-icon-btn:hover {
    background: var(--chat-hover);
}

.chat-icon-btn i {
    width: 18px;
    height: 18px;
}


.chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
    pointer-events: auto;
}

.chat-scroll-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    scrollbar-gutter: stable;
    mask-image: linear-gradient(black 0px, black 32px, black calc(100% - 32px), transparent 100%);
}

.chat-scroll-area::-webkit-scrollbar {
    width: 8px;
}

.chat-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}

.chat-scroll-area::-webkit-scrollbar-thumb {
    background: var(--chat-border-primary);
    border-radius: 4px;
}

.chat-scroll-area::-webkit-scrollbar-thumb:hover {
    background: var(--chat-border-strong);
}

.chat-messages {
    padding-top: 24px;
    padding-bottom: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
}


.chat-welcome {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 710px;
    width: 100%;
    align-self: center;
    padding: 0.875rem 0.875rem 0;
    gap: 0.75rem;
    margin-top: auto;
    transition: opacity 300ms ease, height 300ms ease;
}

.chat-welcome.hidden {
    display: none;
}

.chat-avatar-container {
    position: relative;
    display: inline-block;
    padding-top: 0.875rem;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: transparent;
}

.chat-avatar-inner {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chat-avatar-inner img {
    width: 50px;
    height: 50px;
    user-select: none;
    border-radius: 50%;
    object-fit: cover;
}

.chat-welcome-title {
    font-size: 1.0625rem;
    line-height: 1.3;
    font-weight: 600;
    color: var(--chat-text-primary);
    font-family: 'Inter', sans-serif;
}


.chat-quick-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 710px;
    align-self: center;
    padding: 0.875rem 0.875rem 0;
    gap: 0.25rem;
    transition: opacity 300ms ease, height 300ms ease;
}

.chat-quick-actions.hidden {
    display: none;
}

.chat-action-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: var(--chat-text-primary);
    cursor: pointer;
    transition: all 100ms ease;
    font-family: 'Inter', sans-serif;
    width: 100%;
}

.chat-action-item:hover {
    background: var(--chat-hover);
}

.chat-action-item i {
    width: 18px;
    height: 18px;
    color: var(--chat-icon-primary);
    flex-shrink: 0;
}

.chat-action-text {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.chat-scroll-btn {
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translate(-50%, -8px);
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 20px;
    background: var(--chat-bg-elevated);
    border: none;
    cursor: pointer;
    box-shadow: var(--chat-shadow-outline);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease-out;
}

.chat-scroll-btn.visible {
    opacity: 1;
    pointer-events: auto;
}


.chat-input-area {
    flex-shrink: 0;
    padding: 0.875rem;
    pointer-events: auto;
}

.chat-input-container {
    max-width: 710px;
    margin: 0 auto;
}

.chat-input-wrapper {
    border-radius: 0.5rem;
    background: var(--chat-bg-secondary);
    border: 1px solid var(--chat-border-primary);
    transition: border-color 0.1s ease-in-out;
    margin-top: 0.75rem;
}

.chat-input-wrapper:focus-within {
    border-color: var(--chat-border-strong);
}


.chat-context-pills {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.chat-context-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.75rem;
    width: 1.75rem;
    border-radius: 0.375rem;
    border: 1px solid var(--chat-border-strong);
    background: transparent;
    cursor: pointer;
    transition: background 20ms ease-in;
    padding: 0;
}

.chat-context-btn:hover {
    background: var(--chat-hover);
}

.chat-context-pill {
    display: flex;
    align-items: center;
    height: 1.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid var(--chat-border-strong);
    background: var(--chat-bg-elevated);
    gap: 0.25rem;
    max-width: 50%;
}

.chat-pill-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-pill-text {
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 400;
    color: var(--chat-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    font-family: 'Inter', sans-serif;
}

.chat-pill-remove {
    width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    opacity: 0;
    transition: opacity 100ms ease;
}

.chat-context-pill:hover .chat-pill-remove {
    opacity: 1;
}


.chat-input {
    color: var(--chat-text-primary);
    font-size: 0.875rem;
    line-height: 1.375rem;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    padding: 0.75rem;
    min-height: 6.25rem;
    max-height: 17.5rem;
    overflow: auto;
    outline: none;
    cursor: text;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-input:empty::before {
    content: attr(data-placeholder);
    color: var(--chat-text-tertiary);
}


.chat-input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    gap: 0.75rem;
}

.chat-input-footer-left {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    flex: 1;
    min-width: 0;
}

.chat-input-footer-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.chat-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.75rem;
    padding: 0;
    width: 1.75rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 20ms ease-in;
    flex-shrink: 0;
}

.chat-tool-btn:hover {
    background: var(--chat-hover);
}

.chat-model-btn, .chat-source-btn {
    width: auto;
    padding: 0 0.5rem;
    gap: 0.25rem;
}

.chat-model-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chat-model-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chat-tool-text {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: var(--chat-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Inter', sans-serif;
}

.chat-source-btn i {
    color: var(--chat-blue-text);
}

.chat-send-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    border: none;
    background: var(--chat-icon-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 150ms ease, transform 100ms ease;
    flex-shrink: 0;
}

.chat-send-btn:not(:disabled) {
    background: rgba(51, 65, 85, 1);
}

.chat-send-btn:not(:disabled):hover {
    background: rgba(15, 23, 42, 1);
    transform: scale(1.05);
}

.chat-send-btn:not(:disabled):active {
    transform: scale(0.95);
}

.chat-send-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.chat-send-btn svg {
    width: 14px;
    height: 14px;
    stroke: white !important;
}

.chat-send-btn i {
    width: 14px;
    height: 14px;
}


.chat-message {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem;
    max-width: 710px;
    width: 100%;
    align-self: center;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message.user .chat-message-avatar {
    display: none;
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chat-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.chat-message-avatar .chat-avatar-frame-1 {
    animation: avatarStopMotion 1s steps(1) infinite;
}

.chat-message-avatar .chat-avatar-frame-2 {
    animation: avatarStopMotion 1s steps(1) infinite;
    animation-delay: 0.5s;
    opacity: 0;
}


.chat-message-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.chat-message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--chat-text-primary);
    font-family: 'Inter', sans-serif;
    word-wrap: break-word;
}

.chat-message.ai .chat-message-bubble {
    background: var(--chat-bg-secondary);
    border-top-left-radius: 0.375rem;
}

.chat-message.user .chat-message-bubble {
    background: rgba(15, 23, 42, 1);
    color: white;
    border-top-right-radius: 0.375rem;
    margin-left: auto;
}


.chat-message-bubble h1,
.chat-message-bubble h2,
.chat-message-bubble h3,
.chat-message-bubble h4 {
    font-weight: 600;
    margin-top: 1em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}

.chat-message-bubble h1 { font-size: 1.5em; }
.chat-message-bubble h2 { font-size: 1.3em; }
.chat-message-bubble h3 { font-size: 1.1em; }
.chat-message-bubble h4 { font-size: 1em; }

.chat-message-bubble p {
    margin: 0.5em 0;
}

.chat-message-bubble ul,
.chat-message-bubble ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

.chat-message-bubble li {
    margin: 0.25em 0;
}

.chat-message-bubble code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Courier New', monospace;
}

.chat-message-bubble pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.75rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 0.5em 0;
}

.chat-message-bubble pre code {
    background: none;
    padding: 0;
}


.chat-message-bubble .table-wrapper {
    overflow-x: auto;
    margin: 1em 0;
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}


.chat-message-bubble .table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.chat-message-bubble .table-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.chat-message-bubble .table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.chat-message-bubble .table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}


.chat-message-bubble .table-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 8px;
    width: 20px;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.9), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.chat-message-bubble .table-wrapper:not(.scrolled-to-end)::after {
    opacity: 1;
}

.chat-message-bubble table {
    width: 100%;
    min-width: 400px;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.875em;
}

.chat-message-bubble th,
.chat-message-bubble td {
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0.75rem;
    text-align: left;
    white-space: nowrap;
}

.chat-message-bubble th {
    background: rgba(0, 0, 0, 0.05);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.chat-message-bubble tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}


@media (max-width: 640px) {
    .chat-message-bubble table {
        font-size: 0.75em;
        min-width: 300px;
    }

    .chat-message-bubble th,
    .chat-message-bubble td {
        padding: 0.375rem 0.5rem;
    }
}

.chat-message-bubble blockquote {
    border-left: 3px solid rgba(0, 0, 0, 0.2);
    padding-left: 1rem;
    margin: 0.5em 0;
    color: rgba(0, 0, 0, 0.7);
}

.chat-message-bubble strong {
    font-weight: 600;
}

.chat-message-bubble em {
    font-style: italic;
}

.chat-message-bubble a {
    color: #3b82f6;
    text-decoration: underline;
}

.chat-message-bubble a:hover {
    color: #2563eb;
}

.chat-message-bubble hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 1em 0;
}

.chat-message-time {
    font-size: 0.75rem;
    color: var(--chat-text-tertiary);
    padding: 0 0.25rem;
}

.chat-message.user .chat-message-time {
    text-align: right;
}


.chat-loading {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem;
    max-width: 710px;
    width: 100%;
    align-self: center;
}

.chat-loading-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chat-loading-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.chat-loading-avatar .chat-avatar-frame-1 {
    animation: avatarStopMotion 1s steps(1) infinite;
}

.chat-loading-avatar .chat-avatar-frame-2 {
    animation: avatarStopMotion 1s steps(1) infinite;
    animation-delay: 0.5s;
    opacity: 0;
}

.chat-loading-content {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border-top-left-radius: 0.375rem;
    background: var(--chat-bg-secondary);
}

.chat-loading-dots {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.chat-loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--chat-icon-secondary);
    animation: loadingDot 1.4s infinite ease-in-out both;
}

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

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

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


.chat-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: transform 200ms ease, box-shadow 200ms ease, opacity 300ms ease, visibility 300ms ease;
    pointer-events: auto;
}

.chat-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 3px 6px rgba(0, 0, 0, 0.15);
}

.chat-toggle-btn:active {
    transform: scale(0.95);
}

.chat-toggle-btn.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.chat-toggle-btn i {
    width: 28px;
    height: 28px;
    color: rgba(15, 23, 42, 1);
}

/* Skeleton Loading Animation */
@keyframes shimmer {
  0% {
    background-position: -468px 0;
  }
  100% {
    background-position: 468px 0;
  }
}

.skeleton {
  animation: shimmer 1.2s ease-in-out infinite;
  background: linear-gradient(
    to right,
    #f0f0f0 0%,
    #e0e0e0 20%,
    #f0f0f0 40%,
    #f0f0f0 100%
  );
  background-size: 800px 104px;
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer-slide 1.5s infinite;
}

@keyframes shimmer-slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
