Files
InsightRadar/frontend/src/assets/main.css
T

280 lines
6.7 KiB
CSS

@import url(./font.css);
/* =========================================
1. 现代 SaaS 风格高级主题变量
========================================= */
:root {
/* 明亮模式 - 高级极简白与冷灰,去除了单调的死白 */
--bg-base: #f4f6f8;
--bg-surface: rgba(255, 255, 255, 0.85); /* 半透明表面,为毛玻璃效果打基础 */
--bg-input: #ffffff;
--bg-hover: rgba(0, 0, 0, 0.04);
--border-subtle: rgba(0, 0, 0, 0.08);
--border-strong: rgba(0, 0, 0, 0.15);
--text-primary: #111827;
--text-secondary: #4b5563;
--text-placeholder: #9ca3af;
/* 品牌色优化:更具高级感的靛蓝色 */
--brand-primary: #4338ca;
--brand-primary-hover: #3730a3;
--brand-primary-alpha: rgba(67, 56, 202, 0.08);
--status-error: #ef4444;
--status-success: #10b981;
/* 现代柔和长弥散阴影(Apple 风格) */
--shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
--shadow-md: 0 4px 12px rgba(0,0,0,0.04), 0 2px 4px rgba(0,0,0,0.02);
--shadow-xl: 0 20px 40px rgba(0,0,0,0.08), 0 8px 16px rgba(0,0,0,0.04);
--radius-sm: 6px;
--radius-md: 10px;
--radius-lg: 14px;
--radius-xl: 20px;
--backdrop-blur: blur(12px);
}
html.dark {
/* 暗黑模式 - 纯粹的深邃黑与极光蓝 */
--bg-base: #09090b;
--bg-surface: rgba(24, 24, 27, 0.7);
--bg-input: rgba(255, 255, 255, 0.05);
--bg-hover: rgba(255, 255, 255, 0.1);
--border-subtle: rgba(255, 255, 255, 0.1);
--border-strong: rgba(255, 255, 255, 0.2);
--text-primary: #f9fafb;
--text-secondary: #a1a1aa;
--text-placeholder: #52525b;
--brand-primary: #818cf8;
--brand-primary-hover: #a5b4fc;
--brand-primary-alpha: rgba(129, 140, 248, 0.15);
--status-error: #f87171;
/* 深色模式需要更强的光效阴影 */
--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
--shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6), 0 8px 16px rgba(0, 0, 0, 0.4);
}
/* =========================================
滚动条美化
========================================= */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--border-strong);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--text-placeholder);
}
/* =========================================
2. 全局重置与排版基准
========================================= */
*, *::before, *::after {
box-sizing: border-box;
}
html, body {
margin: 0;
padding: 0;
min-height: 100vh;
/* 优化字体渲染,让文字显得更纤细高级 */
font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background-color: var(--bg-base);
color: var(--text-primary);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
letter-spacing: 0.01em;
}
#app {
min-height: 100vh;
background: transparent;
position: relative;
z-index: 1;
}
a {
color: inherit;
text-decoration: none;
}
button {
cursor: pointer;
border: none;
background: none;
font-family: inherit;
outline: none;
}
/* =========================================
高级背景环境光与数据网格 (极简唯美风)
========================================= */
body::before {
content: '';
position: fixed;
inset: 0;
z-index: -2;
/* 高级细腻的点阵网格 */
background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
background-size: 28px 28px;
mask-image: radial-gradient(ellipse 80% 80% at 50% -10%, black 10%, transparent 80%);
-webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% -10%, black 10%, transparent 80%);
opacity: 0.3;
pointer-events: none;
}
html.dark body::before {
opacity: 0.15;
}
/* 更为克制的极光呼吸环境光 */
body::after {
content: '';
position: fixed;
top: -60%;
left: -30%;
right: -30%;
height: 120vh;
z-index: -3;
background: radial-gradient(ellipse at bottom, var(--brand-primary-alpha) 0%, transparent 50%);
opacity: 0.5;
pointer-events: none;
animation: ambient-pulse 10s ease-in-out infinite alternate;
}
@keyframes ambient-pulse {
0% {
transform: scale(1) translateY(0);
opacity: 0.3;
}
100% {
transform: scale(1.05) translateY(-2%);
opacity: 0.6;
}
}
/* =========================================
3. 现代表单控件体系 (磨砂与无边框风格)
========================================= */
.input-group {
display: flex;
flex-direction: column;
gap: 10px;
margin-bottom: 22px;
}
.input-label {
font-size: 13px;
font-weight: 600;
color: var(--text-primary);
letter-spacing: 0.03em;
}
.input-wrapper {
position: relative;
display: flex;
align-items: center;
}
.input-field {
width: 100%;
padding: 14px 16px;
background-color: var(--bg-input);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-md);
color: var(--text-primary);
font-size: 15px;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
.input-field::placeholder {
color: var(--text-placeholder);
font-weight: 400;
}
.input-field:hover {
border-color: var(--border-strong);
}
.input-field:focus {
outline: none;
border-color: var(--brand-primary);
box-shadow: 0 0 0 4px var(--brand-primary-alpha), inset 0 1px 2px rgba(0,0,0,0.02);
background-color: var(--bg-surface);
}
.input-action-btn {
position: absolute;
right: 12px;
font-size: 13px;
font-weight: 600;
color: var(--brand-primary);
padding: 6px 10px;
border-radius: var(--radius-sm);
transition: all 0.2s ease;
}
.input-action-btn:hover:not(:disabled) {
background: var(--brand-primary-alpha);
}
.input-action-btn:disabled {
color: var(--text-placeholder);
cursor: not-allowed;
}
/* 主按钮的高级拟物渐变效果 */
.btn-primary {
width: 100%;
padding: 14px;
background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-hover) 100%);
color: #ffffff;
font-size: 15px;
font-weight: 600;
letter-spacing: 0.02em;
border-radius: var(--radius-md);
border: 1px solid rgba(255,255,255,0.1);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 4px 12px var(--brand-primary-alpha);
text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.btn-primary:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 8px 20px var(--brand-primary-alpha);
filter: brightness(1.1);
}
.btn-primary:active:not(:disabled) {
transform: translateY(0);
box-shadow: 0 2px 8px var(--brand-primary-alpha);
}
.btn-primary:disabled {
background: var(--bg-input);
color: var(--text-placeholder);
border-color: var(--border-subtle);
box-shadow: none;
text-shadow: none;
cursor: not-allowed;
}