:root {
  --bg: #0b0712;
  --bg-2: #140b1f;
  --surface: rgba(24, 16, 33, 0.82);
  --fg: #f4ecf7;
  --muted: #a292ad;
  --accent: #ff5f9e;
  --accent-2: #a855f7;
  --accent-deep: #ff8ab8;
  --on-accent: #ffffff;
  --border: rgba(255, 255, 255, 0.09);
  --border-soft: rgba(255, 95, 158, 0.2);
  --input-bg: #160f20;
  --ok: #56e2b4;
  --warn: #ffbe5c;
  --err: #ff6b85;
  --glow: rgba(255, 95, 158, 0.38);
  --font-round: "M PLUS Rounded 1c", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(820px 520px at 10% -12%, rgba(255, 95, 158, 0.22) 0%, transparent 60%),
    radial-gradient(760px 520px at 98% 112%, rgba(168, 85, 247, 0.22) 0%, transparent 62%),
    radial-gradient(520px 340px at 50% 118%, rgba(255, 95, 158, 0.08) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  overflow-x: hidden;
}

.kanji {
  position: fixed;
  top: -0.18em;
  right: -0.06em;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: clamp(180px, 30vw, 420px);
  line-height: 1;
  color: var(--accent);
  opacity: 0.07;
  letter-spacing: 0.02em;
  text-shadow: 0 0 90px rgba(255, 95, 158, 0.5);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  animation: kanjiDrift 24s ease-in-out infinite;
}

@keyframes kanjiDrift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-10px, 16px, 0); }
}

.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.petals i {
  position: absolute;
  top: -30px;
  width: 10px;
  height: 10px;
  border-radius: 60% 0 60% 0;
  background: linear-gradient(135deg, #ff8ab8, #a855f7);
  opacity: 0.38;
  filter: blur(0.2px);
  animation: fall linear infinite;
}

.petals i:nth-child(1) { left: 12%; animation-duration: 20s; animation-delay: -3s; }
.petals i:nth-child(2) { left: 34%; width: 7px; height: 7px; animation-duration: 26s; animation-delay: -12s; }
.petals i:nth-child(3) { left: 61%; animation-duration: 23s; animation-delay: -7s; }
.petals i:nth-child(4) { left: 78%; width: 6px; height: 6px; animation-duration: 30s; animation-delay: -17s; }
.petals i:nth-child(5) { left: 92%; animation-duration: 18s; animation-delay: -1s; }
.petals i:nth-child(6) { left: 22%; width: 5px; height: 5px; animation-duration: 34s; animation-delay: -22s; background: linear-gradient(135deg, #c9a5ff, #8b5cf6); }
.petals i:nth-child(7) { left: 48%; width: 8px; height: 8px; animation-duration: 27s; animation-delay: -9s; }
.petals i:nth-child(8) { left: 70%; width: 5px; height: 5px; animation-duration: 38s; animation-delay: -28s; background: linear-gradient(135deg, #c9a5ff, #8b5cf6); }

@keyframes fall {
  0% { transform: translate3d(0, -20px, 0) rotate(0deg); }
  100% { transform: translate3d(-60px, 105vh, 0) rotate(320deg); }
}

.brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px clamp(20px, 5vw, 48px);
}

.brand-name {
  font-family: var(--font-round);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-jp {
  font-family: var(--font-round);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--accent-deep);
  opacity: 0.8;
}

.brand-18 {
  font-family: var(--font-round);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 95, 158, 0.08);
}

.stage {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 40px clamp(16px, 4vw, 32px) 34px;
}

.card {
  position: relative;
  width: min(440px, 100%);
  margin-top: 108px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 112px 32px 32px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 34px 80px -34px rgba(0, 0, 0, 0.9),
    0 0 70px -34px var(--glow);
  animation: rise 520ms cubic-bezier(0.22, 0.9, 0.3, 1) both;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 18% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  opacity: 0.7;
  animation: rim 6s ease-in-out infinite;
}

@keyframes rim {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(70% 42% at 50% 0%, rgba(255, 95, 158, 0.14), transparent 72%);
  opacity: 0.45;
  animation: aura 7s ease-in-out infinite;
}

@keyframes aura {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.85; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.mascot {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 3;
  display: block;
  width: 196px;
  height: 196px;
  transform: translate(-50%, -52%);
  border-radius: 50%;
  overflow: hidden;
  background: #120a1c;
  box-shadow:
    0 0 0 3px var(--bg-2),
    0 0 0 4px rgba(255, 95, 158, 0.32),
    0 22px 44px -18px rgba(0, 0, 0, 0.95);
  pointer-events: none;
  user-select: none;
}

.mascot-glow {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  width: 196px;
  height: 196px;
  transform: translate(-50%, -52%);
  border-radius: 50%;
  pointer-events: none;
  box-shadow:
    0 0 0 3px rgba(255, 95, 158, 0.5),
    0 0 42px 6px rgba(255, 95, 158, 0.5),
    0 0 96px 22px rgba(168, 85, 247, 0.22);
  animation: neonRing 8s linear infinite;
}

@keyframes neonRing {
  0% { opacity: 0; box-shadow: none; }
  1.2% { opacity: 1; box-shadow: 0 0 0 3px rgba(255, 95, 158, 0.55), 0 0 48px 8px rgba(255, 95, 158, 0.55), 0 0 100px 24px rgba(168, 85, 247, 0.25); }
  2% { opacity: 0.12; box-shadow: 0 0 0 3px rgba(255, 95, 158, 0.15), 0 0 6px 0 rgba(255, 95, 158, 0.2); }
  3.2% { opacity: 1; box-shadow: 0 0 0 3px rgba(255, 95, 158, 0.55), 0 0 48px 8px rgba(255, 95, 158, 0.55), 0 0 100px 24px rgba(168, 85, 247, 0.25); }
  4% { opacity: 0.45; box-shadow: 0 0 0 3px rgba(255, 95, 158, 0.2), 0 0 12px 0 rgba(255, 95, 158, 0.25); }
  5%, 44% { opacity: 1; box-shadow: 0 0 0 3px rgba(255, 95, 158, 0.5), 0 0 42px 6px rgba(255, 95, 158, 0.5), 0 0 96px 22px rgba(168, 85, 247, 0.22); }
  45% { opacity: 0.12; box-shadow: 0 0 0 3px rgba(255, 95, 158, 0.15), 0 0 6px 0 rgba(255, 95, 158, 0.2); }
  46.5% { opacity: 1; box-shadow: 0 0 0 3px rgba(255, 95, 158, 0.55), 0 0 48px 8px rgba(255, 95, 158, 0.55), 0 0 100px 24px rgba(168, 85, 247, 0.25); }
  48% { opacity: 0.08; box-shadow: 0 0 0 3px rgba(255, 95, 158, 0.12), 0 0 4px 0 rgba(255, 95, 158, 0.15); }
  49.5% { opacity: 0.9; box-shadow: 0 0 0 3px rgba(255, 95, 158, 0.4), 0 0 26px 2px rgba(255, 95, 158, 0.35); }
  50.5% { opacity: 0.2; box-shadow: 0 0 0 3px rgba(255, 95, 158, 0.15), 0 0 8px 0 rgba(255, 95, 158, 0.2); }
  52%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(255, 95, 158, 0.5), 0 0 42px 6px rgba(255, 95, 158, 0.5), 0 0 96px 22px rgba(168, 85, 247, 0.22); }
}

.mascot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% 30%;
  transform: scale(1.5);
  transform-origin: 45% 30%;
  animation: breathe 8s ease-in-out infinite;
}

.mascot video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transform: scale(1.05);
  transform-origin: 50% 34%;
  animation: breatheVideo 9s ease-in-out infinite, neonMedia 8s linear infinite;
}

@keyframes neonMedia {
  0% { filter: brightness(0.25) saturate(0.5); }
  1.2% { filter: brightness(1.05) saturate(1); }
  2% { filter: brightness(0.3) saturate(0.6); }
  3.2% { filter: brightness(1.05) saturate(1); }
  4% { filter: brightness(0.6) saturate(0.8); }
  5%, 44% { filter: brightness(1) saturate(1); }
  45% { filter: brightness(0.32) saturate(0.5); }
  46.5% { filter: brightness(1.05) saturate(1); }
  48% { filter: brightness(0.28) saturate(0.45); }
  49.5% { filter: brightness(0.9) saturate(0.95); }
  50.5% { filter: brightness(0.38) saturate(0.6); }
  52%, 100% { filter: brightness(1) saturate(1); }
}

@keyframes breatheVideo {
  0%, 100% { transform: scale(1.05) translateY(0); }
  50% { transform: scale(1.075) translateY(1.5px); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1.5) translateY(0); }
  50% { transform: scale(1.515) translateY(2px); }
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-deep);
  text-align: center;
}

h1 {
  margin: 0 0 10px;
  font-family: var(--font-round);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  text-shadow: 0 0 34px rgba(255, 95, 158, 0.35);
  animation: titleGlow 6s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 26px rgba(255, 95, 158, 0.25); }
  50% { text-shadow: 0 0 46px rgba(255, 95, 158, 0.6); }
}

h2 {
  margin: 0;
  font-family: var(--font-round);
  font-size: 20px;
  font-weight: 700;
}

.lede {
  margin: 0 auto 26px;
  max-width: 300px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
  text-align: center;
}

.lede strong {
  color: var(--fg);
  font-weight: 600;
}

.steps {
  display: flex;
  justify-content: center;
  gap: 6px;
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
}

.step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 180ms, background 180ms;
}

.step span {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  transition: background 180ms, color 180ms;
}

.step.is-active {
  background: rgba(255, 95, 158, 0.12);
  color: var(--accent-deep);
}

.step.is-active span {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  animation: dotPulse 2.4s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 95, 158, 0.4); }
  50% { box-shadow: 0 0 18px rgba(255, 95, 158, 0.9); }
}

.step.is-done {
  color: var(--ok);
}

.step.is-done span {
  background: rgba(86, 226, 180, 0.14);
  color: var(--ok);
}

.panel[hidden] {
  display: none;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.campo {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.campo span {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.campo input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 160ms, box-shadow 160ms, background 160ms;
}

.campo input::placeholder {
  color: #6d5c78;
}

.campo input:focus {
  outline: none;
  background: #1a1226;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 95, 158, 0.16), 0 0 26px -8px rgba(255, 95, 158, 0.5);
}

.campo input.codigo {
  text-align: center;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  font-family: var(--font-round);
  font-size: 24px;
  font-weight: 700;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 160ms, box-shadow 160ms, filter 160ms, opacity 160ms;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  background-size: 160% 160%;
  color: var(--on-accent);
  box-shadow: 0 14px 30px -14px rgba(255, 95, 158, 0.75), 0 0 30px -12px rgba(168, 85, 247, 0.6);
  animation: gradientShift 7s ease-in-out infinite;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 36%, rgba(255, 255, 255, 0.4) 48%, transparent 60%);
  transform: translateX(-135%);
  animation: shine 5.5s ease-in-out infinite;
}

@keyframes shine {
  0%, 58% { transform: translateX(-135%); }
  88%, 100% { transform: translateX(135%); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--fg);
  font-weight: 500;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
}

.hint {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}

.hint strong {
  color: var(--fg);
  font-weight: 600;
}

.success-mark,
.error-mark {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  margin: 4px auto 2px;
}

.success-mark {
  background: rgba(86, 226, 180, 0.12);
  color: var(--ok);
  box-shadow: 0 0 30px -10px rgba(86, 226, 180, 0.65);
  animation: pop 420ms cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.error-mark {
  background: rgba(255, 107, 133, 0.12);
  color: var(--err);
}

@keyframes pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

#panel-sucesso,
#panel-erro {
  text-align: center;
  gap: 10px;
}

.notice {
  margin: 14px 0 0;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 190, 92, 0.28);
  background: rgba(255, 190, 92, 0.08);
  font-size: 12.5px;
  line-height: 1.5;
  color: #ffcf8a;
  text-align: center;
}

.footnote {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6d5c78;
}

@media (max-width: 460px) {
  .card {
    margin-top: 92px;
    padding: 98px 20px 24px;
    border-radius: 22px;
  }

  .mascot,
  .mascot-glow {
    width: 156px;
    height: 156px;
    transform: translate(-50%, -50%);
  }

  h1 {
    font-size: 26px;
  }

  .steps {
    gap: 2px;
  }

  .step {
    padding: 5px 7px;
    font-size: 11px;
  }
}
