File size: 10,840 Bytes
d841cb5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
:root {
  --bg-0: #05060c;
  --bg-1: #0d1024;
  --gold: #e9c46a;
  --gold-soft: #f4d58d;
  --ink: #f5f1e6;
  --ink-dim: #b9b3a3;
  --line: rgba(233, 196, 106, 0.28);
  --panel-bg: rgba(12, 14, 28, 0.92);
  --yang: #e9c46a;
  --yin: #8fb3c9;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, var(--bg-1), var(--bg-0) 70%);
  color: var(--ink);
  font-family: "Noto Serif SC", "Cinzel", serif;
  -webkit-font-smoothing: antialiased;
}

#scene-container {
  position: fixed;
  inset: 0;
  z-index: 1;
}
#scene-container canvas { display: block; }

/* ---------- Language visibility ---------- */
body[data-lang="en"] .cn-only { display: none; }
body[data-lang="zh"] .en-only { display: none; }

/* ---------- Loader ---------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: radial-gradient(ellipse at 50% 40%, var(--bg-1), var(--bg-0) 75%);
  transition: opacity 0.8s ease;
}
#loader.gone { opacity: 0; pointer-events: none; }
.taiji {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #f5f1e6 0 50%, #0d1024 50% 100%);
  box-shadow: 0 0 40px rgba(233, 196, 106, 0.35);
  animation: spin 3.4s linear infinite;
  position: relative;
}
.taiji::before, .taiji::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transform: translateX(-50%);
}
.taiji::before { top: 0; background: #f5f1e6; }
.taiji::after  { bottom: 0; background: #0d1024; }
.loader-text {
  font-family: "Cinzel", "Noto Serif SC", serif;
  letter-spacing: 0.35em;
  color: var(--gold-soft);
  font-size: 1.1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Top bar ---------- */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  background: linear-gradient(to bottom, rgba(5,6,12,0.75), rgba(5,6,12,0));
  pointer-events: none;
}
#topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-symbol {
  font-size: 1.7rem;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(233,196,106,0.6);
}
.brand-title {
  font-family: "Ma Shan Zheng", "Cinzel", serif;
  font-size: 1.5rem;
  color: var(--gold-soft);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
body[data-lang="en"] .brand-title { font-family: "Cinzel", serif; font-size: 1.25rem; }

.controls { display: flex; align-items: center; gap: 10px; }
#search {
  width: 210px;
  max-width: 44vw;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.35);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
#search:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(233,196,106,0.18);
}
#search::placeholder { color: var(--ink-dim); }

.btn {
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(233,196,106,0.08);
  color: var(--gold-soft);
  font-family: inherit;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .1s;
}
.btn:hover { background: rgba(233,196,106,0.2); }
.btn:active { transform: scale(0.96); }

/* ---------- Hint ---------- */
#hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  color: var(--ink-dim);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(5,6,12,0.4);
  border: 1px solid rgba(255,255,255,0.06);
  transition: opacity .5s;
}
#hint.hidden { opacity: 0; }

/* ---------- Detail panel ---------- */
#panel {
  position: fixed;
  top: 0; right: 0;
  z-index: 30;
  width: min(420px, 92vw);
  height: 100%;
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(0,0,0,0.5);
  padding: 64px 30px 40px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(.4,.9,.3,1);
}
#panel:not(.hidden) { transform: translateX(0); }
#panel-close {
  position: absolute;
  top: 16px; right: 18px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold-soft);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s;
}
#panel-close:hover { background: rgba(233,196,106,0.15); }

.hx-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.hx-number {
  font-family: "Cinzel", serif;
  font-size: 2.6rem;
  color: var(--gold);
  line-height: 1;
  min-width: 64px;
}
.hx-number small { display: block; font-size: 0.7rem; color: var(--ink-dim); letter-spacing: .2em; }
.hx-names { flex: 1; }
.hx-cn {
  font-family: "Ma Shan Zheng", serif;
  font-size: 2.4rem;
  color: var(--gold-soft);
  line-height: 1.1;
}
.hx-py { color: var(--ink-dim); font-style: italic; margin-top: 2px; }
.hx-en { color: var(--ink); font-family: "Cinzel", serif; font-size: 1.05rem; margin-top: 4px; }

/* Big hexagram glyph */
.hx-glyph {
  display: flex;
  flex-direction: column-reverse; /* bottom line first */
  gap: 7px;
  align-items: center;
  padding: 22px 0;
  margin: 4px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hx-line { display: flex; gap: 10px; height: 13px; }
.hx-seg {
  width: 74px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  box-shadow: 0 0 10px rgba(233,196,106,0.35);
}
.hx-line.yin .hx-seg { width: 32px; }

.hx-trigrams {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}
.tg {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}
.tg-role { font-size: 0.72rem; letter-spacing: .18em; color: var(--ink-dim); text-transform: uppercase; }
.tg-name { font-family: "Ma Shan Zheng", serif; font-size: 1.5rem; color: var(--gold-soft); }
.tg-en { font-size: 0.82rem; color: var(--ink-dim); }

.details-btn {
  display: block;
  width: 100%;
  margin: 0 0 22px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--gold);
  background: linear-gradient(180deg, rgba(233,196,106,0.16), rgba(233,196,106,0.06));
  color: var(--gold-soft);
  font-family: "Cinzel", "Noto Serif SC", serif;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.details-btn:hover { background: rgba(233,196,106,0.26); }
.details-btn:active { transform: scale(0.98); }

.hx-desc .lang-block { margin-bottom: 22px; }
.hx-desc .lang-block + .lang-block {
  padding-top: 18px;
  border-top: 1px dashed rgba(233,196,106,0.22);
}
.hx-desc h4 {
  font-size: 0.74rem;
  letter-spacing: .2em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.hx-desc p {
  color: var(--ink);
  font-size: 1rem;
  margin: 0;
}
.hx-desc p[lang="zh"] { line-height: 1.9; }
.hx-desc p[lang="en"] { line-height: 1.7; font-family: "Cinzel", "Noto Serif SC", serif; }

/* ---------- Details modal ---------- */
#modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#modal.hidden { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 10, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-box {
  position: relative;
  width: min(720px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 40px 36px 36px;
  border-radius: 18px;
  background: linear-gradient(180deg, #12142a, #0a0b16);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: modalIn .35s cubic-bezier(.3,.9,.3,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
#modal-close {
  position: absolute;
  top: 14px; right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold-soft);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s;
}
#modal-close:hover { background: rgba(233,196,106,0.15); }

.md-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 6px; padding-right: 40px; }
.md-num { font-family: "Cinzel", serif; font-size: 2.4rem; color: var(--gold); line-height: 1; }
.md-cn { font-family: "Ma Shan Zheng", serif; font-size: 2.2rem; color: var(--gold-soft); }
.md-py { color: var(--ink-dim); font-style: italic; }
.md-en { font-family: "Cinzel", serif; color: var(--ink); font-size: 1rem; }

.md-section { border-top: 1px solid var(--line); padding: 18px 0; }
.md-section h3 {
  font-size: 0.8rem;
  letter-spacing: .18em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.md-classic {
  font-family: "Noto Serif SC", serif;
  font-size: 1.22rem;
  line-height: 2;
  color: var(--gold-soft);
  margin-bottom: 10px;
}
.md-trans { color: var(--ink); line-height: 1.7; font-family: "Cinzel", "Noto Serif SC", serif; }
.md-cnpara { color: var(--ink); line-height: 1.9; margin-bottom: 10px; }
.md-enpara { color: var(--ink-dim); line-height: 1.7; font-family: "Cinzel", "Noto Serif SC", serif; }

@media (max-width: 640px) {
  .modal-box { padding: 36px 20px 26px; }
  .md-classic { font-size: 1.05rem; }
}

#credit {
  position: fixed;
  bottom: 18px; left: 20px;
  z-index: 12;
  color: var(--ink-dim);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

#author {
  position: fixed;
  bottom: 18px; right: 22px;
  z-index: 12;
  color: var(--gold-soft);
  font-family: "Cinzel", "Noto Serif SC", serif;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  opacity: 0.85;
  text-shadow: 0 0 12px rgba(233,196,106,0.35);
  pointer-events: none;
}

@media (max-width: 640px) {
  .brand-title { font-size: 1.15rem; }
  #search { width: 130px; }
  #credit { display: none; }
  #hint { font-size: 0.72rem; width: 90%; }
}