Files
gemini-banlancer/web/static/css/style.css
2025-11-20 12:12:26 +08:00

161 lines
3.4 KiB
CSS

/* Filename: web/static/css/style.css */
/* --- 基础与字体 --- */
body {
font-family: 'Inter', sans-serif;
}
/* --- 核心卡片与布局 --- */
.glass-card {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border: 1px solid rgba(0, 0, 0, 0.08);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
/* --- 导航按钮 --- */
.nav-buttons-container {
display: flex;
justify-content: center;
margin-bottom: 2rem;
overflow-x: auto;
gap: 0.5rem;
}
.nav-link {
white-space: nowrap;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
font-weight: 500;
border-radius: 0.5rem;
color: #374151; /* gray-700 */
background-color: rgba(229, 231, 235, 0.8); /* gray-200 with opacity */
transition: all 0.2s;
}
.nav-link:hover {
color: #111827; /* gray-900 */
transform: translateY(-2px);
}
.nav-link.active {
background-color: #4f46e5; /* primary-600 */
color: #ffffff;
box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}
/* --- 现代统计面板 --- */
.stats-dashboard {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 1.5rem;
}
.stats-card {
background-color: #ffffff;
border-radius: 1rem;
border: 1px solid #e5e7eb; /* gray-200 */
overflow: hidden;
display: flex;
flex-direction: column;
}
.stats-card-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 1.25rem;
border-bottom: 1px solid #e5e7eb;
}
.stats-card-title {
font-size: 1rem;
font-weight: 600;
display: flex;
align-items: center;
gap: 0.5rem;
color: #1f2937; /* gray-800 */
}
/* 统计项网格 */
.stats-grid {
display: grid;
gap: 1rem;
padding: 1rem;
}
.stat-item {
position: relative;
padding: 1rem;
border-radius: 0.75rem;
overflow: hidden;
color: #ffffff;
}
.stat-value {
font-size: 1.875rem; /* text-3xl */
font-weight: 700;
}
.stat-label {
font-size: 0.875rem; /* text-sm */
opacity: 0.8;
}
.stat-icon {
position: absolute;
right: 1rem;
top: 1rem;
font-size: 2rem;
opacity: 0.2;
}
/* 统计项颜色变体 */
.stat-primary { background-color: #6366f1; }
.stat-success { background-color: #10b981; }
.stat-danger { background-color: #ef4444; }
.stat-warning { background-color: #f59e0b; }
.stat-info { background-color: #3b82f6; }
/* --- 通用组件 --- */
/* 下拉菜单 */
.dropdown-toggle .dropdown-menu {
display: none;
position: absolute;
right: 0;
top: calc(100% + 0.5rem);
background: white;
border-radius: 0.5rem;
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
z-index: 10;
min-width: 160px;
border: 1px solid #f3f4f6;
}
.dropdown-toggle .dropdown-menu.show {
display: block;
}
.dropdown-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem 1rem;
font-size: 0.875rem;
color: #374151; /* gray-700 */
cursor: pointer;
transition: background-color 0.2s;
}
.dropdown-item:hover {
background-color: #f3f4f6; /* gray-100 */
}
/* 自动刷新开关 */
.toggle-checkbox:checked {
right: 0px;
border-color: #4f46e5;
}
.toggle-checkbox:checked + .toggle-label {
background-color: #4f46e5;
}