:root {
  --bg: #040713;
  --bg2: #090d20;

  --cyan: #22f7ff;
  --blue: #126fff;
  --deepBlue: #071b72;

  --red1: #ff4646;
  --red2: #e0182f;
  --red3: #930b19;

  --purple: #8d35ff;
  --pink: #ff2bd6;

  --textLight: #ffffff;
}

* {
  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(34, 247, 255, .14), transparent 55%),
    radial-gradient(900px 700px at 82% 24%, rgba(255, 70, 70, .13), transparent 55%),
    radial-gradient(900px 700px at 50% 92%, rgba(141, 53, 255, .12), 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, .68),
    0 0 44px rgba(34, 247, 255, .10),
    0 0 38px rgba(255, 70, 70, .10);
  position: relative;

  /* กันปุ่ม fixed ทับเนื้อหาด้านล่าง */
  padding-bottom: 124px;
}

.posterImg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* =========================================
   MEGASPIN — ESPORTS POWER CTA
========================================= */

.cta {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));

  width: min(520px, 92vw);
  height: 74px;

  z-index: 100;

  display: flex;
  align-items: center;

  padding: 7px 20px;

  border-radius: 999px;

  text-decoration: none;
  -webkit-tap-highlight-color: transparent;

  color: #fff;

  /*
    เราทำ border โปร่งใส
    แล้วใช้ background 2 ชั้น
    เพื่อสร้าง Energy Border
  */
  border: 2px solid transparent;

  background:
    linear-gradient(180deg,
      #10182d 0%,
      #070c19 52%,
      #030711 100%) padding-box,

    linear-gradient(100deg,
      #27f4ff 0%,
      #247dff 28%,
      #853cff 55%,
      #ff315f 80%,
      #ff4b38 100%) border-box;

  box-shadow:
    0 18px 55px rgba(0, 0, 0, .68),

    0 0 18px rgba(39, 244, 255, .20),

    0 0 24px rgba(133, 60, 255, .12),

    0 0 28px rgba(255, 49, 95, .13),

    inset 0 1px 0 rgba(255, 255, 255, .10),

    inset 0 -5px 14px rgba(0, 0, 0, .30);

  transform: translateX(-50%);

  overflow: hidden;

  isolation: isolate;

  animation:
    powerPulse 5s ease-in-out infinite;

  transition:
    transform .18s ease,
    filter .18s ease,
    box-shadow .18s ease;
}


/* -----------------------------------------
   แสง Energy Sweep
----------------------------------------- */

.cta::before {
  content: "";

  position: absolute;

  top: -25%;
  bottom: -25%;

  left: -45%;

  width: 32%;

  z-index: 0;

  transform:
    skewX(-22deg) translateX(-250%);

  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(39, 244, 255, .05) 15%,
      rgba(255, 255, 255, .80) 50%,
      rgba(255, 49, 95, .12) 85%,
      transparent 100%);

  filter: blur(1px);

  pointer-events: none;

  animation:
    energySweep 3.6s ease-in-out infinite;
}


/* -----------------------------------------
   Glow ด้านนอก
----------------------------------------- */

.cta::after {
  content: "";

  position: absolute;

  inset: -5px;

  z-index: -1;

  border-radius: inherit;

  background:
    linear-gradient(90deg,
      rgba(39, 244, 255, .70),
      rgba(36, 125, 255, .35),
      rgba(133, 60, 255, .55),
      rgba(255, 49, 95, .70));

  filter: blur(14px);

  opacity: .10;

  pointer-events: none;

  animation:
    energyAura 5s ease-in-out infinite;
}


/* =========================================
   LIGHTNING ICON
========================================= */

.ctaBolt {
  position: relative;

  z-index: 2;

  flex: 0 0 auto;

  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  margin-right: 12px;

  border-radius: 50%;

  font-size: 23px;

  background:
    linear-gradient(145deg,
      rgba(39, 244, 255, .17),
      rgba(133, 60, 255, .12));

  border:
    1px solid rgba(39, 244, 255, .30);

  box-shadow:
    inset 0 0 12px rgba(39, 244, 255, .08),
    0 0 12px rgba(39, 244, 255, .16);

  filter:
    drop-shadow(0 0 6px rgba(39, 244, 255, .75));

  animation:
    boltPower 3.6s ease-in-out infinite;
}


/* =========================================
   TEXT
========================================= */

.ctaCopy {
  position: relative;

  z-index: 2;

  display: flex;
  flex-direction: column;

  line-height: 1.08;
}


.ctaCopy small {
  margin-bottom: 3px;

  color:
    rgba(255, 255, 255, .55);

  font-size: 9px;

  font-weight: 800;

  letter-spacing: 1.8px;
}


.ctaCopy strong {
  font-size: 22px;

  font-weight: 950;

  letter-spacing: -.2px;

  color: #fff;

  text-shadow:
    0 2px 0 rgba(0, 0, 0, .40),

    0 0 10px rgba(39, 244, 255, .20);
}


/* =========================================
   ARROW
========================================= */

.ctaArrow {
  position: relative;

  z-index: 2;

  margin-left: auto;

  padding-bottom: 4px;

  font-size: 36px;

  font-weight: 300;

  line-height: 1;

  color: #fff;

  opacity: .92;

  text-shadow:
    0 0 10px rgba(39, 244, 255, .55);

  animation:
    arrowMove 2.4s ease-in-out infinite;
}


/* =========================================
   ANIMATIONS
========================================= */

/*
   แสงจะวิ่งผ่านแล้วเว้นช่วง
   ไม่วิ่งตลอดเวลา
*/
@keyframes energySweep {

  0%,
  18% {
    transform:
      skewX(-22deg) translateX(-250%);
    opacity: 0;
  }

  25% {
    opacity: .35;
  }

  40% {
    transform:
      skewX(-22deg) translateX(650%);
    opacity: .82;
  }

  48%,
  100% {
    transform:
      skewX(-22deg) translateX(650%);
    opacity: 0;
  }

}


/*
   ปุ่มขยายเบามาก
   เพื่อไม่ให้ดูเด้งแรง
*/
@keyframes powerPulse {

  0%,
  38%,
  100% {
    transform:
      translateX(-50%) scale(1);

    filter:
      brightness(1);
  }

  48% {
    transform:
      translateX(-50%) scale(1.018);

    filter:
      brightness(1.07);
  }

  58% {
    transform:
      translateX(-50%) scale(1);
  }

}


/*
   Glow จะเพิ่มตอนแสงผ่าน
*/
@keyframes energyAura {

  0%,
  34%,
  100% {
    opacity: .09;
  }

  48% {
    opacity: .28;
  }

  62% {
    opacity: .11;
  }

}


/*
   สายฟ้าขยับเฉพาะเป็นช่วง
*/
@keyframes boltPower {

  0%,
  25%,
  100% {
    transform:
      rotate(-5deg) scale(1);
  }

  34% {
    transform:
      rotate(4deg) scale(1.12);
  }

  41% {
    transform:
      rotate(-2deg) scale(1.04);
  }

}


/*
   ลูกศรชวนกด
*/
@keyframes arrowMove {

  0%,
  100% {
    transform:
      translateX(0);
  }

  50% {
    transform:
      translateX(4px);
  }

}


/* =========================================
   PRESS EFFECT
========================================= */

.cta:active {
  transform:
    translateX(-50%) scale(.985);

  filter:
    brightness(1.15);

  box-shadow:
    0 10px 32px rgba(0, 0, 0, .60),

    0 0 26px rgba(39, 244, 255, .35),

    0 0 30px rgba(255, 49, 95, .22);
}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 390px) {

  .cta {
    height: 68px;

    padding:
      6px 17px;

    width:
      94vw;
  }


  .ctaBolt {
    width: 38px;
    height: 38px;

    margin-right: 10px;

    font-size: 20px;
  }


  .ctaCopy strong {
    font-size: 20px;
  }


  .ctaArrow {
    font-size: 32px;
  }

}


/* =========================================
   ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {

  .cta,
  .cta::before,
  .cta::after,
  .ctaBolt,
  .ctaArrow {

    animation: none;

  }

}