:root { color-scheme: dark; --text: #f1f1f1; --muted: #bbb; --red: #ff0033; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; background: #000; }
body { color: var(--text); font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body.idle { cursor: none; }

/* The video fills the window; the bar floats over it and fades away while the video plays. */
#stage { position: fixed; inset: 0; background: #000; }
#intro { position: absolute; top: 40%; left: 0; right: 0; margin: 0 auto; max-width: 32em; padding: 0 16px;
  text-align: center; color: var(--muted); }

/* One layer per player, exactly the size of the picture. YouTube's frame reaches --crop past it
   above and below, so the title bar and logo YouTube draws at the frame's edges are cut off. */
.player { position: absolute; overflow: hidden; transition: opacity 1s linear; }
.player.entering { opacity: 0; }
.player iframe { position: absolute; left: 0; width: 100%; border: 0; display: block;
  top: calc(-1 * var(--crop, 0px)); height: calc(100% + 2 * var(--crop, 0px)); }
/* Until it has played, taps go straight to YouTube's frame (phones only let a tap there start
   it); afterwards the shield takes every click, so YouTube never shows its controls. */
.player.started iframe { pointer-events: none; }
.cover { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  background: #000 center / cover no-repeat; }
.cover[hidden] { display: none; }
.glyph { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); border: 2px solid rgba(255, 255, 255, .85); }
.glyph svg { width: 36px; height: 36px; fill: #fff; }
#shield { position: absolute; inset: 0; z-index: 2; }
/* An ad is playing: show YouTube's whole player, uncropped and clickable, so it can be seen and skipped. */
.player.ad iframe { top: 0; height: 100%; pointer-events: auto; }
.player.ad .cover { display: none; }

#top { position: fixed; top: 0; left: 0; right: 0; z-index: 5; transition: opacity .35s;
  padding: max(10px, env(safe-area-inset-top)) 12px 22px;
  background: linear-gradient(rgba(0, 0, 0, .75), rgba(0, 0, 0, 0)); }
body.idle #top { opacity: 0; pointer-events: none; }
#bar { display: flex; gap: 8px; max-width: 720px; margin: 0 auto; }
#link { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid #444; border-radius: 8px;
  background: rgba(15, 15, 15, .85); color: var(--text); font: inherit; }
#link:focus { outline: 2px solid var(--red); outline-offset: -1px; }
#bar button { padding: 9px 18px; border: 0; border-radius: 8px; background: var(--red); color: #fff;
  font: inherit; font-weight: 600; cursor: pointer; }
#status { max-width: 720px; margin: 6px auto 0; color: var(--muted); font-size: 13px; text-align: center;
  text-shadow: 0 1px 3px #000; }
#status:empty { display: none; }
#status a { color: var(--text); }
