
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: transparent;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  overflow: hidden;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: grid;
  place-items: center;
  perspective: 1100px;
  overflow: hidden;
  background: transparent;
}

/* 3D phone canvas */
#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

/* Loading message */
.loading {
  position: absolute;
  z-index: 5;
  color: #777;
  font-size: 13px;
  pointer-events: none;
}

/* Activation button is not displayed.
   The phone itself will be the click target. */
.activate {
  display: none;
}

/* Optional instruction text */
.hint {
  display: none;
}

/* Video player */
.player {
  position: absolute;
  z-index: 6;

  width: min(76vw, 270px, calc(76vh * 0.4769));
  aspect-ratio: 2.17 / 4.55;

  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  border-radius: 22px;
  overflow: hidden;
  background: #080808;

  display: block;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.25);
}

/* Hidden state */
.player[hidden] {
  display: none;
}

/* Video fills the phone screen */
.video-frame {
  position: absolute;
  inset: 0;
  background: #000;
}

.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Title bar overlays the top of the video */
.player-top {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;

  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 10px;
  color: white;
  background: rgba(12, 12, 12, 0.82);
  backdrop-filter: blur(8px);
  font-size: 11px;
}

.player-top button {
  border: 0;
  background: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

/* Previous / Next navigation overlays bottom */
.video-nav {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 0;
  right: 0;

  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 9px;
  color: white;
  background: rgba(12, 12, 12, 0.82);
  backdrop-filter: blur(8px);
  font-size: 10px;
}

.video-nav button {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  color: white;
  background: rgba(35, 35, 35, 0.9);
  padding: 5px 9px;
  cursor: pointer;
  font-size: 10px;
}

/* Smaller screens */
@media (max-width: 500px) {
  .stage {
    min-height: 360px;
  }

  .player {
    width: min(72vw, 260px, calc(74vh * 0.4769));
  }
}

/* Short or wide embed containers */
@media (max-height: 500px) {
  .player {
    width: auto;
    height: 90%;
    aspect-ratio: 2.17 / 4.55;
  }
}
