:root {
  --bg: #05070b;
  --ink: #e9eef4;
  --muted: #8f9aa6;
  --faint: rgba(233, 238, 244, 0.45);
  --line: rgba(255, 255, 255, 0.13);
  --line-soft: rgba(255, 255, 255, 0.07);
  --glass: rgba(10, 14, 20, 0.72);
  --glass-deep: rgba(7, 10, 15, 0.86);
  --accent: #ffb15e;
  --accent-soft: rgba(255, 177, 94, 0.16);
  --accent-line: rgba(255, 177, 94, 0.42);
  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", "Roboto Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; color: inherit; }
#app { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(120% 90% at 60% 15%, #101a2a 0%, #070a10 55%, #04060a 100%); }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }

.atmosphere { position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    linear-gradient(180deg, rgba(3,6,12,0.62) 0%, rgba(3,6,12,0) 20%, rgba(3,6,12,0) 64%, rgba(3,6,12,0.7) 100%),
    radial-gradient(120% 95% at 50% 44%, rgba(0,0,0,0) 48%, rgba(0,0,0,0.38) 100%);
}
.atmosphere::after {
  content: ""; position: absolute; inset: 0; opacity: .13; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='.55'/></svg>");
}

/* ----------------------------------------------------------------- top */
.hud-top { position: absolute; z-index: 6; top: 30px; left: 36px; right: 36px; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.brand { display: flex; align-items: center; gap: 15px; }
.brand-mark { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 13px; display: grid; place-items: center; background: rgba(8,12,18,.5); backdrop-filter: blur(10px); color: #f2d3a2; }
.brand-mark svg { width: 30px; height: 30px; }
.brand-copy h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: .1em; line-height: 1.15; display: flex; align-items: baseline; gap: 10px; }
.brand-copy h1 em { font-family: var(--mono); font-style: normal; font-size: 9.5px; letter-spacing: .28em; color: var(--accent); font-weight: 500; }
.brand-copy p { margin: 6px 0 0; color: var(--muted); font-size: 10.5px; letter-spacing: .22em; }

.status-cluster { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.live-pill, .meta-pill { display: flex; align-items: center; gap: 9px; padding: 9px 14px; border: 1px solid var(--line-soft); border-radius: 999px; background: rgba(8,12,18,.48); backdrop-filter: blur(12px); font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: #d5dde4; }
.live-pill i { font-style: normal; color: var(--muted); font-family: var(--font); letter-spacing: .12em; }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: #72e3a4; box-shadow: 0 0 0 0 rgba(114,227,164,.55); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(114,227,164,.5); } 70% { box-shadow: 0 0 0 7px rgba(114,227,164,0); } 100% { box-shadow: 0 0 0 0 rgba(114,227,164,0); } }
.meta-pill { color: var(--muted); letter-spacing: .08em; }
.meta-pill .sep { width: 1px; height: 10px; background: var(--line); }

/* ----------------------------------------------------------------- hotspots */
#hotspots { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.hotspot { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; padding: 0; background: none; border: 0; cursor: pointer; pointer-events: auto; opacity: 0; transition: opacity .35s ease; white-space: nowrap; }
.hotspot.on { opacity: 1; }
.hotspot .dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: rgba(255,206,150,.95); box-shadow: 0 0 14px 3px rgba(255,168,80,.6); flex: 0 0 auto; }
.hotspot .dot::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid rgba(255,190,120,.5); animation: ring 2.6s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.hotspot .hs-label { font-size: 9.5px; letter-spacing: .16em; color: #f0e7da; background: rgba(7,10,15,.62); border: 1px solid rgba(255,255,255,.12); padding: 4px 7px; border-radius: 4px; backdrop-filter: blur(8px); }
.hotspot .hs-label b { font-weight: 600; letter-spacing: .1em; }
.hotspot:hover .hs-label { border-color: var(--accent-line); color: #fff; }

/* ----------------------------------------------------------------- info panel */
.info-panel { position: absolute; z-index: 8; left: 36px; top: 112px; width: 332px; padding: 22px 22px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(20px); box-shadow: 0 24px 70px rgba(0,0,0,.45); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .35s ease, transform .45s cubic-bezier(.2,.8,.2,1); }
.info-panel.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.panel-close { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-soft); background: transparent; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; transition: .2s; }
.panel-close:hover { color: #fff; border-color: var(--line); }
.panel-kicker { font-family: var(--mono); font-size: 9px; letter-spacing: .28em; color: var(--accent); margin-bottom: 10px; }
.info-panel h2 { margin: 0 0 10px; font-size: 24px; font-weight: 600; letter-spacing: .06em; }
.info-panel p { margin: 0; color: #a6b1bc; font-size: 12px; line-height: 1.85; }
.panel-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 18px 0 16px; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; background: var(--line-soft); }
.panel-meta div { background: rgba(9,13,18,.8); padding: 10px 10px 9px; }
.panel-meta span { display: block; font-size: 8.5px; color: var(--muted); letter-spacing: .16em; margin-bottom: 5px; }
.panel-meta b { font-size: 11px; font-weight: 600; color: #e7edf2; letter-spacing: .04em; }
.panel-meta b.ok { color: #7fe0a6; }
.panel-focus { width: 100%; height: 38px; border: 1px solid var(--accent-line); border-radius: 9px; background: var(--accent-soft); color: #ffd2a0; font-size: 11.5px; letter-spacing: .16em; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: .2s; }
.panel-focus:hover { background: rgba(255,177,94,.25); color: #fff; }

/* ----------------------------------------------------------------- announcement */
.announce { position: absolute; z-index: 6; top: 104px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 9px 16px 9px 10px; border-radius: 999px; border: 1px solid var(--line-soft); background: rgba(6,9,14,.62); backdrop-filter: blur(14px); font-size: 11px; color: #c9d2da; max-width: min(620px, 80vw); opacity: 0; transition: opacity .4s ease, transform .4s ease; transform: translate(-50%, -8px); }
.announce.show { opacity: 1; transform: translate(-50%, 0); }
.announce-tag { flex: 0 0 auto; font-family: var(--mono); font-size: 8.5px; letter-spacing: .16em; color: #0c1015; background: var(--accent); padding: 5px 8px; border-radius: 999px; font-weight: 700; }
.announce-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .04em; }

/* ----------------------------------------------------------------- hint */
.hint { position: absolute; z-index: 5; right: 36px; bottom: 100px; display: flex; align-items: center; gap: 9px; font-size: 10px; color: rgba(190,200,210,.6); letter-spacing: .12em; pointer-events: none; transition: opacity .6s; }
.mouse-icon { width: 13px; height: 18px; border: 1px solid rgba(255,255,255,.35); border-radius: 7px; position: relative; }
.mouse-icon::after { content: ""; position: absolute; left: 50%; top: 4px; width: 1px; height: 4px; background: rgba(255,255,255,.5); transform: translateX(-50%); }

/* ----------------------------------------------------------------- side tools */
.side-tools { position: absolute; z-index: 7; right: 32px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 9px; }
.side-tools button { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line-soft); background: rgba(8,12,18,.55); backdrop-filter: blur(12px); color: #a9b4bf; display: grid; place-items: center; cursor: pointer; transition: .2s; }
.side-tools button:hover, .side-tools button.toggle.active { color: #ffce96; border-color: var(--accent-line); background: rgba(30,22,14,.7); }
.side-tools svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* ----------------------------------------------------------------- dock */
.dock { position: absolute; z-index: 7; left: 28px; bottom: 16px; width: min(640px, calc(100vw - 56px)); padding: 12px 18px 13px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(24px) saturate(1.2); box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06); }
.dock-head { display: flex; justify-content: space-between; align-items: flex-end; }
.dock-label { display: flex; flex-direction: column; gap: 5px; }
.eyebrow { font-family: var(--mono); font-size: 8.5px; letter-spacing: .28em; color: var(--accent); }
.dock-label b { font-size: 13px; font-weight: 600; letter-spacing: .18em; color: #dfe6ec; }
.time-readout { display: flex; align-items: baseline; gap: 12px; }
.time-readout span { font-family: var(--mono); font-size: 25px; font-weight: 300; letter-spacing: .04em; color: #fff2dc; line-height: .9; font-variant-numeric: tabular-nums; }
.time-readout small { font-size: 9.5px; letter-spacing: .14em; color: var(--muted); }

.timeline { position: relative; margin: 9px 0 2px; height: 28px; }
#time-slider { -webkit-appearance: none; appearance: none; position: absolute; left: 0; top: 9px; width: 100%; height: 18px; background: transparent; z-index: 4; cursor: pointer; margin: 0; }
#time-slider::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: linear-gradient(90deg, #1b2b45 0%, #34567a 20%, #e9b06d 34%, #ffe4b8 48%, #ffc382 62%, #e77745 74%, #452c42 84%, #0e1726 100%); }
#time-slider::-moz-range-track { height: 4px; border-radius: 99px; background: linear-gradient(90deg, #1b2b45 0%, #34567a 20%, #e9b06d 34%, #ffe4b8 48%, #ffc382 62%, #e77745 74%, #452c42 84%, #0e1726 100%); }
#time-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 15px; height: 15px; margin-top: -5.5px; border-radius: 50%; background: #fff6e7; border: 2px solid #ffb15e; box-shadow: 0 0 0 4px rgba(255,177,94,.16), 0 0 18px rgba(255,177,94,.65); }
#time-slider::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #fff6e7; border: 2px solid #ffb15e; box-shadow: 0 0 0 4px rgba(255,177,94,.16); }
.timeline-track { position: absolute; left: 0; top: 10px; width: 100%; height: 4px; pointer-events: none; }
.timeline-track .fill { position: absolute; left: 0; top: 0; height: 4px; border-radius: 99px; background: rgba(255,230,200,.55); width: 0; }
.timeline-track .notch { position: absolute; top: 8px; width: 1px; height: 5px; background: rgba(255,255,255,.22); }
.timeline-track .notch span { display: none; }
.timeline-ticks { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 7.5px; color: rgba(160,172,184,.55); letter-spacing: .08em; margin-top: 0px; }

.dock-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.btn { height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-soft); background: rgba(255,255,255,.035); color: #c9d2da; font-size: 11px; letter-spacing: .1em; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; transition: .18s; white-space: nowrap; }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { background: rgba(255,255,255,.08); color: #fff; border-color: var(--line); }
.btn.primary { background: linear-gradient(180deg, rgba(255,177,94,.26), rgba(255,177,94,.14)); border-color: var(--accent-line); color: #ffd7a7; }
.btn.primary:hover { background: rgba(255,177,94,.32); color: #fff; }
.btn.active { border-color: rgba(127,224,166,.4); color: #a9efc5; background: rgba(70,160,110,.1); }
.btn.active svg { color: #7fe0a6; }
.btn.icon { width: 34px; padding: 0; justify-content: center; }
.btn.icon.active { border-color: var(--accent-line); color: #ffd7a7; }

/* ----------------------------------------------------------------- loading */
.loading { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; background: radial-gradient(80% 70% at 50% 45%, #0b111b 0%, #04060a 70%); transition: opacity .8s ease, visibility .8s; }
.loading.hide { opacity: 0; visibility: hidden; }
.loading-inner { text-align: center; }
.loader-ring { width: 62px; height: 62px; margin: 0 auto 24px; border: 1px solid rgba(255,177,94,.16); border-radius: 50%; position: relative; }
.loader-ring::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.loader-ring span { position: absolute; inset: -1px; border-radius: 50%; border: 1px solid transparent; border-top-color: var(--accent); animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title { font-size: 25px; letter-spacing: .34em; font-weight: 500; color: #f0e6d6; margin-left: .34em; }
.loading-sub { font-family: var(--mono); font-size: 8.5px; letter-spacing: .32em; color: var(--muted); margin-top: 10px; }
.loading-bar { width: 208px; height: 2px; background: rgba(255,255,255,.09); margin: 26px auto 10px; overflow: hidden; border-radius: 99px; }
.loading-bar i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #b7783f, #ffd4a0); transition: width .25s ease; }
.loading-pct { font-family: var(--mono); font-size: 9px; color: var(--accent); letter-spacing: .2em; }

/* ----------------------------------------------------------------- about */
.about-modal { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(2,4,8,.72); backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: .35s; }
.about-modal.open { opacity: 1; visibility: visible; }
.about-card { width: min(470px, calc(100vw - 40px)); padding: 30px 30px 26px; border-radius: 18px; border: 1px solid var(--line); background: rgba(11,15,21,.94); box-shadow: 0 40px 120px rgba(0,0,0,.6); position: relative; }
.about-card h2 { margin: 0 0 14px; font-size: 24px; font-weight: 600; letter-spacing: .05em; }
.about-card p { color: #a8b3bd; font-size: 12.5px; line-height: 1.9; margin: 0 0 12px; }
.about-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border: 1px solid var(--line-soft); background: var(--line-soft); border-radius: 10px; overflow: hidden; margin: 20px 0; }
.about-grid div { background: #0a0f15; padding: 13px 10px; text-align: center; }
.about-grid b { display: block; font-family: var(--mono); font-size: 17px; color: #ffd2a0; font-weight: 400; }
.about-grid span { font-size: 9px; color: var(--muted); letter-spacing: .1em; }
.about-foot { font-size: 10px !important; color: var(--muted) !important; letter-spacing: .1em; margin: 4px 0 0 !important; }

@media (max-width: 820px) {
  .info-panel { top: 82px; bottom: auto; }
  .hud-top { top: 18px; left: 18px; right: 18px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 10px; }
  .brand-mark svg { width: 24px; height: 24px; }
  .brand-copy h1 { font-size: 16px; gap: 7px; }
  .brand-copy h1 em { font-size: 8px; letter-spacing: .18em; }
  .brand-copy p { font-size: 8.5px; letter-spacing: .12em; }
  .status-cluster { display: none; }
  .live-pill { font-size: 9.5px; padding: 7px 10px; }
  .info-panel { left: 14px; right: 14px; bottom: 200px; width: auto; }
  .dock { left: 12px; bottom: 12px; width: calc(100vw - 24px); padding: 12px 14px 13px; }
  .time-readout span { font-size: 23px; }
  .time-readout small { display: none; }
  .dock-actions { overflow-x: auto; scrollbar-width: none; }
  .dock-actions::-webkit-scrollbar { display: none; }
  .btn { height: 34px; padding: 0 11px; font-size: 10px; }
  .side-tools { right: 12px; gap: 7px; }
  .side-tools button { width: 34px; height: 34px; }
  .hint { display: none; }
  .announce { top: 88px; max-width: 92vw; font-size: 10px; }
  .announce-text { white-space: normal; }
}
