|
|
@@ -1,84 +1,76 @@
|
|
|
-/* 伺服驱动选型工具 - 样式表 */
|
|
|
-* {
|
|
|
- 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;
|
|
|
+ font-family: 'Inter', sans-serif;
|
|
|
min-height: 100vh;
|
|
|
- padding: 20px;
|
|
|
- transition: background 0.3s ease;
|
|
|
+ transition: background-color 0.3s ease;
|
|
|
}
|
|
|
|
|
|
-/* 白昼模式 */
|
|
|
+/* Theme-specific styles */
|
|
|
body.light-mode {
|
|
|
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
|
+ --bg-primary: #ffffff;
|
|
|
+ --bg-secondary: #f8fafc;
|
|
|
+ --text-primary: #1e293b;
|
|
|
+ --text-secondary: #64748b;
|
|
|
+ --border-color: #e2e8f0;
|
|
|
+ --card-bg: #ffffff;
|
|
|
+ --button-primary: #3b82f6;
|
|
|
+ --button-primary-hover: #2563eb;
|
|
|
+ --button-secondary: #64748b;
|
|
|
+ --button-secondary-hover: #475569;
|
|
|
}
|
|
|
|
|
|
-/* 黑夜模式 */
|
|
|
body.dark-mode {
|
|
|
- background: linear-gradient(135deg, #2c3e50 0%, #1a1a2e 100%);
|
|
|
- color: #f0f0f0;
|
|
|
+ --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;
|
|
|
- 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;
|
|
|
- transition: background 0.3s ease;
|
|
|
-}
|
|
|
-
|
|
|
-/* 白昼模式容器 */
|
|
|
-body.light-mode .container {
|
|
|
- background: white;
|
|
|
-}
|
|
|
-
|
|
|
-/* 黑夜模式容器 */
|
|
|
-body.dark-mode .container {
|
|
|
- background: #2d3748;
|
|
|
+ background-color: var(--bg-primary);
|
|
|
}
|
|
|
|
|
|
.header {
|
|
|
- padding: 30px;
|
|
|
+ padding: 2rem;
|
|
|
text-align: center;
|
|
|
- transition: background 0.3s ease;
|
|
|
-}
|
|
|
-
|
|
|
-/* 白昼模式头部 */
|
|
|
-body.light-mode .header {
|
|
|
- background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
|
|
|
+ background: linear-gradient(135deg, #3b82f6, #8b5cf6);
|
|
|
color: white;
|
|
|
}
|
|
|
|
|
|
-/* 黑夜模式头部 */
|
|
|
-body.dark-mode .header {
|
|
|
- background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
|
|
|
- color: #f0f0f0;
|
|
|
-}
|
|
|
-
|
|
|
.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: 20px;
|
|
|
- right: 20px;
|
|
|
+ top: 1.5rem;
|
|
|
+ right: 1.5rem;
|
|
|
background: rgba(255, 255, 255, 0.2);
|
|
|
border: none;
|
|
|
border-radius: 50%;
|
|
|
- width: 40px;
|
|
|
- height: 40px;
|
|
|
+ width: 2.5rem;
|
|
|
+ height: 2.5rem;
|
|
|
cursor: pointer;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
@@ -100,279 +92,164 @@ body.dark-mode .theme-toggle:hover {
|
|
|
background: rgba(0, 0, 0, 0.3);
|
|
|
}
|
|
|
|
|
|
-.theme-toggle svg {
|
|
|
- width: 20px;
|
|
|
- height: 20px;
|
|
|
- fill: currentColor;
|
|
|
-}
|
|
|
-
|
|
|
.main-content {
|
|
|
display: grid;
|
|
|
grid-template-columns: 1fr 1fr;
|
|
|
- gap: 20px;
|
|
|
- padding: 30px;
|
|
|
+ gap: 1.25rem;
|
|
|
+ padding: 2rem;
|
|
|
}
|
|
|
|
|
|
.card {
|
|
|
- border-radius: 10px;
|
|
|
- padding: 20px;
|
|
|
- box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
|
|
- transition: background 0.3s ease;
|
|
|
-}
|
|
|
-
|
|
|
-/* 白昼模式卡片 */
|
|
|
-body.light-mode .card {
|
|
|
- background: #f8f9fa;
|
|
|
-}
|
|
|
-
|
|
|
-/* 黑夜模式卡片 */
|
|
|
-body.dark-mode .card {
|
|
|
- background: #4a5568;
|
|
|
+ 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);
|
|
|
}
|
|
|
|
|
|
.card h2 {
|
|
|
- margin-bottom: 20px;
|
|
|
- font-size: 1.5em;
|
|
|
- transition: color 0.3s ease;
|
|
|
-}
|
|
|
-
|
|
|
-/* 白昼模式标题 */
|
|
|
-body.light-mode .card h2 {
|
|
|
- color: #333;
|
|
|
-}
|
|
|
-
|
|
|
-/* 黑夜模式标题 */
|
|
|
-body.dark-mode .card h2 {
|
|
|
- color: #f0f0f0;
|
|
|
+ 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;
|
|
|
- transition: color 0.3s ease;
|
|
|
-}
|
|
|
-
|
|
|
-/* 白昼模式标签 */
|
|
|
-body.light-mode .form-group label {
|
|
|
- color: #555;
|
|
|
-}
|
|
|
-
|
|
|
-/* 黑夜模式标签 */
|
|
|
-body.dark-mode .form-group label {
|
|
|
- color: #e2e8f0;
|
|
|
+ margin-bottom: 0.25rem;
|
|
|
+ font-weight: 500;
|
|
|
+ color: var(--text-primary);
|
|
|
+ font-size: 0.875rem;
|
|
|
}
|
|
|
|
|
|
.form-control {
|
|
|
width: 100%;
|
|
|
- padding: 10px;
|
|
|
- border-radius: 5px;
|
|
|
- font-size: 14px;
|
|
|
+ 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;
|
|
|
}
|
|
|
|
|
|
-/* 白昼模式输入框 */
|
|
|
-body.light-mode .form-control {
|
|
|
- border: 2px solid #ddd;
|
|
|
- background: white;
|
|
|
- color: #333;
|
|
|
-}
|
|
|
-
|
|
|
-body.light-mode .form-control:focus {
|
|
|
+.form-control:focus {
|
|
|
outline: none;
|
|
|
- border-color: #4facfe;
|
|
|
-}
|
|
|
-
|
|
|
-/* 黑夜模式输入框 */
|
|
|
-body.dark-mode .form-control {
|
|
|
- border: 2px solid #4a5568;
|
|
|
- background: #2d3748;
|
|
|
- color: #f0f0f0;
|
|
|
-}
|
|
|
-
|
|
|
-body.dark-mode .form-control:focus {
|
|
|
- outline: none;
|
|
|
- border-color: #63b3ed;
|
|
|
+ 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;
|
|
|
}
|
|
|
|
|
|
-/* 白昼模式按钮 */
|
|
|
-body.light-mode .btn-primary {
|
|
|
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
|
- color: white;
|
|
|
-}
|
|
|
-
|
|
|
-body.light-mode .btn-primary:hover {
|
|
|
- transform: translateY(-2px);
|
|
|
- box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
|
|
|
-}
|
|
|
-
|
|
|
-body.light-mode .btn-secondary {
|
|
|
- background: #6c757d;
|
|
|
- color: white;
|
|
|
-}
|
|
|
-
|
|
|
-body.light-mode .btn-secondary:hover {
|
|
|
- background: #5a6268;
|
|
|
- transform: translateY(-2px);
|
|
|
-}
|
|
|
-
|
|
|
-/* 黑夜模式按钮 */
|
|
|
-body.dark-mode .btn-primary {
|
|
|
- background: linear-gradient(135deg, #4299e1 0%, #667eea 100%);
|
|
|
+.btn-primary {
|
|
|
+ background: linear-gradient(135deg, #3b82f6, #8b5cf6);
|
|
|
color: white;
|
|
|
+ box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
|
|
|
}
|
|
|
|
|
|
-body.dark-mode .btn-primary:hover {
|
|
|
+.btn-primary:hover {
|
|
|
transform: translateY(-2px);
|
|
|
- box-shadow: 0 5px 15px rgba(66, 153, 225, 0.4);
|
|
|
+ box-shadow: 0 6px 8px -1px rgba(59, 130, 246, 0.4);
|
|
|
}
|
|
|
|
|
|
-body.dark-mode .btn-secondary {
|
|
|
- background: #4a5568;
|
|
|
+.btn-secondary {
|
|
|
+ background-color: var(--button-secondary);
|
|
|
color: white;
|
|
|
- border: 1px solid #718096;
|
|
|
}
|
|
|
|
|
|
-body.dark-mode .btn-secondary:hover {
|
|
|
- background: #2d3748;
|
|
|
+.btn-secondary:hover {
|
|
|
+ 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 {
|
|
|
- padding: 15px;
|
|
|
- border-radius: 8px;
|
|
|
+ padding: 1rem;
|
|
|
+ border-radius: 0.5rem;
|
|
|
text-align: center;
|
|
|
+ background-color: var(--bg-secondary);
|
|
|
transition: all 0.3s ease;
|
|
|
}
|
|
|
|
|
|
-/* 白昼模式结果卡片 */
|
|
|
-body.light-mode .result-card {
|
|
|
- background: white;
|
|
|
- box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
|
-}
|
|
|
-
|
|
|
-/* 黑夜模式结果卡片 */
|
|
|
-body.dark-mode .result-card {
|
|
|
- background: #2d3748;
|
|
|
- box-shadow: 0 2px 8px rgba(0,0,0,0.3);
|
|
|
-}
|
|
|
-
|
|
|
.result-label {
|
|
|
- font-size: 12px;
|
|
|
- margin-bottom: 5px;
|
|
|
- transition: color 0.3s ease;
|
|
|
-}
|
|
|
-
|
|
|
-/* 白昼模式结果标签 */
|
|
|
-body.light-mode .result-label {
|
|
|
- color: #666;
|
|
|
-}
|
|
|
-
|
|
|
-/* 黑夜模式结果标签 */
|
|
|
-body.dark-mode .result-label {
|
|
|
- color: #cbd5e0;
|
|
|
+ font-size: 0.75rem;
|
|
|
+ margin-bottom: 0.25rem;
|
|
|
+ color: var(--text-secondary);
|
|
|
+ font-weight: 500;
|
|
|
}
|
|
|
|
|
|
.result-value {
|
|
|
- font-size: 18px;
|
|
|
- font-weight: bold;
|
|
|
- transition: color 0.3s ease;
|
|
|
-}
|
|
|
-
|
|
|
-/* 白昼模式结果值 */
|
|
|
-body.light-mode .result-value {
|
|
|
- color: #333;
|
|
|
-}
|
|
|
-
|
|
|
-/* 黑夜模式结果值 */
|
|
|
-body.dark-mode .result-value {
|
|
|
- color: #f0f0f0;
|
|
|
+ font-size: 1.125rem;
|
|
|
+ font-weight: 700;
|
|
|
+ color: var(--text-primary);
|
|
|
}
|
|
|
|
|
|
.placeholder {
|
|
|
font-style: italic;
|
|
|
text-align: center;
|
|
|
- padding: 20px;
|
|
|
- transition: color 0.3s ease;
|
|
|
-}
|
|
|
-
|
|
|
-/* 白昼模式占位符 */
|
|
|
-body.light-mode .placeholder {
|
|
|
- color: #999;
|
|
|
-}
|
|
|
-
|
|
|
-/* 黑夜模式占位符 */
|
|
|
-body.dark-mode .placeholder {
|
|
|
- color: #a0aec0;
|
|
|
+ padding: 1.25rem;
|
|
|
+ color: var(--text-secondary);
|
|
|
}
|
|
|
|
|
|
.warning {
|
|
|
- padding: 10px;
|
|
|
- border-radius: 5px;
|
|
|
- margin-top: 10px;
|
|
|
- transition: all 0.3s ease;
|
|
|
+ padding: 0.75rem;
|
|
|
+ border-radius: 0.5rem;
|
|
|
+ margin-top: 1rem;
|
|
|
+ background-color: #fffbeb;
|
|
|
+ color: #92400e;
|
|
|
+ border: 1px solid #fbbf24;
|
|
|
}
|
|
|
|
|
|
-/* 白昼模式警告 */
|
|
|
-body.light-mode .warning {
|
|
|
- background: #fff3cd;
|
|
|
- color: #856404;
|
|
|
-}
|
|
|
-
|
|
|
-/* 黑夜模式警告 */
|
|
|
body.dark-mode .warning {
|
|
|
- background: #553c00;
|
|
|
- color: #ffd700;
|
|
|
+ background-color: #451a03;
|
|
|
+ color: #fde68a;
|
|
|
+ border-color: #f59e0b;
|
|
|
}
|
|
|
|
|
|
.error {
|
|
|
- padding: 10px;
|
|
|
- border-radius: 5px;
|
|
|
- margin-top: 10px;
|
|
|
- transition: all 0.3s ease;
|
|
|
-}
|
|
|
-
|
|
|
-/* 白昼模式错误 */
|
|
|
-body.light-mode .error {
|
|
|
- background: #f8d7da;
|
|
|
- color: #721c24;
|
|
|
+ padding: 0.75rem;
|
|
|
+ border-radius: 0.5rem;
|
|
|
+ margin-top: 1rem;
|
|
|
+ background-color: #fef2f2;
|
|
|
+ color: #b91c1c;
|
|
|
+ border: 1px solid #f87171;
|
|
|
}
|
|
|
|
|
|
-/* 黑夜模式错误 */
|
|
|
body.dark-mode .error {
|
|
|
- background: #742a2a;
|
|
|
- color: #f8d7da;
|
|
|
+ background-color: #7f1d1d;
|
|
|
+ color: #fecaca;
|
|
|
+ border-color: #f87171;
|
|
|
}
|
|
|
|
|
|
.hidden {
|
|
|
@@ -385,51 +262,40 @@ body.dark-mode .error {
|
|
|
}
|
|
|
|
|
|
.guidance-section li {
|
|
|
- margin-bottom: 8px;
|
|
|
- padding: 8px;
|
|
|
- border-radius: 5px;
|
|
|
- transition: all 0.3s ease;
|
|
|
-}
|
|
|
-
|
|
|
-/* 白昼模式指导列表项 */
|
|
|
-body.light-mode .guidance-section li {
|
|
|
- background: white;
|
|
|
- box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
|
|
-}
|
|
|
-
|
|
|
-/* 黑夜模式指导列表项 */
|
|
|
-body.dark-mode .guidance-section li {
|
|
|
- background: #2d3748;
|
|
|
- box-shadow: 0 1px 3px rgba(0,0,0,0.3);
|
|
|
+ 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;
|
|
|
- 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 {
|
|
|
@@ -443,14 +309,14 @@ body.dark-mode .guidance-section li {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/* 响应式设计 */
|
|
|
+/* Responsive design */
|
|
|
@media (max-width: 768px) {
|
|
|
.main-content {
|
|
|
grid-template-columns: 1fr;
|
|
|
}
|
|
|
|
|
|
.header h1 {
|
|
|
- font-size: 2em;
|
|
|
+ font-size: 2rem;
|
|
|
}
|
|
|
|
|
|
.btn-group {
|
|
|
@@ -458,9 +324,13 @@ body.dark-mode .guidance-section li {
|
|
|
}
|
|
|
|
|
|
.theme-toggle {
|
|
|
- top: 15px;
|
|
|
- right: 15px;
|
|
|
- width: 35px;
|
|
|
- height: 35px;
|
|
|
+ top: 1rem;
|
|
|
+ right: 1rem;
|
|
|
+ width: 2rem;
|
|
|
+ height: 2rem;
|
|
|
+ }
|
|
|
+
|
|
|
+ .results-grid {
|
|
|
+ grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
|
}
|
|
|
}
|