403 lines
8.3 KiB
CSS
403 lines
8.3 KiB
CSS
|
|
/* 现代环保主题 - 简约高级风格 */
|
||
|
|
:root {
|
||
|
|
/* 主色调 - 自然环保色系 */
|
||
|
|
--eco-primary: #059669; /* 森林绿 */
|
||
|
|
--eco-primary-light: #10b981; /* 清新绿 */
|
||
|
|
--eco-primary-dark: #047857; /* 深森林绿 */
|
||
|
|
|
||
|
|
/* 辅助色 - 天空与海洋 */
|
||
|
|
--eco-secondary: #0ea5e9; /* 天空蓝 */
|
||
|
|
--eco-secondary-light: #38bdf8; /* 清澈蓝 */
|
||
|
|
--eco-secondary-dark: #0284c7; /* 深海蓝 */
|
||
|
|
|
||
|
|
/* 强调色 - 阳光与生命 */
|
||
|
|
--eco-accent: #f59e0b; /* 暖阳橙 */
|
||
|
|
--eco-accent-light: #fbbf24; /* 明亮橙 */
|
||
|
|
|
||
|
|
/* 中性色 - 现代灰度系统 */
|
||
|
|
--neutral-50: #fafafa;
|
||
|
|
--neutral-100: #f5f5f5;
|
||
|
|
--neutral-200: #e5e5e5;
|
||
|
|
--neutral-300: #d4d4d4;
|
||
|
|
--neutral-400: #a3a3a3;
|
||
|
|
--neutral-500: #737373;
|
||
|
|
--neutral-600: #525252;
|
||
|
|
--neutral-700: #404040;
|
||
|
|
--neutral-800: #262626;
|
||
|
|
--neutral-900: #171717;
|
||
|
|
|
||
|
|
/* 背景色系 */
|
||
|
|
--bg-primary: #ffffff;
|
||
|
|
--bg-secondary: #f8fafc;
|
||
|
|
--bg-tertiary: #f1f5f9;
|
||
|
|
--bg-accent: #ecfdf5;
|
||
|
|
|
||
|
|
/* 文字色系 */
|
||
|
|
--text-primary: #1f2937;
|
||
|
|
--text-secondary: #6b7280;
|
||
|
|
--text-muted: #9ca3af;
|
||
|
|
--text-inverse: #ffffff;
|
||
|
|
|
||
|
|
/* 状态色 */
|
||
|
|
--success: #10b981;
|
||
|
|
--warning: #f59e0b;
|
||
|
|
--error: #ef4444;
|
||
|
|
--info: #3b82f6;
|
||
|
|
|
||
|
|
/* 阴影系统 */
|
||
|
|
--shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
||
|
|
--shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
||
|
|
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
||
|
|
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
||
|
|
--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
|
||
|
|
--shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
|
||
|
|
|
||
|
|
/* 圆角系统 */
|
||
|
|
--radius-xs: 0.125rem; /* 2px */
|
||
|
|
--radius-sm: 0.25rem; /* 4px */
|
||
|
|
--radius-md: 0.375rem; /* 6px */
|
||
|
|
--radius-lg: 0.5rem; /* 8px */
|
||
|
|
--radius-xl: 0.75rem; /* 12px */
|
||
|
|
--radius-2xl: 1rem; /* 16px */
|
||
|
|
--radius-3xl: 1.5rem; /* 24px */
|
||
|
|
--radius-full: 9999px;
|
||
|
|
|
||
|
|
/* 字体系统 */
|
||
|
|
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||
|
|
--font-display: 'Inter', sans-serif;
|
||
|
|
--font-mono: 'JetBrains Mono', 'Fira Code', monospace;
|
||
|
|
|
||
|
|
/* 字重 */
|
||
|
|
--font-light: 300;
|
||
|
|
--font-normal: 400;
|
||
|
|
--font-medium: 500;
|
||
|
|
--font-semibold: 600;
|
||
|
|
--font-bold: 700;
|
||
|
|
--font-black: 900;
|
||
|
|
|
||
|
|
/* 字号系统 */
|
||
|
|
--text-xs: 0.75rem; /* 12px */
|
||
|
|
--text-sm: 0.875rem; /* 14px */
|
||
|
|
--text-base: 1rem; /* 16px */
|
||
|
|
--text-lg: 1.125rem; /* 18px */
|
||
|
|
--text-xl: 1.25rem; /* 20px */
|
||
|
|
--text-2xl: 1.5rem; /* 24px */
|
||
|
|
--text-3xl: 1.875rem; /* 30px */
|
||
|
|
--text-4xl: 2.25rem; /* 36px */
|
||
|
|
--text-5xl: 3rem; /* 48px */
|
||
|
|
--text-6xl: 3.75rem; /* 60px */
|
||
|
|
--text-7xl: 4.5rem; /* 72px */
|
||
|
|
|
||
|
|
/* 间距系统 */
|
||
|
|
--space-1: 0.25rem; /* 4px */
|
||
|
|
--space-2: 0.5rem; /* 8px */
|
||
|
|
--space-3: 0.75rem; /* 12px */
|
||
|
|
--space-4: 1rem; /* 16px */
|
||
|
|
--space-5: 1.25rem; /* 20px */
|
||
|
|
--space-6: 1.5rem; /* 24px */
|
||
|
|
--space-8: 2rem; /* 32px */
|
||
|
|
--space-10: 2.5rem; /* 40px */
|
||
|
|
--space-12: 3rem; /* 48px */
|
||
|
|
--space-16: 4rem; /* 64px */
|
||
|
|
--space-20: 5rem; /* 80px */
|
||
|
|
--space-24: 6rem; /* 96px */
|
||
|
|
--space-32: 8rem; /* 128px */
|
||
|
|
|
||
|
|
/* 动画曲线 */
|
||
|
|
--ease-in: cubic-bezier(0.4, 0, 1, 1);
|
||
|
|
--ease-out: cubic-bezier(0, 0, 0.2, 1);
|
||
|
|
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
||
|
|
--ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
||
|
|
|
||
|
|
/* 断点 */
|
||
|
|
--breakpoint-sm: 640px;
|
||
|
|
--breakpoint-md: 768px;
|
||
|
|
--breakpoint-lg: 1024px;
|
||
|
|
--breakpoint-xl: 1280px;
|
||
|
|
--breakpoint-2xl: 1536px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 全局样式重置 */
|
||
|
|
* {
|
||
|
|
margin: 0;
|
||
|
|
padding: 0;
|
||
|
|
box-sizing: border-box;
|
||
|
|
}
|
||
|
|
|
||
|
|
*::before,
|
||
|
|
*::after {
|
||
|
|
box-sizing: border-box;
|
||
|
|
}
|
||
|
|
|
||
|
|
html {
|
||
|
|
font-size: 16px;
|
||
|
|
scroll-behavior: smooth;
|
||
|
|
-webkit-text-size-adjust: 100%;
|
||
|
|
tab-size: 4;
|
||
|
|
}
|
||
|
|
|
||
|
|
body {
|
||
|
|
font-family: var(--font-sans);
|
||
|
|
font-weight: var(--font-normal);
|
||
|
|
color: var(--text-primary);
|
||
|
|
background-color: var(--bg-primary);
|
||
|
|
line-height: 1.6;
|
||
|
|
-webkit-font-smoothing: antialiased;
|
||
|
|
-moz-osx-font-smoothing: grayscale;
|
||
|
|
text-rendering: optimizeLegibility;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 文字选择 */
|
||
|
|
::selection {
|
||
|
|
background-color: var(--eco-primary-light);
|
||
|
|
color: var(--text-inverse);
|
||
|
|
}
|
||
|
|
|
||
|
|
::-moz-selection {
|
||
|
|
background-color: var(--eco-primary-light);
|
||
|
|
color: var(--text-inverse);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 滚动条样式 */
|
||
|
|
::-webkit-scrollbar {
|
||
|
|
width: 6px;
|
||
|
|
height: 6px;
|
||
|
|
}
|
||
|
|
|
||
|
|
::-webkit-scrollbar-track {
|
||
|
|
background: var(--neutral-100);
|
||
|
|
}
|
||
|
|
|
||
|
|
::-webkit-scrollbar-thumb {
|
||
|
|
background: var(--eco-primary);
|
||
|
|
border-radius: var(--radius-full);
|
||
|
|
}
|
||
|
|
|
||
|
|
::-webkit-scrollbar-thumb:hover {
|
||
|
|
background: var(--eco-primary-dark);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 焦点样式 */
|
||
|
|
:focus-visible {
|
||
|
|
outline: 2px solid var(--eco-primary);
|
||
|
|
outline-offset: 2px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 链接样式 */
|
||
|
|
a {
|
||
|
|
color: var(--eco-primary);
|
||
|
|
text-decoration: none;
|
||
|
|
transition: color 0.2s var(--ease-out);
|
||
|
|
}
|
||
|
|
|
||
|
|
a:hover {
|
||
|
|
color: var(--eco-primary-dark);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 按钮基础样式 */
|
||
|
|
button {
|
||
|
|
font-family: inherit;
|
||
|
|
cursor: pointer;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 图片响应式 */
|
||
|
|
img {
|
||
|
|
max-width: 100%;
|
||
|
|
height: auto;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 实用类 */
|
||
|
|
.sr-only {
|
||
|
|
position: absolute;
|
||
|
|
width: 1px;
|
||
|
|
height: 1px;
|
||
|
|
padding: 0;
|
||
|
|
margin: -1px;
|
||
|
|
overflow: hidden;
|
||
|
|
clip: rect(0, 0, 0, 0);
|
||
|
|
white-space: nowrap;
|
||
|
|
border: 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
.container {
|
||
|
|
max-width: 1200px;
|
||
|
|
margin: 0 auto;
|
||
|
|
padding: 0 var(--space-6);
|
||
|
|
}
|
||
|
|
|
||
|
|
@media (min-width: 640px) {
|
||
|
|
.container {
|
||
|
|
padding: 0 var(--space-8);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 环保主题特色类 */
|
||
|
|
.eco-gradient {
|
||
|
|
background: linear-gradient(135deg, var(--eco-primary), var(--eco-secondary));
|
||
|
|
}
|
||
|
|
|
||
|
|
.eco-gradient-light {
|
||
|
|
background: linear-gradient(135deg, var(--eco-primary-light), var(--eco-secondary-light));
|
||
|
|
}
|
||
|
|
|
||
|
|
.eco-text-gradient {
|
||
|
|
background: linear-gradient(135deg, var(--eco-primary), var(--eco-secondary));
|
||
|
|
-webkit-background-clip: text;
|
||
|
|
-webkit-text-fill-color: transparent;
|
||
|
|
background-clip: text;
|
||
|
|
}
|
||
|
|
|
||
|
|
.eco-card {
|
||
|
|
background: var(--bg-primary);
|
||
|
|
border-radius: var(--radius-xl);
|
||
|
|
box-shadow: var(--shadow-md);
|
||
|
|
transition: all 0.3s var(--ease-out);
|
||
|
|
}
|
||
|
|
|
||
|
|
.eco-card:hover {
|
||
|
|
box-shadow: var(--shadow-xl);
|
||
|
|
transform: translateY(-2px);
|
||
|
|
}
|
||
|
|
|
||
|
|
.eco-btn {
|
||
|
|
display: inline-flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
padding: var(--space-3) var(--space-6);
|
||
|
|
background: var(--eco-primary);
|
||
|
|
color: var(--text-inverse);
|
||
|
|
border: none;
|
||
|
|
border-radius: var(--radius-lg);
|
||
|
|
font-weight: var(--font-medium);
|
||
|
|
transition: all 0.2s var(--ease-out);
|
||
|
|
cursor: pointer;
|
||
|
|
}
|
||
|
|
|
||
|
|
.eco-btn:hover {
|
||
|
|
background: var(--eco-primary-dark);
|
||
|
|
transform: translateY(-1px);
|
||
|
|
box-shadow: var(--shadow-lg);
|
||
|
|
}
|
||
|
|
|
||
|
|
.eco-btn:active {
|
||
|
|
transform: translateY(0);
|
||
|
|
}
|
||
|
|
|
||
|
|
.eco-btn-outline {
|
||
|
|
background: transparent;
|
||
|
|
color: var(--eco-primary);
|
||
|
|
border: 2px solid var(--eco-primary);
|
||
|
|
}
|
||
|
|
|
||
|
|
.eco-btn-outline:hover {
|
||
|
|
background: var(--eco-primary);
|
||
|
|
color: var(--text-inverse);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 动画类 */
|
||
|
|
.animate-fade-in {
|
||
|
|
animation: fadeIn 0.6s var(--ease-out);
|
||
|
|
}
|
||
|
|
|
||
|
|
.animate-slide-up {
|
||
|
|
animation: slideUp 0.6s var(--ease-out);
|
||
|
|
}
|
||
|
|
|
||
|
|
.animate-slide-down {
|
||
|
|
animation: slideDown 0.6s var(--ease-out);
|
||
|
|
}
|
||
|
|
|
||
|
|
.animate-scale-in {
|
||
|
|
animation: scaleIn 0.3s var(--ease-out);
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes fadeIn {
|
||
|
|
from {
|
||
|
|
opacity: 0;
|
||
|
|
}
|
||
|
|
to {
|
||
|
|
opacity: 1;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes slideUp {
|
||
|
|
from {
|
||
|
|
opacity: 0;
|
||
|
|
transform: translateY(20px);
|
||
|
|
}
|
||
|
|
to {
|
||
|
|
opacity: 1;
|
||
|
|
transform: translateY(0);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes slideDown {
|
||
|
|
from {
|
||
|
|
opacity: 0;
|
||
|
|
transform: translateY(-20px);
|
||
|
|
}
|
||
|
|
to {
|
||
|
|
opacity: 1;
|
||
|
|
transform: translateY(0);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes scaleIn {
|
||
|
|
from {
|
||
|
|
opacity: 0;
|
||
|
|
transform: scale(0.9);
|
||
|
|
}
|
||
|
|
to {
|
||
|
|
opacity: 1;
|
||
|
|
transform: scale(1);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 响应式工具类 */
|
||
|
|
.hidden {
|
||
|
|
display: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
@media (min-width: 768px) {
|
||
|
|
.md\\:block {
|
||
|
|
display: block;
|
||
|
|
}
|
||
|
|
|
||
|
|
.md\\:hidden {
|
||
|
|
display: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.md\\:flex {
|
||
|
|
display: flex;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 暗色模式支持 */
|
||
|
|
@media (prefers-color-scheme: dark) {
|
||
|
|
:root {
|
||
|
|
--bg-primary: #0f172a;
|
||
|
|
--bg-secondary: #1e293b;
|
||
|
|
--bg-tertiary: #334155;
|
||
|
|
--bg-accent: #064e3b;
|
||
|
|
|
||
|
|
--text-primary: #f1f5f9;
|
||
|
|
--text-secondary: #cbd5e1;
|
||
|
|
--text-muted: #94a3b8;
|
||
|
|
|
||
|
|
--neutral-100: #334155;
|
||
|
|
--neutral-200: #475569;
|
||
|
|
--neutral-300: #64748b;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 偏好减少动画 */
|
||
|
|
@media (prefers-reduced-motion: reduce) {
|
||
|
|
*,
|
||
|
|
*::before,
|
||
|
|
*::after {
|
||
|
|
animation-duration: 0.01ms !important;
|
||
|
|
animation-iteration-count: 1 !important;
|
||
|
|
transition-duration: 0.01ms !important;
|
||
|
|
scroll-behavior: auto !important;
|
||
|
|
}
|
||
|
|
}
|