:root {
  --ink: #160b08;
  --paper: #fff8ee;
  --gold: #f4c56d;
  --ember: #ff5a27;
  --muted: #957d6e;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 50% 5%, rgba(255, 90, 39, 0.19), transparent 30rem),
    var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.scan-page {
  position: relative;
  display: flex;
  width: min(520px, calc(100% - 36px));
  min-height: 100dvh;
  margin: 0 auto;
  padding: 28px 0 34px;
  flex-direction: column;
  justify-content: center;
}

.scan-glow {
  position: fixed;
  z-index: -1;
  top: 15%;
  left: 50%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 197, 109, 0.09), transparent 65%);
  transform: translateX(-50%);
}

.scan-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 35px;
}

.scan-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  color: var(--ink);
  background: linear-gradient(145deg, #ffda91, var(--ember));
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 800;
}

.scan-brand > div {
  display: grid;
  gap: 3px;
}

.scan-brand strong {
  font-size: 14px;
  letter-spacing: 0.08em;
}

.scan-brand small {
  color: rgba(255, 248, 238, 0.42);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.scan-card {
  position: relative;
  padding: 48px 27px 31px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 90, 39, 0.17), transparent 42%),
    rgba(255, 248, 238, 0.035);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
  text-align: center;
  backdrop-filter: blur(14px);
}

.scan-card::after {
  position: absolute;
  top: -80px;
  right: -90px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(244, 197, 109, 0.1);
  border-radius: 50%;
  content: "";
}

.scan-ring {
  position: relative;
  display: grid;
  width: 76px;
  height: 76px;
  margin: 0 auto 28px;
  place-items: center;
  border: 1px solid rgba(244, 197, 109, 0.18);
  border-radius: 50%;
}

.scan-ring span {
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: scan-spin 1.7s linear infinite;
}

.scan-ring span:nth-child(2) {
  inset: 9px;
  animation-duration: 2.4s;
  animation-direction: reverse;
  border-top-color: rgba(255, 90, 39, 0.8);
}

.scan-ring span:nth-child(3) {
  inset: 18px;
  animation-duration: 3s;
  border-top-color: rgba(255, 248, 238, 0.3);
}

.scan-ring span:nth-child(4) {
  inset: 29px;
  border: 0;
  background: var(--gold);
  animation: scan-pulse 1.5s ease-in-out infinite;
}

.scan-ring.is-error span {
  animation: none;
  border-color: transparent;
}

.scan-ring.is-error span:nth-child(4) {
  background: var(--ember);
}

.scan-ring.is-ready span {
  animation: none;
  border-color: rgba(244, 197, 109, 0.28);
}

.scan-ring.is-ready span:nth-child(2) {
  border-color: rgba(255, 90, 39, 0.42);
}

.scan-ring.is-ready span:nth-child(4) {
  background: var(--gold);
  box-shadow: 0 0 0 8px rgba(244, 197, 109, 0.08);
}

@keyframes scan-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes scan-pulse {
  50% {
    opacity: 0.45;
    transform: scale(0.7);
  }
}

.scan-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.scan-card h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(30px, 8vw, 42px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.05em;
}

.scan-message {
  margin: 15px auto 0;
  max-width: 340px;
  color: rgba(255, 248, 238, 0.5);
  font-size: 12px;
  line-height: 1.8;
}

.scan-retry {
  min-height: 47px;
  margin-top: 24px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: var(--gold);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.claim-form {
  margin-top: 25px;
}

.claim-button {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 13px;
  color: var(--ink);
  background: var(--gold);
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.claim-button:hover {
  background: #ffd88d;
}

.scan-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 248, 238, 0.08);
}

.scan-steps span {
  color: rgba(255, 248, 238, 0.42);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.scan-steps i {
  width: 12px;
  height: 1px;
  background: rgba(244, 197, 109, 0.3);
}

.scan-footnote {
  margin: 22px 0 0;
  color: rgba(255, 248, 238, 0.27);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-align: center;
}

.noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 13px;
  border-radius: 10px;
  color: #2b1710;
  background: var(--gold);
  font-family: var(--font-sans);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 480px) {
  .scan-page {
    width: calc(100% - 28px);
    padding-top: 22px;
  }

  .scan-brand {
    margin-bottom: 26px;
  }

  .scan-card {
    padding: 39px 20px 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scan-ring span {
    animation: none;
  }
}
