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

html, body {
  background: #ffffff;
  width: 100%;
  height: 100%;
  overflow: hidden;          /* page never scrolls */
  overscroll-behavior: none;
}

img { display: block; }

/* Fixed full-screen box that keeps the design centered both ways; scales it down to fit (see script.js) */
.viewport {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage {
  position: relative;
  width: 620px;
  height: 632px;            /* design content box: logo top → bottom text row */
  flex: none;
  transform-origin: center center;
}

.stage > * { position: absolute; }

/* ---- Positions (design x − 410.07, design y − 80.75) ---- */
.logo      { left: 198.43px; top: 0; line-height: 0; }
.player    { left: 0;        top: 88.69px; width: 620px; height: 348.67px; }
.avatar    { left: 0;        top: 484.54px; }
.t-guest   { left: 64.93px;  top: 498.25px; }
.btn-share { left: 535.65px; top: 484.54px; }
.btn-download { left: 583.89px; top: 484.54px; }
.t-title   { left: -1.07px;  top: 562.25px; }
.t-info    { left: -1.07px;  top: 612.25px; }
.t-views   { left: 539.93px; top: 612.25px; }

/* ---- Buttons ---- */
.btn {
  border: 0;
  background: none;
  cursor: pointer;
  line-height: 0;
  transition: opacity .15s ease;
}
.btn:hover { opacity: .85; }
.btn:focus-visible { outline: 2px solid #2c2c2c; outline-offset: 2px; }

/* ---- Player ---- */
.player {
  overflow: hidden;
  background: #2c2c2c;
}

.player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  opacity: 0;
  transition: opacity .5s ease;
}
.player.is-playing video { opacity: 1; }

/* Video can't be interacted with: no clicks, taps, double-click fullscreen or right-click menu */
.player video { pointer-events: none; user-select: none; }
.video-shield { position: absolute; inset: 0; z-index: 2; }
.player video::-webkit-media-controls { display: none !important; }

.cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #2c2c2c;
  perspective: 600px;
  transition: opacity .5s ease, visibility 0s linear .5s;
}
.player.is-playing .cover { opacity: 0; visibility: hidden; }

/* Flower sits exactly where it is in the design (x 693.92, y 312.63) */
.flower-wrap {
  position: absolute;
  left: 283.85px;
  top: 143.19px;
  width: 52.09px;
  height: 62.21px;
  transform-style: preserve-3d;
}

/* 360° turn around the vertical axis, front face travelling left → right, 5s */
.flower {
  width: 100%;
  height: 100%;
  animation: lily-spin 5s linear forwards;
}

@keyframes lily-spin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .flower { animation: none; }
}
