/* Live demo on the home page. Every frame is a real render of roblox.com with RoCreate;
   this file only frames them and draws the cursor, zooms and captions on top. */
.demo-wrap { margin: 40px auto 0; max-width: 1120px; }
.demo-stage { position: relative; width: 100%; aspect-ratio: 1440 / 940; }
.demo {
  position: absolute; left: 0; top: 0;
  width: 1440px; height: 940px;
  transform-origin: 0 0;
  border-radius: 18px;
  overflow: hidden;
  background: #0b0c0e;
  border: 1px solid #2a2c33;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .6);
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  user-select: none;
}
.demo-poster { width: 100%; height: 100%; object-fit: cover; object-position: top left; border-radius: 16px; border: 1px solid var(--line); }

/* browser frame */
.d-chrome { height: 40px; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: #1c1d22; border-bottom: 1px solid #2a2c33; }
.d-dots { display: flex; gap: 8px; }
.d-dots i { width: 12px; height: 12px; border-radius: 50%; }
.d-dots i:nth-child(1) { background: #ff5f57; } .d-dots i:nth-child(2) { background: #febc2e; } .d-dots i:nth-child(3) { background: #28c840; }
.d-url { flex: 1; max-width: 560px; margin: 0 auto; height: 26px; border-radius: 13px; background: #0f1012; display: flex; align-items: center; gap: 8px; padding: 0 14px; font-size: 13px; color: #9aa0a9; }
.d-url b { color: #e8eaed; font-weight: 500; }
.d-badge { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fbbf24; border: 1px solid rgba(251, 191, 36, .4); border-radius: 999px; padding: 3px 9px; opacity: 0; transition: opacity .3s; }
.d-badge.on { opacity: 1; }
.d-ext { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; transition: background .2s; }
.d-ext.on { background: rgba(255, 255, 255, .14); }

/* the page */
.d-screen { position: relative; width: 1440px; height: 900px; overflow: hidden; background: #0b0c0e; }
.d-cam { position: absolute; inset: 0; transform-origin: 0 0; transition: transform 1s cubic-bezier(.45, .05, .2, 1); }
.d-layer { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; opacity: 0; transition-property: opacity; transition-timing-function: ease; }
.d-layer.on { opacity: 1; }
.d-layer.wipe { opacity: 1; clip-path: inset(0 0 0 100%); }
.d-layer.wipe.go { clip-path: inset(0 0 0 0); transition: clip-path 1.8s cubic-bezier(.6, .05, .25, 1); }
.d-sprites { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.d-sprite { position: absolute; background-repeat: no-repeat; background-size: 1440px 900px; will-change: transform, opacity; }
.d-clip { position: absolute; overflow: hidden; }
.d-sharp { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.d-sharp.on { opacity: 1; }
.d-glow { position: absolute; top: 0; bottom: 0; left: 100%; width: 3px; background: #4ef0d1; box-shadow: 0 0 22px 6px rgba(78, 240, 209, .55); opacity: 0; z-index: 5; }
.d-glow.go { opacity: 1; left: 0; transition: left 1.8s cubic-bezier(.6, .05, .25, 1); }
.d-glow.done { opacity: 0; transition: opacity .3s; }
.d-popup { position: absolute; right: 10px; top: 4px; z-index: 12; border-radius: 12px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .1); opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s; }
.d-popup.on { opacity: 1; transform: none; }
.d-popup img { display: block; }
.d-keys { position: absolute; left: 50%; top: 45%; z-index: 12; display: flex; gap: 14px; transform: translate(-50%, -50%) scale(.92); opacity: 0; transition: opacity .2s, transform .2s; }
.d-keys.on { opacity: 1; transform: translate(-50%, -50%); }
.d-keys kbd { min-width: 92px; padding: 20px 26px; border-radius: 18px; background: rgba(29, 32, 38, .94); border: 1px solid rgba(255, 255, 255, .16); border-bottom-width: 5px; font-family: inherit; font-size: 40px; font-weight: 700; line-height: 1; color: #fff; text-align: center; box-shadow: 0 20px 40px rgba(0, 0, 0, .5); transition: transform .08s, border-bottom-width .08s; }
.d-keys kbd.press { transform: translateY(4px); border-bottom-width: 1px; }
.d-caption {
  position: absolute; left: 24px; bottom: 24px; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px 13px 16px;
  background: rgba(11, 12, 14, .88); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px;
  font-size: 19px; color: #e2e8f0;
  transform: translateY(10px); opacity: 0; transition: transform .35s ease, opacity .35s ease;
}
.d-caption.on { transform: none; opacity: 1; }
.d-caption b { color: #fff; }
.d-caption i { width: 10px; height: 10px; border-radius: 50%; background: #4ef0d1; box-shadow: 0 0 0 5px rgba(78, 240, 209, .18); }

/* cursor (over the whole window, so it can reach the toolbar) */
.d-cursor { position: absolute; left: 0; top: 0; z-index: 30; pointer-events: none; opacity: 0; transition: transform .75s cubic-bezier(.45, .05, .25, 1), opacity .3s; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); }
.d-cursor.on { opacity: 1; }
.d-cursor svg { display: block; }
.d-ring { position: absolute; left: -12px; top: -12px; width: 50px; height: 50px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .9); opacity: 0; transform: scale(.3); }
.d-cursor.click .d-ring { animation: d-ring .45s ease-out; }
@keyframes d-ring { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.1); } }

/* controls under the window */
.demo-controls { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }
.demo-chap { position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.demo-chap:hover { color: var(--text); border-color: #3a3d46; }
.demo-chap.on { color: var(--text); border-color: rgba(78, 240, 209, .45); }
.demo-chap .fill { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--teal); }
.demo-chap span { position: relative; }
.demo-play { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.demo-play:hover { border-color: #3a3d46; }
.demo-chap:focus-visible, .demo-play:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.demo-note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 10px; }
@keyframes demo-fill { from { width: 0; } to { width: 100%; } }

