:root {
  --ui-fade: 0.75s;
  --pane-w: min(52vmin, 820px);
  --pane-h: calc(var(--pane-w) * 0.67);
  --pane-image: url("img/prisoners.jpg");
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #000;
  color: #e7ecff;
  font: 400 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow: hidden;
}
#stars {
  position: fixed;
  inset: 0;
  display: block;
  z-index: 0;
}
.title, .credit {
  position: fixed;
  width: 100%;
  text-align: center;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 14px rgba(0,0,0,.65);
  z-index: 3;
}
.title {
  top: 18px;
  font-size: clamp(20px, 3.6vmin, 44px);
  font-weight: 700;
}
.credit {
  bottom: 14px;
  font-size: 12px;
  opacity: .85;
}
.zone {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  perspective: 1200px;
  z-index: 2;
}
.pane {
  width: var(--pane-w);
  height: var(--pane-h);
  transform-origin: 50% 50%;
  will-change: transform;
  /* Single painted element: image + sheen + border */
  background:
    radial-gradient(100% 120% at 10% 10%, rgba(255,255,255,.25), transparent 45%),
    linear-gradient(105deg,
      rgba(255,255,255,0.28) 0%,
      rgba(255,255,255,0.12) 24%,
      rgba(255,255,255,0.0) 50%,
      rgba(0,150,255,0.08) 64%,
      rgba(255,255,255,0.2) 100%),
    var(--pane-image) center/cover no-repeat;
  border: 1.5px solid rgba(255,255,255,.8);
  box-shadow:
    inset 0 0 22px rgba(255,255,255,.15),
    inset 0 0 2px rgba(255,255,255,.9),
    0 20px 40px rgba(0,0,0,.55);
}
.hud {
  position: fixed;
  left: 14px;
  bottom: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(10,14,24,.56);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  z-index: 4;
  transition: opacity var(--ui-fade) ease;
}
.hud.hide { opacity: 0; pointer-events: none; }
.hud label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; opacity: .9;
}
.hud input[type="range"] { width: 120px; }
.hud .file {
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  cursor: pointer;
}
.hud .file input { display: none; }
@media (max-width: 700px) {
  :root { --pane-w: 80vmin; }
  .hud { left: 50%; transform: translateX(-50%); bottom: 10px; gap: 10px; }
  .hud input[type="range"] { width: 90px; }
}
