:root {
  --bg: #160012;
  --bg2: #2b061b;

  --fuchsia1: #ff4fc3;
  --fuchsia2: #d4147e;
  --fuchsia3: #8f064e;
  --fuchsia4: #4d032b;

  --gold1: #fff3b0;
  --gold2: #ffd76a;
  --gold3: #d69a27;
  --gold4: #8f5b12;

  --jade: #18d88a;
  --textLight: #fff4c4;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 18px 0;
  background:
    radial-gradient(900px 700px at 18% 10%, rgba(255, 79, 195, .15), transparent 55%),
    radial-gradient(900px 700px at 82% 24%, rgba(255, 215, 106, .14), transparent 55%),
    radial-gradient(900px 700px at 50% 92%, rgba(24, 216, 138, .10), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}

.posterWrap {
  width: min(560px, 100vw);
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow:
    0 30px 120px rgba(0, 0, 0, .65),
    0 0 44px rgba(255, 79, 195, .12),
    0 0 38px rgba(255, 215, 106, .10);
  position: relative;

  /* กันปุ่ม fixed ทับเนื้อหาด้านล่าง */
  padding-bottom: 124px;
}

.posterImg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* CTA — Somwang999 Deep Fuchsia + Lucky Gold */
.cta {
  position: fixed;
  left: 50%;
  bottom: 16px;
  width: min(540px, 92vw);
  height: 76px;
  z-index: 50;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  border-radius: 999px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;

  font-weight: 1000;
  font-size: 28px;
  letter-spacing: .25px;

  color: var(--textLight);
  text-shadow:
    0 2px 0 rgba(0, 0, 0, .50),
    0 0 12px rgba(255, 243, 176, .35);

  background:
    radial-gradient(120% 180% at 18% 0%, rgba(255,255,255,.18), transparent 44%),
    linear-gradient(
      180deg,
      var(--fuchsia1) 0%,
      var(--fuchsia2) 38%,
      var(--fuchsia3) 72%,
      var(--fuchsia4) 100%
    );

  border: 2px solid var(--gold2);

  box-shadow:
    0 18px 70px rgba(0, 0, 0, .68),
    0 0 0 1px rgba(255,255,255,.10) inset,
    0 0 0 3px rgba(255, 215, 106, .20) inset,
    0 0 0 7px rgba(255, 79, 195, .14) inset,
    0 0 24px rgba(255, 215, 106, .38),
    0 0 36px rgba(255, 79, 195, .30);

  transform: translateX(-50%);
  transition: transform .22s ease, opacity .22s ease, filter .22s ease;
}

.cta span {
  position: relative;
  z-index: 2;
}

.spark {
  font-size: 30px;
  line-height: 1;
  color: var(--gold1);
  text-shadow:
    0 0 8px rgba(255, 243, 176, .95),
    0 0 16px rgba(255, 79, 195, .60),
    0 0 22px rgba(255, 215, 106, .40);
  animation: sparkBlink 1.45s ease-in-out infinite;
}

/* แสงทองวิ่งบนปุ่ม */
.cta::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(255, 243, 176, .12) 16%,
    rgba(255, 255, 255, .70) 30%,
    rgba(255, 215, 106, .24) 44%,
    transparent 64%
  );
  transform: translateX(-70%);
  opacity: .70;
  filter: blur(1px);
  animation: shineLucky 2.15s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Glow รอบปุ่ม */
.cta::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 215, 106, .75),
      rgba(255, 79, 195, .85),
      rgba(24, 216, 138, .45),
      rgba(255, 215, 106, .70)
    );
  opacity: .24;
  filter: blur(13px);
  z-index: -1;
  animation: auraLucky 2.8s ease-in-out infinite;
}

@keyframes shineLucky {
  0% {
    transform: translateX(-70%);
    opacity: .26;
  }

  42% {
    opacity: .98;
  }

  100% {
    transform: translateX(72%);
    opacity: .34;
  }
}

@keyframes auraLucky {
  0% {
    opacity: .16;
    transform: scale(.98);
  }

  50% {
    opacity: .34;
    transform: scale(1.035);
  }

  100% {
    opacity: .16;
    transform: scale(.98);
  }
}

@keyframes sparkBlink {
  0%, 100% {
    opacity: 1;
    transform: scale(1) rotate(-6deg);
  }

  45% {
    opacity: .80;
    transform: scale(1.12) rotate(3deg);
  }

  60% {
    opacity: 1;
    transform: scale(1.03) rotate(-2deg);
  }
}

@keyframes luckyPulse {
  0% {
    transform: translateX(-50%) scale(1);
    filter: brightness(1);
  }

  50% {
    transform: translateX(-50%) scale(1.035);
    filter: brightness(1.13);
  }

  100% {
    transform: translateX(-50%) scale(1);
    filter: brightness(1);
  }
}

.cta.pulse {
  animation: luckyPulse 2.55s ease-in-out infinite;
}

.cta.is-down {
  transform: translateX(-50%) translateY(10px) scale(.985);
  opacity: .92;
}

.cta.is-up {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
}

.cta:active {
  transform: translateX(-50%) scale(.985);
  filter: brightness(1.12);
}

@media (prefers-reduced-motion: reduce) {
  .cta::before,
  .cta::after,
  .cta.pulse,
  .spark {
    animation: none;
  }
}