mirror of
https://github.com/Zippland/Snap-Solver.git
synced 2026-01-19 17:51:12 +08:00
1329 lines
28 KiB
CSS
1329 lines
28 KiB
CSS
:root {
|
|
/* Light theme colors */
|
|
--primary-color: #2196F3;
|
|
--primary-dark: #1976D2;
|
|
--secondary-color: #4CAF50;
|
|
--secondary-dark: #45a049;
|
|
--background: #f8f9fa;
|
|
--surface: #ffffff;
|
|
--text-primary: #212121;
|
|
--text-secondary: #666666;
|
|
--border-color: #e0e0e0;
|
|
--shadow-color: rgba(0, 0, 0, 0.1);
|
|
--error-color: #f44336;
|
|
--success-color: #4CAF50;
|
|
--primary: #2196f3;
|
|
--primary-rgb: 33, 150, 243;
|
|
--primary-light: #bbdefb;
|
|
--secondary: #ff9800;
|
|
--success: #4caf50;
|
|
--danger: #f44336;
|
|
--warning: #ff9800;
|
|
--info: #2196f3;
|
|
--background: #f5f7fb;
|
|
--surface: #ffffff;
|
|
--surface-rgb: 255, 255, 255;
|
|
--surface-alt: #f0f4f8;
|
|
--surface-alt-rgb: 248, 249, 250;
|
|
--text: #2c3e50;
|
|
--text-tertiary: #9e9e9e;
|
|
--shadow-color: rgba(0, 0, 0, 0.1);
|
|
--hover-color: #e9ecef;
|
|
--accent: #4a6cf7;
|
|
--placeholder: #a0a0a0;
|
|
--disabled: #e6e6e6;
|
|
}
|
|
|
|
[data-theme="dark"] {
|
|
--primary-color: #64B5F6;
|
|
--primary-dark: #42A5F5;
|
|
--secondary-color: #81C784;
|
|
--secondary-dark: #66BB6A;
|
|
--background: #121212;
|
|
--surface: #1E1E1E;
|
|
--surface-rgb: 30, 30, 30;
|
|
--text-primary: #FFFFFF;
|
|
--text-secondary: #B0B0B0;
|
|
--text-tertiary: #909090;
|
|
--border-color: #333333;
|
|
--shadow-color: rgba(0, 0, 0, 0.3);
|
|
--primary: #64b5f6;
|
|
--primary-rgb: 100, 181, 246;
|
|
--primary-light: #bbdefb;
|
|
--secondary: #ff9800;
|
|
--danger: #f44336;
|
|
--success: #4caf50;
|
|
--background: #1a1a2e;
|
|
--surface: #272741;
|
|
--surface-alt: #202035;
|
|
--surface-alt-rgb: 37, 37, 37;
|
|
--text: #f0f0f0;
|
|
--text-secondary: #a0a0a0;
|
|
--shadow-color: rgba(0, 0, 0, 0.4);
|
|
--border-color: #353545;
|
|
--hover-color: #32324b;
|
|
--accent: #4a6cf7;
|
|
--placeholder: #515151;
|
|
--disabled: #3a3a3a;
|
|
}
|
|
|
|
/* Base Styles */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
background-color: var(--background);
|
|
color: var(--text-primary);
|
|
line-height: 1.6;
|
|
transition: background-color 0.3s, color 0.3s;
|
|
touch-action: manipulation;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
.app-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 100vh;
|
|
background-color: var(--background);
|
|
position: relative;
|
|
}
|
|
|
|
/* Header Styles */
|
|
.app-header {
|
|
background-color: var(--surface);
|
|
padding: 0.75rem 1rem;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
z-index: 100;
|
|
position: sticky;
|
|
top: 0;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.header-content {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
flex-wrap: nowrap;
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
width: 100%;
|
|
}
|
|
|
|
.app-header h1 {
|
|
font-size: 1.3rem;
|
|
color: var(--primary);
|
|
margin: 0;
|
|
font-weight: 600;
|
|
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
letter-spacing: -0.5px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
#connectionStatus {
|
|
font-size: 0.8rem;
|
|
padding: 0.2rem 0.5rem;
|
|
border-radius: 1rem;
|
|
margin: 0 0.5rem;
|
|
white-space: nowrap;
|
|
font-weight: 600;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.3rem;
|
|
transition: all 0.3s ease;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
#connectionStatus::before {
|
|
content: "";
|
|
display: inline-block;
|
|
width: 6px;
|
|
height: 6px;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
#connectionStatus.connected {
|
|
background-color: rgba(76, 175, 80, 0.15);
|
|
color: var(--success);
|
|
border: 1px solid rgba(76, 175, 80, 0.3);
|
|
}
|
|
|
|
#connectionStatus.connected::before {
|
|
background-color: var(--success);
|
|
box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
|
|
}
|
|
|
|
#connectionStatus.disconnected {
|
|
background-color: rgba(244, 67, 54, 0.15);
|
|
color: var(--danger);
|
|
border: 1px solid rgba(244, 67, 54, 0.3);
|
|
}
|
|
|
|
#connectionStatus.disconnected::before {
|
|
background-color: var(--danger);
|
|
box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.3);
|
|
}
|
|
|
|
.header-buttons {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.header-buttons .btn-icon {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background-color: var(--surface-alt);
|
|
color: var(--text-secondary);
|
|
transition: all 0.2s ease;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.header-buttons .btn-icon:hover {
|
|
transform: translateY(-2px);
|
|
background-color: var(--hover-color);
|
|
color: var(--primary);
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.header-buttons .btn-icon:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
/* Main Content */
|
|
.app-main {
|
|
flex: 1;
|
|
display: flex;
|
|
padding: 1.5rem;
|
|
gap: 1.5rem;
|
|
position: relative;
|
|
overflow: hidden;
|
|
background-color: var(--background);
|
|
}
|
|
|
|
.content-panel {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.5rem;
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Capture Section */
|
|
.capture-section {
|
|
background-color: var(--surface);
|
|
border-radius: 1rem;
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
|
padding: 1.5rem;
|
|
transition: all 0.3s ease;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.toolbar {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 1.5rem;
|
|
padding: 0.75rem 1rem;
|
|
background-color: var(--surface-alt);
|
|
border-radius: 0.75rem;
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
|
|
}
|
|
|
|
.toolbar-buttons {
|
|
display: flex;
|
|
justify-content: flex-start;
|
|
align-items: center;
|
|
width: 100%;
|
|
}
|
|
|
|
.button-group {
|
|
display: flex;
|
|
gap: 1rem;
|
|
align-items: center;
|
|
}
|
|
|
|
.analysis-button {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 1.5rem;
|
|
margin-top: 1.5rem;
|
|
padding: 1.5rem;
|
|
background-color: var(--surface-alt);
|
|
border-radius: 0.75rem;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.analysis-button .button-group {
|
|
display: flex;
|
|
gap: 1rem;
|
|
width: 100%;
|
|
max-width: 500px;
|
|
justify-content: center;
|
|
}
|
|
|
|
.text-editor {
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.5rem;
|
|
background-color: var(--surface);
|
|
padding: 1.5rem;
|
|
border-radius: 0.75rem;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
|
border: 1px solid var(--border-color);
|
|
transition: all 0.3s ease;
|
|
margin-top: 1.5rem;
|
|
}
|
|
|
|
.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: 100%;
|
|
justify-content: center;
|
|
padding: 0.875rem;
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.image-preview {
|
|
position: relative;
|
|
border-radius: 1rem;
|
|
overflow: hidden;
|
|
background-color: var(--surface-alt);
|
|
margin: 0;
|
|
padding: 1.5rem;
|
|
text-align: center;
|
|
transition: all 0.3s ease;
|
|
border: 1px dashed var(--border-color);
|
|
}
|
|
|
|
.image-container {
|
|
display: inline-block;
|
|
position: relative;
|
|
margin: 0 auto;
|
|
border-radius: 0.75rem;
|
|
overflow: hidden;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
|
|
transition: all 0.3s ease;
|
|
max-width: 90%;
|
|
}
|
|
|
|
.image-container:hover {
|
|
transform: scale(1.01);
|
|
box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
#screenshotImg {
|
|
display: block;
|
|
width: auto;
|
|
height: auto;
|
|
max-width: 100%;
|
|
border-radius: 0.75rem;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.app-header {
|
|
padding: 0.6rem;
|
|
}
|
|
|
|
.app-header h1 {
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
#connectionStatus {
|
|
font-size: 0.7rem;
|
|
padding: 0.15rem 0.4rem;
|
|
}
|
|
|
|
.header-buttons .btn-icon {
|
|
width: 32px;
|
|
height: 32px;
|
|
}
|
|
|
|
.toolbar-buttons {
|
|
flex-direction: row;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.button-group {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.btn-primary, .btn-secondary {
|
|
padding: 0.5rem 0.7rem;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.app-main {
|
|
padding: 1rem 0.75rem;
|
|
}
|
|
|
|
.settings-panel {
|
|
width: 100%;
|
|
}
|
|
|
|
.claude-panel {
|
|
border-radius: 0.75rem;
|
|
min-height: 200px;
|
|
}
|
|
|
|
.response-content {
|
|
padding: 1rem;
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.thinking-content {
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.thinking-content.expanded {
|
|
padding: 0.75rem 1rem;
|
|
}
|
|
|
|
.fab {
|
|
right: 1rem;
|
|
bottom: 1rem;
|
|
}
|
|
|
|
.text-editor {
|
|
padding: 1.25rem;
|
|
margin-top: 1.25rem;
|
|
}
|
|
|
|
.text-editor textarea {
|
|
min-height: 120px;
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
#sendExtractedText {
|
|
padding: 0.75rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.app-header h1 {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
#connectionStatus {
|
|
max-width: 70px;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.header-buttons .btn-icon {
|
|
width: 28px;
|
|
height: 28px;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.toolbar-buttons {
|
|
justify-content: center;
|
|
}
|
|
|
|
.toast-container {
|
|
top: 3.5rem;
|
|
right: 0.5rem;
|
|
}
|
|
|
|
.empty-state i {
|
|
font-size: 3rem;
|
|
}
|
|
|
|
.empty-state h3 {
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.empty-state p {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.text-editor {
|
|
padding: 1rem;
|
|
border-radius: 0.5rem;
|
|
margin-top: 1rem;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.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.75rem;
|
|
font-size: 0.9rem;
|
|
}
|
|
}
|
|
|
|
/* Claude Panel */
|
|
.claude-panel {
|
|
background-color: var(--surface);
|
|
border-radius: 1rem;
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: auto;
|
|
min-height: 300px;
|
|
border: 1px solid var(--border-color);
|
|
transition: all 0.3s ease;
|
|
overflow: visible;
|
|
width: 100%;
|
|
}
|
|
|
|
.claude-panel:not(.hidden) {
|
|
animation: panel-slide-in 0.4s cubic-bezier(0.19, 1, 0.22, 1) forwards;
|
|
}
|
|
|
|
@keyframes panel-slide-in {
|
|
0% {
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.panel-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 1.25rem;
|
|
border-bottom: 1px solid var(--border-color);
|
|
background-color: var(--surface);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 5;
|
|
}
|
|
|
|
.header-title {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.analysis-status {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.status-light {
|
|
width: 12px;
|
|
height: 12px;
|
|
border-radius: 50%;
|
|
background-color: var(--text-secondary);
|
|
transition: background-color 0.3s ease;
|
|
box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.status-light.processing {
|
|
background-color: #ffd700;
|
|
animation: pulse 1.5s infinite;
|
|
box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
|
|
}
|
|
|
|
.status-light.completed {
|
|
background-color: var(--success);
|
|
box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
|
|
}
|
|
|
|
.status-light.error {
|
|
background-color: var(--danger);
|
|
box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0% {
|
|
opacity: 1;
|
|
box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
|
|
}
|
|
50% {
|
|
opacity: 0.6;
|
|
box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.4);
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
|
|
}
|
|
}
|
|
|
|
.response-content {
|
|
padding: 1.5rem;
|
|
background-color: #fff;
|
|
border-radius: 6px;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
line-height: 1.6;
|
|
white-space: pre-wrap;
|
|
overflow-wrap: break-word;
|
|
margin-top: 1rem;
|
|
font-size: 1rem;
|
|
height: auto;
|
|
width: 100%;
|
|
}
|
|
|
|
[data-theme="dark"] .response-content {
|
|
background-color: rgba(var(--surface-rgb), 0.7);
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
/* Settings Panel */
|
|
.settings-panel {
|
|
position: fixed;
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
width: 400px;
|
|
max-width: 100vw;
|
|
background-color: var(--surface);
|
|
box-shadow: -8px 0 20px var(--shadow-color);
|
|
z-index: 1000;
|
|
transform: translateX(100%);
|
|
transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
|
|
display: flex;
|
|
flex-direction: column;
|
|
border-left: 1px solid var(--border-color);
|
|
}
|
|
|
|
.settings-panel:not(.hidden) {
|
|
transform: translateX(0);
|
|
}
|
|
|
|
.settings-content {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
.settings-section {
|
|
margin-bottom: 2.5rem;
|
|
background-color: var(--surface-alt);
|
|
border-radius: 0.75rem;
|
|
padding: 1.5rem;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
}
|
|
|
|
.settings-section:hover {
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.settings-section h3 {
|
|
color: var(--text-primary);
|
|
margin-bottom: 1.5rem;
|
|
font-size: 1.15rem;
|
|
font-weight: 600;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.settings-section h3::before {
|
|
content: "";
|
|
display: inline-block;
|
|
width: 4px;
|
|
height: 18px;
|
|
background-color: var(--primary);
|
|
border-radius: 2px;
|
|
}
|
|
|
|
/* Form Elements */
|
|
.setting-group {
|
|
margin-bottom: 1.5rem;
|
|
position: relative;
|
|
}
|
|
|
|
.setting-group:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.setting-group label {
|
|
display: block;
|
|
margin-bottom: 0.75rem;
|
|
color: var(--text-secondary);
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
transition: color 0.2s ease;
|
|
}
|
|
|
|
.setting-group:hover label {
|
|
color: var(--primary);
|
|
}
|
|
|
|
input[type="text"],
|
|
input[type="password"],
|
|
input[type="number"],
|
|
select,
|
|
textarea {
|
|
width: 100%;
|
|
padding: 0.85rem 1rem;
|
|
border: 1.5px solid var(--border-color);
|
|
border-radius: 0.5rem;
|
|
background-color: var(--background);
|
|
color: var(--text-primary);
|
|
font-size: 0.9375rem;
|
|
transition: all 0.2s ease-in-out;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
input:focus,
|
|
select:focus,
|
|
textarea:focus {
|
|
outline: none;
|
|
border-color: var(--primary);
|
|
box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.input-group {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.input-group input {
|
|
padding-right: 2.75rem;
|
|
}
|
|
|
|
.input-group .btn-icon {
|
|
position: absolute;
|
|
right: 0.75rem;
|
|
background-color: transparent;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.input-group .btn-icon:hover {
|
|
color: var(--primary);
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.range-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
input[type="range"] {
|
|
flex: 1;
|
|
height: 6px;
|
|
-webkit-appearance: none;
|
|
background: linear-gradient(to right, var(--primary) 0%, var(--primary) 70%, var(--border-color) 70%, var(--border-color) 100%);
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
input[type="range"]::-webkit-slider-thumb {
|
|
-webkit-appearance: none;
|
|
width: 18px;
|
|
height: 18px;
|
|
border-radius: 50%;
|
|
background: var(--primary);
|
|
box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
|
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
cursor: pointer;
|
|
}
|
|
|
|
input[type="range"]::-webkit-slider-thumb:hover {
|
|
transform: scale(1.2);
|
|
box-shadow: 0 0 0 4px rgba(74, 108, 247, 0.2);
|
|
}
|
|
|
|
#temperatureValue {
|
|
min-width: 30px;
|
|
text-align: center;
|
|
font-weight: 600;
|
|
color: var(--primary);
|
|
}
|
|
|
|
.checkbox-label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
.checkbox-label input[type="checkbox"] {
|
|
appearance: none;
|
|
width: 18px;
|
|
height: 18px;
|
|
border: 1.5px solid var(--border-color);
|
|
border-radius: 4px;
|
|
position: relative;
|
|
transition: all 0.2s ease;
|
|
background-color: var(--background);
|
|
}
|
|
|
|
.checkbox-label input[type="checkbox"]:checked {
|
|
background-color: var(--primary);
|
|
border-color: var(--primary);
|
|
}
|
|
|
|
.checkbox-label input[type="checkbox"]:checked::after {
|
|
content: "✓";
|
|
position: absolute;
|
|
color: white;
|
|
font-size: 14px;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
}
|
|
|
|
.checkbox-label input[type="checkbox"]:focus {
|
|
box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15);
|
|
}
|
|
|
|
.proxy-settings {
|
|
padding-top: 1rem;
|
|
margin-top: 0.5rem;
|
|
border-top: 1px dashed var(--border-color);
|
|
transition: opacity 0.3s ease, transform 0.3s ease;
|
|
}
|
|
|
|
#proxyEnabled:not(:checked) ~ #proxySettings {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
/* Buttons */
|
|
.btn-primary,
|
|
.btn-secondary,
|
|
.btn-icon {
|
|
padding: 0.75rem 1.5rem;
|
|
border: none;
|
|
border-radius: 0.5rem;
|
|
font-size: 0.9375rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
transition: all 0.2s ease;
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.btn-primary::after,
|
|
.btn-secondary::after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
transform: translateY(100%);
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.btn-primary:hover::after,
|
|
.btn-secondary:hover::after {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.btn-primary {
|
|
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.btn-primary:active {
|
|
transform: translateY(0);
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background-color: var(--surface-alt);
|
|
color: var(--text-primary);
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background-color: var(--hover-color);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.btn-secondary:active {
|
|
transform: translateY(0);
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.btn-icon {
|
|
padding: 0.5rem;
|
|
border-radius: 0.5rem;
|
|
background: transparent;
|
|
color: var(--text-secondary);
|
|
box-shadow: none;
|
|
}
|
|
|
|
.btn-icon:hover {
|
|
background-color: var(--hover-color);
|
|
color: var(--primary);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.btn-icon:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
button:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
transform: none !important;
|
|
box-shadow: none !important;
|
|
}
|
|
|
|
/* Floating Action Button */
|
|
.fab {
|
|
position: fixed;
|
|
right: 2rem;
|
|
bottom: 2rem;
|
|
width: 3.5rem;
|
|
height: 3.5rem;
|
|
border-radius: 50%;
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
border: none;
|
|
cursor: pointer;
|
|
box-shadow: 0 2px 8px var(--shadow-color);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1.5rem;
|
|
transition: transform 0.2s, background-color 0.2s;
|
|
z-index: 900;
|
|
}
|
|
|
|
.fab:hover {
|
|
transform: scale(1.05);
|
|
background-color: var(--primary-dark);
|
|
}
|
|
|
|
/* Toast Notifications */
|
|
.toast-container {
|
|
position: fixed;
|
|
top: 4rem;
|
|
right: 1rem;
|
|
left: auto;
|
|
transform: none;
|
|
z-index: 1000;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.toast {
|
|
background-color: var(--surface);
|
|
color: var(--text-primary);
|
|
padding: 0.75rem 1rem;
|
|
border-radius: 0.375rem;
|
|
box-shadow: 0 4px 6px var(--shadow-color);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
pointer-events: auto;
|
|
animation: toast-in 0.3s ease;
|
|
max-width: 250px;
|
|
opacity: 0.9;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.toast.success {
|
|
border-left: 4px solid var(--success-color);
|
|
}
|
|
|
|
.toast.error {
|
|
border-left: 4px solid var(--error-color);
|
|
}
|
|
|
|
/* Crop Container */
|
|
.crop-container {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: rgba(0, 0, 0, 0.9);
|
|
z-index: 1000;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.crop-wrapper {
|
|
flex: 1;
|
|
position: relative;
|
|
overflow: hidden;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.crop-area {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.crop-area img {
|
|
max-width: 100%;
|
|
max-height: 100%;
|
|
}
|
|
|
|
.crop-actions {
|
|
padding: 1rem;
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 1rem;
|
|
background-color: var(--surface);
|
|
}
|
|
|
|
/* Animations */
|
|
@keyframes toast-in {
|
|
from {
|
|
transform: translateX(100%);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: translateX(0);
|
|
opacity: 0.9;
|
|
}
|
|
}
|
|
|
|
/* Thinking Section */
|
|
.thinking-section {
|
|
margin-bottom: 1rem;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.thinking-header {
|
|
padding: 1rem 1.5rem;
|
|
cursor: pointer;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
transition: all 0.2s ease;
|
|
background-color: rgba(var(--primary-rgb), 0.1);
|
|
border: 2px solid transparent;
|
|
border-radius: 6px;
|
|
position: relative;
|
|
}
|
|
|
|
.thinking-header::after {
|
|
position: absolute;
|
|
right: 60px;
|
|
color: var(--text-secondary);
|
|
font-size: 0.8rem;
|
|
opacity: 0;
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
.thinking-header:hover {
|
|
background-color: rgba(var(--primary-rgb), 0.15);
|
|
border: 2px dashed rgba(var(--primary-rgb), 0.3);
|
|
}
|
|
|
|
.thinking-header:hover::after {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.thinking-title {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.thinking-title i {
|
|
color: var(--primary);
|
|
font-size: 1.125rem;
|
|
}
|
|
|
|
.thinking-title h3 {
|
|
margin: 0;
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.toggle-btn {
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
width: 32px;
|
|
height: 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.toggle-btn:hover {
|
|
color: var(--primary);
|
|
}
|
|
|
|
.thinking-content {
|
|
padding: 0;
|
|
background-color: rgba(var(--primary-rgb), 0.05);
|
|
border-left: 3px solid rgba(var(--primary-rgb), 0.3);
|
|
overflow: hidden;
|
|
transition: max-height 0.3s ease, padding 0.3s ease;
|
|
font-family: monospace;
|
|
white-space: pre-wrap;
|
|
font-size: 0.9rem;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.thinking-content.collapsed {
|
|
max-height: 0;
|
|
padding: 0 1.5rem;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.thinking-content.expanded {
|
|
max-height: none;
|
|
padding: 1rem 1.5rem;
|
|
overflow-y: visible;
|
|
}
|
|
|
|
/* Animation for thinking content */
|
|
@keyframes thinking-typing {
|
|
from { opacity: 0.4; }
|
|
to { opacity: 1; }
|
|
}
|
|
|
|
.thinking-typing {
|
|
animation: thinking-typing 0.5s infinite alternate;
|
|
}
|
|
|
|
/* 初始化错误样式 */
|
|
.init-error {
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
background-color: var(--surface);
|
|
border: 2px solid var(--danger);
|
|
border-radius: 8px;
|
|
padding: 1.5rem;
|
|
max-width: 80%;
|
|
max-height: 80%;
|
|
overflow: auto;
|
|
z-index: 9999;
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.init-error h2 {
|
|
color: var(--danger);
|
|
margin-top: 0;
|
|
margin-bottom: 1rem;
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.init-error p {
|
|
margin-bottom: 1rem;
|
|
font-size: 1rem;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.init-error pre {
|
|
background-color: rgba(0, 0, 0, 0.05);
|
|
padding: 1rem;
|
|
border-radius: 4px;
|
|
font-family: monospace;
|
|
font-size: 0.9rem;
|
|
overflow: auto;
|
|
white-space: pre-wrap;
|
|
max-height: 300px;
|
|
}
|
|
|
|
[data-theme="dark"] .init-error pre {
|
|
background-color: rgba(var(--surface-rgb), 0.5);
|
|
}
|
|
|
|
/* 删除历史缩略图相关样式 */
|
|
|
|
/* Utility Classes */
|
|
.hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
/* Select Styling */
|
|
.select-styled {
|
|
appearance: none;
|
|
background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
|
|
background-repeat: no-repeat;
|
|
background-position: right 0.7rem top 50%;
|
|
background-size: 0.65rem auto;
|
|
padding-right: 2rem !important;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.select-styled:focus {
|
|
background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%234A6CF7%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
|
|
}
|
|
|
|
[data-theme="dark"] .select-styled {
|
|
background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23A0A0A0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
|
|
}
|
|
|
|
[data-theme="dark"] .select-styled:focus {
|
|
background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%234A6CF7%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
|
|
}
|
|
|
|
/* 空状态提示样式 */
|
|
.empty-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 4rem 2rem;
|
|
text-align: center;
|
|
color: var(--text-secondary);
|
|
height: 100%;
|
|
}
|
|
|
|
.empty-state i {
|
|
font-size: 4rem;
|
|
margin-bottom: 1.5rem;
|
|
color: var(--border-color);
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.empty-state h3 {
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
margin-bottom: 1rem;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.empty-state p {
|
|
font-size: 1rem;
|
|
max-width: 400px;
|
|
margin: 0 auto 1.5rem;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.loading-message {
|
|
text-align: center;
|
|
padding: 2rem;
|
|
color: var(--text-secondary);
|
|
font-style: italic;
|
|
}
|
|
|
|
.thinking-hint {
|
|
font-size: 0.8rem;
|
|
font-weight: normal;
|
|
color: var(--text-secondary);
|
|
margin-left: 0.5rem;
|
|
}
|
|
|
|
/* 响应标题样式 */
|
|
.response-header,
|
|
.response-title,
|
|
.response-title i,
|
|
.response-title h3 {
|
|
display: none;
|
|
}
|
|
|
|
/* 大屏幕设备的布局 */
|
|
@media (min-width: 769px) {
|
|
.text-editor {
|
|
max-width: 900px;
|
|
margin: 1.5rem auto;
|
|
}
|
|
|
|
#sendExtractedText {
|
|
width: auto;
|
|
min-width: 200px;
|
|
align-self: flex-end;
|
|
}
|
|
}
|
|
|
|
/* 模型版本信息样式 */
|
|
.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;
|
|
border-left: 3px solid transparent;
|
|
padding-left: 0.5rem;
|
|
}
|
|
|
|
.api-key-active {
|
|
border-left: 3px solid var(--primary);
|
|
background-color: rgba(var(--primary-rgb), 0.05);
|
|
padding-left: 0.5rem;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.api-key-active label {
|
|
color: var(--primary);
|
|
font-weight: 600;
|
|
}
|