:root {
  color-scheme: dark;
  --bg: #030915;
  --panel: rgba(4, 15, 35, 0.78);
  --panel-strong: rgba(10, 39, 72, 0.72);
  --text: #f2fbff;
  --muted: #b7d8ef;
  --line: rgba(83, 221, 255, 0.24);
  --accent: #23dcff;
  --accent-strong: #876cff;
  --accent-cool: #00ffc8;
  --danger: #ff86bc;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family:
    "Noto Sans TC", "Microsoft JhengHei", Inter, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(3, 9, 21, 0.95) 0%, rgba(3, 9, 21, 0.72) 38%, rgba(3, 9, 21, 0.2) 72%),
    linear-gradient(0deg, rgba(3, 9, 21, 0.98) 0%, rgba(3, 9, 21, 0.2) 42%, rgba(3, 9, 21, 0.86) 100%),
    url("/assets/hero-bg.png") center / cover no-repeat;
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(112, 234, 255, 0.72) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(178, 131, 255, 0.62) 0 1px, transparent 2px);
  background-position: 0 0, 36px 42px;
  background-size: 96px 96px, 84px 84px;
  mask-image: linear-gradient(90deg, black, transparent 86%);
  animation: starDrift 18s linear infinite;
}

body::before {
  content: "";
  position: fixed;
  inset: auto 0 0;
  z-index: -1;
  height: 32vh;
  background: linear-gradient(0deg, rgba(0, 206, 255, 0.16), transparent);
  pointer-events: none;
  animation: glowPulse 5s ease-in-out infinite;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 450px);
  gap: 56px;
  align-items: center;
  padding: 40px 0;
}

.intro {
  max-width: 660px;
  padding-top: 10vh;
  animation: riseIn 700ms ease both;
}

.kicker {
  margin: 0 0 18px;
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(35, 220, 255, 0.36);
  background: rgba(2, 22, 48, 0.72);
  color: #7bf1ff;
  font-size: 14px;
  font-weight: 800;
  padding: 9px 13px;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow: 0 0 28px rgba(35, 220, 255, 0.16);
  animation: softFloat 4.8s ease-in-out infinite;
}

h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(46px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: 0;
  color: #e8fbff;
  text-shadow:
    0 0 12px rgba(35, 220, 255, 0.72),
    0 0 34px rgba(135, 108, 255, 0.42),
    0 18px 34px rgba(0, 0, 0, 0.46);
  animation: titleGlow 3.4s ease-in-out infinite;
}

.lede {
  max-width: 560px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.hero-actions span {
  border: 1px solid rgba(35, 220, 255, 0.28);
  border-radius: 999px;
  padding: 11px 14px;
  background: rgba(3, 20, 44, 0.72);
  color: #dffaff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(0, 203, 255, 0.12);
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.hero-actions span:hover {
  transform: translateY(-2px);
  border-color: rgba(35, 220, 255, 0.55);
  box-shadow: 0 16px 34px rgba(0, 203, 255, 0.2);
}

.panel {
  width: 100%;
  border: 1px solid rgba(35, 220, 255, 0.26);
  border-radius: 8px;
  background: var(--panel);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 28px;
  backdrop-filter: blur(20px);
  animation: riseIn 760ms 120ms ease both;
}

.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px dashed rgba(83, 221, 255, 0.26);
  margin-bottom: 22px;
  padding-bottom: 18px;
}

.panel-head p,
.panel-head h2 {
  margin: 0;
}

.panel-head p {
  color: #7bf1ff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.panel-head h2 {
  font-size: 24px;
  letter-spacing: 0;
}

form {
  display: grid;
  gap: 18px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.hint {
  color: rgba(183, 216, 239, 0.72);
  font-size: 12px;
  font-weight: 700;
}

label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(83, 221, 255, 0.2);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text);
  font: inherit;
  padding: 0 15px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder {
  color: rgba(183, 216, 239, 0.58);
}

input:focus,
select:focus {
  border-color: var(--accent);
  background: rgba(8, 34, 66, 0.9);
  box-shadow: 0 0 0 4px rgba(35, 220, 255, 0.16);
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.5;
}

.check input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.turnstile-slot:empty {
  display: none;
}

button {
  position: relative;
  overflow: hidden;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #23dcff, #00ffc8 48%, #9c7cff);
  color: #031327;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 16px 38px rgba(0, 203, 255, 0.24);
  transition: transform 160ms ease, filter 160ms ease;
}

button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.48) 46%, transparent 62%);
  transform: translateX(-120%);
  animation: buttonShine 2.8s ease-in-out infinite;
}

button span {
  position: relative;
}

button:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0) scale(0.99);
}

.button-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  font-size: 24px;
  line-height: 1;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.message {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--accent);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(1, 7, 18, 0.72);
  backdrop-filter: blur(12px);
}

.modal[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(440px, 100%);
  overflow: hidden;
  border: 1px solid rgba(83, 221, 255, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(9, 31, 64, 0.96), rgba(4, 14, 34, 0.96)),
    var(--panel);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.55),
    0 0 52px rgba(35, 220, 255, 0.18);
  padding: 30px;
  text-align: center;
  animation: modalPop 260ms ease both;
}

.modal-spark {
  position: absolute;
  inset: -40px;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(35, 220, 255, 0.72) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(156, 124, 255, 0.56) 0 1px, transparent 2px);
  background-size: 70px 70px, 54px 54px;
  opacity: 0.3;
  animation: starDrift 11s linear infinite reverse;
}

.modal-kicker,
.modal-card h2,
.modal-copy,
.draw-number,
.modal-account,
.modal-card button {
  position: relative;
}

.modal-kicker {
  margin: 0 0 10px;
  color: #7bf1ff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-card h2 {
  margin: 0;
  font-size: 34px;
  text-shadow: 0 0 22px rgba(35, 220, 255, 0.55);
}

.modal-copy {
  margin: 14px 0 22px;
  color: var(--muted);
  line-height: 1.7;
}

.draw-number {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(35, 220, 255, 0.26);
  border-radius: 8px;
  background: rgba(1, 12, 30, 0.7);
  padding: 18px;
}

.draw-number span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.draw-number strong {
  color: #7bf1ff;
  font-size: 42px;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 0 24px rgba(35, 220, 255, 0.48);
  animation: numberPulse 2.4s ease-in-out infinite;
}

.modal-account {
  min-height: 22px;
  margin: 14px 0 22px;
  color: var(--muted);
}

.modal-card button {
  width: 100%;
}

@media (max-width: 860px) {
  .backdrop {
    background:
      linear-gradient(180deg, rgba(3, 9, 21, 0.58) 0%, rgba(3, 9, 21, 0.88) 48%, rgba(3, 9, 21, 1) 100%),
      url("/assets/hero-bg.png") 62% top / auto 58vh no-repeat,
      var(--bg);
  }

  .shell {
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
    padding: 32px 0;
  }

  .panel {
    padding: 22px;
  }

  .intro {
    padding-top: 2vh;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 24px, 1120px);
  }

  .grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 42px;
  }

  .panel-head {
    align-items: start;
    flex-direction: column;
  }
}

@keyframes starDrift {
  from {
    background-position: 0 0, 36px 42px;
  }
  to {
    background-position: 96px 96px, -48px 126px;
  }
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.62;
  }
  50% {
    opacity: 1;
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes titleGlow {
  0%,
  100% {
    text-shadow:
      0 0 12px rgba(35, 220, 255, 0.72),
      0 0 34px rgba(135, 108, 255, 0.42),
      0 18px 34px rgba(0, 0, 0, 0.46);
  }
  50% {
    text-shadow:
      0 0 20px rgba(35, 220, 255, 0.92),
      0 0 46px rgba(135, 108, 255, 0.58),
      0 18px 34px rgba(0, 0, 0, 0.46);
  }
}

@keyframes buttonShine {
  0%,
  42% {
    transform: translateX(-120%);
  }
  72%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes numberPulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.22);
  }
}

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