﻿:root {
    --dark-bg: #1a1a1a;
    --text-light: #666666;
    --primary-color: #cc0000;
    --primary-dark: #a00000;
    --border-color: #eaeaea;
    --transition: all 0.3s ease;
    --ai-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}


html {
    font-family: Arial, Arial-for-Mobile, "微软雅黑", "STHeiti-Light", " STHeiti-Medium", "Helvetica_0", "PingFangSC-Regular";
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}


.demo-container {
    position: fixed;
    width: 380px;
    max-width: 90vw;
    bottom: 30px;
    right: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    text-align: justify;
    overflow: hidden;
    transition: var(--transition);
    transform: translateY(100px);
    opacity: 0;
    animation: slideUp 0.5s forwards 1s;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


.demo-header {
    background: var(--ai-gradient);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.demo-title {
    display: flex;
    align-items: center;
    font-size: 20px;
    gap: 10px;
}

    .demo-title h4 {
        font-size: 20px;
        color: white;
        margin: 0;
    }

.ai-demo-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

    .ai-demo-toggle:hover {
        transform: rotate(180deg);
    }

.demo-subtitle {
    margin-top: 8px;
    font-size: 1rem;
    opacity: 0.9;
}

.demo-badge {
    position: absolute;
    top: 25px;
    right: 30px;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.demo-body {
    max-height: 520px;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

    .demo-body.collapsed {
        max-height: 0;
    }

.ai-demo-description {
    padding: 20px;
    background-color: #f8f9ff;
}

    .ai-demo-description h4 {
        color: var(--dark-bg);
        margin-bottom: 10px;
        font-size: 18px;
    }

    .ai-demo-description p {
        font-size: 14px;
        margin-bottom: 0;
        line-height: 1.5;
        color: var(--text-light);
    }

.info-panel {
    flex: 0 0 300px;
    background: #f8f9ff;
    padding: 30px;
    border-right: 1px solid #eee;
    overflow-y: auto;
}

    .info-panel h3 {
        color: #333;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #667eea;
    }

    .info-panel ul {
        list-style: none;
    }

    .info-panel li {
        margin-bottom: 15px;
        padding-left: 10px;
        border-left: 3px solid #cc0000;
    }

.tech-tag {
    display: inline-block;
    background: #e9ecef;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin: 5px 5px 5px 0;
}

.chat-panel {
    padding: 20px 20px 0 20px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex-grow: 1;
    height: 250px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.message {
    margin-bottom: 20px;
    max-width: 90%;
}

    .message.user {
        margin-left: auto;
    }

.message-bubble {
    padding: 12px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.user .message-bubble {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 5px;
}

.assistant .message-bubble {
    background-color: #f0f2ff;
    color: var(--text-dark);
    border-bottom-left-radius: 5px;
}

.input-area {
    display: flex;
    gap: 10px;
    height: 46px;
    margin: 20px 0;
}

#userInput {
    flex-grow: 1;
    width: 80%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 24px !important;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

    #userInput:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

#sendButton {
    background: var(--ai-gradient);
    color: white;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    #sendButton:hover {
        transform: scale(1.05);
    }

    #sendButton:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.typing-indicator {
    color: #888;
    font-size: 14px;
    font-style: italic;
    text-align: center;
    padding: 0 10px;
    display: none;
}

/* 改善消息气泡内的文本样式 */
.message-bubble p {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    line-height: 1.5;
}

    .message-bubble p:first-child {
        margin-top: 0;
    }

    .message-bubble p:last-child {
        margin-bottom: 0;
    }

/* 为列表项添加样式 */
.message-bubble .list-item {
    display: block;
    padding-left: 1.2em;
    text-indent: -1.2em;
}

    .message-bubble .list-item:before {
        content: "• ";
        color: #cc0000;
        /* 使用你的主题色 */
        font-weight: bold;
    }
