:root {
  --glass: rgba(18, 24, 30, 0.36);
  --stroke: rgba(255, 255, 255, 0.16);
  --txt: #eef3f5;
  --accent: #ffd9a0;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #0b1014; color: var(--txt);
  font: 13px/1.4 -apple-system, "PingFang SC", "Helvetica Neue", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

#loading {
  position: fixed; inset: 0; display: grid; place-items: center; z-index: 30;
  background: radial-gradient(120% 90% at 50% 40%, #1b2a33 0%, #0b1014 70%);
  transition: opacity 0.9s ease, visibility 0.9s;
}
#loading.done { opacity: 0; visibility: hidden; }
#loading .box { width: min(420px, 78vw); text-align: center; }
#loading .ttl { font-size: 20px; letter-spacing: 0.14em; margin-bottom: 18px; font-weight: 500; }
#loading .track { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
#loadBar { height: 100%; width: 0%; background: linear-gradient(90deg, #7fb7c9, var(--accent)); transition: width 0.25s ease; }
#loadLabel { margin-top: 12px; font-size: 12px; opacity: 0.66; letter-spacing: 0.06em; }

#title {
  position: fixed; left: 22px; top: 18px; z-index: 10; pointer-events: none;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}
#title h1 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: 0.16em; }
#title p { margin: 4px 0 0; font-size: 11.5px; opacity: 0.72; letter-spacing: 0.04em; }

#fps {
  position: fixed; right: 20px; top: 18px; z-index: 10; font-variant-numeric: tabular-nums;
  font-size: 11.5px; padding: 5px 10px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
}

#bar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; max-width: calc(100vw - 24px);
  border-radius: 999px; background: var(--glass); border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
  transition: padding 0.25s ease, border-radius 0.25s ease;
}
#bar .row { display: flex; align-items: center; gap: 6px; padding-left: 10px; border-left: 1px solid var(--stroke); }
#bar.collapsed { border-radius: 22px; padding: 6px 10px; }
#bar.collapsed .row { display: none; }
#bar button {
  appearance: none; border: 1px solid transparent; background: rgba(255, 255, 255, 0.06); color: var(--txt);
  font: inherit; font-size: 12px; padding: 6px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
#bar button:hover { background: rgba(255, 255, 255, 0.14); }
#bar button.on { background: rgba(255, 217, 160, 0.2); border-color: rgba(255, 217, 160, 0.55); color: #fff3dc; }
#collapse { padding: 4px 8px !important; opacity: 0.7; }
#play { width: 30px; padding: 6px 0 !important; }
#time { width: 150px; accent-color: #e9c48c; }
#timeLabel { font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; opacity: 0.85; }

@media (max-width: 1180px) {
  #bar { flex-wrap: wrap; border-radius: 22px; justify-content: center; }
  #bar .row { border-left: none; padding-left: 0; }
  #title p { display: none; }
}
