*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --ink: #4b2f45;
  --ink-soft: #65465d;
  --accent: #ef5f8c;
  --accent-dark: #d84275;
  --lavender: #cab8e8;
  --blush: #f4b2c7;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 4%, rgba(255, 255, 255, 0.36), transparent 30%),
    radial-gradient(circle at 88% 54%, rgba(255, 230, 241, 0.26), transparent 32%),
    linear-gradient(180deg, #c9b9e8 0%, #d6b5e1 27%, #e6add3 60%, #f4b3c5 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "PingFang TC", "Microsoft YaHei", "Microsoft JhengHei", "Noto Sans CJK SC",
    sans-serif;
}

.page {
  display: flex;
  min-height: 100vh;
  justify-content: center;
  padding: 0;
}

.card {
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 250, 255, 0.6), rgba(255, 231, 242, 0.34)),
    linear-gradient(180deg, #d9c9ed 0%, #edbbd7 60%, #f5c1cf 100%);
  box-shadow: 0 18px 54px rgba(76, 45, 69, 0.16);
}

.brand-header {
  position: relative;
  display: grid;
  min-height: 78px;
  place-items: center;
  padding: 10px 22px 8px;
}

.brand-title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #573647;
  font-family: "STKaiti", "KaiTi", "Kaiti TC", "FangSong", serif;
  font-size: clamp(34px, 10.2vw, 48px);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.18;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.brand-underline {
  position: absolute;
  bottom: 7px;
  left: 50%;
  width: 62%;
  height: 16px;
  transform: translateX(-50%);
  border-top: 2px solid rgba(239, 95, 140, 0.68);
  border-radius: 50%;
}

.brand-underline::before {
  position: absolute;
  top: -12px;
  left: 50%;
  color: rgba(239, 95, 140, 0.7);
  content: "♥";
  font-size: 13px;
  transform: translateX(-50%);
}

.hero-shell {
  position: relative;
  padding: 0 10px;
}

.hero {
  position: relative;
  contain: layout paint;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 22px;
  background: #211b21;
  box-shadow: 0 12px 28px rgba(78, 42, 65, 0.15);
}

.hero-empty {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent),
    #8d718a;
}

.hero-video {
  display: block;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  object-fit: cover;
  object-position: center top;
}

.cta-button {
  position: absolute;
  z-index: 3;
  bottom: 12%;
  left: 50%;
  display: grid;
  width: min(54%, 250px);
  min-height: 56px;
  place-items: center;
  overflow: hidden;
  padding: 10px 22px;
  transform: translateX(-50%);
  border: 3px solid rgba(238, 103, 146, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 6px 0 rgba(205, 63, 111, 0.18),
    0 12px 28px rgba(101, 40, 73, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--accent);
  text-decoration: none;
  touch-action: manipulation;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
  animation: cta-pulse 1.35s ease-in-out infinite;
}

.cta-button:hover {
  color: var(--accent-dark);
}

.cta-button:active {
  animation: none;
  transform: translateX(-50%) scale(0.96);
}

.cta-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.96);
  outline-offset: 4px;
}

.cta-disabled {
  opacity: 0.72;
  pointer-events: none;
}

.cta-shine {
  position: absolute;
  inset: -70% auto -70% -42%;
  width: 36%;
  transform: translate3d(0, 0, 0) rotate(16deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  will-change: transform;
  animation: cta-shine 2.2s ease-in-out infinite;
}

.cta-text {
  position: relative;
  z-index: 1;
  font-size: clamp(21px, 6vw, 29px);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.content {
  padding: 12px 18px 24px;
}

.title {
  margin: 0 0 8px;
  color: #503548;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}

.rules {
  margin: 0;
  padding-left: 2em;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
  white-space: pre-line;
}

.legal {
  margin: 15px 0 0;
  color: rgba(75, 47, 69, 0.72);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

@keyframes cta-pulse {
  0%,
  100% {
    transform: translateX(-50%) scale(0.985);
  }
  50% {
    transform: translateX(-50%) scale(1.025);
  }
}

@keyframes cta-shine {
  0%,
  35% {
    transform: translate3d(0, 0, 0) rotate(16deg);
  }
  70%,
  100% {
    transform: translate3d(430%, 0, 0) rotate(16deg);
  }
}

@media (min-width: 461px) {
  .page {
    padding: 20px 0 30px;
  }

  .card {
    min-height: auto;
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 24px;
  }
}

@media (max-width: 360px) {
  .brand-header {
    min-height: 68px;
  }

  .content {
    padding-right: 13px;
    padding-left: 13px;
  }

  .rules {
    padding-left: 1.5em;
    font-size: 12px;
  }

  .cta-button {
    min-height: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta-button,
  .cta-shine {
    animation: none;
  }
}
