:root {
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --blue-950: #03102f;
  --blue-900: #061a4a;
  --blue-700: #075bd8;
  --blue-400: #4ea7ff;
  --white: #f7fbff;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--blue-950);
}

body {
  overflow: hidden;
}

button {
  font: inherit;
}

.invitation {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(34px, env(safe-area-inset-top)) max(26px, env(safe-area-inset-right))
    max(32px, env(safe-area-inset-bottom)) max(26px, env(safe-area-inset-left));
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 50% 48%, rgba(0, 117, 255, 0.16), transparent 40%),
    linear-gradient(145deg, #061f59 0%, #061846 43%, #020d29 100%);
}

.aurora,
.grid,
.glow,
.edge {
  position: absolute;
  pointer-events: none;
}

.aurora {
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.grid {
  z-index: -1;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(137, 198, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(137, 198, 255, 0.12) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 28%, #000 70%, transparent 100%);
  transform: perspective(400px) rotateX(55deg) scale(1.7) translateY(16%);
  transform-origin: center bottom;
  animation: grid-drift 14s linear infinite;
}

.glow {
  z-index: -1;
  width: 54vw;
  height: 54vw;
  border-radius: 50%;
  filter: blur(65px);
  opacity: 0.18;
  background: #158cff;
  animation: float 9s ease-in-out infinite alternate;
}

.glow--top {
  top: -22vw;
  right: -18vw;
}

.glow--bottom {
  bottom: -26vw;
  left: -20vw;
  animation-delay: -4s;
}

.brand {
  display: flex;
  align-items: center;
}

.brand__logo {
  width: clamp(150px, 20vw, 190px);
  height: auto;
  max-width: 46vw;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 8, 35, 0.24));
}

.hero {
  align-self: center;
  width: min(100%, 560px);
  margin: 2vh auto 0;
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: rgba(196, 225, 255, 0.72);
  font-family: Arial, sans-serif;
  font-size: clamp(9px, 2.5vw, 12px);
  letter-spacing: 0.34em;
}

.rule {
  width: 72px;
  height: 1px;
  margin: 20px auto 32px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
}

.rule span {
  display: block;
  width: 45%;
  height: 100%;
  background: #6bb5ff;
  animation: scan 2.8s ease-in-out infinite;
}

.title {
  margin: 0;
  font-weight: 300;
  letter-spacing: 0.1em;
}

.title span,
.title strong {
  display: block;
}

.title span {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(16px, 4.5vw, 23px);
  font-weight: 300;
}

.title strong {
  font-size: clamp(31px, 9vw, 52px);
  font-weight: 500;
  line-height: 1.35;
  text-shadow: 0 8px 30px rgba(0, 108, 255, 0.25);
}

.event-name {
  position: relative;
  display: inline-block;
  margin: 34px 0 0;
  padding: 10px 18px;
  color: #a8d4ff;
  font-family: Arial, sans-serif;
  font-size: clamp(17px, 5vw, 24px);
  font-weight: 300;
  letter-spacing: 0.36em;
  text-indent: 0.36em;
}

.event-name::before,
.event-name::after {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(129, 194, 255, 0.7));
}

.event-name::before { right: 100%; }
.event-name::after { left: 100%; transform: rotate(180deg); }

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.detail-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  width: min(100%, 320px);
  min-height: 56px;
  padding: 0 25px;
  overflow: hidden;
  color: #f8fcff;
  cursor: pointer;
  background: rgba(31, 118, 226, 0.24);
  border: 1px solid rgba(139, 201, 255, 0.42);
  border-radius: 999px;
  box-shadow: 0 14px 40px rgba(0, 44, 123, 0.28), inset 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.detail-button::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.16) 48%, transparent 75%);
  transform: translateX(-120%);
  animation: button-shine 3.6s ease-in-out infinite 1.8s;
}

.detail-button span,
.detail-button svg {
  position: relative;
}

.detail-button span {
  font-size: 15px;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
}

.detail-button svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: transform 180ms ease;
}

.detail-button:hover,
.detail-button:focus-visible {
  background: rgba(46, 137, 247, 0.38);
  border-color: rgba(178, 220, 255, 0.8);
  outline: none;
  transform: translateY(-2px);
}

.detail-button:hover svg { transform: translateX(4px); }
.detail-button:active { transform: scale(0.98); }

.hint {
  margin: 0;
  color: rgba(185, 217, 247, 0.5);
  font-size: 10px;
  letter-spacing: 0.2em;
}

.hint span {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 8px 2px 0;
  border-radius: 50%;
  background: #74baff;
  box-shadow: 0 0 8px #74baff;
  animation: pulse 2s ease-in-out infinite;
}

.edge {
  top: 14%;
  bottom: 14%;
  width: 1px;
  opacity: 0.32;
  background: linear-gradient(transparent, rgba(107, 181, 255, 0.75), transparent);
}

.edge--left { left: 10px; }
.edge--right { right: 10px; }

.reveal {
  opacity: 0;
  animation: reveal 900ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.reveal--1 { animation-delay: 100ms; }
.reveal--2 { animation-delay: 360ms; }
.reveal--3 { animation-delay: 620ms; }
.reveal--4 { animation-delay: 860ms; }
.reveal--5 { animation-delay: 1120ms; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(18px); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes scan {
  0%, 100% { transform: translateX(-110%); }
  50% { transform: translateX(230%); }
}

@keyframes grid-drift {
  to { background-position: 0 52px, 52px 0; }
}

@keyframes float {
  to { transform: translate3d(8vw, 4vh, 0) scale(1.12); }
}

@keyframes pulse {
  50% { opacity: 0.3; transform: scale(0.75); }
}

@keyframes button-shine {
  0%, 45% { transform: translateX(-120%); }
  75%, 100% { transform: translateX(120%); }
}

@media (min-width: 768px) {
  .invitation { padding-inline: 56px; }
  .edge--left { left: 28px; }
  .edge--right { right: 28px; }
}

@media (max-height: 620px) {
  .invitation { padding-block: 22px; }
  .rule { margin-block: 12px 22px; }
  .event-name { margin-top: 20px; }
  .detail-button { min-height: 50px; }
}

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