:root {
  --bg: rgba(12, 18, 28, 0.72);
  --line: rgba(120, 190, 255, 0.22);
  --text: #dbe7f5;
  --muted: #8aa0b8;
  --accent: #4fc3ff;
  --accent-2: #2a7fff;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0a0f17; color: var(--text);
  font: 14px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; }

.topbar { position: fixed; top: 0; left: 0; right: 0; height: 52px; display: flex; align-items: center;
  justify-content: space-between; padding: 0 20px; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 10, 18, 0.85), rgba(6, 10, 18, 0)); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: 2px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.status { display: flex; gap: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.status span { padding: 2px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }

.panel { position: fixed; background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35); }
.control { top: 68px; left: 16px; width: 228px; padding: 12px 14px; max-height: calc(100% - 120px); overflow: auto; }
.control { scrollbar-width: thin; scrollbar-color: rgba(120,190,255,0.3) transparent; }
.control section + section { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.panel h2 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 1px; }
.btn-group { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-group.col { flex-direction: column; }
.btn-group button, .info .primary { flex: 1 0 auto; min-width: 56px; padding: 6px 10px; color: var(--text); cursor: pointer;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 6px; font: inherit; transition: all .2s; }
.btn-group button:hover:not(:disabled) { border-color: var(--accent); color: #fff; }
.btn-group button.active { background: linear-gradient(135deg, var(--accent-2), var(--accent)); border-color: transparent; color: #fff; }
.btn-group button:disabled { opacity: 0.4; cursor: not-allowed; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; }

.info { top: 68px; right: 16px; width: 300px; padding: 16px 18px; transition: opacity .25s, transform .25s; }
.info.hidden { opacity: 0; transform: translateX(20px); pointer-events: none; }
.info h2 { font-size: 18px; color: #fff; margin: 6px 0 8px; letter-spacing: 0; }
.info p { margin: 0 0 12px; color: var(--text); }
.info dl { margin: 0 0 14px; display: grid; grid-template-columns: 64px 1fr; gap: 4px 8px; font-size: 12px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; word-break: break-all; }
.info .primary { width: 100%; background: linear-gradient(135deg, var(--accent-2), var(--accent)); border: none; color: #fff; }
.tag { display: inline-block; padding: 1px 8px; font-size: 12px; border-radius: 10px; color: var(--accent); border: 1px solid var(--accent); }
.close { position: absolute; top: 8px; right: 10px; background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; }

.tip { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 12px;
  padding: 4px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); pointer-events: none; }

.loading { position: fixed; inset: 0; display: grid; place-items: center; background: #0a0f17; z-index: 10; transition: opacity .6s; }
.loading.done { opacity: 0; pointer-events: none; }
.loading-box { width: 280px; text-align: center; color: var(--muted); }
.bar { height: 4px; margin: 12px 0 6px; background: rgba(255, 255, 255, 0.08); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .2s; }

@media (max-width: 760px) {
  .control { top: auto; bottom: 46px; left: 8px; right: 8px; width: auto; max-height: 40%; }
  .info { top: 60px; right: 8px; left: 8px; width: auto; }
  .brand h1 { font-size: 15px; }
  #st-fps, .tip { display: none; }
  .status { gap: 6px; }
  .control { bottom: 10px; }
}

/* 时间滑块 */
.control h2 .clock { float: right; font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; }
#time-range { width: 100%; margin: 4px 0 8px; accent-color: var(--accent); }
