:root {
  --accent: #e1452d;
  --font: "Inter", "Helvetica Neue", Arial, sans-serif;
}

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

html { background: #050505; }
body { background: transparent; color: #fff; font-family: var(--font); }

/* 唱片舖相片背景（scale / blur / pan 由 scroll 進度控制） */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("assets/store-bg.webp") center 34% / cover no-repeat;
  transform-origin: center 60%;
  will-change: transform, filter, background-position;
}

/* 幕一黑色 veil：上面黑、底部半圓形透出背景相（opacity 由 scroll 控制） */
.bg-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 90vh 14vh at 50% 100%, rgba(0,0,0,0) 45%, rgba(5,5,5,0.97) 100%);
}

/* player 專用 veil：相反嘅圓頂（頂部黑色圓頂向下彎，唔遮唱盤），scroll 到底先淡入 */
.bg-veil-2 {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse 185vh 56vh at 50% 0%, rgba(5,5,5,0.97) 45%, rgba(5,5,5,0) 100%);
}

/* 固定鋪滿視窗嘅 3D canvas（透明，背景透出嚟） */
#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  display: block;
}

/* 製造捲動長度 */
#scroll {
  position: relative;
  z-index: 3;
  height: 500vh;
  pointer-events: none;
}

/* 文字 overlay */
.ui { position: fixed; z-index: 4; pointer-events: none; text-shadow: 0 2px 16px rgba(0,0,0,0.7); }

#heroTag {
  left: 50%; bottom: 16%; transform: translateX(-50%);
  font-size: 13px; letter-spacing: 3px; color: rgba(255,255,255,0.78);
  text-transform: uppercase; white-space: nowrap; text-align: center;
}
#heroTag b { font-weight: 800; color: #fff; letter-spacing: 4px; }

#hint {
  left: 50%; bottom: 24px; transform: translateX(-50%);
  font-size: 11px; letter-spacing: 2px; color: rgba(255,255,255,0.55);
}

#naTitle {
  top: 30px; left: 32px; font-size: 22px; font-weight: 800; letter-spacing: 1px; color: #fff; opacity: 0;
}

#outro {
  left: 50%; top: 12%; transform: translateX(-50%); text-align: center; opacity: 0;
}
#outro h2 { font-size: clamp(28px, 5vw, 56px); font-weight: 800; color: #fff; }
#outro .cta {
  display: inline-block; margin-top: 18px; pointer-events: auto;
  background: var(--accent); color: #fff; text-decoration: none;
  padding: 11px 22px; border-radius: 30px; font-size: 13px; font-weight: 600; letter-spacing: 1px;
  text-shadow: none; box-shadow: 0 6px 20px rgba(0,0,0,0.45);
}

/* 調較面板 */
#tune {
  position: fixed; top: 12px; right: 12px; z-index: 99;
  width: 290px; padding: 14px 16px; border-radius: 12px;
  background: rgba(15,12,16,0.92); color: #fff; font: 12px/1.5 var(--font);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5); backdrop-filter: blur(4px);
}
#tune h4 { font-size: 13px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: baseline; }
#tune .tip { font-size: 10px; color: #e1452d; font-weight: 400; }
#tune label { display: grid; grid-template-columns: 1fr; gap: 3px; margin-bottom: 9px; color: rgba(255,255,255,0.85); }
#tune input[type=range] { width: 100%; accent-color: #e1452d; }
#tune label b { color: #e1452d; font-weight: 700; }
#tune pre { margin-top: 6px; padding: 8px; background: rgba(0,0,0,0.4); border-radius: 6px; font-size: 11px; color: #9fe; white-space: pre-wrap; user-select: all; }
@media (max-width: 600px) {
  #tune { width: 200px; padding: 9px 11px; top: 8px; right: 8px; background: rgba(15,12,16,0.8); }
  #tune label { margin-bottom: 6px; font-size: 11px; }
}

/* WebGL 唔支援時嘅靜態後備 */
.static-fallback { display: none; }
body.no-webgl .static-fallback {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: fixed; inset: 0; gap: 28px; text-align: center; z-index: 4;
}
body.no-webgl .static-fallback p { font-size: 13px; letter-spacing: 2px; color: rgba(255,255,255,0.8); text-transform: uppercase; text-shadow: 0 2px 14px rgba(0,0,0,0.6); }
body.no-webgl .static-fallback b { color: #fff; font-weight: 800; }
body.no-webgl #scroll { display: none; }
.static-vinyl {
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--accent) 0 12%, #141414 13% 16%, #0c0c0c 17%);
}
