* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: #0b2948;
  overflow: hidden;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #f5ab43;
  overflow: hidden;
}

.video-scene,
.poster-scene,
.ripple-layer {
  position: absolute;
  inset: 0;
}

.video-scene {
  z-index: 3;
  background: #0b2948;
  transition: opacity 1100ms ease, filter 1100ms ease;
}

.video-scene.is-fading {
  opacity: 0;
  filter: blur(8px);
  pointer-events: none;
}

video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #0b2948;
}

.poster-scene {
  z-index: 1;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 248, 225, 0.22), transparent 28%),
    #f5ab43;
  clip-path: circle(0% at 50% 50%);
}

.poster-scene.is-revealed {
  animation: revealPoster 2100ms cubic-bezier(0.22, 0.88, 0.22, 1) forwards;
}

.poster-scene img {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  filter: saturate(1.03) contrast(1.02);
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.poster-scene img.is-switching {
  opacity: 0;
  transform: scale(0.985);
}

.poster-nav {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%) translateY(16px);
  padding: 10px 14px;
  border: 1px solid rgba(255, 248, 225, 0.34);
  border-radius: 999px;
  background: rgba(11, 41, 72, 0.88);
  box-shadow: 0 14px 36px rgba(5, 22, 40, 0.28);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 360ms ease,
    transform 360ms ease;
}

.poster-scene.is-revealed .poster-nav {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-button {
  display: grid;
  place-items: center;
  width: 46px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  color: #0b2948;
  background: #fff8e1;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
}

.nav-button:disabled {
  opacity: 0.38;
  cursor: default;
}

.page-indicator {
  min-width: 54px;
  color: #fff8e1;
  font-size: 16px;
  text-align: center;
}

.ripple-layer {
  z-index: 2;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
}

.ripple-layer.is-active {
  opacity: 1;
}

.ripple {
  position: absolute;
  width: 16vmin;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 248, 225, 0.78);
  border-radius: 50%;
  box-shadow:
    0 0 22px rgba(255, 248, 225, 0.34),
    inset 0 0 18px rgba(255, 248, 225, 0.16);
  opacity: 0;
}

.ripple-layer.is-active .ripple-a {
  animation: ripple 1700ms ease-out forwards;
}

.ripple-layer.is-active .ripple-b {
  animation: ripple 1900ms 170ms ease-out forwards;
}

.ripple-layer.is-active .ripple-c {
  animation: ripple 2200ms 320ms ease-out forwards;
}

.play-fallback {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon text"
    "icon hint";
  column-gap: 16px;
  align-items: center;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 248, 225, 0.72);
  border-radius: 18px;
  padding: 18px 26px 18px 22px;
  color: #fff8e1;
  background: rgba(11, 41, 72, 0.94);
  box-shadow:
    0 20px 58px rgba(2, 11, 22, 0.38),
    0 0 0 8px rgba(255, 248, 225, 0.08);
  font-size: 22px;
  letter-spacing: 0;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.play-fallback:hover {
  transform: translate(-50%, -50%) scale(1.03);
  box-shadow:
    0 24px 70px rgba(2, 11, 22, 0.46),
    0 0 0 10px rgba(255, 248, 225, 0.12);
}

.play-fallback.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.play-icon {
  grid-area: icon;
  width: 54px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff8e1;
  position: relative;
}

.play-icon::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 15px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid #0b2948;
}

.play-text {
  grid-area: text;
  font-weight: 700;
}

.play-hint {
  grid-area: hint;
  margin-top: 3px;
  font-size: 14px;
  opacity: 0.82;
}

@keyframes revealPoster {
  0% {
    clip-path: circle(0% at 50% 50%);
    filter: brightness(1.12) blur(8px);
  }
  42% {
    clip-path: circle(34% at 50% 50%);
    filter: brightness(1.08) blur(2px);
  }
  100% {
    clip-path: circle(150% at 50% 50%);
    filter: brightness(1) blur(0);
  }
}

@keyframes ripple {
  0% {
    transform: scale(0.22);
    opacity: 0.9;
  }
  60% {
    opacity: 0.45;
  }
  100% {
    transform: scale(9);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-scene,
  .poster-scene,
  .ripple {
    animation: none !important;
    transition: none !important;
  }

  .poster-scene.is-revealed {
    clip-path: none;
  }
}
