/* 智能助手容器 */
#smart-assistant-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    transition: all 0.3s ease;
}

/* 助手按钮 */
.assistant-btn {
    background: linear-gradient(135deg, #8e44ad, #3498db);
    color: white;
    border-radius: 50px;
    padding: 14px 24px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.assistant-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.assistant-btn.active {
    background: linear-gradient(135deg, #e74c3c, #f39c12);
}

.assistant-btn i {
    font-size: 1.3rem;
    margin-right: 12px;
}

.assistant-btn span {
    font-weight: 600;
    font-size: 1.1rem;
}

/* 助手窗口 */
.assistant-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 420px;
    height: 520px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.18);
    display: none;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.assistant-window.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* 助手头部 */
.assistant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: linear-gradient(135deg, #8e44ad, #3498db);
    color: white;
}

.assistant-title {
    display: flex;
    align-items: center;
}

.assistant-title i {
    font-size: 1.4rem;
    margin-right: 12px;
}

.assistant-title h3 {
    margin: 0;
    font-weight: 600;
    font-size: 1.2rem;
}

.assistant-close {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.assistant-close:hover {
    background: rgba(255,255,255,0.3);
}

/* 消息区域 */
.assistant-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #f9f9fa;
    display: flex;
    flex-direction: column;
}

.assistant-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* 消息样式 */
.message {
    max-width: 90%;
    padding: 15px 18px;
    border-radius: 16px;
    animation: fadeIn 0.4s ease;
}

.assistant-message {
    background: #f0f0f0;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.user-message {
    background: #e3f2fd;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message-content {
    padding: 8px;
}

.message-sender {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #555;
}

.assistant-message .message-sender {
    color: #8e44ad;
}

.user-message .message-sender {
    color: #1976d2;
    text-align: right;
}

.message-content p {
    margin: 0;
    line-height: 1.65;
    font-size: 1rem;
}

.thinking .message-content p {
    color: #666;
    font-style: italic;
}

/* 输入区域 */
.assistant-footer {
    padding: 18px;
    border-top: 1px solid #eee;
    background: white;
}

.input-group {
    display: flex;
    margin-bottom: 12px;
}

.assistant-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 12px 18px;
    outline: none;
    font-size: 1rem;
    transition: all 0.3s;
}

.assistant-input:focus {
    border-color: #8e44ad;
    box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.15);
}

.send-question {
    background: #8e44ad;
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    margin-left: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-question:hover {
    background: #7d3c98;
    transform: rotate(15deg);
}

.ai-info {
    font-size: 0.85rem;
    color: #777;
    padding: 8px 12px;
    background: #f9f9f9;
    border-radius: 10px;
    border-left: 3px solid #8e44ad;
    text-align: center;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    #smart-assistant-container {
        bottom: 20px;
        right: 20px;
    }
    
    .assistant-btn {
        padding: 12px 18px;
        font-size: 1rem;
    }
    
    .assistant-window {
        width: 95vw;
        height: 75vh;
        bottom: 75px;
        right: 10px;
        left: 10px;
        margin: 0 auto;
        border-radius: 18px 18px 0 0;
    }
}