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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    color: #4a5568;
    font-size: 1.8rem;
    font-weight: 600;
}

.header h1 i {
    color: #667eea;
    margin-right: 10px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.layout-controls {
    display: flex;
    gap: 8px;
}

.layout-btn {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.layout-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.layout-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.clear-all-btn {
    padding: 8px 16px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.clear-all-btn:hover {
    background: #c53030;
}

.comparison-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.comparison-btn:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.manage-prompts-btn {
    padding: 8px 16px;
    background: #38a169;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.manage-prompts-btn:hover {
    background: #2f855a;
}

/* 新增按钮样式 */
.api-manager-btn {
    padding: 8px 16px;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.api-manager-btn:hover {
    background: #3182ce;
}

.settings-btn {
    padding: 8px 16px;
    background: #805ad5;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.settings-btn:hover {
    background: #6b46c1;
}

.comparison-btn {
    padding: 8px 16px;
    background: #ed8936;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.comparison-btn:hover {
    background: #dd6b20;
}

.history-manager-btn {
    padding: 8px 16px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.history-manager-btn:hover {
    background: #38a169;
}

/* 输入区域样式 */
.input-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#questionInput {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

#questionInput:focus {
    outline: none;
    border-color: #667eea;
}

.input-controls {
    display: flex;
    justify-content: flex-end;
}

.send-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 聊天网格样式 */
.chat-grid {
    display: grid;
    gap: 20px;
    flex: 1;
}

.chat-grid.layout-2 {
    grid-template-columns: repeat(2, 1fr);
}

.chat-grid.layout-4 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.chat-grid.layout-6 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.chat-grid.layout-8 {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

/* 聊天窗口样式 */
.chat-window {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    min-height: 500px;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px 15px 0 0;
}

.model-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.model-selector select {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

.prompt-selector select {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    max-width: 150px;
}

/* 拖拽调整宽度手柄 */
.resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background: rgba(102, 126, 234, 0.1);
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 0 15px 0 0;
}

.resize-handle:hover {
    background: rgba(102, 126, 234, 0.2);
    width: 12px;
}

.resize-handle i {
    color: rgba(102, 126, 234, 0.6);
    font-size: 0.8rem;
    transform: rotate(0deg);
    transition: all 0.2s ease;
}

.resize-handle:hover i {
    color: rgba(102, 126, 234, 0.8);
    transform: scale(1.1);
}

/* 确保聊天头部支持相对定位 */
.chat-header {
    position: relative;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 0;
}

.message {
    max-width: 100%;
    word-wrap: break-word;
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 16px;
    border-radius: 18px 18px 4px 18px;
    max-width: 80%;
}

.message.ai {
    align-self: flex-start;
    background: #f7fafc;
    color: #2d3748;
    padding: 12px 16px;
    border-radius: 18px 18px 18px 4px;
    border-left: 4px solid #667eea;
    max-width: 90%;
    line-height: 1.6;
    position: relative;
}

.message.loading {
    align-self: flex-start;
    background: #f7fafc;
    color: #718096;
    padding: 12px 16px;
    border-radius: 18px 18px 18px 4px;
    border-left: 4px solid #cbd5e0;
    max-width: 90%;
    font-style: italic;
}

.message.error {
    background: #fed7d7;
    color: #c53030;
    border-left-color: #e53e3e;
}

/* 单独聊天输入区域 */
.chat-input-section {
    border-top: 1px solid #e2e8f0;
    padding: 15px;
    background: #f8fafc;
    border-radius: 0 0 15px 15px;
}

.single-chat-input {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.single-question-input {
    flex: 1;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    min-height: 44px;
    max-height: 100px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.single-question-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.single-question-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.single-send-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.single-send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.single-send-btn:active {
    transform: translateY(0);
}

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

.single-send-btn i {
    font-size: 16px;
}

/* 复制按钮样式 */
.copy-message-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

.message.ai:hover .copy-message-btn {
    opacity: 1;
}

.copy-message-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.1);
}

.copy-message-btn:active {
    transform: scale(0.95);
}

.copy-message-btn.copied {
    background: #4ade80;
    color: white;
}

/* AI消息中的Markdown样式 */
.message.ai h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    margin: 12px 0 8px 0;
    border-bottom: 2px solid #667eea;
    padding-bottom: 4px;
}

.message.ai h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4a5568;
    margin: 10px 0 6px 0;
    display: flex;
    align-items: center;
}

.message.ai h2::before {
    content: '▶';
    color: #667eea;
    margin-right: 6px;
    font-size: 0.8rem;
}

.message.ai h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
    margin: 8px 0 4px 0;
}

.message.ai p {
    margin: 8px 0;
    line-height: 1.6;
}

.message.ai strong {
    font-weight: 600;
    color: #2d3748;
    background: rgba(102, 126, 234, 0.1);
    padding: 1px 3px;
    border-radius: 3px;
}

.message.ai em {
    font-style: italic;
    color: #4a5568;
}

.message.ai code {
    background: #e2e8f0;
    color: #e53e3e;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.message.ai pre {
    background: #128a92;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
    border-left: 4px solid #667eea;
}

.message.ai pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.ai ul {
    margin: 8px 0;
    padding-left: 0;
    list-style: none;
}

.message.ai li {
    margin: 4px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.message.ai li::before {
    content: '•';
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 6px;
}

.message.ai a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid rgba(102, 126, 234, 0.3);
    transition: all 0.2s ease;
}

.message.ai a:hover {
    color: #4c51bf;
    border-bottom-color: #4c51bf;
}

/* 流式响应样式 */
.message.streaming {
    position: relative;
}

.streaming-cursor {
    animation: blink 1s infinite;
    color: #667eea;
    font-weight: bold;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #718096;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* 模态框样式 */
.prompt-modal, .api-modal, .history-modal, .settings-modal, .comparison-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.prompt-modal-content, .api-modal-content, .settings-modal-content, .comparison-modal-content, .history-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.prompt-modal-header, .api-modal-header, .settings-modal-header, .comparison-modal-header, .history-modal-header {
    padding: 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.prompt-modal-header h3, .api-modal-header h3, .settings-modal-header h3, .comparison-modal-header h3, .history-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt-modal-header h3 i, .api-modal-header h3 i, .settings-modal-header h3 i, .comparison-modal-header h3 i, .history-modal-header h3 i {
    color: #ffd700;
}

.close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.prompt-modal-body, .api-modal-body, .settings-modal-body, .comparison-modal-body, .history-modal-body {
    padding: 25px;
    max-height: calc(85vh - 200px);
    overflow-y: auto;
    background: #f8fafc;
    flex: 1;
}

/* 提示词管理专用样式 */
.add-prompt-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.add-prompt-section h4 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-prompt-section h4::before {
    content: '✨';
    font-size: 1rem;
}

.add-prompt-section input, .add-prompt-section textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.add-prompt-section input:focus, .add-prompt-section textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.add-prompt-section textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.add-prompt-btn {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.add-prompt-btn:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.prompts-list-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.prompts-list-section h4 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prompts-list-section h4::before {
    content: '📝';
    font-size: 1rem;
}

.prompts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prompt-item {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.prompt-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.prompt-item:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.prompt-item:hover::before {
    width: 6px;
}

.prompt-info {
    flex: 1;
    margin-right: 15px;
}

.prompt-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
    font-size: 1rem;
}

.prompt-content {
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 60px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prompt-content:hover {
    background: rgba(255, 255, 255, 0.9);
    max-height: 120px;
}

/* 自定义滚动条样式 */
.prompt-content::-webkit-scrollbar {
    width: 4px;
}

.prompt-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

.prompt-content::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 2px;
}

.prompt-content::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}

.prompt-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.edit-prompt-btn, .delete-prompt-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.edit-prompt-btn {
    color: #4299e1;
}

.edit-prompt-btn:hover {
    background: #4299e1;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.delete-prompt-btn {
    color: #e53e3e;
}

.delete-prompt-btn:hover {
    background: #e53e3e;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.built-in-label {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 编辑提示词模态框样式 */
.edit-prompt-form {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #2d3748;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    min-height: 120px;
    line-height: 1.5;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
}

.cancel-btn {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cancel-btn:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

.save-btn {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.save-btn:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

/* API管理简化样式 */
.api-form {
    padding: 20px;
}

.api-field {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.api-field label {
    min-width: 80px;
    font-weight: 500;
    color: #333;
    text-align: right;
}

.api-field input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.api-field input:focus {
    outline: none;
    border-color: #667eea;
}

.api-buttons {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.save-btn, .test-btn {
    padding: 8px 20px;
    margin: 0 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.save-btn {
    background: #28a745;
    color: white;
}

.save-btn:hover {
    background: #218838;
}

.test-btn {
    background: #007bff;
    color: white;
}

.test-btn:hover {
    background: #0056b3;
}











/* 设置模态框专用样式 */
.settings-modal-footer {
    padding: 20px 25px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

.save-settings-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.save-settings-btn:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.setting-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.setting-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    color: #2d3748;
    cursor: pointer;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
}

.setting-description {
    margin-top: 8px;
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-left: 32px;
}

/* 对比分析模态框样式 */
.comparison-modal-content {
    max-width: 1000px !important;
    max-height: 90vh !important;
}

.comparison-modal-body {
    padding: 20px !important;
    max-height: calc(90vh - 120px) !important;
}

/* 统计摘要 */
.comparison-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    color: white;
}

.summary-stats {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

/* 对比表格 */
.comparison-table-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.comparison-table-container h4 {
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.comparison-table th {
    background: #f8fafc;
    color: #4a5568;
    font-weight: 600;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.comparison-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.response-row:hover {
    background: #f8fafc;
}

.model-name {
    font-weight: 600;
    color: #2d3748;
}

.word-count {
    text-align: center;
    font-family: monospace;
}

/* 质量评分条 */
.score-bar {
    position: relative;
    background: #e2e8f0;
    border-radius: 10px;
    height: 20px;
    width: 100px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #f56565 0%, #ed8936 50%, #48bb78 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.readability {
    text-align: center;
    font-weight: 600;
}

/* 情感指示器 */
.sentiment-indicator {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.sentiment-indicator.positive {
    background: #c6f6d5;
    color: #22543d;
}

.sentiment-indicator.negative {
    background: #fed7d7;
    color: #742a2a;
}

.sentiment-indicator.neutral {
    background: #e2e8f0;
    color: #4a5568;
}

/* 关键词分析 */
.keyword-analysis {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.keyword-analysis h4 {
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.keyword-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.keyword-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    transition: transform 0.2s ease;
}

.keyword-tag:hover {
    transform: scale(1.05);
}

/* 洞察分析 */
.insights-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.insights-section h4 {
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.insight-item {
    background: #f8fafc;
    border-left: 4px solid #667eea;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.insight-item i {
    color: #667eea;
    font-size: 1.1rem;
}

/* 推荐回答 */
.best-response {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.best-response h4 {
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.best-response h4 i {
    color: #f6ad55;
}

.best-response-card {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px solid #48bb78;
    border-radius: 12px;
    padding: 16px;
    margin-top: 10px;
}

.best-response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.best-model {
    font-weight: 700;
    color: #2d3748;
    font-size: 1.1rem;
}

.best-score {
    background: #48bb78;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.best-response-preview {
    color: #4a5568;
    line-height: 1.6;
    font-size: 0.95rem;
    background: white;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #48bb78;
}

/* 错误状态 */
.comparison-error {
    text-align: center;
    padding: 40px 20px;
    color: #e53e3e;
}

.comparison-error p {
    font-size: 1.1rem;
    margin: 0;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .comparison-modal-content {
        max-width: 95% !important;
        margin: 10px;
    }
    
    .summary-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-item {
        padding: 10px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }
    
    .comparison-table {
        font-size: 0.9rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 8px 6px;
    }
    
    .score-bar {
        width: 80px;
    }
    
    .keyword-cloud {
        justify-content: center;
    }
    
    .keyword-tag {
        font-size: 0.8rem !important;
        padding: 4px 8px;
    }
    
    .best-response-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* 移动端模态框优化 */
@media (max-width: 768px) {
    .prompt-modal-content,
    .api-modal-content,
    .settings-modal-content,
    .comparison-modal-content,
    .history-modal-content {
        width: 95% !important;
        max-height: 90vh !important;
        margin: 20px;
        border-radius: 15px;
    }
    
    .prompt-modal-header,
    .api-modal-header,
    .settings-modal-header,
    .comparison-modal-header,
    .history-modal-header {
        padding: 20px !important;
    }
    
    .prompt-modal-body,
    .api-modal-body,
    .settings-modal-body,
    .comparison-modal-body,
    .history-modal-body {
        padding: 20px !important;
    }
    
    .add-prompt-section,
    .prompts-list-section,
    .api-key-section {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 14px;
    }
    
    .api-warning {
        padding: 14px;
        margin-bottom: 16px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .api-warning i {
        font-size: 1.6rem;
    }
    
    .warning-content h4 {
        font-size: 0.95rem;
        justify-content: center;
    }
    
    .warning-content p {
        font-size: 0.85rem;
    }
    
    .api-keys-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
        margin-top: 12px;
    }
    
    .prompt-item {
        padding: 16px !important;
        margin-bottom: 12px;
        border-radius: 12px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .prompt-info {
        margin-right: 0;
        margin-bottom: 12px;
    }
    
    .prompt-name {
        font-size: 1.05rem;
        margin-bottom: 8px;
    }
    
    .prompt-content {
        font-size: 0.95rem;
        -webkit-line-clamp: 3;
        padding: 10px 14px;
    }
    
    .api-key-item {
        padding: 14px !important;
        margin-bottom: 12px;
        border-radius: 12px;
    }
    
    .api-key-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .api-provider {
        font-size: 1rem;
    }
    
    .api-provider::before {
        font-size: 1rem;
    }
    
    .api-status {
        align-self: flex-end;
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    
    .prompt-actions {
        width: 100%;
        justify-content: center;
        gap: 12px;
    }
    
    .edit-prompt-btn, .delete-prompt-btn {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    
    .add-prompt-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 1.05rem;
        min-height: 48px;
    }
    
    .add-prompt-section input, .add-prompt-section textarea {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    .add-prompt-section textarea {
        min-height: 120px;
    }
    
    /* 编辑模态框移动端样式 */
    .edit-prompt-form {
        padding: 20px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    .form-group textarea {
        min-height: 100px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }
    
    .cancel-btn,
    .save-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 1rem;
        min-height: 48px;
    }
    
    .api-key-input {
        width: 100%;
        justify-content: center;
    }
    
    .api-key-input {
        flex-direction: column;
        gap: 10px;
        margin-top: 12px;
    }
    
    .api-key-input input {
        padding: 12px 16px;
        font-size: 16px;
        border-radius: 12px;
    }
    
    .api-key-input button {
        width: 100%;
        height: 44px;
        border-radius: 10px;
        font-size: 1rem;
    }
    
    .api-modal-footer {
        flex-direction: column;
        gap: 14px;
        padding: 20px;
    }
    
    .save-keys-btn,
    .test-keys-btn {
        width: 100%;
        justify-content: center;
        min-width: auto;
        padding: 16px 20px;
        font-size: 1.05rem;
        min-height: 50px;
        border-radius: 14px;
        letter-spacing: 0.8px;
    }
    
    .save-keys-btn:hover,
    .test-keys-btn:hover {
        transform: translateY(-1px) scale(1.005);
    }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .container {
        padding: 8px;
    }
    
    .header {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .header h1 {
        font-size: 1.3rem;
        text-align: center;
    }
    
    .header-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .header-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .layout-controls {
        justify-content: center;
        gap: 6px;
    }
    
    .layout-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: 60px;
    }
    
    .input-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    #questionInput {
        min-height: 100px;
        font-size: 16px;
    }
    
    .send-btn {
        width: 100%;
        padding: 15px;
        font-size: 1.1rem;
        border-radius: 12px;
    }
    
    .chat-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .chat-window {
        min-height: 450px;
    }
    
    .chat-header {
        padding: 12px 15px;
        flex-direction: column;
        gap: 12px;
    }
    
    .model-selector,
    .prompt-selector {
        width: 100%;
        justify-content: space-between;
    }
    
    .model-selector select,
    .prompt-selector select {
        flex: 1;
        margin-left: 10px;
        padding: 8px 12px;
        font-size: 0.9rem;
        max-width: none;
    }
    
    .chat-messages {
        padding: 15px;
    }
    
    .message.user,
    .message.ai {
        max-width: 95%;
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .chat-input-section {
        padding: 10px;
    }
    
    .single-question-input {
        font-size: 16px;
        padding: 10px 12px;
        min-height: 40px;
    }
    
    .single-send-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
    
    .copy-message-btn {
        opacity: 0.7;
        width: 28px;
        height: 28px;
        top: 8px;
        right: 8px;
    }
    
    .message.ai h1 {
        font-size: 1.2rem;
    }
    
    .message.ai h2 {
        font-size: 1.1rem;
    }
    
    .message.ai h3 {
        font-size: 1rem;
    }
    
    .message.ai pre {
        padding: 10px;
        font-size: 0.85rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .message.ai code {
        font-size: 0.85em;
    }
    
    .message.ai li {
        padding-left: 16px;
    }
    
    .prompt-modal-content,
    .api-modal-content,
    .history-modal-content {
        width: 100%;
        margin: 10px;
        max-height: calc(100vh - 20px);
        border-radius: 12px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .single-send-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .layout-btn,
    .send-btn,
    button {
        min-height: 44px;
    }
}

/* 深色模式支持 */
/* 历史记录专用样式优化 */
.history-modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 20px !important;
    width: 95% !important;
    max-width: 1200px !important;
    max-height: 90vh !important;
    animation: slideUp 0.4s ease;
    border: 3px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.history-modal-header {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 25px !important;
}

.history-modal-header h3 {
    color: white !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-modal-header h3 i {
    color: #ffd700;
}

.history-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.export-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 10px 18px !important;
    border-radius: 12px !important;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.export-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.history-modal .close-modal {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: none !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-modal .close-modal:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: rotate(90deg);
}

.history-modal-body {
    background: white !important;
    padding: 25px !important;
    max-height: 75vh !important;
    overflow-y: auto;
}

.history-search {
    position: relative;
    margin-bottom: 25px;
}

.history-search input {
    width: 100%;
    padding: 15px 50px 15px 20px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 15px !important;
    font-size: 1rem !important;
    background: #f8fafc !important;
    transition: all 0.3s ease;
}

.history-search input:focus {
    border-color: #667eea !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.history-search i {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 1.1rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.history-item {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.history-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.history-item:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%) !important;
    border-color: #667eea !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.history-item:hover::before {
    width: 6px;
}

.history-info {
    margin-bottom: 15px;
}

.history-title {
    font-weight: 600 !important;
    color: #2d3748 !important;
    margin-bottom: 6px;
    font-size: 1.1rem !important;
    line-height: 1.3;
}

.history-date {
    color: #718096 !important;
    font-size: 0.85rem !important;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-date::before {
    content: '🕒';
    font-size: 0.8rem;
}

.history-preview {
    color: #4a5568 !important;
    font-size: 0.9rem !important;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.7);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.history-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.load-history-btn, .delete-history-btn {
    padding: 10px 18px !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 0.85rem !important;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.load-history-btn {
    background: linear-gradient(135deg, #48bb78, #38a169) !important;
    color: white !important;
}

.load-history-btn:hover {
    background: linear-gradient(135deg, #38a169, #2f855a) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.delete-history-btn {
    background: linear-gradient(135deg, #f56565, #e53e3e) !important;
    color: white !important;
}

.delete-history-btn:hover {
    background: linear-gradient(135deg, #e53e3e, #c53030) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.4);
}

.no-history {
    text-align: center;
    color: #718096;
    font-style: italic;
    padding: 60px 20px;
    font-size: 1.1rem;
}

.no-history::before {
    content: '📝';
    display: block;
    font-size: 3rem;
    margin-bottom: 15px;
}

@media (prefers-color-scheme: dark) {
    .prompt-modal-content,
    .api-modal-content {
        background: #2d3748;
        color: white;
    }
    
    .prompt-modal-header,
    .api-modal-header {
        border-bottom-color: #4a5568;
    }
    
    .prompt-item,
    .api-key-item {
        background: #4a5568;
        border-color: #718096;
    }
    
    .prompt-item:hover,
    .api-key-item:hover {
        background: #718096;
    }
    
    /* 历史记录在深色模式下保持彩色主题 */
    .history-modal-content {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    }
}

/* 移动端历史记录优化 */
@media (max-width: 768px) {
    .history-modal-content {
        width: 95% !important;
        max-height: 90vh !important;
        margin: 20px;
    }
    
    .history-modal-header {
        padding: 20px !important;
    }
    
    .history-modal-header h3 {
        font-size: 1.1rem !important;
    }
    
    .history-modal-body {
        padding: 20px !important;
    }
    
    .history-item {
        padding: 16px !important;
    }
    
    .history-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .load-history-btn, .delete-history-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 滚动条样式 */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}