Skip to content

Commit 8757c9a

Browse files
committed
upload ide/css/style.css
1 parent 4e2c34e commit 8757c9a

1 file changed

Lines changed: 169 additions & 0 deletions

File tree

ide/css/style.css

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
/* ============================================================
2+
* HC v0.01 在线 IDE 样式 —— 浅色液态玻璃风格
3+
* ============================================================ */
4+
:root {
5+
--bg: #f3eee6;
6+
--panel: rgba(255, 252, 245, .72);
7+
--line: rgba(90, 70, 40, .14);
8+
--text: #3a2f1e;
9+
--muted: #6b5f49;
10+
--dim: #9a8c73;
11+
--accent: #c2965c;
12+
--accent-strong: #b38545;
13+
--accent-soft: rgba(194, 150, 92, .16);
14+
--good: #4c9a6a;
15+
--bad: #c05a5a;
16+
--radius: 14px;
17+
--glass: linear-gradient(150deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .28));
18+
font-size: 14px;
19+
}
20+
* { box-sizing: border-box; margin: 0; padding: 0; }
21+
html, body { height: 100%; }
22+
body {
23+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
24+
color: var(--text);
25+
background:
26+
radial-gradient(70% 60% at 12% 8%, rgba(228, 196, 150, .30), transparent 60%),
27+
radial-gradient(60% 55% at 90% 90%, rgba(200, 160, 120, .20), transparent 58%),
28+
var(--bg);
29+
overflow: hidden;
30+
}
31+
code { background: rgba(120, 90, 50, .1); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
32+
.hidden { display: none !important; }
33+
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
34+
35+
/* ---- 玻璃板 ---- */
36+
.btn {
37+
padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 13.5px;
38+
transition: opacity .18s, transform .15s, box-shadow .2s; border: 1px solid transparent;
39+
}
40+
.btn:hover { opacity: .92; transform: translateY(-1px); }
41+
.btn.solid { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(179, 133, 69, .35); }
42+
.btn.solid:hover { background: var(--accent-strong); }
43+
.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
44+
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
45+
.btn.soft { background: var(--accent-soft); color: var(--accent-strong); }
46+
.btn.big { padding: 12px 30px; font-size: 15px; }
47+
.btn.live { box-shadow: inset 0 0 0 1px rgba(76, 154, 106, .4); color: var(--good); border-color: transparent; }
48+
.mini { width: 26px; height: 26px; border-radius: 8px; font-size: 17px; line-height: 1; color: var(--muted); }
49+
.mini:hover { background: var(--accent-soft); color: var(--accent-strong); }
50+
51+
/* ---- 顶栏 ---- */
52+
.topbar {
53+
display: flex; align-items: center; gap: 16px; padding: 10px 18px;
54+
background: var(--glass); border-bottom: 1px solid var(--line);
55+
-webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%);
56+
position: relative; z-index: 20;
57+
}
58+
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
59+
.logo-dot { width: 26px; height: 26px; border-radius: 8px;
60+
background: linear-gradient(140deg, #e2b878, #b38545); box-shadow: 0 4px 12px rgba(179,133,69,.4); }
61+
.logo-dot.lg { width: 44px; height: 44px; border-radius: 12px; }
62+
.brand-name { font-weight: 800; font-size: 17px; }
63+
.ver { font-size: 11.5px; color: var(--muted); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; }
64+
.crumb { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
65+
.actions { display: flex; gap: 10px; align-items: center; }
66+
.menu-wrap { position: relative; }
67+
.menu {
68+
position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; z-index: 40;
69+
background: var(--glass); border: 1px solid var(--line); border-radius: 12px; padding: 8px;
70+
-webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
71+
box-shadow: 0 18px 46px rgba(60, 45, 20, .2);
72+
display: none;
73+
}
74+
.menu.open { display: block; }
75+
.menu-title { font-size: 12px; color: var(--dim); padding: 6px 10px 8px; }
76+
.menu button { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; font-size: 13.5px; }
77+
.menu button:hover { background: var(--accent-soft); }
78+
79+
/* ---- 布局 ---- */
80+
.layout { display: flex; height: calc(100% - 57px); }
81+
.tree {
82+
width: 240px; flex: 0 0 240px; padding: 12px; overflow-y: auto;
83+
background: var(--glass); border-right: 1px solid var(--line);
84+
-webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
85+
}
86+
.tree-sec { margin-bottom: 18px; }
87+
.tree-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
88+
.tree-head span { font-size: 12px; color: var(--dim); font-weight: 700; letter-spacing: .4px; }
89+
.tree-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
90+
.tree-item {
91+
display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 9px;
92+
cursor: pointer; font-size: 13.5px; color: var(--muted); border: 1px solid transparent;
93+
}
94+
.tree-item:hover { background: rgba(120,90,50,.07); }
95+
.tree-item.on { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; border-color: rgba(179,133,69,.2); }
96+
.tree-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
97+
.tree-item .ops { display: none; gap: 2px; }
98+
.tree-item:hover .ops, .tree-item.on .ops { display: flex; }
99+
.tree-item .ops span { font-size: 13px; padding: 0 3px; color: var(--dim); }
100+
.tree-item .ops span:hover { color: var(--bad); }
101+
.tree-item .ic { opacity: .5; }
102+
.tree-empty { font-size: 13px; color: var(--dim); text-align: center; margin-top: 18px; line-height: 1.7; }
103+
104+
/* ---- 工作区 ---- */
105+
.workspace { flex: 1; display: flex; flex-direction: column; min-width: 0; }
106+
.tabs { display: flex; gap: 4px; padding: 10px 14px 0; }
107+
.tab { padding: 8px 16px; border-radius: 10px 10px 0 0; font-size: 13.5px; color: var(--muted); background: transparent; }
108+
.tab:hover { color: var(--accent); }
109+
.tab.on { background: var(--panel); color: var(--accent-strong); font-weight: 700; box-shadow: 0 -6px 18px rgba(120,90,50,.06); }
110+
.pane { display: none; flex: 1; min-height: 0; padding: 12px 14px 14px; flex-direction: column; }
111+
.pane.on { display: flex; }
112+
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
113+
.hint { font-size: 12.5px; color: var(--muted); }
114+
.shortcut { font-size: 12px; color: var(--dim); }
115+
.codearea {
116+
flex: 1; min-height: 0; resize: none; border: 1px solid var(--line); border-radius: var(--radius);
117+
padding: 16px; font-family: "Cascadia Code", Consolas, "Courier New", monospace; font-size: 14px; line-height: 1.65;
118+
background: rgba(255,255,255,.6); color: #2d2416; outline: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
119+
}
120+
.codearea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
121+
.codearea.src { flex: none; height: 100%; white-space: pre; }
122+
.statusbar { margin-top: 8px; font-size: 12.5px; color: var(--dim); }
123+
.preview-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
124+
.preview-frame { flex: 1; width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
125+
126+
/* ---- 变量面板 ---- */
127+
.var-help { font-size: 13px; color: var(--muted); line-height: 1.8; background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
128+
.var-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
129+
.var-row {
130+
display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
131+
background: var(--panel); border: 1px solid var(--line);
132+
}
133+
.var-row .vk { font-weight: 800; color: var(--accent-strong); font-size: 13px; }
134+
.var-row .vn { font-weight: 700; font-size: 13.5px; }
135+
.var-row .vt { font-size: 12px; color: var(--dim); }
136+
.var-row .val { flex: 1; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
137+
.var-row .thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: #eee; }
138+
.img-actions { display: flex; gap: 6px; }
139+
.img-actions button { padding: 6px 10px; border-radius: 8px; font-size: 12px; border: 1px solid var(--line); color: var(--muted); }
140+
.img-actions button.primary { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
141+
.img-actions button.danger:hover { border-color: var(--bad); color: var(--bad); }
142+
.var-empty { text-align: center; color: var(--dim); margin-top: 30px; }
143+
144+
/* ---- 首页 ---- */
145+
.home {
146+
position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
147+
-webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
148+
background: linear-gradient(160deg, rgba(243,238,230,.8), rgba(243,238,230,.94));
149+
}
150+
.home-card { text-align: center; padding: 44px 52px; background: var(--glass); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 70px rgba(60,45,20,.18); max-width: 520px; }
151+
.home-card h1 { margin: 16px 0 6px; font-size: 30px; }
152+
.home-card .dim { color: var(--muted); font-size: 16px; font-weight: 600; }
153+
.home-sub { color: var(--muted); margin-top: 4px; line-height: 1.7; }
154+
.home-sub.small { font-size: 12.5px; color: var(--dim); }
155+
.home-actions { display: flex; gap: 12px; justify-content: center; margin-top: 26px; }
156+
.home-recent { margin-top: 26px; border-top: 1px dashed var(--line); padding-top: 18px; }
157+
.recent-title { font-size: 12.5px; color: var(--dim); margin-bottom: 10px; }
158+
159+
/* ---- 弹窗 ---- */
160+
.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; background: rgba(40,30,15,.35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
161+
.modal-card { width: min(430px, 92vw); background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 24px 60px rgba(40,30,15,.3); text-align: center; }
162+
.modal-title { font-size: 16px; font-weight: 800; margin-bottom: 14px; }
163+
.modal-body { font-size: 13.5px; color: var(--muted); line-height: 1.7; }
164+
.modal-body input[type="text"] { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 14px; outline: none; margin-top: 4px; background: rgba(255,255,255,.7); }
165+
.modal-body input:focus { border-color: var(--accent); }
166+
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
167+
.alert-info { padding: 10px; border-radius: 8px; background: var(--accent-soft); text-align: left; font-size: 12.5px; }
168+
.msg-good { color: var(--good); }
169+
.msg-bad { color: var(--bad); }

0 commit comments

Comments
 (0)