:root {
            --primary-color: #FF7A00;
            --secondary-color: #FF9E40;
            --tertiary-color: #FFB870;
            --background-color: #FFF9F0;
            --panel-bg: rgba(255, 255, 255, 0.85);
            --text-color: #333333;
            --light-text: #666666;
            --border-color: rgba(255, 122, 0, 0.2);
            --model-msg-bg: rgba(255, 158, 64, 0.15);
            --user-msg-bg: rgba(255, 122, 0, 0.15);
            --shadow: 0 8px 32px rgba(255, 122, 0, 0.15);
            --inner-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
            --transition: all 0.3s ease;
            --radius: 16px;
            --radius-sm: 8px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
            background: linear-gradient(135deg, var(--background-color), #FFF5E6);
            color: var(--text-color);
            min-height: 100vh;
            padding: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            line-height: 1.6;
        }

        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 300px;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            z-index: -1;
            clip-path: polygon(0 0, 100% 0, 100% 70%, 0 100%);
        }

        .app-container {
            display: flex;
            width: 100%;
            max-width: 1400px;
            height: 90vh;
            min-height: 700px;
            background: var(--panel-bg);
            border-radius: var(--radius);
            overflow: hidden;
            box-shadow: var(--shadow);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid var(--border-color);
        }

        .settings-panel {
            width: 320px;
            padding: 25px;
            background: var(--panel-bg);
            border-right: 1px solid var(--border-color);
            overflow-y: auto;
            flex-shrink: 0;
            transition: var(--transition);
            z-index: 10;
        }

        .settings-header {
            display: flex;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--border-color);
        }

        .settings-header h2 {
            color: var(--primary-color);
            font-weight: 700;
            font-size: 1.5rem;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .settings-header i {
            font-size: 1.4rem;
        }

        .input-group {
            margin-bottom: 22px;
            position: relative;
        }

        .input-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            font-size: 0.9rem;
            color: var(--text-color);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .input-group i {
            color: var(--primary-color);
            width: 20px;
            text-align: center;
        }

        .input-group input, .input-group select {
            width: 100%;
            padding: 14px 15px;
            border-radius: var(--radius-sm);
            border: 1px solid var(--border-color);
            background: rgba(255, 255, 255, 0.7);
            color: var(--text-color);
            font-size: 0.95rem;
            transition: var(--transition);
            box-shadow: var(--inner-shadow);
        }

        .input-group input:focus, .input-group select:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.2);
        }

        .input-group input[type="range"] {
            padding: 0;
            height: 30px;
        }

        .input-group input[type="password"] {
            letter-spacing: 2px;
            font-weight: 500;
        }

        .temp-slider-container {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .temp-value {
            min-width: 40px;
            font-weight: 700;
            color: var(--primary-color);
            font-size: 1.1rem;
        }

        .chat-container {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            position: relative;
            background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ff7a00' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
        }

        .chat-header {
            padding: 20px 25px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: var(--panel-bg);
            z-index: 2;
        }

        .chat-title {
            font-size: 1.4rem;
            font-weight: 700;
            color: var(--primary-color);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .model-indicator {
            background: rgba(255, 122, 0, 0.1);
            border-radius: 50px;
            padding: 5px 12px;
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--primary-color);
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .chat-box {
            flex-grow: 1;
            overflow-y: auto;
            padding: 25px;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .message {
            max-width: 85%;
            padding: 18px 20px;
            border-radius: var(--radius);
            line-height: 1.7;
            word-wrap: break-word;
            position: relative;
            animation: fadeIn 0.4s ease-out;
            box-shadow: 0 4px 12px rgba(0,0,0,0.03);
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .message p {
            margin: 0;
        }

        .message.model {
            background: var(--model-msg-bg);
            align-self: flex-start;
            border-bottom-left-radius: 5px;
        }

        .message.user {
            background: var(--user-msg-bg);
            align-self: flex-end;
            margin-left: auto;
            border-bottom-right-radius: 5px;
        }

        .message::before {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            bottom: -10px;
            background: inherit;
            clip-path: polygon(0 0, 100% 0, 100% 100%);
        }

        .message.model::before {
            left: 0;
            transform: rotate(270deg);
        }

        .message.user::before {
            right: 0;
        }

        pre, code {
            background: rgba(255, 255, 255, 0.7);
            padding: 10px;
            border-radius: var(--radius-sm);
            overflow-x: auto;
            white-space: pre-wrap;
            font-family: 'Fira Code', 'Courier New', monospace;
            font-size: 0.9rem;
            border: 1px solid var(--border-color);
            box-shadow: var(--inner-shadow);
        }

        code {
            padding: 2px 8px;
            margin: 0 2px;
        }

        pre {
            padding: 15px;
            margin: 10px 0;
        }

        strong {
            color: var(--primary-color);
        }

        .input-area {
            display: flex;
            align-items: flex-end;
            padding: 20px;
            border-top: 1px solid var(--border-color);
            background: var(--panel-bg);
            position: relative;
        }

        .input-container {
            flex-grow: 1;
            position: relative;
        }

        #user-input {
            width: 100%;
            border-radius: var(--radius);
            border: 1px solid var(--border-color);
            background: rgba(255, 255, 255, 0.7);
            color: var(--text-color);
            padding: 16px 50px 16px 20px;
            font-size: 1rem;
            resize: none;
            max-height: 200px;
            overflow-y: auto;
            transition: var(--transition);
            box-shadow: var(--inner-shadow);
        }

        #user-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.2);
        }

        .input-hint {
            position: absolute;
            right: 20px;
            bottom: 20px;
            color: var(--light-text);
            font-size: 0.8rem;
            background: rgba(255, 255, 255, 0.7);
            padding: 2px 8px;
            border-radius: 50px;
        }

        .action-buttons {
            display: flex;
            gap: 12px;
            margin-left: 15px;
        }

        .action-btn {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 1.2rem;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: var(--transition);
            background: rgba(255, 255, 255, 0.7);
            border: 1px solid var(--border-color);
            color: var(--text-color);
            box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        }

        .action-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(0,0,0,0.1);
        }

        #send-btn {
            background: var(--primary-color);
            color: white;
            border: none;
        }

        #send-btn:hover {
            background: var(--secondary-color);
        }

        #send-btn:disabled {
            background: #ccc;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        #clear-btn {
            color: var(--primary-color);
        }

        #clear-btn:hover {
            background: rgba(255, 122, 0, 0.1);
        }

        .loading-indicator {
            position: absolute;
            top: 15px;
            left: 50%;
            transform: translateX(-50%);
            width: 30px;
            height: 30px;
            border: 3px solid rgba(255, 154, 64, 0.3);
            border-top-color: var(--primary-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            z-index: 10;
        }

        .hidden {
            display: none;
        }

        @keyframes spin {
            to { transform: translateX(-50%) rotate(360deg); }
        }

        .welcome-message {
            text-align: center;
            max-width: 600px;
            margin: 40px auto 0;
            padding: 30px;
            background: rgba(255, 255, 255, 0.7);
            border-radius: var(--radius);
            box-shadow: 0 8px 20px rgba(0,0,0,0.05);
        }

        .welcome-message h2 {
            color: var(--primary-color);
            margin-bottom: 15px;
            font-size: 1.8rem;
        }

        .welcome-message p {
            color: var(--light-text);
            margin-bottom: 10px;
        }

        .feature-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-top: 25px;
        }

        .feature {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            background: rgba(255, 255, 255, 0.5);
            padding: 12px;
            border-radius: var(--radius-sm);
            font-size: 0.9rem;
        }

        .feature i {
            color: var(--primary-color);
            font-size: 1.1rem;
            margin-top: 3px;
        }

        @media (max-width: 900px) {
            .app-container {
                flex-direction: column;
                height: auto;
                min-height: 100vh;
            }
            
            .settings-panel {
                width: 100%;
                border-right: none;
                border-bottom: 1px solid var(--border-color);
                max-height: 350px;
            }
            
            .chat-container {
                min-height: 70vh;
            }
            
            .feature-grid {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 600px) {
            body {
                padding: 10px;
            }
            
            .app-container {
                height: 95vh;
            }
            
            .message {
                max-width: 95%;
            }
            
            .action-buttons {
                margin-left: 8px;
            }
            
            .action-btn {
                width: 44px;
                height: 44px;
            }
        }

/* 基础样式 */
#temperature {
    -webkit-appearance: none; /* 移除默认样式 */
    width: 100%;              /* 宽度自适应 */
    height: 12px;             /* 轨道高度 */
    border-radius: 6px;       /* 圆角轨道 */
    background: linear-gradient(to right, #FFA500, #FF8C00); /* 橙色渐变 */
    outline: none;            /* 移除焦点边框 */
}

/* WebKit 浏览器（Chrome/Safari）滑块手柄 */
#temperature::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;              /* 手柄宽度 */
    height: 24px;             /* 手柄高度 */
    border-radius: 50%;       /* 圆形手柄 */
    background: #FFD700;      /* 亮橙色填充 */
    border: 3px solid #FF8C00; /* 深橙色边框 */
    box-shadow: 0 2px 6px rgba(255, 165, 0, 0.4); /* 橙色阴影 */
    cursor: pointer;          /* 鼠标指针样式 */
    z-index: 2;               /* 确保手柄在轨道上层 */
}

/* WebKit 浏览器轨道高亮部分（拖动后） */
#temperature::-webkit-slider-runnable-track {
    width: 100%;
    height: 12px;
    background: linear-gradient(to right, #FFA500, #FF8C00);
    border-radius: 6px;
}

/* Firefox 浏览器滑块手柄 */
#temperature::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #FFD700;
    border: 3px solid #FF8C00;
    box-shadow: 0 2px 6px rgba(255, 165, 0, 0.4);
    cursor: pointer;
}

/* Firefox 浏览器轨道 */
#temperature::-moz-range-track {
    width: 100%;
    height: 12px;
    background: linear-gradient(to right, #FFA500, #FF8C00);
    border-radius: 6px;
}

/* 交互效果 */
#temperature:hover::-webkit-slider-thumb {
    background: #FFD700;
    box-shadow: 0 4px 8px rgba(255, 165, 0, 0.6);
}

#temperature:active::-webkit-slider-thumb {
    transform: scale(1.1);    /* 点击时放大 */
    box-shadow: 0 6px 12px rgba(255, 165, 0, 0.8);
}

/* 基础样式 */
#user-input {
    font-family: 'Microsoft YaHei', sans-serif; /* 主体文本字体 */
    font-size: 14px; /* 字体大小（可选） */
    color: #000; /* 输入文字颜色（可选） */
}

/* 通用 placeholder 样式 */
#user-input::placeholder {
    font-family: 'Microsoft YaHei', sans-serif; /* 提示语字体 */
    color: #999; /* 提示语颜色（可选） */
    opacity: 1; /* 部分浏览器默认透明度为0.5，需重置 */
}