.chat-widget-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    cursor: pointer;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    animation: pulse 2s infinite;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chat-widget-button-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

.chat-widget-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.chat-widget-window-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-widget-header {
    padding: 15px 20px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-widget-header h3 {
    margin: 0;
    font-size: 16px;
}

.chat-widget-header-buttons {
    display: flex;
    gap: 10px;
}

.chat-widget-close, .chat-widget-fullscreen {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.chat-widget-fullscreen {
    font-size: 20px;
}

.chat-widget-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.chat-widget-message {
    margin-bottom: 15px;
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    line-height: 1.4;
}

.chat-widget-message-user {
    background: #f0f0f0;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.chat-widget-message-bot {
    background: #e3f2fd;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.chat-widget-input {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.chat-widget-input textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: none;
    height: 40px;
    font-family: inherit;
}

.chat-widget-input textarea:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.chat-widget-send {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.chat-widget-send:hover {
    opacity: 0.9;
}

.chat-widget-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 加载动画样式 */
.chat-widget-loading {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 15px;
    background: #e3f2fd;
    border-radius: 15px;
    margin-right: auto;
    margin-bottom: 15px;
    border-bottom-left-radius: 5px;
}

.chat-widget-loading-dots {
    display: flex;
    gap: 4px;
}

.chat-widget-loading-dot {
    width: 8px;
    height: 8px;
    background: #2196f3;
    border-radius: 50%;
    animation: loading 1.4s infinite;
}

.chat-widget-loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-widget-loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loading {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* 全屏模式样式 */
.chat-widget-window-fullscreen {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
}

.chat-widget-window-fullscreen .chat-widget-header {
    border-radius: 0;
}
