/* 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: 'Inter', sans-serif; min-height: 100vh; 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; 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 { padding: 2rem; text-align: center; background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: white; } .header h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem; } .subtitle { 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: 1.25rem; padding: 2rem; } .card { 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 { margin-bottom: 1.25rem; font-size: 1.5rem; font-weight: 600; color: var(--text-primary); } .form-group { margin-bottom: 1rem; } .form-group label { display: block; margin-bottom: 0.25rem; font-weight: 500; color: var(--text-primary); font-size: 0.875rem; } .form-control { width: 100%; 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: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); } .form-control.error { border-color: #ef4444; } .btn-group { display: flex; gap: 0.75rem; margin-top: 1.25rem; flex-wrap: wrap; } .btn { padding: 0.5rem 1rem; border: none; border-radius: 0.375rem; cursor: pointer; 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, #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 6px 8px -1px rgba(59, 130, 246, 0.4); } .btn-secondary { background-color: var(--button-secondary); color: white; } .btn-secondary:hover { background-color: var(--button-secondary-hover); transform: translateY(-2px); } .results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-top: 1rem; } .result-card { padding: 1rem; border-radius: 0.5rem; text-align: center; background-color: var(--bg-secondary); transition: all 0.3s ease; } .result-label { font-size: 0.75rem; margin-bottom: 0.25rem; color: var(--text-secondary); font-weight: 500; } .result-value { font-size: 1.125rem; font-weight: 700; color: var(--text-primary); } .placeholder { font-style: italic; text-align: center; padding: 1.25rem; color: var(--text-secondary); } .warning { 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 { 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 { display: none !important; } .guidance-section ul { list-style-type: none; padding-left: 0; } .guidance-section li { margin-bottom: 0.5rem; padding: 0.5rem; border-radius: 0.5rem; background-color: var(--bg-secondary); font-size: 0.875rem; } .alert { position: fixed; 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: #0ea5e9; } .alert-success { background: #22c55e; } .alert-warning { background: #f59e0b; } .alert-error { background: #ef4444; } @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } /* Responsive design */ @media (max-width: 768px) { .main-content { grid-template-columns: 1fr; } .header h1 { 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)); } }