:root {
  --bg: #07001A;
  --panel: #12062B;
  --text: #F8F3FF;
  --muted: #C7B8DE;
  --purple: #8B5CF6;
  --magenta: #EC48C6;
  --whatsapp: #25D366;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top left, rgba(236, 72, 198, 0.2), transparent 36rem),
    radial-gradient(circle at 80% 18%, rgba(139, 92, 246, 0.24), transparent 34rem),
    linear-gradient(180deg, #07001a 0%, #03000d 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.sr-only {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.language-dock {
  position: fixed;
  top: 16px;
  left: max(16px, calc(50% - 505px));
  z-index: 30;
  display: inline-flex;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 6px;
  background: rgba(7, 0, 26, 0.76);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.lang-button {
  min-width: 46px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  color: rgba(248, 243, 255, 0.78);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.lang-button.active {
  color: #080111;
  background: var(--whatsapp);
}

.effect-page {
  width: 100%;
  padding: 0;
}

.effect-frame {
  width: min(750px, 100%);
  margin: 0 auto;
  box-shadow: 0 0 80px rgba(236, 72, 198, 0.12);
}

.effect-frame.hidden {
  display: none;
}

.effect-slice {
  margin: 0;
  padding: 0;
}

.effect-slice img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

.composite-slice {
  position: relative;
}

.case-stage {
  position: absolute;
  top: 14%;
  left: 9%;
  display: flex;
  width: 82%;
  height: 68%;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px;
  border-radius: 18px;
  background: rgba(7, 0, 26, 0.36);
  box-shadow: inset 0 0 42px rgba(236, 72, 198, 0.12);
  clip-path: inset(0 round 18px);
  overscroll-behavior: contain;
  scroll-snap-type: y proximity;
  -webkit-overflow-scrolling: touch;
}

.case-slide {
  display: block;
  width: 86%;
  height: auto;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 106, 213, 0.46);
  border-radius: 16px;
  opacity: 1;
  object-fit: cover;
  object-position: center;
  scroll-snap-align: start;
  box-shadow: 0 0 24px rgba(236, 72, 198, 0.18);
}

.case-stage::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.video-stage {
  --video-slide-width: 58%;
  position: absolute;
  top: 6.4%;
  left: 7.8%;
  display: flex;
  width: 84.4%;
  height: 78%;
  gap: 22px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 0 30px;
  border-radius: 18px;
  background: rgba(7, 0, 26, 0.36);
  box-shadow: inset 0 0 42px rgba(236, 72, 198, 0.12);
  clip-path: inset(0 round 18px);
  contain: paint;
  overscroll-behavior-x: contain;
  scroll-padding-inline: calc((100% - var(--video-slide-width)) / 2);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.video-stage::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.video-scroll-cue {
  position: absolute;
  right: 32%;
  bottom: 16.8%;
  left: 32%;
  z-index: 2;
  display: block;
  height: 5px;
  opacity: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.08), 0 0 10px rgba(139, 92, 246, 0.22);
  pointer-events: none;
}

.video-scroll-cue span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--video-cue-progress, 0%);
  width: var(--video-cue-width, 38%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(248, 243, 255, 0.92), rgba(139, 92, 246, 0.95));
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.56);
}

.video-stage::before,
.video-stage::after {
  content: "";
  flex: 0 0 calc((100% - var(--video-slide-width)) / 2);
}

.video-slide {
  position: relative;
  display: grid;
  min-width: 0;
  height: 100%;
  flex: 0 0 var(--video-slide-width);
  place-items: center;
  overflow: hidden;
  padding: 0;
  scroll-snap-align: center;
}

.video-stage video {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  transform: translate(-50%, -50%);
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(255, 106, 213, 0.5);
  border-radius: 18px;
  background: #05000f;
  box-shadow: 0 0 28px rgba(236, 72, 198, 0.22);
  object-fit: contain;
}

.case-composite-zh {
  aspect-ratio: 750 / 624;
  overflow: hidden;
}

.case-composite-zh > img {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-34.45%);
}

.case-composite-zh .case-stage {
  top: 12%;
  height: 72%;
}

.floating-whatsapp {
  position: fixed;
  left: 50%;
  bottom: max(4px, env(safe-area-inset-bottom));
  z-index: 35;
  display: block;
  width: min(60vw, 260px);
  transform: translateX(-50%);
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.42));
}

.floating-whatsapp-image {
  display: block;
  width: 100%;
  height: auto;
}

.floating-whatsapp-image[hidden] {
  display: none;
}

.video-audio-toggle {
  position: fixed;
  right: max(14px, calc(50% - 356px));
  bottom: max(84px, calc(env(safe-area-inset-bottom) + 84px));
  z-index: 36;
  display: none;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(236, 72, 198, 0.44);
  border-radius: 999px;
  color: rgba(248, 243, 255, 0.92);
  background: rgba(16, 6, 43, 0.84);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28), inset 0 0 22px rgba(236, 72, 198, 0.16);
  backdrop-filter: blur(18px);
  cursor: pointer;
}

.video-audio-toggle.visible {
  display: inline-flex;
}

.video-audio-toggle[data-muted="true"] {
  border-color: rgba(255, 106, 213, 0.56);
  color: #f8f3ff;
  background: rgba(20, 7, 50, 0.9);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.3), 0 0 18px rgba(236, 72, 198, 0.2), inset 0 0 24px rgba(236, 72, 198, 0.2);
}

.video-audio-icon {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.video-audio-icon-off,
.video-audio-toggle[data-muted="true"] .video-audio-icon-on {
  display: none;
}

.video-audio-toggle[data-muted="true"] .video-audio-icon-off {
  display: block;
}

.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  padding: calc(env(safe-area-inset-top) + 58px) 14px calc(env(safe-area-inset-bottom) + 18px);
  overflow: hidden;
  background: rgba(3, 0, 13, 0.98);
}

.video-lightbox.hidden {
  display: none;
}

.video-lightbox-close {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 81;
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(248, 243, 255, 0.9);
  background: rgba(7, 0, 26, 0.78);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.video-lightbox-player {
  display: block;
  width: auto;
  height: min(78svh, 700px);
  max-width: 92vw;
  max-height: calc(100svh - 104px);
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(255, 106, 213, 0.5);
  border-radius: 18px;
  background: #05000f;
  box-shadow: 0 0 34px rgba(236, 72, 198, 0.32);
  object-fit: contain;
}

body.video-lightbox-open {
  overflow: hidden;
}

body.video-lightbox-open .floating-whatsapp,
body.video-lightbox-open .video-audio-toggle {
  display: none;
}

@media (max-width: 780px) {
  .language-dock {
    top: 10px;
    left: 10px;
  }

  .floating-whatsapp {
    bottom: max(12px, env(safe-area-inset-bottom));
    width: min(58vw, 230px);
  }

  .video-audio-toggle {
    right: 12px;
    bottom: max(82px, calc(env(safe-area-inset-bottom) + 82px));
    width: 50px;
    height: 50px;
  }

  .case-stage {
    gap: 10px;
    padding: 10px;
  }
}
