/* universe.briaan.com — dome viewer chrome.
   One rule of taste: the film is the interface. Everything here is
   black glass that gets out of the way. */

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

html, body {
  height: 100%;
  background: #000;
  color: #ddd;
  font: 14px/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}

#dome {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;      /* we own all gestures */
  cursor: grab;
}
#dome.dragging { cursor: grabbing; }
#dome.idle { cursor: none; }

#feed {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 2px;
  height: 2px;
}

/* ---- entry gate ---- */

/* The gate floats OVER the live dome — the trailer is playing behind it,
   so this is only a scrim, never an image. */
#gate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: radial-gradient(ellipse at center,
              rgba(0,0,0,.30) 0%, rgba(0,0,0,.62) 55%, rgba(0,0,0,.85) 100%);
  z-index: 30;
  transition: opacity 1.4s ease;
}
#gate.leaving { opacity: 0; pointer-events: none; }

#gate h1 {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(52px, 11vw, 132px);
  letter-spacing: -.045em;       /* tracked in tight */
  line-height: .95;
  color: #fff;
}
#gate .credits {
  margin-top: 18px;
  font-size: 14px;
  letter-spacing: .01em;
  color: #fff;
}
#gate .credits i { font-style: italic; }
#gate .hint {
  margin-top: 10px;
  font-size: 13px;
  color: #fff;
  opacity: .72;
}
#gate .hint.orient {
  margin-top: 16px;
  opacity: .9;
}
#gate .hint.orient[hidden] { display: none; }

#enter {
  margin-top: 32px;
  padding: 15px 38px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.005em;
  color: #000;
  background: #fff;
  border: none;
  border-radius: 999px;          /* pill */
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease;
}
#enter:hover { transform: scale(1.04); }
#enter:active { transform: scale(.99); }

/* ---- player chrome ---- */

#chrome {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 26px 18px 14px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  z-index: 20;
  opacity: 1;
  transition: opacity .4s ease;
}
#chrome.hidden { opacity: 0; pointer-events: none; }

#chrome button {
  background: none;
  border: none;
  color: #ddd;
  font-size: 15px;
  width: 30px;
  cursor: pointer;
  padding: 4px 0;
}
#chrome button:hover { color: #fff; }

#time, #duration {
  font-size: 11px;
  color: #aaa;
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  text-align: center;
}

#scrub {
  position: relative;
  flex: 1;
  height: 22px;
  cursor: pointer;
  touch-action: none;   /* the browser must never steal the scrub gesture */
}
#scrub::before {           /* the track */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 10px;
  height: 2px;
  background: rgba(255,255,255,.22);
}
#buffered, #played {
  position: absolute;
  left: 0; top: 10px;
  height: 2px;
  width: 0;
}
#buffered { background: rgba(255,255,255,.35); }
#played   { background: #fff; }
#chapters { position: absolute; inset: 0; pointer-events: none; }
#chapters i {
  position: absolute;
  top: 8px;
  width: 2px;
  height: 6px;
  background: rgba(255,255,255,.55);
}

#quality {
  background: rgba(0,0,0,.4);
  color: #ccc;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 2px;
  font: inherit;
  font-size: 11px;
  padding: 3px 4px;
}

/* ---- notices & fallback ---- */

#notice {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.7);
  border: 1px solid rgba(255,255,255,.2);
  padding: 8px 14px;
  font-size: 12px;
  border-radius: 2px;
  z-index: 40;
}

#fallback[hidden] { display: none; }   /* author display beats [hidden] otherwise */
#fallback {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  text-align: center;
}
#fallback video { max-width: min(90vw, 90vh); max-height: 80vh; }
