183 lines
4.5 KiB
CSS
183 lines
4.5 KiB
CSS
/* ===== style-1.css - 全局基础 ===== */
|
||
|
||
/* ---------- 字体定义 ---------- */
|
||
/* 自托管 HarmonyOS Sans SC Regular */
|
||
|
||
/* 中英文:HarmonyOS Sans SC Regular */
|
||
@font-face {
|
||
font-family: 'HarmonyOS Sans SC';
|
||
src: url('./fonts/HarmonyOS_Sans_SC_Regular.ttf') format('truetype');
|
||
font-weight: 400;
|
||
font-style: normal;
|
||
font-display: swap;
|
||
}
|
||
|
||
/* 数字专用:复用 HarmonyOS Sans SC Regular(因 Light 版本缺失) */
|
||
@font-face {
|
||
font-family: 'HarmonyOS Sans';
|
||
src: url('./fonts/HarmonyOS_Sans_SC_Regular.ttf') format('truetype');
|
||
font-weight: 300;
|
||
font-style: normal;
|
||
font-display: swap;
|
||
}
|
||
|
||
/* 后备:如果自托管字体加载失败,使用系统字体 */
|
||
|
||
/* ---------- 重置 ---------- */
|
||
* {
|
||
margin: 0;
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
body {
|
||
font-family: 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
|
||
background: #0a0a0f;
|
||
height: 100vh;
|
||
overflow: hidden;
|
||
color: #e0e0e0;
|
||
}
|
||
|
||
/* ---------- 数字专用字体(使用 HarmonyOS Sans) ---------- */
|
||
.digit,
|
||
.big-number,
|
||
.remote-port,
|
||
.proxy-addr,
|
||
.metric-value .digit,
|
||
.metric-value .big-number,
|
||
.login-header h1,
|
||
.login-btn,
|
||
.save-btn,
|
||
.btn-confirm {
|
||
font-weight: 300 !important;
|
||
letter-spacing: 0.02em;
|
||
font-family: 'HarmonyOS Sans', 'JetBrains Mono', monospace;
|
||
}
|
||
|
||
/* 数字特别加粗(适用于大数字展示) */
|
||
.big-number {
|
||
font-weight: 600 !important;
|
||
letter-spacing: -0.01em;
|
||
}
|
||
|
||
/* 代码/端口类数字使用等宽字体,但保持 HarmonyOS Sans 风格 */
|
||
.digit,
|
||
.remote-port,
|
||
.proxy-addr {
|
||
font-family: 'HarmonyOS Sans', 'JetBrains Mono', monospace;
|
||
font-weight: 300 !important;
|
||
}
|
||
|
||
/* ---------- 全局颜色变量 ---------- */
|
||
:root {
|
||
--primary-blue: #4a7cff;
|
||
--primary-blue-dim: rgba(74, 124, 255, 0.15);
|
||
--primary-blue-glow: rgba(74, 124, 255, 0.3);
|
||
--primary-blue-border: rgba(74, 124, 255, 0.2);
|
||
--bg-deep: #0a0a18;
|
||
--bg-card: rgba(13, 13, 26, 0.6);
|
||
--bg-metric: rgba(255, 255, 255, 0.03);
|
||
--border-subtle: rgba(255, 255, 255, 0.04);
|
||
--text-dim: rgba(255, 255, 255, 0.25);
|
||
--text-muted: rgba(255, 255, 255, 0.35);
|
||
--text-secondary: rgba(255, 255, 255, 0.6);
|
||
--text-primary: rgba(255, 255, 255, 0.85);
|
||
}
|
||
|
||
/* ---------- 滚动条 ---------- */
|
||
::-webkit-scrollbar {
|
||
width: 4px;
|
||
height: 4px;
|
||
}
|
||
::-webkit-scrollbar-track {
|
||
background: rgba(255, 255, 255, 0.02);
|
||
border-radius: 4px;
|
||
}
|
||
::-webkit-scrollbar-thumb {
|
||
background: rgba(74, 124, 255, 0.25);
|
||
border-radius: 4px;
|
||
}
|
||
::-webkit-scrollbar-thumb:hover {
|
||
background: rgba(74, 124, 255, 0.4);
|
||
}
|
||
|
||
/* ---------- 背景磨砂层 ---------- */
|
||
.app-backdrop {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100vw;
|
||
height: 100vh;
|
||
background:
|
||
radial-gradient(ellipse at 20% 50%, rgba(30, 60, 120, 0.3) 0%, transparent 60%),
|
||
radial-gradient(ellipse at 80% 50%, rgba(80, 30, 120, 0.2) 0%, transparent 60%),
|
||
#0a0a0f;
|
||
z-index: 0;
|
||
}
|
||
|
||
/* ---------- 主容器 ---------- */
|
||
.app-container {
|
||
position: fixed;
|
||
top: 50%;
|
||
left: 50%;
|
||
transform: translate(-50%, -50%);
|
||
z-index: 1;
|
||
background: rgba(255, 255, 255, 0.04);
|
||
backdrop-filter: blur(40px) saturate(1.2);
|
||
-webkit-backdrop-filter: blur(40px) saturate(1.2);
|
||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||
border-radius: 32px;
|
||
box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
|
||
transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* 登录态尺寸 */
|
||
.app-container:not(.is-logged-in) {
|
||
width: 600px;
|
||
height: 500px;
|
||
}
|
||
|
||
/* 登录后尺寸 */
|
||
.app-container.is-logged-in {
|
||
width: min(1600px, 92vw);
|
||
height: min(900px, 88vh);
|
||
}
|
||
|
||
/* ---------- 旋转圈 ---------- */
|
||
.loading-ring {
|
||
position: absolute;
|
||
top: 50%;
|
||
left: 50%;
|
||
transform: translate(-50%, -50%);
|
||
width: 48px;
|
||
height: 48px;
|
||
border: 3px solid rgba(255, 255, 255, 0.04);
|
||
border-top: 3px solid var(--primary-blue);
|
||
border-radius: 50%;
|
||
animation: spin 0.8s linear infinite;
|
||
opacity: 0;
|
||
pointer-events: none;
|
||
transition: opacity 0.3s;
|
||
z-index: 5;
|
||
}
|
||
.loading-ring.visible {
|
||
opacity: 1;
|
||
}
|
||
@keyframes spin {
|
||
to { transform: translate(-50%, -50%) rotate(360deg); }
|
||
}
|
||
|
||
/* ---------- 主内容淡入 ---------- */
|
||
.main-panel {
|
||
width: 100%;
|
||
height: 100%;
|
||
display: flex;
|
||
flex-direction: column;
|
||
padding: 20px 28px;
|
||
opacity: 0;
|
||
transition: opacity 0.3s ease;
|
||
}
|
||
.main-panel.visible {
|
||
opacity: 1;
|
||
} |