stock-agent/web/static/css/style.css
2025-12-28 10:12:30 +08:00

743 lines
14 KiB
CSS

/* 全局重置和基础样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
line-height: 1.6;
color: #000000; /* 纯黑色文字确保最高对比度 */
background: #f8f9fa; /* 浅灰背景增加层次感 */
min-height: 100vh;
}
/* 导航栏 */
.navbar {
background: #ffffff;
border-bottom: 1px solid #e5e5e5;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
padding: 0 2rem;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.nav-container {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 1200px;
margin: 0 auto;
height: 60px;
}
.nav-brand {
display: flex;
align-items: center;
gap: 10px;
font-size: 1.4rem;
font-weight: 700;
color: #000000; /* 纯黑色确保清晰 */
}
.nav-menu {
display: flex;
gap: 1rem;
}
.nav-link {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
text-decoration: none;
color: #333333; /* 深灰色确保在白底上清晰可见 */
border-radius: 6px;
transition: all 0.2s ease;
font-weight: 500;
font-size: 0.9rem;
}
.nav-link:hover, .nav-link.active {
background: #f0f0f0;
color: #000000; /* 悬停时变为纯黑 */
}
/* 主容器 */
.main-container {
margin-top: 80px;
padding: 2rem;
max-width: 1200px;
margin-left: auto;
margin-right: auto;
}
/* 页面标题 */
.page-header {
text-align: center;
margin-bottom: 3rem;
color: #000000; /* 标题用纯黑色 */
}
.page-header h1 {
font-size: 2.2rem;
font-weight: 600;
margin-bottom: 0.5rem;
letter-spacing: -0.02em;
color: #000000; /* 确保标题清晰 */
}
.page-header p {
font-size: 1rem;
color: #444444; /* 副标题用深灰色 */
max-width: 600px;
margin: 0 auto;
}
/* 卡片样式 */
.card {
background: #fafafa; /* 更浅的背景色 */
border-radius: 8px;
padding: 1.5rem;
margin-bottom: 1.5rem;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* 更轻的阴影 */
border: 1px solid #f0f0f0; /* 更浅的边框 */
transition: box-shadow 0.2s ease;
}
.card:hover {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* 悬停时稍微深一点 */
}
.card-header {
margin-bottom: 1.5rem;
padding-bottom: 1rem;
border-bottom: 1px solid #f0f0f0;
}
.card-header h3 {
font-size: 1.2rem;
font-weight: 600;
color: #000000; /* 卡片标题用纯黑色 */
}
/* 表单样式 */
.form-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 2rem;
margin-bottom: 2rem;
}
.form-group {
display: flex;
flex-direction: column;
}
.form-group label {
font-weight: 600;
color: #000000; /* 表单标签用纯黑色 */
margin-bottom: 6px;
font-size: 0.9rem;
}
.form-input, .form-select {
padding: 10px 12px;
border: 1px solid #ccc; /* 更深的边框确保可见 */
border-radius: 6px;
font-size: 0.9rem;
transition: border-color 0.2s ease;
background: #ffffff;
color: #000000; /* 输入文字用纯黑色 */
}
.form-input:focus, .form-select:focus {
outline: none;
border-color: #000000; /* 聚焦时黑色边框 */
}
.form-range {
width: 100%;
height: 8px;
border-radius: 5px;
background: #e2e8f0;
outline: none;
-webkit-appearance: none;
margin-bottom: 8px;
}
.form-range::-webkit-slider-thumb {
appearance: none;
width: 16px;
height: 16px;
border-radius: 50%;
background: #000000; /* 纯黑色 */
cursor: pointer;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); /* 简单阴影 */
}
.form-range::-moz-range-thumb {
width: 16px;
height: 16px;
border-radius: 50%;
background: #000000; /* 纯黑色 */
cursor: pointer;
border: none;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); /* 简单阴影 */
}
.range-value {
font-weight: 600;
color: #000000; /* 纯黑色 */
text-align: center;
}
/* 按钮样式 */
.btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 20px;
border: none;
border-radius: 6px;
font-size: 0.9rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
text-decoration: none;
justify-content: center;
}
.btn-primary {
background: #1a1a1a;
color: #ffffff;
}
.btn-primary:hover {
background: #333333;
}
.btn-primary:active {
background: #0d0d0d;
}
/* 指标卡片 */
.metrics-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
}
.metric-card {
background: #fafafa; /* 与主卡片保持一致的浅背景 */
border-radius: 8px;
padding: 1.5rem;
text-align: center;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* 更轻的阴影 */
border: 1px solid #f0f0f0; /* 更浅的边框 */
transition: box-shadow 0.2s ease;
}
.metric-card:hover {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* 悬停时稍微深一点 */
}
.metric-icon {
font-size: 1.8rem;
margin-bottom: 0.8rem;
}
.metric-value {
font-size: 1.6rem;
font-weight: 700;
color: #000000; /* 指标数值用纯黑色 */
margin-bottom: 0.3rem;
}
.metric-label {
color: #333333; /* 指标标签用深灰色 */
font-weight: 500;
font-size: 0.9rem;
}
/* 图表容器 */
.charts-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
gap: 2rem;
margin-top: 2rem;
}
.chart-container {
background: #fafafa; /* 与其他卡片保持一致 */
border-radius: 8px;
padding: 1.5rem;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* 更轻的阴影 */
border: 1px solid #f0f0f0; /* 更浅的边框 */
}
/* 对比网格 */
.comparison-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
}
/* 表格样式 */
.data-table {
width: 100%;
border-collapse: collapse;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
margin-bottom: 2rem;
border: 1px solid #e5e5e5;
}
.data-table th {
background: #000000; /* 表头用纯黑背景 */
color: #ffffff;
padding: 12px 16px;
text-align: left;
font-weight: 600;
font-size: 0.9rem;
}
.data-table td {
padding: 12px 16px;
border-bottom: 1px solid #f0f0f0; /* 更浅的分隔线 */
background: #fafafa; /* 与卡片背景一致 */
color: #000000; /* 表格内容用纯黑色 */
font-size: 0.9rem;
}
.data-table tr:hover td {
background: #f0f0f0; /* 悬停时稍微深一点 */
color: #000000;
}
/* 选项卡内容 */
.tab-content {
display: none;
animation: fadeIn 0.3s ease;
}
.tab-content.active {
display: block;
}
.results-section {
animation: slideUp 0.5s ease;
}
/* 加载动画 */
.loading-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.95);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 2000;
color: #000000; /* 加载文字用纯黑色 */
}
.spinner {
width: 40px;
height: 40px;
border: 3px solid #e0e0e0;
border-top: 3px solid #000000; /* 旋转部分用黑色 */
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 1rem;
}
/* Toast 通知 */
#toast-container {
position: fixed;
top: 100px;
right: 2rem;
z-index: 3000;
}
.toast {
background: #fafafa; /* 与卡片背景一致 */
padding: 12px 16px;
border-radius: 6px;
margin-bottom: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 稍微明显的阴影 */
border: 1px solid #f0f0f0; /* 与其他元素一致的边框 */
border-left: 3px solid #000000; /* 左边框用黑色 */
animation: slideInRight 0.3s ease;
max-width: 300px;
font-size: 0.9rem;
color: #000000; /* Toast文字用纯黑色 */
}
.toast.success {
border-left-color: #22c55e;
}
.toast.error {
border-left-color: #ef4444;
}
.toast.warning {
border-left-color: #f59e0b;
}
/* 动画 */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slideInRight {
from {
opacity: 0;
transform: translateX(100%);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* 响应式设计 */
@media (max-width: 768px) {
.navbar {
padding: 0 1rem;
}
.nav-container {
height: 60px;
}
.nav-brand {
font-size: 1.2rem;
}
.nav-menu {
gap: 1rem;
}
.nav-link {
padding: 8px 12px;
font-size: 0.9rem;
}
.main-container {
margin-top: 80px;
padding: 1rem;
}
.page-header h1 {
font-size: 2rem;
}
.page-header p {
font-size: 1rem;
}
.card {
padding: 1.5rem;
}
.form-grid {
grid-template-columns: 1fr;
gap: 1rem;
}
.charts-grid {
grid-template-columns: 1fr;
gap: 1rem;
}
.metrics-grid {
grid-template-columns: 1fr;
gap: 1rem;
}
.comparison-grid {
grid-template-columns: 1fr;
gap: 1rem;
}
#toast-container {
right: 1rem;
left: 1rem;
top: 80px;
}
.toast {
max-width: none;
}
}
@media (max-width: 480px) {
.nav-menu {
flex-direction: column;
gap: 0.5rem;
}
.nav-link {
padding: 6px 10px;
font-size: 0.8rem;
}
.btn {
padding: 12px 24px;
font-size: 0.9rem;
}
.metric-value {
font-size: 1.5rem;
}
}
/* 综合分析页面特殊样式 */
.analysis-input-section {
display: flex;
align-items: flex-end;
gap: 1.5rem;
margin-bottom: 1.5rem;
padding: 1.5rem;
background: #f8f9fa;
border-radius: 10px;
border: 1px solid #e9ecef;
}
.input-wrapper {
flex: 1;
min-width: 200px;
}
.input-wrapper label {
display: block;
margin-bottom: 0.5rem;
font-weight: 600;
color: #000000;
}
.input-hint {
display: block;
margin-top: 0.25rem;
color: #6c757d;
font-size: 0.875rem;
}
.analysis-btn {
padding: 12px 24px !important;
font-size: 1rem !important;
font-weight: 600 !important;
min-width: 180px;
height: auto;
white-space: nowrap;
margin-top: 0;
}
.analysis-info {
padding-top: 1rem;
border-top: 1px solid #e9ecef;
}
.info-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
margin-bottom: 1rem;
}
.info-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 1rem;
background: #ffffff;
border-radius: 8px;
border: 1px solid #e9ecef;
transition: all 0.2s ease;
}
.info-item:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
border-color: #000000;
}
.info-item i {
font-size: 1.2rem;
color: #000000;
width: 20px;
text-align: center;
}
.info-item span {
font-weight: 600;
color: #000000;
}
.analysis-desc {
text-align: center;
color: #6c757d;
font-size: 0.9rem;
margin: 0;
font-style: italic;
}
/* 响应式适配 */
@media (max-width: 768px) {
.analysis-input-section {
flex-direction: column;
align-items: stretch;
gap: 1rem;
}
.input-wrapper {
flex: none;
}
.analysis-btn {
width: 100%;
}
.info-grid {
grid-template-columns: 1fr;
gap: 0.5rem;
}
}
/* 股票筛选页面特殊样式 */
.screening-info-main {
background: #f8f9fa;
border-radius: 10px;
padding: 1.5rem;
border: 1px solid #e9ecef;
}
.screening-criteria {
display: flex;
justify-content: center;
gap: 2rem;
flex-wrap: wrap;
margin-bottom: 1.5rem;
}
.criteria-item {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1rem;
background: #ffffff;
border-radius: 6px;
border: 1px solid #e9ecef;
font-weight: 500;
color: #000000;
}
.criteria-item i {
color: #007bff;
font-size: 1rem;
}
.strategy-overview {
margin-top: 1.5rem;
padding-top: 1.5rem;
border-top: 1px solid #e9ecef;
}
.strategy-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
margin-bottom: 1rem;
}
.strategy-item {
display: flex;
align-items: center;
gap: 1rem;
padding: 1.25rem;
background: #ffffff;
border-radius: 8px;
border: 1px solid #e9ecef;
transition: all 0.2s ease;
}
.strategy-item:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
border-color: #000000;
}
.strategy-item i {
font-size: 1.5rem;
color: #000000;
width: 24px;
text-align: center;
}
.strategy-info h4 {
margin: 0 0 0.25rem 0;
font-size: 1rem;
font-weight: 600;
color: #000000;
}
.strategy-info p {
margin: 0;
font-size: 0.875rem;
color: #6c757d;
}
@media (max-width: 768px) {
.screening-criteria {
flex-direction: column;
gap: 0.75rem;
align-items: center;
}
.criteria-item {
width: 100%;
justify-content: center;
}
.strategy-grid {
grid-template-columns: 1fr;
gap: 0.75rem;
}
.strategy-item {
padding: 1rem;
}
.strategy-item i {
font-size: 1.25rem;
}
}