|
|
@@ -1,176 +1,266 @@
|
|
|
-/* 伺服驱动选型工具 - 样式表 */
|
|
|
-* {
|
|
|
- margin: 0;
|
|
|
- padding: 0;
|
|
|
- box-sizing: border-box;
|
|
|
-}
|
|
|
+/* Custom styles that complement Tailwind CSS */
|
|
|
+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
|
|
|
|
|
body {
|
|
|
- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
|
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
|
+ font-family: 'Inter', sans-serif;
|
|
|
min-height: 100vh;
|
|
|
- padding: 20px;
|
|
|
+ transition: background-color 0.3s ease;
|
|
|
+}
|
|
|
+
|
|
|
+/* Theme-specific styles */
|
|
|
+body.light-mode {
|
|
|
+ --bg-primary: #ffffff;
|
|
|
+ --bg-secondary: #f8fafc;
|
|
|
+ --text-primary: #1e293b;
|
|
|
+ --text-secondary: #64748b;
|
|
|
+ --border-color: #cbd5e1; /* 更深的边框色,提高对比度 */
|
|
|
+ --card-bg: #ffffff;
|
|
|
+ --button-primary: #3b82f6;
|
|
|
+ --button-primary-hover: #2563eb;
|
|
|
+ --button-secondary: #64748b; /* 调整为中等灰色,提高对比度 */
|
|
|
+ --button-secondary-hover: #475569;
|
|
|
+}
|
|
|
+
|
|
|
+body.dark-mode {
|
|
|
+ --bg-primary: #0f172a;
|
|
|
+ --bg-secondary: #1e293b;
|
|
|
+ --text-primary: #f8fafc;
|
|
|
+ --text-secondary: #cbd5e1;
|
|
|
+ --border-color: #334155;
|
|
|
+ --card-bg: #1e293b;
|
|
|
+ --button-primary: #3b82f6;
|
|
|
+ --button-primary-hover: #2563eb;
|
|
|
+ --button-secondary: #64748b;
|
|
|
+ --button-secondary-hover: #94a3b8;
|
|
|
}
|
|
|
|
|
|
.container {
|
|
|
max-width: 1200px;
|
|
|
margin: 0 auto;
|
|
|
- background: white;
|
|
|
- border-radius: 15px;
|
|
|
- box-shadow: 0 10px 30px rgba(0,0,0,0.3);
|
|
|
+ border-radius: 1rem;
|
|
|
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
|
|
|
overflow: hidden;
|
|
|
+ background-color: var(--bg-primary);
|
|
|
}
|
|
|
|
|
|
.header {
|
|
|
- background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
|
|
|
- color: white;
|
|
|
- padding: 30px;
|
|
|
+ padding: 2rem;
|
|
|
text-align: center;
|
|
|
+ background: linear-gradient(135deg, #3b82f6, #8b5cf6);
|
|
|
+ color: white;
|
|
|
}
|
|
|
|
|
|
.header h1 {
|
|
|
- font-size: 2.5em;
|
|
|
- margin-bottom: 10px;
|
|
|
+ font-size: 2.5rem;
|
|
|
+ font-weight: 700;
|
|
|
+ margin-bottom: 0.5rem;
|
|
|
}
|
|
|
|
|
|
.subtitle {
|
|
|
- font-size: 1.1em;
|
|
|
+ font-size: 1.1rem;
|
|
|
opacity: 0.9;
|
|
|
+ font-weight: 400;
|
|
|
+}
|
|
|
+
|
|
|
+.theme-toggle {
|
|
|
+ position: absolute;
|
|
|
+ top: 1.5rem;
|
|
|
+ right: 1.5rem;
|
|
|
+ background: rgba(255, 255, 255, 0.2);
|
|
|
+ border: none;
|
|
|
+ border-radius: 50%;
|
|
|
+ width: 2.5rem;
|
|
|
+ height: 2.5rem;
|
|
|
+ cursor: pointer;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ backdrop-filter: blur(10px);
|
|
|
+ transition: all 0.3s ease;
|
|
|
+}
|
|
|
+
|
|
|
+.theme-toggle:hover {
|
|
|
+ transform: scale(1.1);
|
|
|
+ background: rgba(255, 255, 255, 0.3);
|
|
|
+}
|
|
|
+
|
|
|
+body.dark-mode .theme-toggle {
|
|
|
+ background: rgba(0, 0, 0, 0.2);
|
|
|
+}
|
|
|
+
|
|
|
+body.dark-mode .theme-toggle:hover {
|
|
|
+ background: rgba(0, 0, 0, 0.3);
|
|
|
}
|
|
|
|
|
|
.main-content {
|
|
|
display: grid;
|
|
|
grid-template-columns: 1fr 1fr;
|
|
|
- gap: 20px;
|
|
|
- padding: 30px;
|
|
|
+ gap: 1.25rem;
|
|
|
+ padding: 2rem;
|
|
|
}
|
|
|
|
|
|
.card {
|
|
|
- background: #f8f9fa;
|
|
|
- border-radius: 10px;
|
|
|
- padding: 20px;
|
|
|
- box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
|
|
+ border-radius: 0.75rem;
|
|
|
+ padding: 1.5rem;
|
|
|
+ background-color: var(--card-bg);
|
|
|
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
|
+ color: var(--text-primary);
|
|
|
}
|
|
|
|
|
|
.card h2 {
|
|
|
- color: #333;
|
|
|
- margin-bottom: 20px;
|
|
|
- font-size: 1.5em;
|
|
|
+ margin-bottom: 1.25rem;
|
|
|
+ font-size: 1.5rem;
|
|
|
+ font-weight: 600;
|
|
|
+ color: var(--text-primary);
|
|
|
}
|
|
|
|
|
|
.form-group {
|
|
|
- margin-bottom: 15px;
|
|
|
+ margin-bottom: 1rem;
|
|
|
}
|
|
|
|
|
|
.form-group label {
|
|
|
display: block;
|
|
|
- margin-bottom: 5px;
|
|
|
- font-weight: 600;
|
|
|
- color: #555;
|
|
|
+ margin-bottom: 0.25rem;
|
|
|
+ font-weight: 500;
|
|
|
+ color: var(--text-primary);
|
|
|
+ font-size: 0.875rem;
|
|
|
}
|
|
|
|
|
|
.form-control {
|
|
|
width: 100%;
|
|
|
- padding: 10px;
|
|
|
- border: 2px solid #ddd;
|
|
|
- border-radius: 5px;
|
|
|
- font-size: 14px;
|
|
|
- transition: border-color 0.3s;
|
|
|
+ padding: 0.5rem 0.75rem;
|
|
|
+ border-radius: 0.375rem;
|
|
|
+ font-size: 0.875rem;
|
|
|
+ border: 2px solid var(--border-color);
|
|
|
+ background-color: var(--bg-primary);
|
|
|
+ color: var(--text-primary);
|
|
|
+ transition: all 0.3s;
|
|
|
+}
|
|
|
+
|
|
|
+/* Enhanced form control visibility in light mode */
|
|
|
+body.light-mode .form-control {
|
|
|
+ border-color: #cbd5e1; /* Darker border for better visibility */
|
|
|
+}
|
|
|
+
|
|
|
+body.light-mode .form-control:focus {
|
|
|
+ border-color: #3b82f6;
|
|
|
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
|
|
}
|
|
|
|
|
|
.form-control:focus {
|
|
|
outline: none;
|
|
|
- border-color: #4facfe;
|
|
|
+ border-color: #3b82f6;
|
|
|
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
|
|
}
|
|
|
|
|
|
.form-control.error {
|
|
|
- border-color: #e74c3c;
|
|
|
+ border-color: #ef4444;
|
|
|
}
|
|
|
|
|
|
.btn-group {
|
|
|
display: flex;
|
|
|
- gap: 10px;
|
|
|
- margin-top: 20px;
|
|
|
+ gap: 0.75rem;
|
|
|
+ margin-top: 1.25rem;
|
|
|
+ flex-wrap: wrap;
|
|
|
}
|
|
|
|
|
|
.btn {
|
|
|
- padding: 10px 20px;
|
|
|
+ padding: 0.5rem 1rem;
|
|
|
border: none;
|
|
|
- border-radius: 5px;
|
|
|
+ border-radius: 0.375rem;
|
|
|
cursor: pointer;
|
|
|
- font-size: 14px;
|
|
|
+ font-size: 0.875rem;
|
|
|
font-weight: 600;
|
|
|
transition: all 0.3s;
|
|
|
+ display: inline-flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
}
|
|
|
|
|
|
.btn-primary {
|
|
|
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
|
+ background: linear-gradient(135deg, #3b82f6, #8b5cf6);
|
|
|
color: white;
|
|
|
+ box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
|
|
|
}
|
|
|
|
|
|
.btn-primary:hover {
|
|
|
transform: translateY(-2px);
|
|
|
- box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
|
|
|
+ box-shadow: 0 6px 8px -1px rgba(59, 130, 246, 0.4);
|
|
|
}
|
|
|
|
|
|
.btn-secondary {
|
|
|
- background: #6c757d;
|
|
|
+ background-color: var(--button-secondary);
|
|
|
color: white;
|
|
|
}
|
|
|
|
|
|
.btn-secondary:hover {
|
|
|
- background: #5a6268;
|
|
|
+ background-color: var(--button-secondary-hover);
|
|
|
transform: translateY(-2px);
|
|
|
}
|
|
|
|
|
|
.results-grid {
|
|
|
display: grid;
|
|
|
- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
|
- gap: 15px;
|
|
|
- margin-top: 15px;
|
|
|
+ grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
|
+ gap: 1rem;
|
|
|
+ margin-top: 1rem;
|
|
|
}
|
|
|
|
|
|
.result-card {
|
|
|
- background: white;
|
|
|
- padding: 15px;
|
|
|
- border-radius: 8px;
|
|
|
- box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
|
+ padding: 1rem;
|
|
|
+ border-radius: 0.5rem;
|
|
|
text-align: center;
|
|
|
+ background-color: var(--bg-secondary);
|
|
|
+ transition: all 0.3s ease;
|
|
|
}
|
|
|
|
|
|
.result-label {
|
|
|
- font-size: 12px;
|
|
|
- color: #666;
|
|
|
- margin-bottom: 5px;
|
|
|
+ font-size: 0.75rem;
|
|
|
+ margin-bottom: 0.25rem;
|
|
|
+ color: var(--text-secondary);
|
|
|
+ font-weight: 500;
|
|
|
}
|
|
|
|
|
|
.result-value {
|
|
|
- font-size: 18px;
|
|
|
- font-weight: bold;
|
|
|
- color: #333;
|
|
|
+ font-size: 1.125rem;
|
|
|
+ font-weight: 700;
|
|
|
+ color: var(--text-primary);
|
|
|
}
|
|
|
|
|
|
.placeholder {
|
|
|
- color: #999;
|
|
|
font-style: italic;
|
|
|
text-align: center;
|
|
|
- padding: 20px;
|
|
|
+ padding: 1.25rem;
|
|
|
+ color: var(--text-secondary);
|
|
|
}
|
|
|
|
|
|
.warning {
|
|
|
- background: #fff3cd;
|
|
|
- color: #856404;
|
|
|
- padding: 10px;
|
|
|
- border-radius: 5px;
|
|
|
- margin-top: 10px;
|
|
|
+ padding: 0.75rem;
|
|
|
+ border-radius: 0.5rem;
|
|
|
+ margin-top: 1rem;
|
|
|
+ background-color: #fffbeb;
|
|
|
+ color: #92400e;
|
|
|
+ border: 1px solid #fbbf24;
|
|
|
+}
|
|
|
+
|
|
|
+body.dark-mode .warning {
|
|
|
+ background-color: #451a03;
|
|
|
+ color: #fde68a;
|
|
|
+ border-color: #f59e0b;
|
|
|
}
|
|
|
|
|
|
.error {
|
|
|
- background: #f8d7da;
|
|
|
- color: #721c24;
|
|
|
- padding: 10px;
|
|
|
- border-radius: 5px;
|
|
|
- margin-top: 10px;
|
|
|
+ padding: 0.75rem;
|
|
|
+ border-radius: 0.5rem;
|
|
|
+ margin-top: 1rem;
|
|
|
+ background-color: #fef2f2;
|
|
|
+ color: #b91c1c;
|
|
|
+ border: 1px solid #f87171;
|
|
|
+}
|
|
|
+
|
|
|
+body.dark-mode .error {
|
|
|
+ background-color: #7f1d1d;
|
|
|
+ color: #fecaca;
|
|
|
+ border-color: #f87171;
|
|
|
}
|
|
|
|
|
|
.hidden {
|
|
|
@@ -183,40 +273,40 @@ body {
|
|
|
}
|
|
|
|
|
|
.guidance-section li {
|
|
|
- margin-bottom: 8px;
|
|
|
- padding: 8px;
|
|
|
- background: white;
|
|
|
- border-radius: 5px;
|
|
|
- box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
|
|
+ margin-bottom: 0.5rem;
|
|
|
+ padding: 0.5rem;
|
|
|
+ border-radius: 0.5rem;
|
|
|
+ background-color: var(--bg-secondary);
|
|
|
+ font-size: 0.875rem;
|
|
|
}
|
|
|
|
|
|
.alert {
|
|
|
position: fixed;
|
|
|
- top: 20px;
|
|
|
- right: 20px;
|
|
|
- padding: 15px 20px;
|
|
|
- border-radius: 5px;
|
|
|
- color: white;
|
|
|
- font-weight: bold;
|
|
|
+ top: 1.25rem;
|
|
|
+ right: 1.25rem;
|
|
|
+ padding: 0.75rem 1rem;
|
|
|
+ border-radius: 0.5rem;
|
|
|
+ font-weight: 600;
|
|
|
z-index: 1000;
|
|
|
animation: slideIn 0.3s ease-out;
|
|
|
+ transition: all 0.3s ease;
|
|
|
+ color: white;
|
|
|
}
|
|
|
|
|
|
.alert-info {
|
|
|
- background: #17a2b8;
|
|
|
+ background: #0ea5e9;
|
|
|
}
|
|
|
|
|
|
.alert-success {
|
|
|
- background: #28a745;
|
|
|
+ background: #22c55e;
|
|
|
}
|
|
|
|
|
|
.alert-warning {
|
|
|
- background: #ffc107;
|
|
|
- color: #212529;
|
|
|
+ background: #f59e0b;
|
|
|
}
|
|
|
|
|
|
.alert-error {
|
|
|
- background: #dc3545;
|
|
|
+ background: #ef4444;
|
|
|
}
|
|
|
|
|
|
@keyframes slideIn {
|
|
|
@@ -230,17 +320,28 @@ body {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/* 响应式设计 */
|
|
|
+/* Responsive design */
|
|
|
@media (max-width: 768px) {
|
|
|
.main-content {
|
|
|
grid-template-columns: 1fr;
|
|
|
}
|
|
|
|
|
|
.header h1 {
|
|
|
- font-size: 2em;
|
|
|
+ font-size: 2rem;
|
|
|
}
|
|
|
|
|
|
.btn-group {
|
|
|
flex-direction: column;
|
|
|
}
|
|
|
+
|
|
|
+ .theme-toggle {
|
|
|
+ top: 1rem;
|
|
|
+ right: 1rem;
|
|
|
+ width: 2rem;
|
|
|
+ height: 2rem;
|
|
|
+ }
|
|
|
+
|
|
|
+ .results-grid {
|
|
|
+ grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
|
+ }
|
|
|
}
|