html, body {
  margin: 0; padding: 0; height: 100%;
  background: #0a0a10; color: #eae7dd;
  font-family: system-ui, -apple-system, sans-serif;
}
.hidden { display: none !important; }

.topbar { padding: 20px 24px 0; }
.topbar h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: 0.3px; }

.player-wrap {
  max-width: 900px; margin: 24px auto; padding: 0 20px;
  display: flex; flex-direction: column; gap: 16px;
}
#movie { width: 100%; border-radius: 10px; background: #000; }

.primaryBtn {
  font: 600 15px/1 system-ui, sans-serif; color: #fff; background: #d9534f;
  border: none; padding: 14px 22px; border-radius: 999px; cursor: pointer; align-self: flex-start;
}
.primaryBtn:hover { background: #c74642; }

#view3d { position: fixed; inset: 0; background: #000; }
#c3d { display: block; width: 100vw; height: 100vh; touch-action: none; }

#hint {
  position: absolute; top: 14px; left: 14px; color: #eae7dd; font-size: 13px; line-height: 1.5;
  background: rgba(10,10,14,0.55); padding: 8px 12px; border-radius: 8px; pointer-events: none;
  max-width: 240px;
}

.ghostBtn {
  position: absolute; font: 600 13px system-ui, sans-serif; color: #eae7dd;
  background: rgba(10,10,14,0.55); border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
}
.corner-tl { top: 14px; right: 14px; }
.corner-tr { top: 60px; right: 14px; }
.corner-br { bottom: 26px; right: 26px; }

#joyBase, #lookZone { position: absolute; bottom: 26px; touch-action: none; user-select: none; }
#joyBase { left: 26px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.25); }
#joyKnob { position: absolute; width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,0.35); left: 34px; top: 34px; }
#lookZone { right: 0; width: 50vw; height: 60vh; bottom: 0; }

#chatPanel {
  position: absolute; bottom: 72px; right: 14px; width: 260px; max-height: 260px;
  background: rgba(10,10,14,0.75); border: 1px solid rgba(255,255,255,0.15); border-radius: 10px;
  display: flex; flex-direction: column; overflow: hidden;
}
#chatLog { flex: 1; overflow-y: auto; padding: 10px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.chatRow { display: flex; border-top: 1px solid rgba(255,255,255,0.12); }
.chatRow input { flex: 1; background: transparent; border: none; color: #eae7dd; padding: 8px; font-size: 12px; outline: none; }
.chatRow button { background: transparent; border: none; color: #d9534f; font: 600 12px system-ui; cursor: pointer; padding: 0 10px; }

.modalOverlay {
  position: fixed; inset: 0; background: rgba(5,5,8,0.85);
  display: flex; align-items: center; justify-content: center; z-index: 20;
}
.modalCard {
  background: #14141c; border: 1px solid rgba(255,255,255,0.1); border-radius: 14px;
  padding: 24px; width: 300px; display: flex; flex-direction: column; gap: 12px;
}
.modalCard h2 { margin: 0; font-size: 17px; font-weight: 600; }
.modalCard input[type="text"] {
  background: #0a0a10; border: 1px solid rgba(255,255,255,0.15); border-radius: 8px;
  color: #eae7dd; padding: 10px 12px; font-size: 14px; outline: none;
}
.label { margin: 4px 0 0; font-size: 12px; color: #9a978d; }
.colorRow { display: flex; gap: 10px; }
.colorSwatch {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer;
}
.colorSwatch.active { border-color: #fff; }
