/* 手机端适配 */ 
@media (max-width: 768px) { 
    /* 手机端直接跳过启动画面，使用第二个背景 */ 
    .startup-screen { 
        display: none !important; 
    } 
    
    .container { 
        opacity: 1 !important; 
        visibility: visible !important; 
        padding: 10px; 
        height: 100vh; 
        display: flex; 
        flex-direction: column; 
        overflow: hidden; 
    } 
    
    body { 
        background: url('images/Backdrop Alona2.png') no-repeat center center fixed !important; 
        background-size: cover; 
        overflow: hidden; 
    } 
    
    /* 头部布局：左上角文字，右侧设置 */ 
    header { 
        padding: 10px 0; 
        margin-bottom: 10px; 
        flex-shrink: 0; 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
    } 
    
    .logo h1 { 
        font-size: 1.4rem; 
    } 
    
    .settings-btn { 
        width: 35px; 
        height: 35px; 
    } 
    
    /* 主内容区域重新布局 */ 
    .main-content { 
        flex: 1; 
        position: relative; 
        height: calc(100vh - 80px); 
        overflow: hidden; 
    } 
    
    /* 上半部分：阿洛娜 - 完全透明背景 */ 
    .character-section { 
        position: absolute; 
        top: 0; 
        left: 0; 
        right: 0; 
        height: 100%; 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
        justify-content: center; 
        padding: 20px 0; 
        z-index: 1; 
        background: transparent; /* 完全透明 */
    } 
    
    .character-container { 
        width: 100%; 
        max-width: 280px; 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
        justify-content: center; 
        position: relative;
    } 
    
    .character-image { 
        width: 100%; 
        max-width: 220px; 
        height: auto; 
        object-fit: contain; 
    } 
    
    /* 移动端气泡显示在阿洛娜下方 */
    .speech-bubble { 
        position: static;
        transform: none;
        width: 250px; 
        font-size: 0.9rem; 
        padding: 10px 15px; 
        margin-top: 20px;
        background: rgba(255, 255, 255, 0.85); /* 半透明背景 */
        backdrop-filter: blur(10px);
    } 
    
    .speech-bubble::after {
        display: none; /* 移除气泡尖角 */
    }
    
    .api-status { 
        margin-top: 10px; 
        font-size: 0.75rem; 
        padding: 5px 10px; 
        background: rgba(0, 30, 60, 0.4); /* 更透明 */
        backdrop-filter: blur(5px);
    } 
    
    /* 下半部分：聊天区域 - 绝对定位覆盖阿洛娜下半身 */ 
    .chat-section { 
        position: absolute; 
        bottom: 0; 
        left: 0; 
        right: 0; 
        height: 48%; /* 增加高度，覆盖更多阿洛娜下半部分 */
        background: rgba(255, 255, 255, 0.08); /* 更透明 */
        backdrop-filter: blur(8px); 
        border-radius: 15px 15px 0 0; 
        display: flex; 
        flex-direction: column; 
        z-index: 2; 
        padding-top: 8px; 
        transition: all 0.3s ease;
    } 
    
    /* 折叠状态下的聊天区域 */
    .chat-section.collapsed {
        height: 50px; /* 只显示折叠按钮 */
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(5px);
        overflow: hidden; /* 确保内容不会溢出 */
    }
    
    .chat-section.collapsed .chat-header,
    .chat-section.collapsed .chat-messages,
    .chat-section.collapsed .input-container,
    .chat-section.collapsed .typing-indicator,
    .chat-section.collapsed #clearBtn {
        display: none !important;
    }
    
    /* 移动端隐藏聊天头部 */ 
    .chat-header { 
        display: none !important;
    } 
    
    /* 移动端清空按钮改为圆形浮动按钮 */
    #clearBtn { 
        position: absolute !important;
        bottom: 70px; /* 位于输入框上方 */
        right: 15px;
        width: 42px !important;
        height: 42px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        z-index: 30; /* 确保在内容上方但在折叠按钮下方 */
        box-shadow: 0 3px 10px rgba(231, 76, 60, 0.5) !important;
        border: none !important;
        cursor: pointer;
    }
    
    #clearBtn i {
        font-size: 1rem !important;
        margin: 0 !important;
    }
    
    #clearBtn:hover {
        transform: scale(1.1) !important;
    }
    
    #clearBtn:active {
        transform: scale(0.95) !important;
    }
    
    /* 历史记录区域 - 半透明可以看到阿洛娜下半身 */ 
    .chat-messages { 
        flex: 1; 
        padding: 8px; /* 不需要底部留空间了 */
        overflow-y: auto; 
        background: rgba(255, 255, 255, 0.03); 
        backdrop-filter: blur(2px); 
        position: relative; 
        min-height: 80px; 
        transition: all 0.3s ease; 
        gap: 6px; /* 减小消息间距 */
    } 
    
    /* 折叠按钮调整位置 */
    .collapse-toggle { 
        position: absolute; 
        top: 8px; /* 移到顶部 */
        right: 50%;
        transform: translateX(50%);
        background: rgba(255, 255, 255, 0.25); 
        border: 1px solid rgba(255, 255, 255, 0.4); 
        border-radius: 20px; 
        width: 60px; 
        height: 30px; 
        display: flex !important; 
        align-items: center; 
        justify-content: center; 
        cursor: pointer; 
        color: white; 
        font-size: 1rem; 
        transition: all 0.3s; 
        z-index: 10; 
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); 
    } 
    
    .collapse-toggle:hover { 
        background: rgba(255, 255, 255, 0.35); 
    } 
    
    .collapse-toggle.collapsed { 
        background: rgba(255, 255, 255, 0.15);
    } 
    
    .collapse-toggle i {
        transition: transform 0.3s ease;
    }
    
    .collapse-toggle.collapsed i {
        transform: rotate(180deg);
    }
    
    /* 输入区域 */ 
    .input-container { 
        padding: 6px 10px; 
        flex-shrink: 0; 
        background: rgba(255, 255, 255, 0.08); 
        border-top: 1px solid rgba(255, 255, 255, 0.15); 
        min-height: 60px; 
    } 
    
    .status { 
        font-size: 0.75rem; 
        margin-bottom: 6px; 
        text-align: center; 
    } 
    
    .chat-input-container { 
        background: rgba(255, 255, 255, 0.2); 
        border: 1px solid rgba(255, 255, 255, 0.3); 
        border-radius: 20px; 
        padding: 3px; 
    } 
    
    .chat-input { 
        font-size: 0.85rem; 
        padding: 6px 12px; 
    } 
    
    .send-btn, .stop-btn { 
        width: 30px; 
        height: 30px; 
        border-radius: 50%; 
    } 
    
    /* 消息样式调整 - 更小更紧凑 */ 
    .message { 
        max-width: 85%; /* 减小最大宽度，防止溢出 */
        margin-bottom: 6px; 
        display: flex;
        gap: 6px;
    } 
    
    .message-avatar { 
        width: 24px; 
        height: 24px; 
        flex-shrink: 0;
    } 
    
    .message-content { 
        font-size: 0.8rem; 
        max-width: calc(100% - 30px); /* 确保内容不会溢出 */
        overflow-wrap: break-word; /* 强制长单词换行 */
    } 
    
    .message-text { 
        padding: 6px 10px; 
        border-radius: 12px; 
        font-size: 0.8rem;
        line-height: 1.4;
        word-break: break-word; /* 确保长文本换行 */
    } 
    
    .message-sender { 
        font-size: 0.7rem; 
        margin-bottom: 2px; 
    } 
    
    /* 打字指示器 */ 
    .typing-indicator { 
        margin: 0 8px 8px 8px; 
        padding: 6px 12px; 
        background: rgba(255, 255, 255, 0.08);
    } 
    
    .typing-dots {
        gap: 3px;
    }
    
    .typing-dot {
        width: 6px;
        height: 6px;
    }
    
    /* 设置模态框适配 */ 
    .modal-content { 
        width: 95%; 
        max-width: 400px; 
        margin: 20px; 
        max-height: 80vh; 
        overflow-y: auto; 
    } 
    
    /* 隐藏水印 */ 
    .watermark { 
        display: none; 
    } 
    
    /* 显示移动端专用元素，隐藏桌面端专用元素 */
    .mobile-only {
        display: flex !important;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    /* 确保手机端聊天记录可选中 */ 
    .chat-messages * { 
        -webkit-user-select: text; 
        -moz-user-select: text; 
        -ms-user-select: text; 
        user-select: text; 
    } 

    .startup-screen { 
        display: none !important; 
    } 
    
    .container { 
        opacity: 1 !important; 
        visibility: visible !important; 
        padding: 10px; 
        height: 100vh; 
        display: flex; 
        flex-direction: column; 
        overflow: hidden; 
    } 
    
    body { 
        background: url('images/Backdrop Alona2.png') no-repeat center center fixed !important; 
        background-size: cover; 
        overflow: hidden; 
    } 
    
    /* 头部布局：左上角文字，右侧设置 */ 
    header { 
        padding: 10px 0; 
        margin-bottom: 10px; 
        flex-shrink: 0; 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
    } 
    
    .logo h1 { 
        font-size: 1.4rem; 
    } 
    
    .settings-btn { 
        width: 35px; 
        height: 35px; 
    } 
    
    /* 主内容区域重新布局 */ 
    .main-content { 
        flex: 1; 
        position: relative; 
        height: calc(100vh - 80px); 
        overflow: hidden; 
    } 
    
    /* 上半部分：阿洛娜 - 完全透明背景 */ 
    .character-section { 
        position: absolute; 
        top: 0; 
        left: 0; 
        right: 0; 
        height: 100%; 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
        justify-content: center; 
        padding: 20px 0; 
        z-index: 1; 
        background: transparent; /* 完全透明 */
    } 
    
    .character-container { 
        width: 100%; 
        max-width: 280px; 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
        justify-content: center; 
        position: relative;
    } 
    
    .character-image { 
        width: 100%; 
        max-width: 220px; 
        height: auto; 
        object-fit: contain; 
    } 
    
    /* 移动端气泡显示在阿洛娜下方 */
    .speech-bubble { 
        position: static;
        transform: none;
        width: 250px; 
        font-size: 0.9rem; 
        padding: 10px 15px; 
        margin-top: 20px;
        background: rgba(255, 255, 255, 0.85); /* 半透明背景 */
        backdrop-filter: blur(10px);
    } 
    
    .speech-bubble::after {
        display: none; /* 移除气泡尖角 */
    }
    
    .api-status { 
        margin-top: 15px; 
        font-size: 0.8rem; 
        padding: 6px 12px; 
    } 
    
    /* 下半部分：聊天区域 - 绝对定位覆盖阿洛娜下半身 */ 
    .chat-section { 
        position: absolute; 
        bottom: 0; 
        left: 0; 
        right: 0; 
        height: 40%; /* 减小高度 */
        background: rgba(255, 255, 255, 0.08); /* 更透明 */
        backdrop-filter: blur(8px); 
        border-radius: 15px 15px 0 0; 
        display: flex; 
        flex-direction: column; 
        z-index: 2; 
        padding-top: 5px; 
        transition: all 0.3s ease;
    } 
    
    /* 折叠状态下的聊天区域 */
    .chat-section.collapsed {
        height: 50px; /* 只显示折叠按钮 */
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(5px);
    }
    
    .chat-section.collapsed .chat-header,
    .chat-section.collapsed .chat-messages,
    .chat-section.collapsed .input-container,
    .chat-section.collapsed .typing-indicator {
        display: none;
    }
    
    /* 聊天头部 */ 
    .chat-header { 
        padding: 6px 12px; 
        flex-shrink: 0; 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
        background: rgba(0, 100, 200, 0.15); 
        min-height: 35px; 
    } 
    
    .chat-header h3 { 
        font-size: 0.9rem; 
        margin: 0; 
    } 
    
    .control-btn { 
        padding: 4px 8px; 
        font-size: 0.7rem; 
        border-radius: 12px; 
    } 
    
    /* 历史记录区域 - 半透明可以看到阿洛娜下半身 */ 
    .chat-messages { 
        flex: 1; 
        padding: 8px; 
        overflow-y: auto; 
        background: rgba(255, 255, 255, 0.03); 
        backdrop-filter: blur(2px); 
        position: relative; 
        min-height: 80px; 
        transition: all 0.3s ease; 
        gap: 8px; /* 减小消息间距 */
    } 
    
    /* 折叠按钮调整位置 */
    .collapse-toggle { 
        position: absolute; 
        top: 8px; /* 移到顶部 */
        right: 50%;
        transform: translateX(50%);
        background: rgba(255, 255, 255, 0.25); 
        border: 1px solid rgba(255, 255, 255, 0.4); 
        border-radius: 20px; 
        width: 60px; 
        height: 30px; 
        display: flex !important; 
        align-items: center; 
        justify-content: center; 
        cursor: pointer; 
        color: white; 
        font-size: 1rem; 
        transition: all 0.3s; 
        z-index: 10; 
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); 
    } 
    
    .collapse-toggle:hover { 
        background: rgba(255, 255, 255, 0.35); 
    } 
    
    .collapse-toggle.collapsed { 
        background: rgba(255, 255, 255, 0.15);
    } 
    
    .collapse-toggle.collapsed i {
        transform: rotate(180deg);
    }
    
    /* 输入区域 */ 
    .input-container { 
        padding: 6px 10px; 
        flex-shrink: 0; 
        background: rgba(255, 255, 255, 0.08); 
        border-top: 1px solid rgba(255, 255, 255, 0.15); 
        min-height: 60px; 
    } 
    
    .status { 
        font-size: 0.75rem; 
        margin-bottom: 6px; 
        text-align: center; 
    } 
    
    .chat-input-container { 
        background: rgba(255, 255, 255, 0.2); 
        border: 1px solid rgba(255, 255, 255, 0.3); 
        border-radius: 20px; 
        padding: 3px; 
    } 
    
    .chat-input { 
        font-size: 0.85rem; 
        padding: 6px 12px; 
    } 
    
    .send-btn, .stop-btn { 
        width: 30px; 
        height: 30px; 
        border-radius: 50%; 
    } 
    
    /* 消息样式调整 - 更小更紧凑 */ 
    .message { 
        max-width: 90%; 
        margin-bottom: 6px; 
        display: flex;
        gap: 8px;
    } 
    
    .message-avatar { 
        width: 24px; 
        height: 24px; 
        flex-shrink: 0;
    } 
    
    .message-content { 
        font-size: 0.8rem; 
        max-width: calc(100% - 32px);
    } 
    
    .message-text { 
        padding: 6px 10px; 
        border-radius: 12px; 
        font-size: 0.8rem;
        line-height: 1.4;
    } 
    
    .message-sender { 
        font-size: 0.7rem; 
        margin-bottom: 2px; 
    } 
    
    /* 打字指示器 */ 
    .typing-indicator { 
        margin: 0 8px 8px 8px; 
        padding: 6px 12px; 
        background: rgba(255, 255, 255, 0.08);
    } 
    
    .typing-dots {
        gap: 3px;
    }
    
    .typing-dot {
        width: 6px;
        height: 6px;
    }
    
    /* 设置模态框适配 */ 
    .modal-content { 
        width: 95%; 
        max-width: 400px; 
        margin: 20px; 
        max-height: 80vh; 
        overflow-y: auto; 
    } 
    
    /* 隐藏水印 */ 
    .watermark { 
        display: none; 
    } 
    
    /* 确保手机端聊天记录可选中 */ 
    .chat-messages * { 
        -webkit-user-select: text; 
        -moz-user-select: text; 
        -ms-user-select: text; 
        user-select: text; 
    } 
}

@media (max-width: 900px) and (min-width: 769px) {
    .main-content {
        flex-direction: column;
        height: auto;
    }
    
    .character-section {
        flex: none;
        padding: 20px 0;
    }
    
    .chat-section {
        height: 60vh;
    }
    
    .message {
        max-width: 95%;
    }
    
    .message-avatar {
        width: 35px;
        height: 35px;
    }
}* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', serif;
    line-height: 1.6;
    color: white;
    min-height: 100vh;
    background: url('images/Backdrop Alona2.png') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    transition: background-image 0.5s ease-in-out;
}

/* 启动画面样式 */
.startup-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/Backdrop Alona3.png') no-repeat center center;
    background-size: cover;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 唤醒区域 */
.wake-up-area {
    position: absolute;
    /* 屏幕从中间分两半，左侧取2/3的左半部分再取左3/5：从16.67%到26.67% */
    left: 16.67%;
    width: 10%; /* 原来区域的左3/5部分 (16.67% * 3/5 = 10%) */
    /* 上下分5份，从下往上第3块：从40%到60% */
    top: 40%;
    height: 20%; /* 5份中的1份 */
    cursor: pointer;
    /* 调试用边框，实际使用时可以删除 */
    /* border: 2px solid rgba(255, 255, 255, 0.5); */
}

.wake-up-area:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 主容器初始隐藏 */
.container {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

/* 激活状态 */
body.awakened .startup-screen {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

body.awakened .container {
    opacity: 1;
    visibility: visible;
}

/* 允许聊天消息被选中 */
.chat-messages {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    font-size: 1.8rem;
    background: linear-gradient(to right, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.settings-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(30deg);
}

.main-content {
    display: flex;
    flex: 1;
    gap: 30px;
    height: calc(100vh - 100px);
}

.character-section {
    flex: 0 0 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.character-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.speech-bubble {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 18px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    width: 260px;
    text-align: center;
    font-family: "Noto Serif SC", serif;
    animation: bubblePop 0.3s ease-out;
    display: none;
    color: #2c3e50;
    font-size: 1.05rem;
    z-index: 100;
    pointer-events: none;
}

@keyframes bubblePop {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    100% { opacity: 1; transform: translate(-50%, 0); }
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: white transparent transparent;
}

.character-image {
    width: 100%;
    max-width: 320px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    animation: float 4s ease-in-out infinite;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.chat-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.chat-header {
    padding: 15px 20px;
    background: rgba(0, 100, 200, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.5);
}

.control-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.control-btn i {
    font-size: 0.85rem;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.bot-message {
    align-self: flex-start;
    flex-direction: row;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.message-content {
    display: flex;
    flex-direction: column;
    max-width: calc(100% - 52px);
}

.message-sender {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #4facfe;
}

.user-message .message-sender {
    text-align: right;
}

.message-text {
    padding: 15px;
    border-radius: 18px;
    word-wrap: break-word;
}

.user-message .message-text {
    background: rgba(0, 161, 231, 0.7);
    color: white;
    border-bottom-right-radius: 5px;
}

.bot-message .message-text {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-bottom-left-radius: 5px;
}

.typing-indicator {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 18px;
    align-self: flex-start;
    margin: 0 20px 15px 20px;
    width: fit-content;
}

.typing-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #a0d2ff;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

.input-container {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status {
    text-align: center;
    color: #a0d2ff;
    font-size: 0.85rem;
}

.chat-input-container {
    width: 100%;
    display: flex;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.chat-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 50px;
    font-family: 'Noto Serif SC', serif;
    font-size: 1rem;
    outline: none;
    color: white;
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.send-btn, .stop-btn {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 100, 255, 0.3);
}

.stop-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.send-btn:hover, .stop-btn:hover {
    transform: scale(1.05);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.watermark {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

.api-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(0, 30, 60, 0.5);
    border-radius: 50px;
    font-size: 0.85rem;
    margin-top: 20px;
}

.connected {
    color: #2ecc71;
}

.disconnected {
    color: #e74c3c;
}

/* 设置模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #2c3e50, #1a2a6c);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: #4facfe;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.settings-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    gap: 10px;
}

.tab-btn {
    flex: 1;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-family: 'Noto Serif SC', serif;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    border-color: transparent;
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.2);
}

.settings-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #a0d2ff;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-family: 'Noto Serif SC', serif;
    font-size: 1rem;
}

.form-group input[type="range"] {
    width: 100%;
    margin-top: 10px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.param-value {
    float: right;
    color: #4facfe;
    font-weight: 600;
}

.form-group input:focus {
    outline: none;
    border-color: #4facfe;
}

.save-btn {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-family: 'Noto Serif SC', serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin: 20px 25px;
}

.save-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 100, 255, 0.4);
}

.about-content {
    color: rgba(255, 255, 255, 0.9);
}

.about-content h3 {
    color: #4facfe;
    margin-bottom: 15px;
}

.about-content h4 {
    color: #a0d2ff;
    margin-top: 20px;
    margin-bottom: 10px;
}

.about-content ul {
    list-style: none;
    padding-left: 20px;
}

.about-content ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
}

.about-content ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #4facfe;
}

.about-content .copyright {
    text-align: center;
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.5);
}

/* 确认对话框 */
.confirm-dialog {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #2c3e50, #1a2a6c);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1001;
    min-width: 300px;
    text-align: center;
}

.confirm-dialog h3 {
    color: #4facfe;
    margin-bottom: 15px;
}

.confirm-dialog p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.confirm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.confirm-btn, .cancel-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    font-family: 'Noto Serif SC', serif;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 80px;
}

.confirm-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.5);
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.confirm-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* 自定义滚动条 */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}