
:root {
  --navy-950: #020b24;
  --navy-900: #06143c;
  --cyan-400: #25e4f2;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--navy-950);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 117, 255, 0.38), transparent 35rem),
    linear-gradient(155deg, #020923 0%, #061749 54%, #03102e 100%);
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.site-shell {
  position: relative;
  display: flex;
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px 16px 48px;
  isolation: isolate;
}

.site-shell::before,
.site-shell::after {
  position: fixed;
  z-index: -2;
  content: "";
  pointer-events: none;
}

.site-shell::before {
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(71, 220, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 220, 255, 0.16) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

.site-shell::after {
  right: -22%;
  bottom: -22%;
  width: 70vw;
  height: 70vw;
  border: 1px solid rgba(61, 220, 255, 0.26);
  border-radius: 50%;
  box-shadow:
    0 0 0 42px rgba(31, 140, 255, 0.025),
    0 0 0 84px rgba(31, 140, 255, 0.02),
    0 0 90px rgba(31, 140, 255, 0.18);
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  filter: blur(95px);
  opacity: 0.32;
  pointer-events: none;
}

.ambient-one {
  top: -80px;
  left: -90px;
  background: #0077ff;
}

.ambient-two {
  right: -90px;
  bottom: 0;
  background: #00dbe7;
}

.game-card {
  position: relative;
  width: min(100%, 440px);
  min-height: min(850px, calc(100svh - 62px));
  overflow: hidden;
  border: 1px solid rgba(153, 224, 255, 0.22);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(7, 31, 89, 0.97), rgba(2, 12, 43, 0.985)),
    var(--navy-900);
  box-shadow:
    0 32px 90px rgba(0, 2, 18, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 48px rgba(0, 134, 255, 0.16);
}

.game-card::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 24%, rgba(0, 215, 255, 0.14), transparent 34%),
    linear-gradient(120deg, transparent 45%, rgba(40, 212, 255, 0.035) 46%, transparent 47%);
  content: "";
  pointer-events: none;
}

.brand-bar {
  position: relative;
  z-index: 4;
  display: flex;
  height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid rgba(130, 216, 255, 0.14);
  background: rgba(2, 14, 47, 0.72);
  backdrop-filter: blur(12px);
}

.delta-logo {
  display: block;
  width: 118px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 0 9px rgba(0, 151, 229, 0.32));
}

.event-year {
  color: rgba(211, 242, 255, 0.68);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.entry-screen,
.spin-screen,
.result-screen,
.message-screen {
  position: relative;
  z-index: 1;
}

.screen-enter {
  animation: screen-enter 520ms cubic-bezier(0.2, 0.78, 0.24, 1) both;
}

.hero-copy {
  padding: 28px 28px 19px;
  text-align: center;
}

.eyebrow,
.result-kicker {
  margin: 0;
  color: var(--cyan-400);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.hero-copy h1 {
  margin: 8px 0 7px;
  font-size: clamp(34px, 9.4vw, 43px);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: 0.02em;
  text-shadow: 0 8px 26px rgba(0, 23, 84, 0.5);
}

.hero-copy h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(95deg, #4deaff, #3ca3ff 58%, #94c8ff);
  background-clip: text;
  -webkit-background-clip: text;
}

.subtitle {
  margin: 0;
  color: rgba(225, 245, 255, 0.7);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.machine-window {
  position: relative;
  width: calc(100% - 48px);
  height: clamp(262px, 38svh, 330px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(83, 222, 255, 0.32);
  border-radius: 26px;
  background: #061539;
  box-shadow:
    inset 0 0 34px rgba(0, 178, 255, 0.16),
    0 15px 38px rgba(0, 4, 30, 0.4),
    0 0 0 5px rgba(34, 141, 255, 0.035);
}

.machine-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.video-vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -58px 58px rgba(0, 8, 35, 0.5);
  pointer-events: none;
}

.machine-label {
  position: absolute;
  bottom: 12px;
  left: 50%;
  z-index: 2;
  padding: 5px 12px;
  transform: translateX(-50%);
  border: 1px solid rgba(82, 232, 255, 0.38);
  border-radius: 99px;
  color: #bdf8ff;
  background: rgba(1, 15, 49, 0.64);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  backdrop-filter: blur(6px);
}

.entry-form {
  padding: 20px 24px 28px;
}

.entry-form > label {
  display: block;
  margin: 0 0 8px 4px;
  color: rgba(228, 246, 255, 0.85);
  font-size: 13px;
  font-weight: 700;
}

.input-wrap {
  display: flex;
  height: 55px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(153, 223, 255, 0.35);
  border-radius: 16px;
  background: rgba(231, 247, 255, 0.09);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.input-wrap:focus-within {
  border-color: var(--cyan-400);
  background: rgba(231, 247, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(37, 228, 242, 0.1), 0 0 22px rgba(0, 186, 255, 0.13);
}

.input-wrap > span {
  display: grid;
  width: 48px;
  align-self: stretch;
  place-items: center;
  border-right: 1px solid rgba(151, 226, 255, 0.18);
  color: var(--cyan-400);
  font-weight: 700;
}

.input-wrap input {
  width: calc(100% - 48px);
  height: 100%;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  padding: 0 16px;
  font-size: 16px;
}

.input-wrap input::placeholder {
  color: rgba(211, 237, 250, 0.44);
}

.one-chance {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 9px 3px 15px;
  color: rgba(213, 239, 250, 0.59);
  font-size: 11px;
}

.one-chance span {
  color: var(--cyan-400);
  font-size: 7px;
  box-shadow: 0 0 10px var(--cyan-400);
}

.primary-button,
.secondary-button {
  display: flex;
  width: 100%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border: 0;
  color: white;
  font-weight: 800;
}

.primary-button {
  position: relative;
  height: 58px;
  overflow: hidden;
  border-radius: 17px;
  background: linear-gradient(110deg, #0874f9 0%, #0751cf 64%, #0f2e9d 100%);
  box-shadow: 0 13px 30px rgba(0, 72, 213, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  font-size: 18px;
  letter-spacing: 0.04em;
  transition: transform 160ms ease, filter 160ms ease;
}

.primary-button::before {
  position: absolute;
  top: -120%;
  left: -30%;
  width: 35%;
  height: 330%;
  transform: rotate(24deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  content: "";
  animation: button-shine 3.2s ease-in-out infinite;
}

.primary-button:hover {
  filter: brightness(1.1);
}

.primary-button:active {
  transform: translateY(2px) scale(0.995);
}

.button-arrow {
  position: absolute;
  right: 18px;
  font-size: 27px;
  font-weight: 400;
}

.spin-screen {
  display: flex;
  min-height: calc(min(850px, 100svh - 62px) - 66px);
  flex-direction: column;
  justify-content: center;
  padding: 28px 24px 36px;
}

.spin-copy {
  padding-bottom: 18px;
  text-align: center;
}

.spin-copy h2 {
  margin: 6px 0 8px;
  font-size: 32px;
  letter-spacing: 0.04em;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan-400);
  box-shadow: 0 0 9px var(--cyan-400);
  animation: dot-bounce 900ms ease-in-out infinite alternate;
}

.loading-dots span:nth-child(2) {
  animation-delay: 160ms;
}

.loading-dots span:nth-child(3) {
  animation-delay: 320ms;
}

.spin-video-wrap {
  position: relative;
  width: 100%;
  height: min(54svh, 480px);
  overflow: hidden;
  border: 1px solid rgba(75, 224, 255, 0.38);
  border-radius: 28px;
  background: #061437;
  box-shadow: 0 0 45px rgba(0, 177, 255, 0.18), inset 0 0 24px rgba(40, 217, 255, 0.1);
}

.scan-line {
  position: absolute;
  inset: -20% 0 auto;
  height: 38%;
  background: linear-gradient(to bottom, transparent, rgba(58, 233, 255, 0.1), transparent);
  animation: scan 2.2s linear infinite;
  pointer-events: none;
}

.spin-note {
  margin: 18px 0 0;
  color: rgba(219, 244, 255, 0.68);
  font-size: 13px;
  text-align: center;
  letter-spacing: 0.06em;
}

.result-screen {
  min-height: calc(min(850px, 100svh - 62px) - 66px);
  padding: 25px 22px 24px;
  text-align: center;
}

.confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti i {
  position: absolute;
  top: -20px;
  left: calc(var(--i, 0) * 7%);
  width: 7px;
  height: 14px;
  border-radius: 2px;
  background: var(--cyan-400);
  animation: confetti-fall 3.4s ease-in infinite;
}

.confetti i:nth-child(1) { --i: 1; animation-delay: 0s; }
.confetti i:nth-child(2) { --i: 2; background: #ffde4a; animation-delay: .7s; }
.confetti i:nth-child(3) { --i: 3; background: #5aa8ff; animation-delay: 1.4s; }
.confetti i:nth-child(4) { --i: 4; background: #ff6c9b; animation-delay: .3s; }
.confetti i:nth-child(5) { --i: 5; animation-delay: 1.9s; }
.confetti i:nth-child(6) { --i: 6; background: #ffde4a; animation-delay: 1s; }
.confetti i:nth-child(7) { --i: 7; background: #5aa8ff; animation-delay: 2.3s; }
.confetti i:nth-child(8) { --i: 8; background: #ff6c9b; animation-delay: 1.6s; }
.confetti i:nth-child(9) { --i: 9; animation-delay: .4s; }
.confetti i:nth-child(10) { --i: 10; background: #ffde4a; animation-delay: 2s; }
.confetti i:nth-child(11) { --i: 11; background: #5aa8ff; animation-delay: .9s; }
.confetti i:nth-child(12) { --i: 12; background: #ff6c9b; animation-delay: 2.7s; }
.confetti i:nth-child(13) { --i: 13; animation-delay: 1.2s; }
.confetti i:nth-child(14) { --i: 14; background: #ffde4a; animation-delay: 2.2s; }

.result-heading {
  position: relative;
  z-index: 2;
}

.result-heading h2 {
  margin: 3px 0 0;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0.04em;
}

.restored-note {
  display: inline-block;
  margin: 7px 0 0;
  padding: 5px 10px;
  border: 1px solid rgba(92, 221, 255, 0.2);
  border-radius: 99px;
  color: rgba(211, 245, 255, 0.72);
  background: rgba(35, 171, 225, 0.08);
  font-size: 10px;
}

.test-mode-note {
  display: block;
  max-width: 350px;
  margin: 8px auto 0;
  padding: 7px 12px;
  border: 1px solid rgba(255, 211, 83, 0.62);
  border-radius: 14px;
  color: #fff3bb;
  background: rgba(255, 170, 0, 0.16);
  box-shadow: 0 0 20px rgba(255, 180, 0, 0.12);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
  letter-spacing: 0.04em;
}

.result-substitution-note {
  max-width: 350px;
  margin: 9px auto 0;
  color: rgba(225, 245, 255, 0.72);
  font-size: 12px;
  line-height: 1.6;
}

.prize-card {
  position: relative;
  z-index: 1;
  margin: 18px 0 16px;
  overflow: hidden;
  border: 1px solid rgba(147, 226, 255, 0.26);
  border-radius: 27px;
  background:
    radial-gradient(circle at 50% 36%, rgba(125, 231, 255, 0.22), transparent 34%),
    linear-gradient(160deg, rgba(240, 251, 255, 0.13), rgba(142, 217, 255, 0.055));
  padding: 18px 18px 19px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 16px 38px rgba(0, 4, 28, 0.3);
}

.prize-glow {
  position: absolute;
  top: 16px;
  left: 50%;
  width: 220px;
  height: 220px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(46, 213, 255, 0.12);
  filter: blur(22px);
}

.prize-image-frame {
  position: relative;
  display: grid;
  width: 100%;
  height: clamp(250px, 34svh, 305px);
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(205, 235, 248, 0.72);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: inset 0 0 28px rgba(112, 177, 212, 0.1);
}

.prize-image-frame::before,
.prize-image-frame::after {
  position: absolute;
  border: 1px solid rgba(0, 126, 199, 0.1);
  border-radius: 50%;
  content: "";
}

.prize-image-frame::before {
  width: 190px;
  height: 190px;
  box-shadow: 0 0 35px rgba(0, 203, 255, 0.12);
}

.prize-image-frame::after {
  width: 146px;
  height: 146px;
}

.prize-image-frame .prize-image {
  position: absolute;
  z-index: 1;
  display: block;
  inset: 12px 18px;
  width: calc(100% - 36px);
  height: calc(100% - 24px);
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 18px 20px rgba(0, 10, 35, 0.28));
}

.prize-card h3 {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  font-size: clamp(20px, 5.6vw, 25px);
  line-height: 1.35;
}

.claim-panel {
  position: relative;
  z-index: 2;
  border: 1px solid rgba(162, 224, 255, 0.22);
  border-radius: 21px;
  background: rgba(234, 248, 255, 0.095);
  padding: 15px;
  text-align: left;
}

.claim-instruction {
  margin: 0 0 10px;
  color: #f4fbff;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.65;
  text-align: center;
}

.claim-meta {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  border-top: 1px solid rgba(168, 229, 255, 0.14);
  border-bottom: 1px solid rgba(168, 229, 255, 0.14);
}

.claim-meta > div {
  min-width: 0;
  padding: 10px 8px;
  text-align: center;
}

.claim-meta > div + div {
  border-left: 1px solid rgba(168, 229, 255, 0.14);
}

.claim-meta span,
.claim-meta strong {
  display: block;
}

.claim-meta span {
  margin-bottom: 3px;
  color: rgba(210, 239, 250, 0.56);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.claim-meta strong {
  overflow: hidden;
  color: #dfffff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claim-panel time {
  display: block;
  margin-top: 8px;
  color: rgba(208, 236, 248, 0.48);
  font-size: 9px;
  text-align: center;
}

.result-footnote {
  margin: 13px 0 0;
  color: rgba(205, 236, 248, 0.47);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.test-again-button {
  width: 100%;
  margin-top: 13px;
}

.message-screen {
  display: flex;
  min-height: calc(min(850px, 100svh - 62px) - 66px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 38px 28px;
  text-align: center;
}

.message-icon {
  display: grid;
  width: 82px;
  height: 82px;
  margin-bottom: 24px;
  place-items: center;
  border: 1px solid rgba(62, 225, 245, 0.48);
  border-radius: 50%;
  color: var(--cyan-400);
  background: rgba(38, 217, 242, 0.08);
  box-shadow: 0 0 30px rgba(38, 217, 242, 0.16);
  font-size: 36px;
}

.message-screen h2 {
  margin: 8px 0 12px;
  font-size: 28px;
  line-height: 1.35;
}

.message-screen > p:not(.eyebrow) {
  max-width: 300px;
  margin: 0;
  color: rgba(220, 242, 250, 0.65);
  font-size: 14px;
  line-height: 1.7;
}

.secondary-button {
  height: 52px;
  margin-top: 26px;
  border: 1px solid rgba(91, 220, 255, 0.42);
  border-radius: 15px;
  background: rgba(9, 104, 220, 0.2);
}

.site-footer {
  position: absolute;
  bottom: 18px;
  left: 50%;
  z-index: 2;
  margin: 0;
  transform: translateX(-50%);
  color: rgba(196, 234, 250, 0.36);
  font-size: 9px;
  letter-spacing: 0.15em;
  white-space: nowrap;
}

@keyframes screen-enter {
  from { opacity: 0; transform: translateY(10px) scale(0.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes button-shine {
  0%, 45% { left: -40%; opacity: 0; }
  55% { opacity: 1; }
  75%, 100% { left: 120%; opacity: 0; }
}

@keyframes dot-bounce {
  from { transform: translateY(3px); opacity: 0.35; }
  to { transform: translateY(-3px); opacity: 1; }
}

@keyframes scan {
  from { transform: translateY(-20%); }
  to { transform: translateY(380%); }
}

@keyframes confetti-fall {
  0% { transform: translate3d(0, -20px, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.9; }
  100% { transform: translate3d(22px, 850px, 0) rotate(540deg); opacity: 0; }
}

@media (max-width: 520px) {
  .site-shell {
    align-items: stretch;
    padding: 0;
  }

  .game-card {
    width: 100%;
    min-height: 100svh;
    border: 0;
    border-radius: 0;
  }

  .site-footer {
    display: none;
  }

  .spin-screen,
  .result-screen,
  .message-screen {
    min-height: calc(100svh - 66px);
  }
}

@media (max-height: 760px) {
  .hero-copy {
    padding-top: 19px;
    padding-bottom: 13px;
  }

  .hero-copy h1 {
    font-size: 32px;
  }

  .machine-window {
    height: 255px;
  }

  .entry-form {
    padding-top: 15px;
  }

  .result-screen {
    padding-top: 18px;
  }

  .prize-card {
    margin-top: 12px;
    padding-top: 12px;
  }

  .prize-image-frame {
    height: 205px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
