diff --git "a/static/style.css" "b/static/style.css" new file mode 100644--- /dev/null +++ "b/static/style.css" @@ -0,0 +1,5845 @@ +:root { + /* Light theme colors */ + --primary: #0366d6; + --primary-rgb: 3, 102, 214; + --primary-rgb-alpha: rgba(3, 102, 214, 0.1); + --primary-light: #2188ff; + --primary-dark: #044289; + --text-primary: #24292e; + --text-secondary: #586069; + --text-tertiary: #6a737d; + --text-success: #28a745; + --text-warning: #f66a0a; + --text-error: #d73a49; + --surface: #ffffff; + --surface-rgb: 255, 255, 255; + --surface-alt: #f6f8fa; + --surface-alt-rgb: 246, 248, 250; + --border-color: #e1e4e8; + --link-color: #0366d6; + --shadow-color: rgba(0, 0, 0, 0.05); + --highlight-bg-color: #f6f8fa; + --highlight-bg-color-dark: #2d333b; + --button-hover: #f3f4f6; + --button-active: #ebecf0; + --header-height: 40px; + --header-height: 40px; + --transition-speed: 0.3s; + --screen-md: 768px; + --screen-sm: 480px; + --editor-padding: 0.5rem; + + /* 其他颜色 */ + --error-color: #e53935; + --success-color: #4CAF50; + --secondary: #ff9800; + --info: #2196f3; + --background: #f5f7fb; + --text: #2c3e50; + --hover-color: #e9ecef; + --accent: #4a6cf7; +} + +[data-theme="dark"] { + /* Dark theme colors */ + --primary: #58a6ff; + --primary-rgb: 88, 166, 255; + --primary-rgb-alpha: rgba(88, 166, 255, 0.1); + --primary-light: #79b8ff; + --primary-dark: #388bfd; + --text-primary: #c9d1d9; + --text-secondary: #8b949e; + --text-tertiary: #6e7681; + --text-success: #3fb950; + --text-warning: #d29922; + --text-error: #f85149; + --surface: #0d1117; + --surface-rgb: 13, 17, 23; + --surface-alt: #161b22; + --surface-alt-rgb: 22, 27, 34; + --border-color: #30363d; + --link-color: #58a6ff; + --shadow-color: rgba(0, 0, 0, 0.4); + --highlight-bg-color: #161b22; + --highlight-bg-color-dark: #0d1117; + --button-hover: #2a303b; + --button-active: #252c36; + + /* 其他颜色 */ + --background: #0d1117; + --text: #c9d1d9; + --hover-color: #2a303b; + + /* 设置面板相关变量 */ + --card-background: #161b22; + --input-background: #0d1117; + --input-border: #30363d; + --input-focus-border: #58a6ff; + --input-focus-shadow: rgba(88, 166, 255, 0.2); + --input-text: #c9d1d9; + --input-placeholder: #6e7681; + + /* 按钮相关 */ + --btn-primary-bg: #238636; + --btn-primary-text: #ffffff; + --btn-primary-hover-bg: #2ea043; + --btn-primary-active-bg: #238636; + --btn-secondary-bg: #21262d; + --btn-secondary-text: #c9d1d9; + --btn-secondary-border: #30363d; + --btn-secondary-hover-bg: #30363d; + + /* 成功/警告/错误状态 */ + --success-color: #3fb950; + --warning-color: #d29922; + --error-color: #f85149; + --info: #58a6ff; + + /* 特殊元素 */ + --dropdown-background: #0d1117; + --tooltip-background: #30363d; + --tooltip-text: #c9d1d9; + --switch-bg-on: #238636; + --switch-bg-off: #484f58; + --danger: #f85149; +} + +/* 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 ease, color 0.3s ease; + 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.3rem 1rem; + padding: 0.3rem 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); + height: var(--header-height); + display: flex; + align-items: center; + height: var(--header-height); + display: flex; + align-items: center; +} + +.header-content { + display: flex; + justify-content: space-between; + align-items: center; + flex-wrap: nowrap; + max-width: 1200px; + margin: 0 auto; + width: 100%; +} + +.header-middle { + display: flex; + align-items: center; + gap: 0.5rem; +} + +.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; + 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; + align-items: center; /* 确保按钮垂直居中 */ + align-items: center; /* 确保按钮垂直居中 */ +} + +.header-buttons .btn-icon { + width: 36px; + height: 32px; + height: 32px; + 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); +} + +.capture-btn-highlight { + background-color: var(--primary) !important; + color: white !important; + box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3) !important; + width: auto !important; + min-width: 100px !important; + border-radius: 18px !important; + padding: 0 8px !important; +} + +.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: 0.5rem 1rem; /* 减小垂直内边距和水平内边距 */ + gap: 1rem; + padding: 0.5rem 1rem; /* 减小垂直内边距和水平内边距 */ + gap: 1rem; + 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.8rem 1.5rem; + padding: 0.8rem 1.5rem; + border: none; + border-radius: 2rem; + font-size: 1rem; + border-radius: 2rem; + font-size: 1rem; + font-weight: 600; + cursor: pointer; + display: inline-flex; + align-items: center; + justify-content: center; + gap: 0.5rem; + gap: 0.5rem; + transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + position: relative; + overflow: hidden; + min-width: 180px; + min-width: 180px; +} + +.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; + } + + .header-middle { + gap: 0.3rem; + } + + #connectionStatus { + font-size: 0.7rem; + padding: 0.15rem 0.4rem; + } + + .header-buttons .btn-icon { + width: 32px; + height: 32px; + } + + .capture-btn-highlight { + min-width: 90px !important; + padding: 0 6px !important; + font-size: 0.85rem !important; + } + + .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; +} + +.claude-panel .response-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0.25rem 0.75rem; /* 调整垂直内边距 */ + background-color: var(--surface-alt); + border-bottom: 1px solid var(--border-color); + border-top-left-radius: 0.75rem; + border-top-right-radius: 0.75rem; + font-weight: 600; + color: var(--text-primary); + font-size: 1rem; + border-radius: 0.75rem; + min-height: 200px; +} + +.claude-panel .response-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0.25rem 0.75rem; /* 调整垂直内边距 */ + background-color: var(--surface-alt); + border-bottom: 1px solid var(--border-color); + border-top-left-radius: 0.75rem; + border-top-right-radius: 0.75rem; + font-weight: 600; + color: var(--text-primary); + font-size: 1rem; +} + + .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; + } + + .header-middle { + gap: 0.2rem; + } + + .header-middle .btn-icon { + width: 28px; + height: 28px; + } + + #connectionStatus { + max-width: 70px; + text-overflow: ellipsis; + overflow: hidden; + font-size: 0.65rem; + } + + .header-buttons .btn-icon { + width: 28px; + height: 28px; + font-size: 0.85rem; + } + + .capture-btn-highlight { + min-width: 80px !important; + padding: 0 4px !important; + font-size: 0.8rem !important; + } + + .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%; + position: relative; + margin-bottom: 1.5rem; + position: relative; + margin-bottom: 1.5rem; +} + +.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: 0.25rem 1.25rem; /* 进一步减小垂直内边距 */ + padding: 0.25rem 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: 4px; + width: 40px; + background-color: var(--border-color); + border-radius: 2px; + overflow: hidden; + position: relative; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) inset; +} + +.progress-line::before { + content: ''; + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + background-color: var(--primary); + border-radius: 2px; + transform: translateX(-100%); + transition: transform 0.3s ease; +} + +.progress-line.processing::before { + animation: pulse-animation 1.5s ease-in-out infinite; +} + +.progress-line.completed::before { + transform: translateX(0); + background-color: #4CAF50; + transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), background-color 0.3s ease; +} + +.progress-line.error::before { + transform: translateX(0); + background-color: #F44336; + transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), background-color 0.3s ease; +} + +@keyframes pulse-animation { + 0% { + transform: translateX(-100%); + } + 50% { + transform: translateX(0); + } + 100% { + transform: translateX(100%); + } +} + +.status-text { + font-weight: 600; + white-space: nowrap; + transition: color 0.3s ease; + font-size: 0.7rem; + letter-spacing: 0.3px; + text-transform: uppercase; +} + +.analysis-indicator.processing .status-text { + color: var(--primary); +} + +.analysis-indicator.completed .status-text { + color: #4CAF50; +} + +.analysis-indicator.error .status-text { + color: #F44336; +} + +/* 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: -450px; + width: 450px; + height: 100vh; + background-color: var(--background); + box-shadow: 0 0 20px rgba(0, 0, 0, 0.15); + transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1); + z-index: 1000; + overflow-y: auto; +} + +.settings-panel.active { + right: 0; +} + +.settings-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 1.5rem; + border-bottom: 1px solid var(--border-color); +} + +.settings-header h2 { + margin: 0; + font-size: 1.25rem; + font-weight: 600; + color: var(--text-primary); +} + +.settings-content { + padding: 1.5rem; +} + +/* 卡片式设置区域 */ +.settings-section { + opacity: 0; + transform: translateY(10px); + animation: fadeInUp 0.4s forwards; + animation-delay: calc(var(--anim-order, 0) * 0.1s); + margin-bottom: 2rem; + background-color: var(--card-background, #f8f9fa); + border-radius: 0.75rem; + padding: 1.25rem; + box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05); + border: 1px solid var(--border-color); + transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); +} + +.settings-section:hover { + box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); + transform: translateY(-3px) scale(1.01); +} + +.settings-section h3 { + font-size: 1.125rem; + margin-top: 0; + margin-bottom: 1.25rem; + color: var(--text-primary); + font-weight: 600; + position: relative; + padding-bottom: 0.75rem; + border-bottom: 1px solid var(--border-color); +} + +/* 设置组样式优化 */ +.setting-group { + margin-bottom: 1.25rem; + transition: all 0.2s ease; +} + +.setting-group:last-child { + margin-bottom: 0; +} + +.setting-group:hover { + transform: translateX(3px); +} + +.setting-group label { + display: block; + margin-bottom: 0.5rem; + color: var(--text-secondary); + font-size: 0.9375rem; + font-weight: 500; + transition: color 0.2s ease; +} + +.setting-group:hover label { + color: var(--text-primary); +} + +/* 下拉菜单美化 */ +.setting-group select { + appearance: none; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-position: right 1rem center; + background-size: 16px; + padding-right: 2.5rem; +} + +.setting-group select:hover { + border-color: var(--primary); +} + +/* 滑块和范围输入优化 */ +input[type="range"] { + -webkit-appearance: none; + appearance: none; + width: 100%; + height: 6px; + background: var(--border-color); + border-radius: 3px; + outline: none; + margin: 1rem 0; + position: relative; +} + +input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + appearance: none; + width: 18px; + height: 18px; + background-color: var(--primary); + border-radius: 50%; + border: 2px solid white; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); + cursor: pointer; + transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s ease; +} + +input[type="range"]::-moz-range-thumb { + width: 18px; + height: 18px; + background-color: var(--primary); + border-radius: 50%; + border: 2px solid white; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); + cursor: pointer; + transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s ease; +} + +input[type="range"]::-webkit-slider-thumb:hover, +input[type="range"]::-webkit-slider-thumb:active { + transform: scale(1.15); + box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.2); +} + +.slider-value { + display: inline-block; + background-color: var(--primary); + color: white; + padding: 0.25rem 0.5rem; + border-radius: 4px; + font-size: 0.875rem; + margin-left: 0.5rem; + font-weight: 500; + min-width: 3rem; + text-align: center; +} + +/* 系统提示文本区域优化 */ +textarea#systemPrompt { + min-height: 150px; + resize: vertical; + font-family: monospace; + line-height: 1.5; + font-size: 0.9rem; +} + +/* 模型版本信息 */ +.model-version-info { + display: flex; + align-items: center; + font-size: 0.75rem; + color: var(--text-secondary); + padding: 4px 0; + margin-top: 4px; + transition: all 0.2s ease; + gap: 4px; + opacity: 0.7; +} + +.model-version-info i { + font-size: 0.7rem; + margin-right: 2px; + transition: color 0.2s ease; + color: #9C27B0; /* 统一使用紫色 */ +} + +.model-version-info.has-version { + opacity: 1; +} + +/* 悬停效果 */ +.model-version-info:hover { + color: var(--text); +} + +/* 暗色模式样式 */ +[data-theme="dark"] .model-version-info { + color: var(--text-tertiary); +} + +[data-theme="dark"] .model-version-info:hover { + color: var(--text-secondary); +} + +/* 移动端适配 */ +@media (max-width: 480px) { + .model-version-info { + font-size: 0.7rem; + padding: 3px 0; + margin-top: 3px; + } + + .model-version-info i { + font-size: 0.65rem; + } +} + +/* API密钥设置区域的特殊样式 */ +.api-key-settings .setting-group { + background-color: rgba(0, 0, 0, 0.02); + padding: 1rem; + border-radius: 0.5rem; + border: 1px solid var(--border-color); +} + +.api-key-settings .setting-group:hover { + background-color: rgba(0, 0, 0, 0.03); +} + +/* 紧凑模式下的特殊样式调整 */ +@media (max-width: 1200px) { + .settings-panel { + width: 400px; + right: -400px; + } + + .settings-content { + padding: 1.25rem; + } + + .settings-section { + padding: 1rem; + } +} + +/* 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; + bottom: 20px; + right: 20px; + display: flex; + flex-direction: column; + align-items: flex-end; + gap: 10px; + z-index: 9999; + max-width: 300px; + pointer-events: none; /* 容器本身不接收鼠标事件 */ +} + +.toast { + padding: 12px 16px; + background-color: white; + color: var(--text-color); + border-radius: 4px; + box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15); + display: flex; + align-items: center; + margin: 0; + opacity: 1; + position: relative; + animation: toast-in 0.3s ease; + border-left: 4px solid; + pointer-events: auto; /* toast本身仍接收鼠标事件 */ +} + +.toast.persistent { + padding-right: 32px; +} + +.toast.success { + border-color: var(--success-color); +} + +.toast.error { + border-color: var(--error-color); +} + +.toast.warning { + border-color: var(--warning-color); +} + +.toast.info { + border-color: var(--info-color); +} + +.toast-close { + position: absolute; + right: 8px; + top: 8px; + background: none; + border: none; + font-size: 16px; + color: var(--text-light); + cursor: pointer; + opacity: 0.7; + transition: opacity 0.3s; +} + +.toast-close:hover { + opacity: 1; +} + +@keyframes toast-in { + from { + transform: translateX(100%); + opacity: 0; + } + to { + transform: translateX(0); + opacity: 1; + } +} + +/* 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); +} + +.crop-actions-top { + position: absolute; + top: 0; + left: 0; + right: 0; + z-index: 10; + background-color: rgba(0, 0, 0, 0.7); + border-bottom: 1px solid rgba(255, 255, 255, 0.2); + display: flex; + justify-content: space-between; + align-items: center; + padding: 1rem; + gap: 1rem; +} + +.crop-actions-top button { + min-height: 44px; + white-space: nowrap; +} + +.crop-bottom-buttons { + display: flex; + gap: 0; + min-width: 120px; + max-width: 150px; +} + +.crop-half-btn { + flex: 1; + border-radius: 0; + margin: 0; + white-space: nowrap; + min-height: 44px; + display: flex; + align-items: center; + justify-content: center; + font-size: 0.85rem; +} + +.crop-half-btn:first-child { + border-top-left-radius: 8px; + border-bottom-left-radius: 8px; + border-right: 1px solid rgba(255, 255, 255, 0.2); +} + +.crop-half-btn:last-child { + border-top-right-radius: 8px; + border-bottom-right-radius: 8px; +} + + + +/* 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;%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%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;%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%234A6CF7' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E"); +} + +[data-theme="dark"] .select-styled { + background-image: url("data:image/svg+xml;%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23A0A0A0' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E"); +} + +[data-theme="dark"] .select-styled:focus { + background-image: url("data:image/svg+xml;%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%234A6CF7' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E"); +} + +/* 空状态提示样式 */ +.empty-state { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + text-align: center; + padding: 2rem; + height: 100%; +} + +.empty-state i { + font-size: 3rem; + color: var(--text-tertiary); + margin-bottom: 1rem; +} + +.empty-state h3 { + font-size: 1.5rem; + margin-bottom: 1rem; + color: var(--text-primary); +} + +.empty-state p { + color: var(--text-secondary); + max-width: 600px; + margin: 0 auto 1.5rem; + line-height: 1.6; +} + +.empty-state .star-prompt { + color: var(--primary); + font-weight: 500; + margin-top: 0.5rem; + margin-bottom: 1rem; + font-size: 0.95rem; +} + +.empty-state .star-prompt:hover { + transform: scale(1.02); + transition: transform 0.2s ease; +} + +/* 空状态社交链接 */ +.empty-state-social { + display: flex; + gap: 12px; + margin-top: 0.5rem; +} + +.social-link { + display: flex; + align-items: center; + gap: 6px; + padding: 6px 12px; + border-radius: 20px; + font-size: 0.85rem; + font-weight: 500; + text-decoration: none; + color: var(--text-secondary); + background-color: rgba(var(--surface-rgb), 0.5); + border: 1px solid var(--border-color); + transition: all 0.25s ease; +} + +.social-link:hover { + transform: translateY(-2px); + color: var(--primary); + box-shadow: 0 2px 8px rgba(0,0,0,0.08); +} + +.social-link i { + font-size: 0.95rem; +} + +.github-link:hover { + background-color: rgba(60, 60, 60, 0.08); + border-color: rgba(60, 60, 60, 0.2); +} + +.xiaohongshu-link:hover { + background-color: rgba(255, 36, 66, 0.08); + border-color: rgba(255, 36, 66, 0.2); +} + +.xiaohongshu-link i { + color: #ff2442; +} + +/* 暗色主题社交链接 */ +[data-theme="dark"] .social-link { + background-color: rgba(255, 255, 255, 0.05); + border-color: rgba(255, 255, 255, 0.1); +} + +[data-theme="dark"] .github-link:hover { + background-color: rgba(255, 255, 255, 0.1); + border-color: rgba(255, 255, 255, 0.2); +} + +[data-theme="dark"] .xiaohongshu-link:hover { + background-color: rgba(255, 36, 66, 0.15); + border-color: rgba(255, 36, 66, 0.3); +} + +.loading-message { + text-align: center; + padding: 2rem; + color: var(--text-secondary); + font-style: italic; +} + +/* 响应标题样式 */ +.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; + position: relative; + overflow: hidden; +} + +.api-key-group.highlight { + background-color: rgba(var(--primary-rgb), 0.1); + border-radius: 4px; + padding: 0.5rem; + box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2); +} + +.api-key-group.saving { + background-color: rgba(var(--primary-rgb), 0.05); +} + +.api-key-group.saving::after { + content: ''; + position: absolute; + top: 0; + left: -100%; + width: 100%; + height: 100%; + background: linear-gradient( + 90deg, + transparent, + rgba(var(--primary-rgb), 0.2), + transparent + ); + animation: saving-animation 1.5s linear; +} + +@keyframes saving-animation { + 0% { left: -100%; } + 100% { left: 100%; } +} + +/* API密钥状态显示样式 */ +.api-keys-status { + background-color: var(--surface-alt); + border-radius: 6px; + padding: 0.75rem; + margin-bottom: 1rem; + border: 1px solid var(--border-color); +} + +.status-header { + font-size: 0.9rem; + color: var(--text-secondary); + margin-bottom: 0.5rem; + font-weight: 500; + display: flex; + justify-content: space-between; + align-items: center; +} + +.api-keys-list { + display: flex; + flex-direction: column; + gap: 0.5rem; + padding: 0.5rem 0; +} + +.api-key-status { + display: flex; + justify-content: space-between; + align-items: center; + font-size: 0.85rem; + padding: 0.5rem 1rem; + border-radius: 4px; + background-color: var(--surface); + transition: background-color 0.3s ease; +} + +.api-key-status.highlight { + background-color: var(--hover-bg); + border-left: 4px solid var(--primary-color); + padding-left: 16px; + transition: all 0.3s ease; +} + +.key-name { + font-weight: 500; + color: var(--text-secondary); +} + +.key-status-wrapper { + display: flex; + align-items: center; + gap: 0.35rem; + position: relative; + width: 100%; + max-width: 300px; +} + +.key-display, .key-edit { + display: flex; + align-items: center; + gap: 0.35rem; + width: 100%; + transition: all 0.3s ease; +} + +.key-status { + font-weight: 500; + padding: 0.15rem 0; + text-align: right; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + flex: 1; +} + +.key-status.set { + color: var(--success-color); + font-weight: 600; +} + +.key-status.not-set { + color: var(--warning-color); + font-weight: 600; +} + +.key-edit { + flex: 1; +} + +.key-input { + flex: 1; + padding: 0.15rem 0.5rem; + border-radius: 3px; + border: 1px solid var(--border-color); + background-color: var(--surface); + color: var(--text-primary); + font-family: monospace; + font-size: 0.85rem; + transition: all 0.2s ease; +} + +.key-input:focus { + outline: none; + border-color: var(--primary); + box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2); +} + +.toggle-visibility, .save-api-key { + font-size: 0.8rem; + padding: 0.3rem; + color: var(--text-secondary); + transition: all 0.2s ease; +} + +.toggle-visibility:hover, .save-api-key:hover { + color: var(--primary); + background-color: rgba(var(--primary-rgb), 0.1); + transform: scale(1.1); +} + +.save-api-key { + color: var(--text-success); +} + +.save-api-key:hover { + color: var(--text-success); + background-color: rgba(40, 167, 69, 0.1); +} + +.key-status.set { + color: var(--text-success); +} + +.key-status.not-set { + color: var(--text-warning); +} + +.hidden { + display: none !important; +} + +.edit-api-key { + font-size: 0.8rem; + color: var(--text-secondary); + opacity: 0.7; + transition: all 0.2s ease; +} + +.edit-api-key:hover { + color: var(--primary); + opacity: 1; + transform: scale(1.1); +} + +.header-actions { + display: flex; + align-items: center; + gap: 0.5rem; +} + +.refresh-btn { + font-size: 0.85rem; + padding: 0.35rem; + color: var(--text-tertiary); +} + +.refresh-btn:hover { + color: var(--primary); + background-color: rgba(var(--primary-rgb), 0.1); +} + +.refresh-btn.spinning i { + animation: spinning 1s linear infinite; +} + +@keyframes spinning { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + +/* 推理深度设置相关样式 */ +.reasoning-setting-group { + padding: 12px; + border-radius: 8px; + background-color: var(--highlight-bg-color); + transition: all 0.2s ease-in-out; +} + +.think-budget-group { + margin-top: 8px; + padding: 12px; + border-radius: 8px; + background-color: var(--highlight-bg-color); + transition: all 0.2s ease-in-out; +} + +/* OCR设置样�� */ +.ocr-settings { + margin-bottom: 1.5rem; +} + +.ocr-source-control { + display: flex; + flex-direction: column; + gap: 12px; +} + +.ocr-source-selector { + position: relative; +} + +.ocr-source-select { + width: 100%; + padding: 10px 14px; + border: 1px solid var(--border-color); + border-radius: 8px; + background: var(--surface); + color: var(--text-primary); + font-size: 0.9rem; + transition: all 0.2s ease; +} + +.ocr-source-select:hover { + border-color: var(--primary-color); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); +} + +.ocr-source-select:focus { + outline: none; + border-color: var(--primary-color); + box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1); +} + +.ocr-source-description { + display: flex; + flex-direction: column; + gap: 8px; + padding: 12px; + background: rgba(0, 0, 0, 0.02); + border-radius: 8px; + border: 1px solid var(--border-color); +} + +.ocr-desc-item { + display: flex; + align-items: flex-start; + gap: 8px; + font-size: 0.85rem; + line-height: 1.4; + color: var(--text-secondary); +} + +.ocr-desc-item i { + color: var(--primary-color); + margin-top: 2px; + flex-shrink: 0; +} + +.ocr-desc-item strong { + color: var(--text-primary); +} + +/* 暗色主题下的OCR设置样式 */ +[data-theme="dark"] .ocr-source-description { + background: rgba(255, 255, 255, 0.02); +} + +[data-theme="dark"] .ocr-source-select { + background: var(--surface); + border-color: var(--border-color); +} + +/* 新增的推理控制组件样式 */ +.reasoning-control { + display: flex; + flex-direction: column; + gap: 8px; +} + +.reasoning-label { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 4px; +} + +.reasoning-selector { + display: flex; + gap: 8px; + margin-bottom: 4px; +} + +.reasoning-option { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + padding: 10px; + border-radius: 8px; + background: rgba(0, 0, 0, 0.05); + cursor: pointer; + transition: all 0.2s ease; + border: 2px solid transparent; + position: relative; + overflow: hidden; +} + +.reasoning-option::before { + content: ''; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 3px; + background: linear-gradient(to right, var(--primary-color), transparent); + opacity: 0; + transition: opacity 0.3s ease; +} + +.reasoning-option:hover { + transform: translateY(-2px); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); +} + +.reasoning-option.active { + background: rgba(var(--primary-rgb), 0.1); + border-color: var(--primary-color); +} + +.reasoning-option.active::before { + opacity: 1; +} + +.reasoning-option i { + font-size: 1.2rem; + margin-bottom: 6px; + color: var(--primary-color); + opacity: 0.8; + transition: all 0.2s ease; +} + +.reasoning-option .option-name { + font-weight: 600; + font-size: 0.9rem; + margin-bottom: 4px; +} + +.reasoning-option .option-desc { + font-size: 0.7rem; + opacity: 0.7; + text-align: center; +} + +.reasoning-option:hover i { + transform: scale(1.1); + opacity: 1; +} + +/* 豆包深度思考控制组件样式 */ +.doubao-thinking-control { + display: flex; + flex-direction: column; + gap: 8px; +} + +.doubao-thinking-label { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 6px; +} + +.doubao-thinking-selector { + display: flex; + gap: 8px; + margin-bottom: 8px; +} + +.doubao-thinking-option { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + padding: 12px 8px; + border-radius: 8px; + background: rgba(0, 0, 0, 0.05); + cursor: pointer; + transition: all 0.2s ease; + border: 2px solid transparent; + position: relative; + overflow: hidden; + min-height: 80px; + justify-content: center; +} + +.doubao-thinking-option::before { + content: ''; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 3px; + background: linear-gradient(to right, var(--primary-color), transparent); + opacity: 0; + transition: opacity 0.3s ease; +} + +.doubao-thinking-option:hover { + transform: translateY(-2px); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); +} + +.doubao-thinking-option.active { + background: rgba(var(--primary-rgb), 0.1); + border-color: var(--primary-color); +} + +.doubao-thinking-option.active::before { + opacity: 1; +} + +.doubao-thinking-option i { + font-size: 1.3rem; + margin-bottom: 6px; + color: var(--primary-color); + opacity: 0.8; + transition: all 0.2s ease; +} + +.doubao-thinking-option .option-name { + font-weight: 600; + font-size: 0.85rem; + margin-bottom: 4px; + text-align: center; +} + +.doubao-thinking-option .option-desc { + font-size: 0.7rem; + opacity: 0.7; + text-align: center; + line-height: 1.2; +} + +.doubao-thinking-option:hover i { + transform: scale(1.1); + opacity: 1; +} + +.doubao-thinking-desc { + display: flex; + flex-direction: column; + gap: 6px; + margin-top: 8px; + padding: 8px; + background: rgba(0, 0, 0, 0.03); + border-radius: 6px; +} + +.doubao-desc-item { + display: flex; + align-items: center; + gap: 8px; + font-size: 0.8rem; + opacity: 0.8; +} + +.doubao-desc-item i { + font-size: 0.9rem; + color: var(--primary-color); + opacity: 0.7; + width: 16px; + text-align: center; +} + +/* 思考预算控制组件样式 */ +.think-budget-control { + display: flex; + flex-direction: column; + gap: 6px; +} + +.think-budget-label { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 4px; +} + +.think-value-badge { + font-size: 0.85rem; + font-weight: 500; + background: rgba(0, 0, 0, 0.05); + padding: 2px 8px; + border-radius: 12px; + min-width: 40px; + text-align: center; + color: var(--primary-color); + transition: all 0.2s ease; +} + +.think-slider { + -webkit-appearance: none; + appearance: none; + width: 100%; + height: 6px; + border-radius: 4px; + background: rgba(0, 0, 0, 0.1); + outline: none; + padding: 0; + margin: 0; + cursor: pointer; +} + +.think-slider::-webkit-slider-thumb { + -webkit-appearance: none; + appearance: none; + width: 18px; + height: 18px; + border-radius: 50%; + background: white; + border: 2px solid var(--primary-color); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); + cursor: pointer; + transition: all 0.2s ease; +} + +.think-slider::-moz-range-thumb { + width: 18px; + height: 18px; + border-radius: 50%; + background: white; + border: 2px solid var(--primary-color); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); + cursor: pointer; + transition: all 0.2s ease; +} + +.think-slider::-webkit-slider-thumb:hover, +.think-slider::-webkit-slider-thumb:active { + transform: scale(1.2); + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); +} + +.think-slider::-moz-range-thumb:hover, +.think-slider::-moz-range-thumb:active { + transform: scale(1.2); + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); +} + +.think-budget-markers { + display: flex; + justify-content: space-between; + margin-top: 2px; + font-size: 0.7rem; + color: rgba(0, 0, 0, 0.5); + padding: 0 2px; +} + +.think-budget-presets { + display: flex; + justify-content: space-around; + gap: 8px; + margin-top: 8px; +} + +.think-preset { + flex: 1; + padding: 4px 0; + font-size: 0.75rem; + border: none; + border-radius: 12px; + background: rgba(0, 0, 0, 0.05); + color: rgba(0, 0, 0, 0.7); + cursor: pointer; + transition: all 0.2s ease; +} + +.think-preset:hover { + background: rgba(0, 0, 0, 0.1); + transform: translateY(-1px); +} + +.think-preset.active { + background: var(--primary-color); + color: #333; + font-weight: 500; +} + +.think-budget-desc { + display: flex; + flex-direction: column; + gap: 4px; + margin-top: 8px; + padding: 6px; + border-radius: 6px; + background: rgba(0, 0, 0, 0.03); + font-size: 0.75rem; +} + +.think-desc-item { + display: flex; + align-items: center; + gap: 6px; +} + +.think-desc-item i { + color: var(--primary-color); + opacity: 0.8; + font-size: 0.8rem; +} + +/* 深色模式样式 */ +[data-theme="dark"] .reasoning-setting-group, +[data-theme="dark"] .think-budget-group { + background-color: var(--highlight-bg-color-dark); +} + +[data-theme="dark"] .reasoning-option { + background: rgba(255, 255, 255, 0.05); +} + +[data-theme="dark"] .reasoning-option.active { + background: rgba(var(--primary-rgb), 0.2); +} + +[data-theme="dark"] .doubao-thinking-option { + background: rgba(255, 255, 255, 0.05); +} + +[data-theme="dark"] .doubao-thinking-option.active { + background: rgba(var(--primary-rgb), 0.2); +} + +[data-theme="dark"] .doubao-thinking-desc { + background: rgba(255, 255, 255, 0.03); +} + +[data-theme="dark"] .think-value-badge { + background: rgba(255, 255, 255, 0.1); +} + +[data-theme="dark"] .think-slider { + background: rgba(255, 255, 255, 0.1); +} + +[data-theme="dark"] .think-slider::-webkit-slider-thumb { + background: #333; + border: 2px solid var(--primary-color); +} + +[data-theme="dark"] .think-slider::-moz-range-thumb { + background: #333; + border: 2px solid var(--primary-color); +} + +[data-theme="dark"] .think-budget-markers { + color: rgba(255, 255, 255, 0.5); +} + +[data-theme="dark"] .think-preset { + background: rgba(255, 255, 255, 0.1); + color: rgba(255, 255, 255, 0.8); +} + +[data-theme="dark"] .think-preset:hover { + background: rgba(255, 255, 255, 0.15); +} + +[data-theme="dark"] .think-preset.active { + background: var(--primary-color); + color: #fff; + font-weight: 500; +} + +[data-theme="dark"] .think-budget-desc { + background: rgba(255, 255, 255, 0.05); +} + +/* 移动端适配 */ +@media (max-width: 480px) { + .reasoning-option { + padding: 8px 6px; + } + + .reasoning-option i { + font-size: 1rem; + margin-bottom: 4px; + } + + .reasoning-option .option-name { + font-size: 0.8rem; + } + + .reasoning-option .option-desc { + font-size: 0.65rem; + } + + .think-budget-presets { + gap: 4px; + } + + .think-preset { + padding: 3px 0; + font-size: 0.7rem; + } + + .think-budget-markers { + font-size: 0.65rem; + } + + .think-value-badge { + font-size: 0.75rem; + min-width: 35px; + padding: 1px 6px; + } + + .think-slider::-webkit-slider-thumb { + width: 16px; + height: 16px; + } + + .think-slider::-moz-range-thumb { + width: 16px; + height: 16px; + } + + .think-budget-desc { + font-size: 0.7rem; + } +} + +/* Footer Styles */ +.app-footer { + background-color: var(--surface); + padding: 0.75rem 1.5rem; + border-top: 1px solid rgba(0,0,0,0.05); + margin-top: auto; + box-shadow: 0 -2px 10px rgba(0,0,0,0.02); + position: relative; +} + +.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.85rem; + display: flex; + align-items: center; + gap: 1rem; + font-weight: 500; + opacity: 0.85; + letter-spacing: 0.02em; +} + +.footer-links { + display: flex; + align-items: center; + gap: 1.2rem; +} + +.footer-link { + display: flex; + align-items: center; + gap: 0.5rem; + color: var(--text-secondary); + text-decoration: none; + font-size: 0.85rem; + transition: all 0.25s ease; + padding: 0.35rem 0.8rem; + border-radius: 20px; + font-weight: 500; +} + +.footer-link:hover { + color: var(--primary); + background-color: rgba(var(--primary-rgb), 0.08); + transform: translateY(-1px); +} + +.footer-link i { + font-size: 0.95rem; +} + +.star-icon { + font-size: 0.95rem; + color: #FFB400; + margin-right: 0.15rem; +} + +.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; + padding: 0.5rem 0; + } + + .footer-links { + flex-wrap: wrap; + justify-content: center; + } + + .app-footer { + padding: 0.6rem 1rem; + } +} + +@media (max-width: 480px) { + .footer-links { + gap: 0.5rem; + } + + .footer-link { + font-size: 0.8rem; + padding: 0.25rem 0.6rem; + } + + .app-footer { + padding: 0.5rem 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.75; + margin-left: 0.5rem; + padding: 0.1rem 0.35rem; + border-radius: 3rem; + background-color: rgba(var(--surface-rgb), 0.3); + font-weight: normal; + vertical-align: middle; +} + +.app-header h1 .version-badge { + font-size: 0.65rem; + opacity: 0.8; + margin-left: 0.3rem; + padding: 0.1rem 0.35rem; + position: relative; + top: -0.1rem; +} + +@media (max-width: 480px) { + .app-header h1 .version-badge { + font-size: 0.55rem; + padding: 0.05rem 0.25rem; + } +} + +/* 媒体查询 */ +@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.3); */ /* 移除整体缩放 */ + box-shadow: 0 0 12px rgba(255, 90, 95, 0.6); + border-radius: 0.5rem; /* 调整为长条状的圆角 */ + /* transform: scale(1.3); */ /* 移除整体缩放 */ + box-shadow: 0 0 12px rgba(255, 90, 95, 0.6); + border-radius: 0.5rem; /* 调整为长条状的圆角 */ + position: relative; + width: 100px !important; /* 增加宽度 */ + height: 36px !important; /* 保持与普通按钮相同的高度 */ + width: 100px !important; /* 增加宽度 */ + height: 36px !important; /* 保持与普通按钮相同的高度 */ +} + +.capture-btn-highlight i { + font-size: 1.2em; +} + +.capture-btn-highlight:hover { + background-color: #ff7e82 !important; + /* transform: scale(1.2); */ + /* transform: scale(1.2); */ + box-shadow: 0 0 12px rgba(255, 90, 95, 0.7); +} + +.capture-btn-highlight:active { + /* transform: scale(1.1); */ + /* 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: rgba(244, 67, 54, 0.1); + color: #F44336; + border: 1px solid rgba(244, 67, 54, 0.2); + border-radius: 50%; + width: 24px; + height: 24px; + padding: 0; + margin-left: 8px; + cursor: pointer; + transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); + align-items: center; + justify-content: center; + font-size: 10px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + position: relative; + overflow: hidden; +} + +.btn-stop-generation:hover { + background-color: rgba(244, 67, 54, 0.15); + transform: scale(1.1); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +} + +.btn-stop-generation:active { + transform: scale(0.95); +} + +.btn-stop-generation i { + font-size: 10px; +} + +.btn-stop-generation.visible { + display: flex; +} + +[data-theme="dark"] .btn-stop-generation { + background-color: rgba(248, 81, 73, 0.15); + color: #f85149; + border-color: rgba(248, 81, 73, 0.3); +} + +/* API密钥状态高亮 */ +.api-key-status.highlight { + background-color: var(--hover-bg); + border-left: 4px solid var(--primary-color); + padding-left: 16px; + transition: all 0.3s ease; +} + +.api-key-status { + border-left: 4px solid transparent; + padding-left: 20px; + transition: all 0.3s ease; +} + +.key-status.checking { + color: var(--info); + font-weight: 600; +} + +.key-status.set i { + color: var(--success-color); +} + +.key-status.not-set i { + color: var(--warning-color); +} + +.key-status.checking i { + color: var(--info); +} + +/* 通用表单元素样式 */ +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(var(--primary-rgb), 0.15); + transform: translateY(-1px); + transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); +} + +.input-group { + display: flex; + align-items: center; + position: relative; +} + +.input-group input { + flex: 1; +} + +.input-group .btn-icon { + margin-left: 0.25rem; + padding: 0.35rem; + font-size: 0.9rem; + color: var(--text-tertiary); +} + +.input-group .btn-icon:hover { + color: var(--primary); + background-color: rgba(var(--primary-rgb), 0.1); +} + +.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%) scale(0); + animation: checkmark 0.25s forwards; +} + +@keyframes checkmark { + from { + transform: translate(-50%, -50%) scale(0); + } + to { + transform: translate(-50%, -50%) scale(1); + } +} + +.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; +} + +.clipboard-panel { + background-color: var(--surface); + border-radius: 1rem; + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); + padding: 1.5rem; + border: 1px solid var(--border-color); + transition: all 0.3s ease; +} + +.clipboard-panel:hover { + box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); + transform: translateY(-2px); +} + +.clipboard-header { + display: flex; + flex-direction: column; + gap: 0.35rem; + margin-bottom: 1rem; +} + +.clipboard-header h3 { + display: flex; + align-items: center; + gap: 0.5rem; + font-size: 1.15rem; + margin: 0; + color: var(--text-primary); +} + +.clipboard-hint { + font-size: 0.85rem; + color: var(--text-tertiary); + display: flex; + align-items: center; + gap: 0.4rem; +} + +.clipboard-hint kbd { + background-color: var(--surface-alt); + border: 1px solid var(--border-color); + border-radius: 0.35rem; + padding: 0.1rem 0.45rem; + font-weight: 600; + font-size: 0.75rem; + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08); +} + +.clipboard-panel textarea { + min-height: 140px; + resize: vertical; +} + +.clipboard-panel .clipboard-actions { + display: flex; + align-items: center; + gap: 0.75rem; + flex-wrap: wrap; + margin-top: 0.75rem; +} + +.clipboard-send-btn, +.clipboard-read-btn { + display: inline-flex; + align-items: center; + gap: 0.5rem; +} + +.clipboard-read-btn { + background-color: var(--primary); + color: white; + border: 1px solid var(--primary); +} + +.clipboard-read-btn:hover { + background-color: var(--primary-dark); + border-color: var(--primary-dark); +} + +.clipboard-read-btn:disabled { + background-color: var(--text-tertiary); + border-color: var(--text-tertiary); + cursor: not-allowed; +} + +.clipboard-status { + font-size: 0.85rem; + color: var(--text-tertiary); + min-height: 1.2rem; +} + +.clipboard-status[data-status="pending"] { + color: var(--primary); +} + +.clipboard-status[data-status="success"] { + color: var(--success-color); +} + +.clipboard-status[data-status="error"] { + color: var(--danger); +} + +/* 代码块复制按钮样式 */ +.code-block-wrapper { + position: relative; + margin: 1rem 0; +} + +.code-block-wrapper pre { + margin: 0; + padding: 1rem; + background-color: var(--surface-alt); + border-radius: 0.5rem; + border: 1px solid var(--border-color); + overflow-x: auto; +} + +.code-copy-btn { + position: absolute; + top: 0.5rem; + right: 0.5rem; + background-color: var(--primary); + color: white; + border: none; + border-radius: 0.25rem; + padding: 0.25rem 0.5rem; + font-size: 0.75rem; + cursor: pointer; + opacity: 0.8; + transition: opacity 0.2s ease; + z-index: 10; +} + +.code-copy-btn:hover { + opacity: 1; +} + +.code-copy-btn:active { + background-color: var(--primary-dark); +} + +.code-copy-btn.copied { + background-color: var(--success-color); +} + +/* 滑块值显示优化 */ +#temperatureValue, +#thinkBudgetPercentValue { + display: inline-block; + background-color: var(--primary); + color: white; + padding: 0.25rem 0.5rem; + border-radius: 0.35rem; + font-size: 0.875rem; + margin-left: 0.5rem; + font-weight: 500; + min-width: 2.5rem; + text-align: center; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + transition: all 0.2s ease; +} + +/* 设置标签图标 */ +.setting-group label { + display: flex; + align-items: center; + gap: 0.5rem; +} + +.setting-group label i { + color: var(--text-tertiary); + font-size: 0.9rem; + transition: color 0.2s ease; +} + +.setting-group:hover label i { + color: var(--primary); +} + +/* 模型选择增强 */ +#modelSelect { + font-weight: 500; +} + +#modelSelect option { + font-weight: normal; +} + +/* 特殊设置组样式 */ +.reasoning-setting-group, +.think-budget-group { + background-color: rgba(0, 0, 0, 0.02); + border-radius: 0.75rem; + padding: 1rem; + border: 1px dashed var(--border-color); + margin: 1rem 0; + transition: all 0.25s ease; +} + +.reasoning-setting-group:hover, +.think-budget-group:hover { + background-color: rgba(var(--primary-rgb), 0.03); + border-color: var(--primary); +} + +/* 设置面板按钮样式 */ + +@keyframes fadeInUp { + from { + opacity: 0; + transform: translateY(10px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +.model-settings { + --anim-order: 1; +} + +.api-key-settings { + --anim-order: 2; +} + +.proxy-settings-section { + --anim-order: 3; +} + +/* 按钮点击状态 */ +.btn:active { + transform: scale(0.97); + transition: transform 0.1s ease; +} + +/* 设置组内部元素的过渡效果 */ +.setting-group > * { + transition: all 0.2s ease; +} + +/* 开关切换的动画效果 */ +.checkbox-label input[type="checkbox"] { + position: relative; + transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); +} + +.checkbox-label input[type="checkbox"]:checked::after { + content: "✓"; + position: absolute; + color: white; + font-size: 14px; + top: 50%; + left: 50%; + transform: translate(-50%, -50%) scale(0); + animation: checkmark 0.25s forwards; +} + +@keyframes checkmark { + from { + transform: translate(-50%, -50%) scale(0); + } + to { + transform: translate(-50%, -50%) scale(1); + } +} + +/* 全局过渡效果,让主题切换更平滑 */ +html { + transition: background-color 0.3s ease, color 0.3s ease; +} + +/* 添加主题切换按钮的动画效果 */ +#themeToggle { + position: relative; + overflow: hidden; + transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); +} + +#themeToggle:hover { + transform: translateY(-2px) scale(1.05); + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); +} + +#themeToggle:active { + transform: translateY(0) scale(0.98); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +} + +#themeToggle i { + transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.3s ease; +} + +#themeToggle:hover i { + transform: rotate(15deg) scale(1.1); +} + +/* ===== 夜间模式样式增强 ===== */ +/* 设置面板暗色模式样式 */ +[data-theme="dark"] .settings-panel { + background-color: var(--surface); + box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); +} + +[data-theme="dark"] .settings-header { + border-bottom: 1px solid var(--border-color); + background-color: var(--surface); +} + +[data-theme="dark"] .settings-section { + background-color: var(--card-background); + border: 1px solid var(--border-color); + box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2); +} + +[data-theme="dark"] .settings-section:hover { + box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25); +} + +[data-theme="dark"] input[type="text"], +[data-theme="dark"] input[type="password"], +[data-theme="dark"] input[type="number"], +[data-theme="dark"] select, +[data-theme="dark"] textarea { + background-color: var(--input-background); + border-color: var(--input-border); + color: var(--input-text); +} + +[data-theme="dark"] input:focus, +[data-theme="dark"] select:focus, +[data-theme="dark"] textarea:focus { + border-color: var(--input-focus-border); + box-shadow: 0 0 0 3px var(--input-focus-shadow); +} + +[data-theme="dark"] input::placeholder { + color: var(--input-placeholder); +} + +/* 滑块样式优化 */ +[data-theme="dark"] input[type="range"] { + background: var(--border-color); +} + +[data-theme="dark"] input[type="range"]::-webkit-slider-thumb { + background-color: var(--primary); + border: 2px solid var(--surface); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); +} + +[data-theme="dark"] input[type="range"]::-moz-range-thumb { + background-color: var(--primary); + border: 2px solid var(--surface); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); +} + +/* API密钥设置区域 */ +[data-theme="dark"] .api-key-settings .setting-group { + background-color: rgba(0, 0, 0, 0.2); + border: 1px solid var(--border-color); +} + +[data-theme="dark"] .api-key-settings .setting-group:hover { + background-color: rgba(0, 0, 0, 0.3); +} + +[data-theme="dark"] .key-input { + background-color: var(--input-background); + border-color: var(--input-border); + color: var(--input-text); +} + +[data-theme="dark"] .key-status.set { + color: var(--success-color); +} + +[data-theme="dark"] .key-status.not-set { + color: var(--warning-color); +} + +/* 特殊设置组样式 */ +[data-theme="dark"] .reasoning-setting-group, +[data-theme="dark"] .think-budget-group { + background-color: rgba(0, 0, 0, 0.2); + border: 1px dashed var(--border-color); +} + +[data-theme="dark"] .reasoning-setting-group:hover, +[data-theme="dark"] .think-budget-group:hover { + background-color: rgba(var(--primary-rgb), 0.1); + border-color: var(--primary); +} + +/* 温度和思考预算值显示 */ +[data-theme="dark"] #temperatureValue, +[data-theme="dark"] #thinkBudgetPercentValue { + background-color: var(--primary); + color: white; +} + +/* 模型版本信息 */ +[data-theme="dark"] .model-version-info { + background-color: rgba(0, 0, 0, 0.2); + border: 1px dashed var(--border-color); +} + +/* 复选框样式 */ +[data-theme="dark"] .checkbox-label input[type="checkbox"] { + background-color: var(--input-background); + border-color: var(--input-border); +} + +[data-theme="dark"] .checkbox-label input[type="checkbox"]:checked { + background-color: var(--primary); + border-color: var(--primary); +} + +/* 代理设置 */ +[data-theme="dark"] .proxy-settings { + border-top: 1px dashed var(--border-color); +} + +/* 设置界面的按钮 */ +[data-theme="dark"] .btn-icon { + background-color: var(--surface-alt); + color: var(--text-secondary); +} + +[data-theme="dark"] .btn-icon:hover { + background-color: var(--btn-secondary-hover-bg); + color: var(--primary); +} + +/* 改进API密钥按钮和状态 */ +[data-theme="dark"] .edit-api-key { + color: var(--text-secondary); +} + +[data-theme="dark"] .edit-api-key:hover { + color: var(--primary); + background-color: rgba(var(--primary-rgb), 0.1); +} + +[data-theme="dark"] .toggle-visibility, +[data-theme="dark"] .save-api-key { + color: var(--text-tertiary); + background-color: var(--surface-alt); +} + +[data-theme="dark"] .toggle-visibility:hover, +[data-theme="dark"] .save-api-key:hover { + color: var(--primary); + background-color: rgba(var(--primary-rgb), 0.1); +} + +/* 系统提示文本区域 */ +[data-theme="dark"] textarea#systemPrompt { + background-color: var(--input-background); + color: var(--input-text); + border-color: var(--input-border); +} + +/* 媒体查询中的暗色模式 */ +@media (max-width: 1200px) { + [data-theme="dark"] .settings-panel { + background-color: var(--surface); + } + + [data-theme="dark"] .settings-content { + background-color: var(--surface); + } +} + +/* 捕获面板和分析结果面板的夜间模式优化 */ +[data-theme="dark"] .capture-section { + background-color: var(--surface); + border-color: var(--border-color); + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); +} + +[data-theme="dark"] .empty-state { + background-color: rgba(0, 0, 0, 0.1); +} + +[data-theme="dark"] .empty-state i { + color: var(--text-tertiary); +} + +[data-theme="dark"] .image-container { + background-color: var(--surface-alt); + border: 1px solid var(--border-color); +} + +[data-theme="dark"] .btn-action { + background-color: var(--primary); + color: white; +} + +[data-theme="dark"] .btn-action:hover { + background-color: var(--primary-light); +} + +[data-theme="dark"] .extracted-text-area { + background-color: var(--input-background); + border-color: var(--input-border); + color: var(--input-text); +} + +[data-theme="dark"] .extracted-text-area:focus { + border-color: var(--input-focus-border); + box-shadow: 0 0 0 3px var(--input-focus-shadow); +} + +/* Claude面板夜间模式 */ +[data-theme="dark"] .claude-panel { + background-color: var(--surface); + border-left: 1px solid var(--border-color); + box-shadow: -8px 0 20px rgba(0, 0, 0, 0.3); +} + +[data-theme="dark"] .panel-header { + border-bottom: 1px solid var(--border-color); + background-color: var(--surface); +} + +[data-theme="dark"] .thinking-section { + background-color: rgba(0, 0, 0, 0.2); + border: 1px solid var(--border-color); +} + +[data-theme="dark"] .thinking-header { + background-color: rgba(0, 0, 0, 0.1); +} + +[data-theme="dark"] .thinking-header:hover { + background-color: rgba(0, 0, 0, 0.2); +} + +[data-theme="dark"] .thinking-content { + background-color: var(--input-background); + border-top: 1px solid var(--border-color); +} + +/* 按钮夜间模式 */ +[data-theme="dark"] .btn-primary { + background-color: var(--btn-primary-bg); + color: var(--btn-primary-text); +} + +[data-theme="dark"] .btn-primary:hover { + background-color: var(--btn-primary-hover-bg); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); +} + +[data-theme="dark"] .btn-secondary { + background-color: var(--btn-secondary-bg); + color: var(--btn-secondary-text); + border: 1px solid var(--btn-secondary-border); +} + +[data-theme="dark"] .btn-secondary:hover { + background-color: var(--btn-secondary-hover-bg); +} + +/* Toast消息夜间模式 */ +[data-theme="dark"] .toast { + background-color: var(--surface-alt); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); +} + +[data-theme="dark"] .toast.success { + border-left: 4px solid var(--success-color); +} + +[data-theme="dark"] .toast.error { + border-left: 4px solid var(--error-color); +} + +[data-theme="dark"] .toast.warning { + border-left: 4px solid var(--warning-color); +} + +[data-theme="dark"] .toast.info { + border-left: 4px solid var(--info); +} + +/* 底部栏夜间模式 */ +[data-theme="dark"] .app-footer { + background-color: var(--surface); + border-top: 1px solid rgba(255,255,255,0.05); + box-shadow: 0 -2px 10px rgba(0,0,0,0.1); +} + +[data-theme="dark"] .footer-link { + color: var(--text-secondary); +} + +[data-theme="dark"] .footer-link:hover { + color: var(--primary); +} + +/* 更新通知夜间模式 */ +[data-theme="dark"] .update-notice { + background-color: rgba(var(--primary-rgb), 0.1); + border-bottom: 1px solid var(--border-color); +} + +[data-theme="dark"] .update-link { + color: var(--primary); + background-color: rgba(var(--primary-rgb), 0.1); +} + +/* 增强夜间模式过渡效果 */ +html, +body, +.app-container, +.app-header, +.app-main, +.capture-section, +.settings-panel, +.claude-panel, +.app-footer, +button, +input, +select, +textarea, +.btn-primary, +.btn-secondary, +.btn-icon, +.settings-section, +.model-version-info, +.thinking-section, +.response-content, +.toast { + transition: background-color 0.5s ease, + color 0.5s ease, + border-color 0.5s ease, + box-shadow 0.5s ease; +} + +/* 夜间模式切换按钮动画增强 */ +#themeToggle i { + transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.3s ease; +} + +/* 切换按钮点击效果增强 */ +#themeToggle:active i { + transform: rotate(360deg) scale(0.8); +} + +/* 添加提示词管理相关样式 */ +.prompt-setting-group label { + font-weight: 500; + color: var(--text-primary); +} + +.prompt-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 8px; +} + +.prompt-actions { + display: flex; + gap: 8px; + align-items: center; +} + +.prompt-actions select { + min-width: 180px; + padding: 4px 8px; + border-radius: 4px; + border: 1px solid var(--border-color); + background-color: var(--surface-alt); + color: var(--text-primary); + font-size: 0.9em; +} + +/* 提示词描述样式 */ +.prompt-description { + margin-top: 15px; + padding: 15px; + border-radius: 8px; + background-color: rgba(var(--primary-rgb), 0.05); + max-height: 150px; + overflow-y: auto; + font-size: 0.9rem; + line-height: 1.5; + border: 1px solid rgba(var(--primary-rgb), 0.1); + transition: all 0.2s ease; +} + +.prompt-description:hover { + background-color: rgba(var(--primary-rgb), 0.08); +} + +.prompt-description p { + margin: 0; + color: var(--text); +} + +[data-theme="dark"] .prompt-description { + background-color: rgba(var(--primary-rgb), 0.08); + border-color: rgba(var(--primary-rgb), 0.15); +} + +[data-theme="dark"] .prompt-description:hover { + background-color: rgba(var(--primary-rgb), 0.12); +} + +@media (max-width: 480px) { + .prompt-description { + max-height: 120px; + padding: 12px; + font-size: 0.85rem; + } +} + +/* 移动端提示词区域优化 */ +@media (max-width: 768px) { + .prompt-header { + flex-direction: column; + align-items: flex-start; + gap: 6px; + } + + .prompt-actions { + margin-top: 4px; + width: 100%; + justify-content: space-between; + } + + .prompt-actions select { + min-width: 0; + width: calc(100% - 110px); + font-size: 0.85em; + } + + .icon-btn { + padding: 3px; + } + + .prompt-description { + padding: 8px 10px; + font-size: 0.9rem; + } +} + +@media (max-width: 480px) { + .prompt-actions { + gap: 4px; + } + + .prompt-actions select { + width: calc(100% - 90px); + padding: 3px 6px; + font-size: 0.8em; + } + + textarea#systemPrompt { + min-height: 100px; + font-size: 0.85rem; + } + + .icon-btn { + font-size: 0.9em; + padding: 2px; + } + + .prompt-description { + padding: 6px 8px; + font-size: 0.85rem; + } +} + +.icon-btn { + background: transparent; + border: none; + color: var(--text-secondary); + cursor: pointer; + padding: 4px; + border-radius: 4px; + transition: all 0.2s ease; +} + +.icon-btn:hover { + color: var(--text-color); + background-color: var(--hover-color); +} + +.icon-btn:active { + transform: scale(0.95); +} + +/* 提示词对话框 */ +.prompt-dialog { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background-color: var(--surface); + border-radius: 8px; + box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5); + padding: 20px; + z-index: 1000; + width: 90%; + max-width: 500px; + display: none; + /* 确保背景完全不透明 */ + backdrop-filter: blur(5px); + border: 1px solid var(--border-color); +} + +/* 适配暗模式 */ +[data-theme="dark"] .prompt-dialog { + background-color: var(--surface); + border: 1px solid var(--border-color); + box-shadow: 0 5px 20px rgba(0, 0, 0, 0.7); +} + +/* 移动端对话框优化 */ +@media (max-width: 480px) { + .prompt-dialog { + padding: 15px; + width: 95%; + } + + .prompt-dialog h3 { + font-size: 1.1rem; + padding-bottom: 8px; + margin-bottom: 12px; + } + + .prompt-dialog .form-group { + margin-bottom: 12px; + } + + .prompt-dialog label { + font-size: 0.9rem; + margin-bottom: 4px; + } + + .prompt-dialog input { + padding: 6px 8px; + font-size: 0.9rem; + } + + .prompt-dialog textarea { + min-height: 100px; + font-size: 0.9rem; + } + + .prompt-dialog .dialog-buttons { + margin-top: 15px; + } + + .prompt-dialog .dialog-buttons button { + padding: 6px 12px; + font-size: 0.9rem; + } +} + +.prompt-dialog.active { + display: block; +} + +.prompt-dialog h3 { + margin-top: 0; + border-bottom: 1px solid var(--border-color); + padding-bottom: 10px; + color: var(--text-primary); + font-weight: 600; +} + +[data-theme="dark"] .prompt-dialog h3 { + color: var(--text-primary); + border-bottom-color: var(--border-color); +} + +.prompt-dialog .form-group { + margin-bottom: 16px; +} + +.prompt-dialog label { + display: block; + margin-bottom: 6px; + font-weight: 500; +} + +.prompt-dialog input, +.prompt-dialog textarea { + width: 100%; + padding: 8px 10px; + border-radius: 4px; + border: 1px solid var(--border-color); + background-color: var(--surface-alt); + color: var(--text-primary); + font-size: 0.9rem; +} + +[data-theme="dark"] .prompt-dialog input, +[data-theme="dark"] .prompt-dialog textarea { + background-color: var(--input-background); + border: 1px solid var(--input-border); + color: var(--input-text); +} + +[data-theme="dark"] .prompt-dialog input:focus, +[data-theme="dark"] .prompt-dialog textarea:focus { + border-color: var(--input-focus-border); + box-shadow: 0 0 0 2px var(--input-focus-shadow); + outline: none; +} + +.prompt-dialog textarea { + min-height: 120px; + resize: vertical; +} + +.prompt-dialog .dialog-buttons { + display: flex; + justify-content: flex-end; + gap: 10px; + margin-top: 20px; +} + +.prompt-dialog .dialog-buttons button { + padding: 8px 16px; + border-radius: 4px; + cursor: pointer; + border: none; + font-weight: 500; +} + +.prompt-dialog .dialog-buttons .cancel-btn { + background-color: var(--surface-alt); + color: var(--text-primary); + border: 1px solid var(--border-color); +} + +.prompt-dialog .dialog-buttons .save-btn { + background-color: var(--primary); + color: white; +} + +[data-theme="dark"] .prompt-dialog .dialog-buttons .cancel-btn { + background-color: var(--btn-secondary-bg); + color: var(--btn-secondary-text); + border: 1px solid var(--btn-secondary-border); +} + +[data-theme="dark"] .prompt-dialog .dialog-buttons .cancel-btn:hover { + background-color: var(--btn-secondary-hover-bg); +} + +[data-theme="dark"] .prompt-dialog .dialog-buttons .save-btn { + background-color: var(--primary); +} + +.dialog-overlay { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.7); + z-index: 999; + display: none; + backdrop-filter: blur(2px); +} + +[data-theme="dark"] .dialog-overlay { + background-color: rgba(0, 0, 0, 0.8); +} + +.dialog-overlay.active { + display: block; +} + +/* 温度设置优化样式 */ +.temperature-control { + position: relative; + margin-top: 0.5rem; + margin-bottom: 1.2rem; +} + +.temperature-slider { + -webkit-appearance: none !important; + appearance: none !important; + width: 100%; + height: 10px; + border-radius: 10px; + background: linear-gradient(to right, + #3498db 0%, + #2ecc71 25%, + #f1c40f 50%, + #e67e22 75%, + #e74c3c 100%) !important; + outline: none; + box-shadow: inset 0 2px 4px rgba(0,0,0,0.2); + margin: 0.8rem 0 1.2rem; + border: none; +} + +.temperature-slider::-webkit-slider-thumb { + -webkit-appearance: none !important; + appearance: none !important; + width: 22px; + height: 22px; + border-radius: 50%; + background: var(--surface); + border: 2px solid var(--primary); + cursor: pointer; + box-shadow: 0 2px 5px rgba(0,0,0,0.3); + transition: all 0.2s ease; + position: relative; + z-index: 2; +} + +.temperature-slider::-moz-range-track { + background: linear-gradient(to right, + #3498db 0%, + #2ecc71 25%, + #f1c40f 50%, + #e67e22 75%, + #e74c3c 100%) !important; + border-radius: 10px; + height: 10px; + border: none; +} + +.temperature-slider::-moz-range-thumb { + width: 22px; + height: 22px; + border-radius: 50%; + background: var(--surface); + border: 2px solid var(--primary); + cursor: pointer; + box-shadow: 0 2px 5px rgba(0,0,0,0.3); + transition: all 0.2s ease; + position: relative; + z-index: 2; +} + +.temperature-slider::-webkit-slider-thumb:hover, +.temperature-slider::-webkit-slider-thumb:active { + transform: scale(1.1); + box-shadow: 0 2px 5px rgba(0,0,0,0.3); +} + +.temperature-slider::-moz-range-thumb:hover, +.temperature-slider::-moz-range-thumb:active { + transform: scale(1.1); + box-shadow: 0 2px 5px rgba(0,0,0,0.3); +} + +.temperature-value { + display: none; /* 保留选择器但隐藏元素,防止JavaScript报错 */ +} + +[data-theme="dark"] .temperature-value { + display: none; +} + +@media (max-width: 480px) { + .temperature-slider { + height: 8px; + margin: 0.7rem 0 1rem; + } + + .temperature-slider::-webkit-slider-thumb { + width: 20px; + height: 20px; + } + + .temperature-slider::-moz-range-thumb { + width: 20px; + height: 20px; + } + + .temperature-value { + display: none; + } + + .temperature-markers { + font-size: 0.6rem; + margin-top: -0.6rem; + } + + .temperature-description { + font-size: 0.65rem; + margin-top: -0.3rem; + } +} + +.temperature-markers { + display: flex; + justify-content: space-between; + margin-top: -0.8rem; + margin-bottom: 0.2rem; + padding: 0 2px; + font-size: 0.65rem; + color: var(--text-tertiary); +} + +.temperature-description { + display: flex; + justify-content: space-between; + font-size: 0.7rem; + color: var(--text-tertiary); + margin-top: -0.5rem; +} + +.temperature-low { + text-align: left; +} + +.temperature-high { + text-align: right; +} + +.temperature-label { + display: flex; + align-items: center; + justify-content: flex-start; + margin-bottom: 0.2rem; +} + +.temperature-label i { + margin-right: 0.3rem; + color: var(--primary); +} + +/* 暗模式优化 */ +[data-theme="dark"] .temperature-slider { + background: linear-gradient(to right, + #3498db 0%, + #2ecc71 25%, + #f1c40f 50%, + #e67e22 75%, + #e74c3c 100%) !important; + box-shadow: inset 0 2px 4px rgba(0,0,0,0.4); +} + +[data-theme="dark"] .temperature-slider::-moz-range-track { + background: linear-gradient(to right, + #3498db 0%, + #2ecc71 25%, + #f1c40f 50%, + #e67e22 75%, + #e74c3c 100%) !important; + box-shadow: inset 0 2px 4px rgba(0,0,0,0.4); +} + +[data-theme="dark"] .temperature-slider::-webkit-slider-thumb { + background: var(--surface-alt); + border: 2px solid var(--primary); + box-shadow: 0 2px 5px rgba(0,0,0,0.5); +} + +[data-theme="dark"] .temperature-slider::-moz-range-thumb { + background: var(--surface-alt); + border: 2px solid var(--primary); + box-shadow: 0 2px 5px rgba(0,0,0,0.5); +} + +[data-theme="dark"] .temperature-value { + background-color: var(--surface); + box-shadow: 0 1px 3px rgba(0,0,0,0.3); +} + +/* Token控制区样式 */ +.token-control { + width: 100%; + display: flex; + flex-direction: column; + gap: 6px; + position: relative; +} + +.token-label { + display: flex; + align-items: center; + margin-bottom: 0.2rem; +} + +.token-slider-container { + display: flex; + align-items: center; + gap: 10px; + position: relative; + width: 100%; +} + +.token-slider { + flex: 1; + -webkit-appearance: none; + height: 6px; + border-radius: 4px; + background: linear-gradient(to right, + rgba(58, 134, 255, 0.8) 0%, + rgba(58, 134, 255, 0.8) 50%, + rgba(0, 0, 0, 0.1) 50%, + rgba(0, 0, 0, 0.1) 100%); + outline: none; + padding: 0; + margin: 0; + cursor: pointer; +} + +.token-slider::-webkit-slider-thumb { + -webkit-appearance: none; + appearance: none; + width: 18px; + height: 18px; + border-radius: 50%; + background: white; + border: 2px solid #3a86ff; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); + cursor: pointer; + transition: all 0.2s ease; +} + +.token-slider::-moz-range-thumb { + width: 18px; + height: 18px; + border-radius: 50%; + background: white; + border: 2px solid #3a86ff; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); + cursor: pointer; + transition: all 0.2s ease; +} + +.token-slider::-webkit-slider-thumb:hover, +.token-slider::-webkit-slider-thumb:active { + transform: scale(1.2); + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); +} + +.token-slider::-moz-range-thumb:hover, +.token-slider::-moz-range-thumb:active { + transform: scale(1.2); + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); +} + +.token-value { + font-size: 0.85rem; + font-weight: 500; + opacity: 0.8; + background: rgba(0, 0, 0, 0.05); + padding: 2px 6px; + border-radius: 4px; + min-width: 50px; + text-align: center; + transition: all 0.2s ease; + flex-shrink: 0; +} + +[data-theme="dark"] .token-slider { + background: linear-gradient(to right, + rgba(72, 149, 239, 0.8) 0%, + rgba(72, 149, 239, 0.8) 50%, + rgba(255, 255, 255, 0.1) 50%, + rgba(255, 255, 255, 0.1) 100%); +} + +[data-theme="dark"] .token-slider::-webkit-slider-thumb { + background: #333; + border: 2px solid #4895ef; +} + +[data-theme="dark"] .token-slider::-moz-range-thumb { + background: #333; + border: 2px solid #4895ef; +} + +.token-markers { + display: flex; + justify-content: space-between; + margin-top: 2px; + font-size: 0.7rem; + color: rgba(0, 0, 0, 0.5); + padding: 0 2px; +} + +[data-theme="dark"] .token-markers { + color: rgba(255, 255, 255, 0.5); +} + +.token-presets { + display: flex; + justify-content: space-between; + gap: 8px; + margin-top: 8px; + flex-wrap: wrap; +} + +.token-preset { + flex: 1; + padding: 4px 8px; + font-size: 0.75rem; + border: none; + border-radius: 12px; + background: rgba(0, 0, 0, 0.05); + color: rgba(0, 0, 0, 0.7); + cursor: pointer; + transition: all 0.2s ease; + min-width: 0; + text-align: center; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.token-preset:hover { + background: rgba(0, 0, 0, 0.1); + transform: translateY(-1px); +} + +.token-preset.active { + background: #3a86ff; + color: white; + font-weight: 500; +} + +[data-theme="dark"] .token-value, +[data-theme="dark"] .think-value-badge { + background: rgba(255, 255, 255, 0.1); +} + +[data-theme="dark"] .token-preset { + background: rgba(255, 255, 255, 0.1); + color: rgba(255, 255, 255, 0.8); +} + +[data-theme="dark"] .token-preset:hover { + background: rgba(255, 255, 255, 0.15); +} + +[data-theme="dark"] .token-preset.active { + background: var(--primary-color); + color: #fff; + font-weight: 500; +} + +/* 思考预算控制组件样式 */ +.think-budget-control { + display: flex; + flex-direction: column; + gap: 6px; +} + +.think-budget-label { + display: flex; + align-items: center; + margin-bottom: 0.2rem; +} + +.think-slider-container { + display: flex; + align-items: center; + gap: 10px; + position: relative; + width: 100%; +} + +.think-slider { + flex: 1; + -webkit-appearance: none; + appearance: none; + height: 6px; + border-radius: 4px; + background: rgba(0, 0, 0, 0.1); + outline: none; + padding: 0; + margin: 0; + cursor: pointer; +} + +.think-slider::-webkit-slider-thumb { + -webkit-appearance: none; + appearance: none; + width: 18px; + height: 18px; + border-radius: 50%; + background: white; + border: 2px solid var(--primary-color); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); + cursor: pointer; + transition: all 0.2s ease; +} + +.think-slider::-moz-range-thumb { + width: 18px; + height: 18px; + border-radius: 50%; + background: white; + border: 2px solid var(--primary-color); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); + cursor: pointer; + transition: all 0.2s ease; +} + +.think-slider::-webkit-slider-thumb:hover, +.think-slider::-webkit-slider-thumb:active { + transform: scale(1.2); + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); +} + +.think-slider::-moz-range-thumb:hover, +.think-slider::-moz-range-thumb:active { + transform: scale(1.2); + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); +} + +.think-value-badge { + font-size: 0.85rem; + font-weight: 500; + background: rgba(0, 0, 0, 0.05); + padding: 2px 8px; + border-radius: 12px; + min-width: 40px; + text-align: center; + color: var(--primary-color); + transition: all 0.2s ease; + flex-shrink: 0; +} + +.think-budget-markers { + display: flex; + justify-content: space-between; + margin-top: 2px; + font-size: 0.7rem; + color: rgba(0, 0, 0, 0.5); + padding: 0 2px; +} + +.think-budget-presets { + display: flex; + justify-content: space-around; + gap: 8px; + margin-top: 8px; +} + +.think-preset { + flex: 1; + padding: 4px 0; + font-size: 0.75rem; + border: none; + border-radius: 12px; + background: rgba(0, 0, 0, 0.05); + color: rgba(0, 0, 0, 0.7); + cursor: pointer; + transition: all 0.2s ease; +} + +.think-preset:hover { + background: rgba(0, 0, 0, 0.1); + transform: translateY(-1px); +} + +.think-preset.active { + background: var(--primary-color); + color: #333; + font-weight: 500; +} + +/* 移动端适配 */ +@media (max-width: 480px) { + .token-slider-container, + .think-slider-container { + gap: 8px; + } + + .token-value, + .think-value-badge { + font-size: 0.75rem; + min-width: 35px; + padding: 1px 4px; + } + + .token-presets { + gap: 4px; + } + + .token-preset { + padding: 3px 6px; + font-size: 0.7rem; + } + + .token-markers, + .think-budget-markers { + font-size: 0.65rem; + } + + .token-slider::-webkit-slider-thumb, + .think-slider::-webkit-slider-thumb { + width: 16px; + height: 16px; + } + + .token-slider::-moz-range-thumb, + .think-slider::-moz-range-thumb { + width: 16px; + height: 16px; + } +} + +/* 模型选择器增强 */ +.model-control { + width: 100%; + display: flex; + flex-direction: column; + gap: 10px; + position: relative; +} + +.model-selector-container { + position: relative; + width: 100%; +} + +.model-selector-display { + cursor: pointer; + background-color: var(--surface); + border: 1px solid var(--border-color); + border-radius: 8px; + padding: 10px 12px; + transition: all 0.2s ease; + user-select: none; +} + +.model-selector-display:hover { + border-color: var(--primary-color); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); +} + +.selected-model { + display: flex; + align-items: center; + gap: 12px; +} + +.model-icon-container { + position: relative; + width: 36px; + height: 36px; + display: flex; + align-items: center; + justify-content: center; + background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.2), rgba(var(--primary-rgb), 0.05)); + color: var(--primary-color); + border-radius: 8px; + font-size: 1.2rem; + flex-shrink: 0; +} + +.model-capabilities { + position: absolute; + bottom: -5px; + right: -5px; + display: flex; + gap: 2px; +} + +.model-capabilities i { + width: 16px; + height: 16px; + font-size: 0.6rem; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50%; + background-color: var(--surface); + border: 1px solid var(--border-color); + color: var(--text-tertiary); +} + +.model-capabilities i.model-multimodal { + background-color: rgba(52, 152, 219, 0.2); + color: #3498db; +} + +.model-capabilities i.model-reasoning { + background-color: rgba(155, 89, 182, 0.2); + color: #9b59b6; +} + +.model-info { + flex: 1; + display: flex; + flex-direction: column; + gap: 2px; + min-width: 0; +} + +.model-name { + font-weight: 600; + font-size: 0.95rem; + color: var(--text-primary); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.model-provider { + font-size: 0.75rem; + color: var(--text-tertiary); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.selector-arrow { + color: var(--text-tertiary); + font-size: 0.9rem; + transition: transform 0.3s ease; +} + +.model-selector-display.active .selector-arrow { + transform: rotate(180deg); +} + +/* 强化模型选择下拉框样式 */ +.model-dropdown { + display: none !important; + position: absolute !important; + top: calc(100% + 5px) !important; + left: 0 !important; + width: 100% !important; + background: var(--surface) !important; /* 使用background代替background-color */ + border: 1px solid var(--border-color) !important; + border-radius: 8px !important; + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important; + z-index: 99999 !important; /* 提高z-index值 */ + max-height: 320px !important; + overflow-y: auto !important; + padding: 8px !important; + pointer-events: all !important; + opacity: 1 !important; + + /* 以下属性确保背景不透明 */ + backdrop-filter: none !important; + -webkit-backdrop-filter: none !important; + background-clip: border-box !important; + transform: translateZ(0) !important; /* 启用硬件加速 */ + will-change: transform, opacity !important; /* 提升为合成层 */ + isolation: isolate !important; /* 创建新的层叠上下文 */ +} + +.model-dropdown.active { + display: block !important; + opacity: 1 !important; + visibility: visible !important; + pointer-events: all !important; + animation: dropdown-fade 0.2s ease !important; +} + +/* 修复模型选项的样式和交互 */ +.model-option { + pointer-events: all !important; + cursor: pointer !important; + position: relative !important; + z-index: 1 !important; + background-color: transparent !important; + transition: background-color 0.15s ease !important; + padding: 8px 12px !important; + border-radius: 6px !important; + overflow: hidden !important; + display: flex !important; + align-items: center !important; + gap: 12px !important; + margin-bottom: 2px !important; +} + +.model-option:hover { + background-color: rgba(var(--primary-rgb), 0.1) !important; + transform: translateX(2px) !important; +} + +.model-option:active { + transform: translateX(1px) scale(0.99) !important; + background-color: rgba(var(--primary-rgb), 0.15) !important; +} + +.model-option.selected { + background-color: rgba(var(--primary-rgb), 0.15) !important; + position: relative !important; +} + +.model-option.selected::after { + content: none; + display: none; +} + +/* 确保暗色模式下的配色正确 */ +[data-theme="dark"] .model-dropdown { + background: var(--surface-alt) !important; + border-color: var(--border-color-dark) !important; + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important; +} + +@keyframes dropdown-fade { + from { + opacity: 0; + transform: translateY(-5px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +.model-option-group { + margin-bottom: 8px; +} + +.model-group-header { + padding: 6px 10px; + font-size: 0.75rem; + font-weight: 600; + color: var(--text-tertiary); + text-transform: uppercase; + letter-spacing: 0.03em; + border-bottom: 1px solid var(--border-color); + margin-bottom: 4px; +} + +.model-option { + padding: 8px 10px; + display: flex; + align-items: center; + gap: 12px; + border-radius: 6px; + cursor: pointer; + transition: background-color 0.15s ease; +} + +.model-option:hover { + background-color: rgba(var(--primary-rgb), 0.05); +} + +.model-option.selected { + background-color: rgba(var(--primary-rgb), 0.1); + position: relative; +} + +.model-option.selected::after { + content: none; + display: none; +} + +.model-version-tag { + font-size: 0.7rem; + padding: 2px 6px; + background-color: rgba(var(--primary-rgb), 0.1); + color: var(--primary-color); + border-radius: 4px; + margin-left: 4px; +} + +/* 深色模式样式 */ +[data-theme="dark"] .model-selector-display { + background-color: var(--surface-alt); + border-color: var(--border-color-dark); +} + +[data-theme="dark"] .model-selector-display:hover { + border-color: var(--primary-color); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); +} + +[data-theme="dark"] .model-icon-container { + background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.3), rgba(var(--primary-rgb), 0.1)); +} + +[data-theme="dark"] .model-capabilities i { + background-color: var(--surface-alt); + border-color: var(--border-color-dark); +} + +[data-theme="dark"] .model-dropdown { + background-color: var(--surface-alt); + border-color: var(--border-color-dark); + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); +} + +[data-theme="dark"] .model-option:hover { + background-color: rgba(var(--primary-rgb), 0.15); +} + +[data-theme="dark"] .model-option.selected { + background-color: rgba(var(--primary-rgb), 0.2); +} + +/* 移动端适配 */ +@media (max-width: 480px) { + .model-selector-display { + padding: 8px 10px; + } + + .model-icon-container { + width: 32px; + height: 32px; + font-size: 1rem; + } + + .model-capabilities i { + width: 14px; + height: 14px; + font-size: 0.55rem; + } + + .model-name { + font-size: 0.85rem; + } + + .model-provider { + font-size: 0.7rem; + } + + .model-dropdown { + max-height: 240px; + } + + .model-option { + padding: 6px 8px; + } + + .model-group-header { + padding: 4px 8px; + font-size: 0.7rem; + } +} + +/* 确保模型下拉框可见 - 强制覆盖 */ +.model-selector-container { + position: relative !important; + width: 100% !important; +} + +.model-dropdown.active { + display: block !important; + animation: dropdown-fade 0.2s ease !important; + opacity: 1 !important; + visibility: visible !important; +} + +.model-selector-display.active .selector-arrow { + transform: rotate(180deg) !important; +} + +/* 修复z-index问题 */ +#settingsPanel { + z-index: 100; +} + +.model-dropdown { + z-index: 1001 !important; +} + +/* 修复选择器指示箭头 */ +.model-selector-display .selector-arrow { + transition: transform 0.2s ease !important; +} + +.model-selector-display.active .selector-arrow { + transform: rotate(180deg) !important; +} + +/* 确保选择器有明显的交互感 */ +.model-selector-display { + cursor: pointer !important; + user-select: none !important; + transition: all 0.2s ease !important; +} + +.model-selector-display:hover { + border-color: var(--primary-color) !important; + box-shadow: 0 0 0 1px var(--primary-color) !important; +} + +/* 设置合适的z-index层级 */ +#settingsPanel { + z-index: 900; +} + +.model-dropdown { + z-index: 9999 !important; +} + +/* 模型选项互动效果增强 */ +.model-option { + transition: background-color 0.15s ease, transform 0.1s ease !important; +} + +.model-option:hover { + background-color: rgba(var(--primary-rgb), 0.1) !important; + transform: translateX(2px) !important; +} + +.model-option:active { + transform: scale(0.99) !important; +} + +.model-option.selected { + background-color: rgba(var(--primary-rgb), 0.2) !important; + position: relative !important; +} + +/* 补充模型下拉框分组样式 */ +.model-option-group { + pointer-events: all !important; + position: relative !important; + z-index: 2 !important; + background: inherit !important; + margin-bottom: 8px !important; +} + +.model-group-header { + padding: 6px 10px !important; + font-size: 0.75rem !important; + font-weight: 600 !important; + color: var(--text-tertiary) !important; + text-transform: uppercase !important; + letter-spacing: 0.03em !important; + border-bottom: 1px solid var(--border-color) !important; + margin-bottom: 4px !important; + pointer-events: none !important; + background: inherit !important; +} + +/* 添加强制不透明背景 */ +.model-dropdown { + background-color: #ffffff !important; + background: #ffffff !important; + box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.001) !important; /* 创建一个几乎不可见但能捕获点击的覆盖层 */ +} + +[data-theme="dark"] .model-dropdown { + background-color: #2a2a2a !important; + background: #2a2a2a !important; +} + +/* 确保选项组和头部也有不透明背景 */ +.model-option-group { + background-color: inherit !important; +} + +.model-group-header { + background-color: inherit !important; +} + +/* 下面是强制确保模态下拉框覆盖所有元素并正确显示 */ +.model-dropdown.active { + display: block !important; + opacity: 1 !important; + visibility: visible !important; + pointer-events: all !important; + z-index: 999999 !important; /* 超高的z-index确保在最上层 */ + position: absolute !important; + transform: translateZ(0) !important; /* 强制创建新的堆叠上下文 */ + backdrop-filter: blur(0) !important; /* 禁用任何背景滤镜效果 */ + -webkit-backdrop-filter: blur(0) !important; + background-blend-mode: normal !important; /* 禁用混合模式 */ +} + +/* 全新的模型选择器样式 */ +.model-selector { + position: relative; + width: 100%; + z-index: 10; +} + +.model-display { + display: flex; + align-items: center; + padding: 10px 12px; + border: 1px solid var(--border-color); + border-radius: 8px; + background-color: var(--input-bg); + cursor: pointer; + transition: all 0.2s ease; + gap: 10px; +} + +.model-display:hover { + border-color: var(--primary-color); + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); +} + +.model-display-icon { + width: 36px; + height: 36px; + border-radius: 50%; + background-color: rgba(var(--primary-rgb), 0.1); + display: flex; + align-items: center; + justify-content: center; + font-size: 1rem; +} + +.model-display-info { + flex: 1; + display: flex; + flex-direction: column; +} + +.model-display-name { + font-weight: 500; + font-size: 0.95rem; + color: var(--text); +} + +.model-display-provider { + font-size: 0.8rem; + color: var(--text-secondary); +} + +.model-display-badges { + display: flex; + gap: 5px; +} + +.model-badge { + width: 20px; + height: 20px; + border-radius: 50%; + background-color: rgba(var(--primary-rgb), 0.1); + display: flex; + align-items: center; + justify-content: center; + font-size: 0.7rem; + color: var(--primary-color); +} + +.model-selector-arrow { + transition: transform 0.2s ease; +} + +.model-selector.open .model-selector-arrow { + transform: rotate(180deg); +} + +.model-dropdown-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: transparent; + z-index: 9999; + cursor: default; + display: none; +} + +.model-dropdown-panel { + position: fixed; + max-height: 300px; + overflow-y: auto; + background-color: var(--surface); + border: 1px solid var(--border-color); + border-radius: 8px; + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); + z-index: 10000; + padding: 8px; + display: none; + opacity: 0; + transform: translateY(-10px); + transition: opacity 0.2s, transform 0.2s; +} + +.model-dropdown-panel.visible { + display: block; + opacity: 1; + transform: translateY(0); +} + +.model-group { + margin-bottom: 10px; +} + +.model-group-title { + padding: 5px 8px; + font-size: 0.75rem; + font-weight: 600; + color: var(--text-tertiary); + text-transform: uppercase; + letter-spacing: 0.03em; + border-bottom: 1px solid var(--border-color); + margin-bottom: 5px; +} + +.model-option { + display: flex; + align-items: center; + padding: 8px 10px; + border-radius: 6px; + cursor: pointer; + transition: background-color 0.15s; + gap: 10px; +} + +.model-option:hover { + background-color: rgba(var(--primary-rgb), 0.1); +} + +.model-option.selected { + background-color: rgba(var(--primary-rgb), 0.15); +} + +.model-option-name { + flex: 1; + font-size: 0.9rem; +} + +.model-option-provider { + font-size: 0.75rem; + color: var(--text-secondary); +} + +.model-option-badges { + display: flex; + gap: 4px; +} + +.model-option-badge { + width: 16px; + height: 16px; + border-radius: 50%; + background-color: rgba(var(--primary-rgb), 0.1); + display: flex; + align-items: center; + justify-content: center; + font-size: 0.6rem; + color: var(--primary-color); +} + +/* 暗色模式适配 */ +[data-theme="dark"] .model-display { + background-color: var(--surface-alt); + border-color: var(--border-color-dark); +} + +[data-theme="dark"] .model-display:hover { + border-color: var(--primary-color); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); +} + +[data-theme="dark"] .model-dropdown-panel { + background-color: var(--surface-alt); + border-color: var(--border-color-dark); + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); +} + +/* 移动端适配 */ +@media (max-width: 480px) { + .model-display { + padding: 8px 10px; + } + + .model-display-icon { + width: 30px; + height: 30px; + font-size: 0.85rem; + } + + .model-display-name { + font-size: 0.85rem; + } + + .model-display-provider { + font-size: 0.7rem; + } + + .model-dropdown-panel { + max-height: 250px; + } + + .model-option { + padding: 6px 8px; + } + + .model-group-title { + font-size: 0.7rem; + padding: 4px 6px; + } +} + +/* 模型选择器容器 */ +.model-selector { + position: relative; + width: 100%; + z-index: 10; +} + +/* 模型显示区域 */ +.model-display { + display: flex; + align-items: center; + padding: 8px 10px; + border: 1px solid var(--border-color); + border-radius: 8px; + background-color: var(--input-bg); + cursor: pointer; + transition: all 0.2s ease; + gap: 8px; +} + +.model-display:hover { + border-color: var(--primary-color); + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); +} + +/* 模型图标 */ +.model-display-icon { + width: 32px; + height: 32px; + border-radius: 50%; + background-color: rgba(var(--primary-rgb), 0.1); + display: flex; + align-items: center; + justify-content: center; + font-size: 0.9rem; + flex-shrink: 0; + color: var(--primary-color); + transition: all 0.2s ease; +} + +/* 模型名称和提供商 */ +.model-display-info { + flex: 1; + display: flex; + flex-direction: column; + min-width: 0; /* 确保文本可以截断 */ +} + +.model-display-name { + font-weight: 500; + font-size: 0.9rem; + color: var(--text); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.model-display-provider { + font-size: 0.75rem; + color: var(--text-secondary); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +/* 模型能力徽章 */ +.model-display-badges { + display: flex; + gap: 4px; + margin-right: 2px; +} + +.model-badge { + width: 18px; + height: 18px; + border-radius: 50%; + background-color: rgba(var(--primary-rgb), 0.1); + display: flex; + align-items: center; + justify-content: center; + font-size: 0.65rem; + color: var(--primary-color); + transition: transform 0.15s ease; +} + +.model-badge:hover { + transform: scale(1.1); +} + +/* 多模态能力特殊样式 */ +.model-badge i.fa-image { + color: #4CAF50; /* 绿色 */ +} + +/* 推理能力特殊样式 */ +.model-badge i.fa-brain { + color: #9C27B0; /* 紫色 */ +} + +/* 下拉箭头 */ +.model-selector-arrow { + transition: transform 0.2s ease; + font-size: 0.75rem; + color: var(--text-secondary); + width: 16px; + text-align: center; +} + +.model-selector.open .model-selector-arrow { + transform: rotate(180deg); + color: var(--primary-color); +} + +/* 下拉面板覆盖层 */ +.model-dropdown-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: transparent; + z-index: 9999; + cursor: default; + display: none; +} + +/* 下拉面板 */ +.model-dropdown-panel { + position: fixed; + max-height: 300px; + overflow-y: auto; + background-color: var(--surface); + border: 1px solid var(--border-color); + border-radius: 8px; + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); + z-index: 10000; + padding: 8px; + display: none; + opacity: 0; + transform: translateY(-10px); + transition: opacity 0.2s, transform 0.2s; +} + +.model-dropdown-panel::-webkit-scrollbar { + width: 6px; +} + +/* 提示词预览样式 */ +.prompt-preview { + position: relative; + cursor: pointer; +} + +.prompt-preview-overlay { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + border-radius: 8px; + background-color: rgba(0, 0, 0, 0.03); + opacity: 0; + transition: opacity 0.2s ease; +} + +.prompt-preview:hover .prompt-preview-overlay { + opacity: 1; +} + +.prompt-edit-hint { + position: absolute; + right: 10px; + bottom: 10px; + /* 不显示图标,因为上方已有编辑按钮 */ +} + +[data-theme="dark"] .prompt-preview-overlay { + background-color: rgba(255, 255, 255, 0.05); +} + +@media (max-width: 768px) { + .prompt-preview-overlay { + display: none; + } +} + +/* 中转 API url 设置区域 */ +.api-url-settings { + margin-bottom: 20px; +} + +.api-url-settings small { + color: var(--text-muted); + font-weight: normal; + margin-left: 5px; +} + +/* 移动设备横屏模式优化 */ +@media screen and (max-height: 500px) and (orientation: landscape) { + .crop-actions-top { + padding: 0.5rem; + gap: 0.5rem; + } + + .crop-actions-top button { + padding: 0.5rem 0.75rem; + font-size: 0.85rem; + } + + .crop-actions-top button span { + display: none; + } + + .crop-actions-top button i { + margin: 0; + } +} + +/* 针对极小高度的横屏设备 */ +@media screen and (max-height: 400px) and (orientation: landscape) { + .crop-actions-top { + padding: 0.25rem; + gap: 0.25rem; + } + + .crop-actions-top button { + padding: 0.25rem 0.5rem; + font-size: 0.8rem; + min-height: auto; + } +}