/* 启小焰聊天界面样式 */

/* 聊天窗口基础样式 */
#qixiaoyan-chat-container {
    font-family: 'Inter', system-ui, sans-serif;
}

/* 聊天消息区域滚动条样式 */
#chat-messages {
    scroll-behavior: smooth;
}

#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: #FF6B35;
    border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: #E84A27;
}

/* 输入框聚焦效果增强 */
#chat-input:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

/* 发送按钮悬停效果 */
#send-message-btn:hover {
    transform: scale(1.05);
}

/* 发送按钮激活效果 */
#send-message-btn:active {
    transform: scale(0.95);
}

/* 悬浮按钮动画效果 */
#qixiaoyan-button {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 消息出现动画 */
#chat-messages > div {
    animation: fadeIn 0.3s ease-out;
}

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

/* 正在输入动画 */
@keyframes typing {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

#typing-indicator .animate-bounce {
    animation: typing 1.4s ease-in-out infinite;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #qixiaoyan-chat-container {
        width: 90vw;
        bottom: 10%;
        right: 5%;
        left: 5%;
        max-height: 70vh;
    }
    
    #qixiaoyan-button {
        width: 14vw;
        height: 14vw;
        bottom: 5%;
        right: 5%;
        max-width: 60px;
        max-height: 60px;
    }
    
    #chat-messages {
        height: 50vh;
    }
}

/* 打印样式隐藏聊天界面 */
@media print {
    #qixiaoyan-chat-container,
    #qixiaoyan-button {
        display: none !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    #qixiaoyan-chat-container {
        border: 2px solid currentColor;
    }
    
    #qixiaoyan-button {
        border: 2px solid currentColor;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    #qixiaoyan-button {
        animation: none;
    }
    
    #chat-messages > div {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    #typing-indicator .animate-bounce {
        animation: none;
        opacity: 1;
        transform: none;
    }
}