/* 基础容器和窗口 */
.ltc-chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    box-sizing: border-box;
}

/* 按钮/切换器 */
.ltc-chat-toggle {
    background-color: #64B5F6;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease;
}
.ltc-chat-toggle:hover {
    background-color: #42A5F5;
}

/* 聊天窗口 */
.ltc-chat-window {
    display: none; /* 默认隐藏 */
    flex-direction: column;
    width: 350px;
    height: 500px;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* 深色模式 */
.ltc-chat-container.ltc-dark-mode .ltc-chat-window {
    background-color: #2d2d2d;
    color: #f5f5f5;
}
.ltc-chat-container.ltc-dark-mode .ltc-chat-header {
    background-color: #424242;
    color: #bb86fc;
}
.ltc-chat-container.ltc-dark-mode .ltc-chat-messages {
    background-color: #1e1e1e;
}
.ltc-chat-container.ltc-dark-mode .ltc-chat-input-area input {
    background-color: #424242;
    color: #f5f5f5;
    border: 1px solid #616161;
}
.ltc-chat-container.ltc-dark-mode .ltc-chat-input-area button {
    background-color: #bb86fc;
    color: #121212;
}
.ltc-chat-container.ltc-dark-mode .ltc-chat-input-area button:hover {
    background-color: #9a67ea;
}
.ltc-chat-container.ltc-dark-mode .ltc-message.user {
    background-color: #bb86fc;
    color: #121212;
}
.ltc-chat-container.ltc-dark-mode .ltc-message.bot {
    background-color: #424242;
    color: #f5f5f5;
}
.ltc-chat-container.ltc-dark-mode #ltc-toggle-dark-mode {
    background-color: #424242;
    color: #bb86fc;
    border: 1px solid #616161;
}
.ltc-chat-container.ltc-dark-mode #ltc-toggle-dark-mode:hover {
    background-color: #616161;
}


/* 头部 */
.ltc-chat-header {
    background-color: #E3F2FD;
    color: #1976D2;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    border-bottom: 1px solid #BBDEFB;
}

/* 关闭按钮 */
#ltc-close-chat {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #1976D2;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}
#ltc-close-chat:hover {
    background-color: rgba(25, 118, 210, 0.1);
}

/* 消息区域 */
.ltc-chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #FAFAFA;
    display: flex;
    flex-direction: column;
}

/* 消息项 */
.ltc-message {
    max-width: 80%;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.4;
}
.ltc-message.user {
    align-self: flex-end;
    background-color: #64B5F6;
    color: white;
}
.ltc-message.bot {
    align-self: flex-start;
    background-color: #E0E0E0;
    color: #333;
}

/* 输入区域 */
.ltc-chat-input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid #E0E0E0;
    background-color: #fff;
}
.ltc-chat-input-area input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    margin-right: 10px;
    outline: none;
}
.ltc-chat-input-area button {
    padding: 10px 15px;
    background-color: #64B5F6;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.ltc-chat-input-area button:hover {
    background-color: #42A5F5;
}

/* 主题切换按钮 */
#ltc-theme-toggle {
    padding: 0 10px 10px 10px;
    text-align: center;
}
#ltc-toggle-dark-mode {
    padding: 8px 12px;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}
#ltc-toggle-dark-mode:hover {
    background-color: #e0e0e0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ltc-chat-window {
        width: 90vw;
        height: 70vh;
        right: 5vw;
        bottom: 5vh;
    }
}

@media (max-width: 480px) {
    .ltc-chat-window {
        width: 95vw;
        height: 60vh;
        right: 2.5vw;
        bottom: 2.5vh;
    }
    .ltc-chat-toggle {
        width: 50px;
        height: 50px;
        font-size: 14px;
    }
}



