:root { /* Light theme colors */ --primary-color: #2196F3; --primary-dark: #1976D2; --secondary-color: #4CAF50; --secondary-dark: #45a049; --background: #f8f9fa; --surface: #ffffff; --text-primary: #212121; --text-secondary: #666666; --border-color: #e0e0e0; --shadow-color: rgba(0, 0, 0, 0.1); --error-color: #e53935; --success-color: #4CAF50; --primary: #2196f3; --primary-rgb: 33, 150, 243; --primary-light: #bbdefb; --secondary: #ff9800; --success: #4caf50; --danger: #f44336; --warning: #ff9800; --info: #2196f3; --background: #f5f7fb; --surface: #ffffff; --surface-rgb: 255, 255, 255; --surface-alt: #f0f4f8; --surface-alt-rgb: 248, 249, 250; --text: #2c3e50; --text-tertiary: #9e9e9e; --shadow-color: rgba(0, 0, 0, 0.1); --hover-color: #e9ecef; --accent: #4a6cf7; --placeholder: #a0a0a0; --disabled: #e6e6e6; --error-hover-color: #c62828; } [data-theme="dark"] { --primary-color: #64B5F6; --primary-dark: #42A5F5; --secondary-color: #81C784; --secondary-dark: #66BB6A; --background: #121212; --surface: #1E1E1E; --surface-rgb: 30, 30, 30; --text-primary: #FFFFFF; --text-secondary: #B0B0B0; --text-tertiary: #909090; --border-color: #333333; --shadow-color: rgba(0, 0, 0, 0.3); --primary: #64b5f6; --primary-rgb: 100, 181, 246; --primary-light: #bbdefb; --secondary: #ff9800; --danger: #f44336; --success: #4caf50; --background: #1a1a2e; --surface: #272741; --surface-alt: #202035; --surface-alt-rgb: 37, 37, 37; --text: #f0f0f0; --text-secondary: #a0a0a0; --shadow-color: rgba(0, 0, 0, 0.4); --border-color: #353545; --hover-color: #32324b; --accent: #4a6cf7; --placeholder: #515151; --disabled: #3a3a3a; } /* Base Styles */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; background-color: var(--background); color: var(--text-primary); line-height: 1.6; transition: background-color 0.3s, color 0.3s; touch-action: manipulation; -webkit-tap-highlight-color: transparent; } .app-container { display: flex; flex-direction: column; min-height: 100vh; background-color: var(--background); position: relative; } /* Header Styles */ .app-header { background-color: var(--surface); padding: 0.75rem 1rem; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); z-index: 100; position: sticky; top: 0; border-bottom: 1px solid var(--border-color); } .header-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; max-width: 1200px; margin: 0 auto; width: 100%; } .app-header h1 { font-size: 1.3rem; color: var(--primary); margin: 0; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); letter-spacing: -0.5px; white-space: nowrap; } #connectionStatus { font-size: 0.8rem; padding: 0.2rem 0.5rem; border-radius: 1rem; margin: 0 0.5rem; white-space: nowrap; font-weight: 600; display: inline-flex; align-items: center; gap: 0.3rem; transition: all 0.3s ease; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } #connectionStatus::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; } #connectionStatus.connected { background-color: rgba(76, 175, 80, 0.15); color: var(--success); border: 1px solid rgba(76, 175, 80, 0.3); } #connectionStatus.connected::before { background-color: var(--success); box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3); } #connectionStatus.disconnected { background-color: rgba(244, 67, 54, 0.15); color: var(--danger); border: 1px solid rgba(244, 67, 54, 0.3); } #connectionStatus.disconnected::before { background-color: var(--danger); box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.3); } .header-buttons { display: flex; gap: 0.5rem; } .header-buttons .btn-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background-color: var(--surface-alt); color: var(--text-secondary); transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); } .header-buttons .btn-icon:hover { transform: translateY(-2px); background-color: var(--hover-color); color: var(--primary); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } .header-buttons .btn-icon:active { transform: translateY(0); } /* Main Content */ .app-main { flex: 1; display: flex; padding: 1.5rem; gap: 1.5rem; position: relative; overflow: hidden; background-color: var(--background); } .content-panel { flex: 1; display: flex; flex-direction: column; gap: 1.5rem; max-width: 1200px; margin: 0 auto; width: 100%; } /* Capture Section */ .capture-section { background-color: var(--surface); border-radius: 1rem; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); padding: 1.5rem; transition: all 0.3s ease; border: 1px solid var(--border-color); } .toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding: 0.75rem 1rem; background-color: var(--surface-alt); border-radius: 0.75rem; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03); } .toolbar-buttons { display: flex; justify-content: flex-start; align-items: center; width: 100%; } .button-group { display: flex; gap: 1rem; align-items: center; } .analysis-button { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-top: 1.5rem; padding: 1rem; background-color: var(--surface-alt); border-radius: 0.75rem; transition: all 0.3s ease; } .analysis-button .button-group { display: flex; gap: 0.6rem; width: 100%; max-width: 500px; justify-content: center; } /* 提取的文本框样式 */ .extracted-text-area { width: 100%; min-height: 150px; padding: 1rem; margin-top: 1.5rem; border: 1.5px solid var(--border-color); border-radius: 0.5rem; background-color: var(--background); color: var(--text-primary); font-size: 1rem; resize: vertical; transition: all 0.2s ease; line-height: 1.5; max-width: 900px; margin-left: auto; margin-right: auto; display: block; } .extracted-text-area:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15); } /* 发送文本按钮样式 */ .send-text-btn { margin-top: 1rem; margin-left: auto; margin-right: auto; display: block; min-width: 150px; justify-content: center; padding: 0.6rem 1rem; } @media (min-width: 769px) { .send-text-btn { margin-left: auto; margin-right: 0; max-width: 900px; } .extracted-text-area { margin-bottom: 0; } } @media (max-width: 480px) { .extracted-text-area { min-height: 120px; padding: 0.75rem; font-size: 0.9rem; margin-top: 1rem; } .send-text-btn { width: 100%; padding: 0.6rem 0.8rem; font-size: 0.8rem; } } /* 图片操作按钮新样式 */ .btn-action { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; padding: 0.6rem 1rem; border: none; border-radius: 0.4rem; font-size: 0.85rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); position: relative; overflow: hidden; } .btn-action i { font-size: 1rem; } .btn-action:hover { transform: translateY(-2px); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15); filter: brightness(1.05); } .btn-action:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } .btn-action::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0)); opacity: 0; transition: opacity 0.25s ease; } .btn-action:hover::after { opacity: 1; } .text-editor { width: 100%; display: flex; flex-direction: column; gap: 1rem; background-color: var(--surface); padding: 1rem; border-radius: 0.5rem; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); border: 1px solid var(--border-color); transition: all 0.3s ease; margin-top: 1rem; } .text-editor:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); } .text-editor textarea { width: 100%; min-height: 150px; padding: 1rem; border: 1.5px solid var(--border-color); border-radius: 0.5rem; background-color: var(--background); color: var(--text-primary); font-size: 1rem; resize: vertical; transition: all 0.2s ease; line-height: 1.5; } .text-editor textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15); } /* 发送文本按钮样式 */ #sendExtractedText { width: auto; min-width: 120px; justify-content: center; padding: 0.6rem 1rem; margin-top: 0.5rem; } .image-preview { position: relative; border-radius: 1rem; overflow: hidden; background-color: var(--surface-alt); margin: 0; padding: 1.5rem; text-align: center; transition: all 0.3s ease; border: 1px dashed var(--border-color); } .image-container { display: inline-block; position: relative; margin: 0 auto; border-radius: 0.75rem; overflow: hidden; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); transition: all 0.3s ease; max-width: 90%; } .image-container:hover { transform: scale(1.01); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15); } #screenshotImg { display: block; width: auto; height: auto; max-width: 100%; border-radius: 0.75rem; transition: all 0.3s ease; } @media (max-width: 768px) { .app-header { padding: 0.6rem; } .app-header h1 { font-size: 1.1rem; } #connectionStatus { font-size: 0.7rem; padding: 0.15rem 0.4rem; } .header-buttons .btn-icon { width: 32px; height: 32px; } .toolbar-buttons { flex-direction: row; gap: 0.5rem; } .button-group { flex-wrap: wrap; } .btn-primary, .btn-secondary { padding: 0.5rem 0.7rem; font-size: 0.85rem; } .app-main { padding: 1rem 0.75rem; } .settings-panel { width: 100%; } .claude-panel { border-radius: 0.75rem; min-height: 200px; } .response-content { padding: 1rem; font-size: 0.85rem; } .thinking-content { font-size: 0.85rem; } .thinking-content.expanded { padding: 0.75rem 1rem; } .fab { right: 1rem; bottom: 1rem; } .text-editor { padding: 1.25rem; margin-top: 1.25rem; } .text-editor textarea { min-height: 120px; font-size: 0.95rem; } #sendExtractedText { padding: 0.75rem; } } @media (max-width: 480px) { .app-header h1 { font-size: 1rem; } #connectionStatus { max-width: 70px; text-overflow: ellipsis; overflow: hidden; } .header-buttons .btn-icon { width: 28px; height: 28px; font-size: 0.85rem; } .toolbar-buttons { justify-content: center; } .toast-container { top: 3.5rem; right: 0.5rem; } .empty-state i { font-size: 3rem; } .empty-state h3 { font-size: 1.2rem; } .empty-state p { font-size: 0.9rem; } .text-editor { padding: 0.8rem; border-radius: 0.5rem; margin-top: 1rem; gap: 0.8rem; } .text-editor textarea { min-height: 100px; padding: 0.75rem; font-size: 0.9rem; } .confidence-indicator { padding: 0.375rem 0.625rem; font-size: 0.8rem; } #sendExtractedText { padding: 0.6rem 0.8rem; font-size: 0.8rem; width: 100%; align-self: stretch; } .btn-action { padding: 0.5rem 0.8rem; font-size: 0.75rem; } .btn-action i { font-size: 0.9rem; } .analysis-button { padding: 0.8rem; } .analysis-button .button-group { gap: 0.5rem; } .response-content { padding: 0.9rem; font-size: 0.82rem; } } /* Claude Panel */ .claude-panel { background-color: var(--surface); border-radius: 0.75rem; box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05); display: flex; flex-direction: column; height: auto; min-height: 300px; border: 1px solid var(--border-color); transition: all 0.3s ease; overflow: visible; width: 100%; } .claude-panel:not(.hidden) { animation: panel-slide-in 0.3s cubic-bezier(0.19, 1, 0.22, 1) forwards; } @keyframes panel-slide-in { 0% { opacity: 0; transform: translateY(15px); } 100% { opacity: 1; transform: translateY(0); } } .panel-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-color); background-color: var(--surface); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); } .header-title { display: flex; align-items: center; gap: 8px; } .header-title h2 { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); margin: 0; display: flex; align-items: center; gap: 0.5rem; } .header-title h2 i { color: var(--primary); font-size: 1rem; } /* 新的状态指示器 */ .analysis-indicator { display: flex; align-items: center; gap: 0.75rem; font-size: 0.75rem; color: var(--text-secondary); } .progress-line { height: 2px; width: 60px; background-color: var(--border-color); border-radius: 1px; overflow: hidden; position: relative; } .progress-line::before { content: ''; position: absolute; top: 0; left: 0; height: 100%; width: 0%; background-color: var(--primary); border-radius: 1px; transition: width 0.3s ease; } .progress-line.processing::before { animation: progress-animation 2s ease-in-out infinite; } .progress-line.completed::before { width: 100%; background-color: var(--success); } .progress-line.error::before { width: 100%; background-color: var(--danger); } @keyframes progress-animation { 0% { width: 0%; left: 0; } 50% { width: 50%; left: 25%; } 100% { width: 0%; left: 100%; } } .status-text { font-weight: 500; white-space: nowrap; transition: color 0.3s ease; } .analysis-indicator.processing .status-text { color: var(--primary); } .analysis-indicator.completed .status-text { color: var(--success); } .analysis-indicator.error .status-text { color: var(--danger); } /* Thinking Section */ .thinking-section { margin: 0.25rem 0 0.1rem 0; border-top: none; border-bottom: none; } .thinking-header { padding: 0.5rem 1rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: all 0.2s ease; background-color: rgba(var(--primary-rgb), 0.04); border: none; border-radius: 0.35rem; margin: 0.25rem 1rem 0.15rem 1rem; opacity: 0.9; } .thinking-header:hover { background-color: rgba(var(--primary-rgb), 0.08); opacity: 1; } .thinking-title { display: flex; align-items: center; gap: 0.5rem; } .thinking-title i { color: var(--text-secondary); font-size: 0.9rem; opacity: 0.85; } .thinking-title h3 { margin: 0; font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); } .toggle-btn { background: none; border: none; cursor: pointer; color: var(--text-secondary); padding: 0.2rem; width: 24px; height: 24px; border-radius: 3px; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; opacity: 0.8; } .toggle-btn:hover { background-color: rgba(var(--primary-rgb), 0.1); color: var(--primary); opacity: 1; } .toggle-btn i { font-size: 0.8rem; } .thinking-content { padding: 0; background-color: rgba(var(--primary-rgb), 0.02); border-left: 1px solid rgba(var(--primary-rgb), 0.1); margin: 0 1.5rem 0.3rem 1.75rem; overflow: hidden; transition: all 0.3s ease; font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace; font-size: 0.85rem; line-height: 1.5; } /* 思考进行中的动态省略号 */ @keyframes thinking-dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } 100% { content: ''; } } .thinking-title .dots-animation { display: inline-block; min-width: 24px; margin-left: 4px; height: 1em; position: relative; } .thinking-title .dots-animation::after { content: ''; animation: thinking-dots 1.5s infinite; position: absolute; left: 0; color: var(--primary); font-weight: bold; } .response-content { padding: 1rem 1.5rem; background-color: transparent; border-radius: 0; box-shadow: none; line-height: 1.5; white-space: normal; overflow-wrap: break-word; margin-top: 0.1rem; font-size: 0.9rem; height: auto; width: 100%; } [data-theme="dark"] .response-content { background-color: transparent; box-shadow: none; } /* 添加Markdown样式 */ .response-content h1, .response-content h2, .response-content h3, .response-content h4, .response-content h5, .response-content h6 { margin-top: 1.3rem; margin-bottom: 0.8rem; font-weight: 600; line-height: 1.25; color: var(--text-primary); } .response-content h1 { font-size: 1.8em; border-bottom: 1px solid var(--border-color); padding-bottom: 0.3em; } .response-content h2 { font-size: 1.4em; border-bottom: 1px solid var(--border-color); padding-bottom: 0.3em; } .response-content h3 { font-size: 1.2em; } .response-content h4 { font-size: 1em; } .response-content h5 { font-size: 0.875em; } .response-content h6 { font-size: 0.85em; color: var(--text-secondary); } .response-content p { margin-top: 0; margin-bottom: 0.8rem; } .response-content a { color: var(--primary); text-decoration: none; } .response-content a:hover { text-decoration: underline; } .response-content blockquote { margin: 0 0 0.8rem; padding: 0 0.8rem; color: var(--text-secondary); border-left: 0.25rem solid var(--border-color); } .response-content code { font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; font-size: 0.9em; padding: 0.2em 0.4em; margin: 0; background-color: rgba(var(--surface-alt-rgb), 0.5); border-radius: 3px; } .response-content pre { background-color: rgba(var(--surface-alt-rgb), 0.5); border-radius: 6px; padding: 0.8rem; overflow: auto; margin-bottom: 0.8rem; } .response-content pre code { background-color: transparent; padding: 0; margin: 0; font-size: 0.85em; white-space: pre; overflow-wrap: normal; } .response-content ul, .response-content ol { margin-top: 0; margin-bottom: 0.8rem; padding-left: 1.8rem; } .response-content li + li { margin-top: 0.2rem; } .response-content table { display: block; width: 100%; overflow: auto; border-spacing: 0; border-collapse: collapse; margin-bottom: 0.8rem; } .response-content table th { font-weight: 600; background-color: var(--surface-alt); } .response-content table th, .response-content table td { padding: 5px 10px; border: 1px solid var(--border-color); } .response-content table tr { background-color: var(--surface); border-top: 1px solid var(--border-color); } .response-content table tr:nth-child(2n) { background-color: var(--surface-alt); } .response-content img { max-width: 100%; box-sizing: content-box; margin: 0.8rem 0; border-radius: 4px; } /* 特殊样式:任务列表 */ .response-content input[type="checkbox"] { margin-right: 0.5rem; } [data-theme="dark"] .response-content { background-color: rgba(var(--surface-rgb), 0.7); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); } /* 暗色模式下的代码块样式 */ [data-theme="dark"] .response-content pre { background-color: rgba(0, 0, 0, 0.2); } [data-theme="dark"] .response-content code { background-color: rgba(0, 0, 0, 0.2); } [data-theme="dark"] .response-content table th { background-color: rgba(var(--surface-alt-rgb), 0.3); } [data-theme="dark"] .response-content table tr:nth-child(2n) { background-color: rgba(var(--surface-alt-rgb), 0.2); } /* Settings Panel */ .settings-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 100vw; background-color: var(--surface); box-shadow: -8px 0 20px var(--shadow-color); z-index: 1000; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1); display: flex; flex-direction: column; border-left: 1px solid var(--border-color); } .settings-panel:not(.hidden) { transform: translateX(0); } .settings-content { flex: 1; overflow-y: auto; padding: 1.5rem; } .settings-section { margin-bottom: 2.5rem; background-color: var(--surface-alt); border-radius: 0.75rem; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); transition: transform 0.2s ease, box-shadow 0.2s ease; } .settings-section:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transform: translateY(-2px); } .settings-section h3 { color: var(--text-primary); margin-bottom: 1.5rem; font-size: 1.15rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; } .settings-section h3::before { content: ""; display: inline-block; width: 4px; height: 18px; background-color: var(--primary); border-radius: 2px; } /* Form Elements */ .setting-group { margin-bottom: 1.5rem; position: relative; } .setting-group:last-child { margin-bottom: 0; } .setting-group label { display: block; margin-bottom: 0.75rem; color: var(--text-secondary); font-size: 0.875rem; font-weight: 500; transition: color 0.2s ease; } .setting-group:hover label { color: var(--primary); } input[type="text"], input[type="password"], input[type="number"], select, textarea { width: 100%; padding: 0.85rem 1rem; border: 1.5px solid var(--border-color); border-radius: 0.5rem; background-color: var(--background); color: var(--text-primary); font-size: 0.9375rem; transition: all 0.2s ease-in-out; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); } input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15); transform: translateY(-1px); } .input-styled { width: 100%; padding: 8px 10px; background-color: var(--input-bg-color); border: 1px solid var(--border-color); border-radius: 4px; color: var(--input-text-color); font-size: 1rem; transition: border-color 0.2s; } .input-styled:focus { border-color: var(--accent-color); outline: none; } [data-theme="dark"] .input-styled { background-color: var(--input-bg-color-dark); color: var(--input-text-color-dark); border-color: var(--border-color-dark); } .input-group { position: relative; display: flex; align-items: center; } .input-group input { padding-right: 2.75rem; } .input-group .btn-icon { position: absolute; right: 0.75rem; background-color: transparent; transition: all 0.2s ease; } .input-group .btn-icon:hover { color: var(--primary); transform: scale(1.1); } .range-group { display: flex; align-items: center; gap: 1rem; } input[type="range"] { flex: 1; height: 6px; -webkit-appearance: none; background: linear-gradient(to right, var(--primary) 0%, var(--primary) 50%, var(--border-color) 50%, var(--border-color) 100%); border-radius: 3px; cursor: pointer; } input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 6px rgba(0, 0, 0, 0.1); transition: transform 0.2s ease, box-shadow 0.2s ease; cursor: pointer; } input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); box-shadow: 0 0 0 4px rgba(74, 108, 247, 0.2); } #temperatureValue { min-width: 30px; text-align: center; font-weight: 600; color: var(--primary); } .checkbox-label { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; user-select: none; } .checkbox-label input[type="checkbox"] { appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--border-color); border-radius: 4px; position: relative; transition: all 0.2s ease; background-color: var(--background); } .checkbox-label input[type="checkbox"]:checked { background-color: var(--primary); border-color: var(--primary); } .checkbox-label input[type="checkbox"]:checked::after { content: "✓"; position: absolute; color: white; font-size: 14px; top: 50%; left: 50%; transform: translate(-50%, -50%); } .checkbox-label input[type="checkbox"]:focus { box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15); } .proxy-settings { padding-top: 1rem; margin-top: 0.5rem; border-top: 1px dashed var(--border-color); transition: opacity 0.3s ease, transform 0.3s ease; } #proxyEnabled:not(:checked) ~ #proxySettings { opacity: 0.5; } /* Buttons */ .btn-primary, .btn-secondary, .btn-icon { padding: 0.75rem 1.5rem; border: none; border-radius: 0.5rem; font-size: 0.9375rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; transition: all 0.2s ease; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); position: relative; overflow: hidden; } .btn-primary::after, .btn-secondary::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255, 255, 255, 0.1); transform: translateY(100%); transition: transform 0.2s ease; } .btn-primary:hover::after, .btn-secondary:hover::after { transform: translateY(0); } .btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; } .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); } .btn-primary:active { transform: translateY(0); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } .btn-secondary { background-color: var(--surface-alt); color: var(--text-primary); border: 1px solid var(--border-color); } .btn-secondary:hover { background-color: var(--hover-color); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } .btn-secondary:active { transform: translateY(0); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } .btn-icon { padding: 0.5rem; border-radius: 0.5rem; background: transparent; color: var(--text-secondary); box-shadow: none; } .btn-icon:hover { background-color: var(--hover-color); color: var(--primary); transform: translateY(-2px); } .btn-icon:active { transform: translateY(0); } button:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; box-shadow: none !important; } /* Floating Action Button */ .fab { position: fixed; right: 2rem; bottom: 2rem; width: 3.5rem; height: 3.5rem; border-radius: 50%; background-color: var(--primary-color); color: white; border: none; cursor: pointer; box-shadow: 0 2px 8px var(--shadow-color); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; transition: transform 0.2s, background-color 0.2s; z-index: 900; } .fab:hover { transform: scale(1.05); background-color: var(--primary-dark); } /* Toast Notifications */ .toast-container { position: fixed; top: 4rem; right: 1rem; left: auto; transform: none; z-index: 1000; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; } .toast { background-color: var(--surface); color: var(--text-primary); padding: 0.75rem 1rem; border-radius: 0.375rem; box-shadow: 0 4px 6px var(--shadow-color); display: flex; align-items: center; gap: 0.75rem; pointer-events: auto; animation: toast-in 0.3s ease; max-width: 250px; opacity: 0.9; font-size: 0.9rem; } .toast.success { border-left: 4px solid var(--success-color); } .toast.error { border-left: 4px solid var(--error-color); } /* Crop Container */ .crop-container { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.9); z-index: 1000; display: flex; flex-direction: column; } .crop-wrapper { flex: 1; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; } .crop-area { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } .crop-area img { max-width: 100%; max-height: 100%; } .crop-actions { padding: 1rem; display: flex; justify-content: center; gap: 1rem; background-color: var(--surface); } /* Animations */ @keyframes toast-in { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 0.9; } } /* 应用同样的Markdown样式到思考内容 */ .thinking-content h1, .thinking-content h2, .thinking-content h3, .thinking-content h4, .thinking-content h5, .thinking-content h6, .thinking-content p, .thinking-content a, .thinking-content blockquote, .thinking-content code, .thinking-content pre, .thinking-content ul, .thinking-content ol, .thinking-content table, .thinking-content img { /* 继承响应内容的样式,但字体更小 */ font-size: 90%; } .thinking-content pre code { white-space: pre; font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; } /* 思考内容的展开折叠样式 */ .thinking-content.collapsed { max-height: 0; padding: 0 1.25rem; margin-bottom: 0; opacity: 0; } .thinking-content.expanded { max-height: none; padding: 0.75rem 1.25rem; margin-bottom: 0.3rem; opacity: 1; } /* Animation for thinking content */ @keyframes thinking-typing { from { opacity: 0.4; } to { opacity: 1; } } .thinking-typing { animation: thinking-typing 0.5s infinite alternate; } /* 初始化错误样式 */ .init-error { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: var(--surface); border: 2px solid var(--danger); border-radius: 8px; padding: 1.5rem; max-width: 80%; max-height: 80%; overflow: auto; z-index: 9999; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); } .init-error h2 { color: var(--danger); margin-top: 0; margin-bottom: 1rem; font-size: 1.5rem; } .init-error p { margin-bottom: 1rem; font-size: 1rem; line-height: 1.5; } .init-error pre { background-color: rgba(0, 0, 0, 0.05); padding: 1rem; border-radius: 4px; font-family: monospace; font-size: 0.9rem; overflow: auto; white-space: pre-wrap; max-height: 300px; } [data-theme="dark"] .init-error pre { background-color: rgba(var(--surface-rgb), 0.5); } /* 删除历史缩略图相关样式 */ /* Utility Classes */ .hidden { display: none !important; } /* Select Styling */ .select-styled { appearance: none; background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); background-repeat: no-repeat; background-position: right 0.7rem top 50%; background-size: 0.65rem auto; padding-right: 2rem !important; cursor: pointer; } .select-styled:focus { background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%234A6CF7%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); } [data-theme="dark"] .select-styled { background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23A0A0A0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); } [data-theme="dark"] .select-styled:focus { background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%234A6CF7%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); } /* 空状态提示样式 */ .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem 2rem; text-align: center; color: var(--text-secondary); height: 100%; } .empty-state i { font-size: 4rem; margin-bottom: 1.5rem; color: var(--border-color); opacity: 0.7; } .empty-state h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; color: var(--text-primary); } .empty-state p { font-size: 1rem; max-width: 400px; margin: 0 auto 1.5rem; line-height: 1.6; } .empty-state .star-prompt { color: var(--primary); font-weight: 500; margin-top: 1rem; font-size: 0.95rem; } .empty-state .star-prompt:hover { transform: scale(1.02); transition: transform 0.2s ease; } .loading-message { text-align: center; padding: 2rem; color: var(--text-secondary); font-style: italic; } .thinking-hint { font-size: 0.8rem; font-weight: normal; color: var(--text-secondary); margin-left: 0.5rem; } /* 响应标题样式 */ .response-header, .response-title, .response-title i, .response-title h3 { display: none; } /* 大屏幕设备的布局 */ @media (min-width: 769px) { .text-editor { flex-direction: row; align-items: flex-end; max-width: 900px; margin: 1.5rem auto; gap: 1rem; } .text-editor textarea { flex: 1; min-height: 120px; margin-bottom: 0; } #sendExtractedText { width: auto; min-width: 150px; align-self: flex-end; margin-top: 0; flex: 0 0 auto; } } /* 模型版本信息样式 */ .model-version-info { margin-top: 5px; font-size: 0.85em; color: var(--text-secondary); display: flex; align-items: center; } .model-version-info i { margin-right: 5px; color: var(--accent); } /* 在模型选择后添加版本信息 */ #modelSelect + .model-version-info { margin-top: 5px; } /* API密钥高亮显示样式 */ .api-key-group { transition: all 0.3s ease; } /* 可折叠内容样式 */ .collapsible-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding-bottom: 1rem; } .collapsible-header h3 { margin-bottom: 0 !important; } .collapsible-content { overflow: hidden; transition: max-height 0.3s ease, padding-top 0.3s ease; } .collapsible-content.collapsed { max-height: 0; padding-top: 0; } .collapsible-content:not(.collapsed) { max-height: 2000px; padding-top: 1rem; border-top: 1px dashed var(--border-color); } /* 推理深度设置相关样式 */ .reasoning-setting-group { padding: 10px; border-radius: 4px; background-color: var(--highlight-bg-color); } .think-budget-group { margin-top: 0; padding: 10px; border-radius: 4px; background-color: var(--highlight-bg-color); } /* 推理设置在暗模式下的样式 */ [data-theme="dark"] .reasoning-setting-group, [data-theme="dark"] .think-budget-group { background-color: var(--highlight-bg-color-dark); } /* Footer Styles */ .app-footer { background-color: var(--surface); padding: 1rem; border-top: 1px solid var(--border-color); margin-top: auto; } .footer-content { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; } .footer-text { color: var(--text-secondary); font-size: 0.9rem; display: flex; align-items: center; gap: 1rem; } .footer-links { display: flex; align-items: center; gap: 1.5rem; } .footer-link { display: flex; align-items: center; gap: 0.5rem; color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: color 0.2s ease; } .footer-link:hover { color: var(--primary); } .footer-link i { font-size: 1rem; } .star-icon { font-size: 1rem; } .user-counter { display: flex; align-items: center; gap: 0.25rem; opacity: 0.7; font-size: 0.75rem; color: var(--text-tertiary); } .counter-badge { display: flex; align-items: center; background: transparent; border-radius: 4px; overflow: hidden; font-size: 0.75rem; color: var(--text-tertiary); } .counter-title { display: none; } .counter-number { background-color: transparent; color: var(--text-tertiary); padding: 2px 4px; font-size: 0.75rem; font-weight: normal; } .user-counter img { height: 20px; width: auto; } @media (max-width: 768px) { .footer-content { flex-direction: column; text-align: center; } .footer-links { flex-wrap: wrap; justify-content: center; } } @media (max-width: 480px) { .footer-links { gap: 1rem; } .footer-link { font-size: 0.8rem; } } .footer-link.xiaohongshu-link i { color: #ff2442; } .footer-link.xiaohongshu-link:hover i { color: #ff4d6d; } /* 更新通知样式 */ .update-notice { background-color: rgba(var(--primary-rgb), 0.1); border-bottom: 1px solid rgba(var(--primary-rgb), 0.2); padding: 0.5rem 0; transition: all 0.3s ease; overflow: hidden; max-height: 3rem; } .update-notice.hidden { max-height: 0; padding: 0; border-bottom: none; } .update-notice-content { display: flex; align-items: center; justify-content: center; gap: 0.75rem; font-size: 0.85rem; color: var(--text-secondary); } .update-notice-content i { color: var(--primary); } .update-link { color: var(--primary); text-decoration: none; font-weight: 500; padding: 0.25rem 0.75rem; border-radius: 3rem; background: rgba(var(--primary-rgb), 0.1); transition: all 0.2s ease; } .update-link:hover { background: rgba(var(--primary-rgb), 0.2); transform: translateY(-1px); } /* 版本徽章样式 */ .version-badge { font-size: 0.75rem; opacity: 0.6; margin-left: 0.5rem; padding: 0.1rem 0.35rem; border-radius: 3rem; background-color: rgba(var(--surface-rgb), 0.3); } /* 媒体查询 */ @media (max-width: 768px) { .update-notice-content { font-size: 0.75rem; } .update-link { padding: 0.2rem 0.5rem; } } @media (max-width: 480px) { .update-notice-content > span:not(#updateVersion) { display: none; } .update-notice-content { gap: 0.5rem; } } /* 截图按钮高亮样式 */ .capture-btn-highlight { background-color: #ff5a5f !important; color: white !important; transform: scale(1.15); box-shadow: 0 0 8px rgba(255, 90, 95, 0.5); border-radius: 50%; position: relative; } .capture-btn-highlight i { font-size: 1.2em; } .capture-btn-highlight:hover { background-color: #ff7e82 !important; transform: scale(1.2); box-shadow: 0 0 12px rgba(255, 90, 95, 0.7); } .capture-btn-highlight:active { transform: scale(1.1); box-shadow: 0 0 5px rgba(255, 90, 95, 0.4); } /* 添加呼吸动画效果 */ @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 95, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(255, 90, 95, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 95, 0); } } .capture-btn-highlight:not(:disabled) { animation: pulse 2s infinite; } /* 暗色模式适配 */ [data-theme="dark"] .capture-btn-highlight { background-color: #ff5a5f !important; color: white !important; } @media (min-width: 769px) { .text-editor { display: flex; flex-direction: row; align-items: flex-end; flex-wrap: wrap; } .text-editor textarea { flex: 1; margin-right: 1rem; min-height: 120px; } #sendExtractedText { margin-top: 0; } } /* 移动设备上的思考过程样式优化 */ @media (max-width: 768px) { .thinking-section { margin: 0.2rem 0 0.1rem 0; } .thinking-header { padding: 0.45rem 0.8rem; margin: 0.2rem 0.8rem 0.1rem 0.8rem; border-radius: 0.35rem; } .thinking-title i { font-size: 0.85rem; } .thinking-title h3 { font-size: 0.85rem; } .thinking-title .dots-animation { min-width: 16px; } .toggle-btn { width: 22px; height: 22px; } .thinking-content { margin: 0 1.25rem 0.2rem 1.5rem; font-size: 0.8rem; } .thinking-content.expanded { padding: 0.6rem 1rem; margin-bottom: 0.2rem; } .response-content { padding: 0.8rem 1rem; margin-top: 0.1rem; } } @media (max-width: 480px) { .thinking-section { margin: 0.15rem 0 0.1rem 0; } .thinking-header { padding: 0.4rem 0.7rem; margin: 0.15rem 0.65rem 0.1rem 0.65rem; } .thinking-title { gap: 0.4rem; } .thinking-title i { font-size: 0.8rem; } .thinking-title h3 { font-size: 0.8rem; } .thinking-content { margin: 0 1.1rem 0.15rem 1.3rem; } .thinking-content.expanded { padding: 0.5rem 0.8rem; margin-bottom: 0.15rem; } .response-content { padding: 0.7rem 0.9rem; margin-top: 0.1rem; } } /* 思考过程和回复内容的分隔 */ .thinking-section:not(.hidden) + .response-content { border-top: 1px dashed rgba(var(--primary-rgb), 0.15); padding-top: 0.8rem; } @media (max-width: 768px) { .thinking-section:not(.hidden) + .response-content { padding-top: 0.7rem; } } @media (max-width: 480px) { .thinking-section:not(.hidden) + .response-content { padding-top: 0.6rem; } } /* 在适当位置添加停止生成按钮样式 */ .btn-stop-generation { display: none; background-color: var(--error-color); color: white; border: none; border-radius: 4px; width: 32px; height: 32px; padding: 0; margin-left: 10px; cursor: pointer; transition: all 0.2s ease; align-items: center; justify-content: center; } .btn-stop-generation:hover { background-color: var(--error-hover-color); transform: scale(1.05); } .btn-stop-generation:active { transform: scale(0.95); } .btn-stop-generation i { font-size: 14px; } .btn-stop-generation.visible { display: flex; }