/* —————— 全局样式 —————— */
/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f0f4ff 0%, #e6e9f2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* —————— 个人信息卡片样式 —————— */
.profile-card {
    /* 修改点：增加背景图片，并添加透明白色叠层 */
    background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)), url('/assets/background.png') no-repeat center/cover;
    width: 100%;
    max-width: 800px;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    text-align: center;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* —————— 聊天窗口样式 —————— */
.chat-container {
    background: #fff;
    width: 100%;
    max-width: 800px;
    height: 65vh;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

/* —————— 消息区域样式 —————— */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 消息气泡 */
.message {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 20px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.user-message {
    background: #007bff;
    color: white;
    align-self: flex-end;
}

.bot-message {
    background: #f1f3f6;
    align-self: flex-start;
}

/* —————— 加载动画样式 —————— */
.typing-indicator {
    background: #f1f3f6;
    padding: 12px 20px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 80px;
}

.dot {
    width: 8px;
    height: 8px;
    background: #666;
    border-radius: 50%;
    animation: bounce 1.4s infinite;
}

/* —————— 输入区域样式 —————— */
.input-area {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.message-input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.message-input:focus {
    border-color: #007bff;
}

.send-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s;
}

.send-button:disabled {
    background: #a0c4ff;
    cursor: not-allowed;
}

/* —————— 动画 —————— */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
