/* =============================================================
 * style.css —— 纯白极简界面（毛玻璃 / 细发丝线 / 柔和阴影）
 * ============================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #eef0f4;
  color: #2c2f36;
  font-family: "Inter", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  touch-action: none;
}

/* 摄影棚背景：柔和垂直渐变 + 顶部聚光 */
#backdrop {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 85% at 50% -10%, #ffffff 0%, #fafbfd 36%, #ecEEF3 66%, #dde1e9 100%),
    linear-gradient(#f7f8fa, #e6e9ee);
}
#vignette {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(112% 88% at 50% 40%, rgba(255,255,255,0) 46%, rgba(112,120,136,0.22) 100%);
  mix-blend-mode: multiply;
}

#stage { position: fixed; inset: 0; z-index: 1; }
#stage canvas { display: block; width: 100%; height: 100%; }

/* ---------------- 标题 ---------------- */
#brand {
  position: fixed; top: 26px; left: 32px; z-index: 5;
  pointer-events: none;
}
#brand h1 {
  font-family: "Didot", "Times New Roman", Georgia, serif;
  font-size: 26px; font-weight: 500; letter-spacing: 0.16em;
  color: #3a3e47;
}
#brand p {
  margin-top: 6px; font-size: 11px; letter-spacing: 0.30em;
  color: #9aa0ac; text-transform: uppercase;
}
#brand .zh { margin-top: 10px; font-size: 12.5px; letter-spacing: 0.20em; color: #7c828e; }

/* ---------------- 控制面板 ---------------- */
#panel {
  position: fixed; top: 24px; right: 24px; z-index: 6;
  width: 230px; padding: 16px 16px 14px;
  background: rgba(255,255,255,0.60);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(90,100,120,0.14), 0 2px 6px rgba(90,100,120,0.06), inset 0 1px 0 rgba(255,255,255,0.9);
  transition: transform .45s cubic-bezier(.4,.01,.2,1), opacity .3s;
}
#panel.collapsed { transform: translateX(calc(100% + 26px)); opacity: 0; }
#panel h2 {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.22em;
  color: #98a0ad; text-transform: uppercase; margin: 2px 0 10px 2px;
}
#panel h2:not(:first-of-type) { margin-top: 16px; }

.row { display: flex; gap: 7px; flex-wrap: wrap; }
button {
  font: inherit; font-size: 12px; color: #454a55;
  padding: 8px 11px; border-radius: 11px; cursor: pointer;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(180,188,200,0.42);
  box-shadow: 0 1px 2px rgba(90,100,120,0.06), inset 0 1px 0 rgba(255,255,255,0.85);
  transition: background .18s, color .18s, transform .12s, box-shadow .18s;
}
button:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(90,100,120,0.12); }
button:active { transform: translateY(0); }
button.on {
  background: linear-gradient(#3c4250, #2b303b);
  color: #fff; border-color: #2b303b;
  box-shadow: 0 4px 14px rgba(40,46,58,0.28);
}
button.wide { flex: 1 1 100%; text-align: center; }
button.half { flex: 1 1 calc(50% - 4px); text-align: center; }

.slider { margin: 9px 2px 2px; }
.slider label {
  display: flex; justify-content: space-between;
  font-size: 11px; color: #8b919d; letter-spacing: 0.06em; margin-bottom: 5px;
}
input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, #b9bfca, #dfe3ea);
  outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: #fff; border: 1px solid #c3c9d3; cursor: pointer;
  box-shadow: 0 2px 6px rgba(90,100,120,0.22);
}
input[type=range]::-moz-range-thumb {
  width: 15px; height: 15px; border: 1px solid #c3c9d3; border-radius: 50%;
  background: #fff; cursor: pointer;
}

#btn-collapse {
  position: fixed; top: 24px; right: 24px; z-index: 7;
  width: 34px; height: 34px; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1;
}

/* ---------------- 底部信息 ---------------- */
#note-read {
  position: fixed; left: 32px; bottom: 74px; z-index: 5;
  font-family: "Didot", "Times New Roman", Georgia, serif;
  font-size: 40px; letter-spacing: 0.04em; color: #454a55;
  opacity: 0; transition: opacity .5s, transform .14s;
  pointer-events: none;
}
#note-read.pop { transform: translateY(-4px); }

#hint {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 5; text-align: center; font-size: 11.5px; line-height: 1.85;
  color: #868d99; letter-spacing: 0.08em; pointer-events: none;
  transition: opacity .8s;
}
#hint.fade { opacity: 0.28; }
#hint kbd {
  font-family: inherit; font-size: 10.5px; padding: 1.5px 6px; margin: 0 2px;
  border-radius: 6px; background: rgba(255,255,255,0.8);
  border: 1px solid rgba(180,188,200,0.5); color: #5d636e;
}

#stat {
  position: fixed; left: 32px; bottom: 26px; z-index: 5;
  font-size: 10.5px; letter-spacing: 0.1em; color: #a7adb8;
  font-variant-numeric: tabular-nums; pointer-events: none;
}

/* 屏幕踏板 */
#pedals {
  position: fixed; right: 26px; bottom: 26px; z-index: 6;
  display: flex; gap: 9px;
}
#pedals button {
  width: 62px; padding: 9px 0; text-align: center; font-size: 10.5px; letter-spacing: 0.04em;
}

#toast {
  position: fixed; left: 50%; top: 30px; transform: translate(-50%, -14px);
  z-index: 8; padding: 8px 16px; border-radius: 12px; font-size: 12px; color: #454a55;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 10px 30px rgba(90,100,120,0.16);
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 载入遮罩 ---------------- */
#loading {
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; background: #f2f4f7;
  transition: opacity .6s;
}
#loading.hide { opacity: 0; pointer-events: none; }
#loading .ring {
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid rgba(140,148,162,0.18);
  border-top-color: #6d7480;
  animation: spin 0.9s linear infinite;
}
#loading p { font-size: 12px; letter-spacing: 0.26em; color: #969ca8; text-transform: uppercase; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  #panel { width: 200px; top: 16px; right: 14px; padding: 13px; }
  #btn-collapse { top: 16px; right: 14px; }
  #brand { top: 16px; left: 18px; }
  #brand h1 { font-size: 20px; }
  #note-read { left: 18px; bottom: 96px; font-size: 30px; }
  #stat { left: 18px; }
  #hint { font-size: 10.5px; width: 92%; }
  #pedals { right: 14px; bottom: 62px; }
  #pedals button { width: 54px; }
}
