* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: 'Alegreya Sans', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 60% 20%, #4b1d7a 0%, #24124a 55%, #160a30 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 0;
  position: relative;
}

.hidden {
  display: none !important;
}

/* Decorative Game Background */
.bg-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bg-beam {
  position: absolute;
  width: 140px;
  height: 140vh;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.03));
  transform: rotate(-16deg);
  filter: blur(2px);
}

.beam-1 {
  left: 16%;
  top: -15%;
}

.beam-2 {
  right: 12%;
  top: -20%;
  width: 90px;
  opacity: 0.4;
}

.float-star {
  position: absolute;
  top: 4%;
  left: 46%;
  font-size: 5.5rem;
  color: #2589ff;
  text-shadow: 0 6px 0 #12489e, 0 14px 28px rgba(0, 0, 0, 0.45);
  transform: rotate(12deg);
  animation: floatBob 4s ease-in-out infinite;
}

.float-arrow {
  position: absolute;
  bottom: 12%;
  right: 6%;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #ff5e62, #d61f3c);
  clip-path: polygon(0 25%, 55% 25%, 55% 0, 100% 50%, 55% 100%, 55% 75%, 0 75%);
  transform: rotate(35deg);
  opacity: 0.9;
  animation: floatBob 5s ease-in-out infinite reverse;
}

.float-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(45px);
  opacity: 0.45;
}

.orb-1 {
  width: 260px;
  height: 260px;
  background: #ec4899;
  left: -60px;
  bottom: 10%;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: #6366f1;
  right: -80px;
  top: 10%;
}

@keyframes floatBob {
  0%, 100% { transform: translateY(0) rotate(10deg); }
  50% { transform: translateY(-10px) rotate(14deg); }
}

/* Main Stage */
.stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 580px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Logo Emblem */
.logo-wrap {
  position: relative;
  width: 180px;
  height: 150px;
  margin-bottom: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: logoFloat 2.4s ease-in-out infinite;
}

.logo-arc {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #60a5fa 0%, #1e40af 72%);
  border: 5px solid #fde047;
  box-shadow: 0 0 32px rgba(96, 165, 250, 0.55), 0 10px 24px rgba(0, 0, 0, 0.45);
}

.logo-badge {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.9;
}

.logo-match {
  font-family: 'Fredoka', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: linear-gradient(180deg, #fff176 0%, #f59e0b 85%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 0 #7c2d12) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5));
}

.logo-masters {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  color: #ff2e63;
  -webkit-text-stroke: 1.5px #fff;
  text-shadow: 0 4px 0 #701a3c, 0 8px 12px rgba(0, 0, 0, 0.45);
  margin-top: 2px;
}

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

/* Main Gradient Card (Matches Screenshot) */
.card {
  width: 100%;
  max-width: 530px;
  min-height: 360px;
  border-radius: 16px;
  padding: 34px 32px 32px;
  background: radial-gradient(circle at -10% -10%, #ff63b6 0%, #c058c8 45%, #5b59cf 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 24px 55px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.step-view {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  margin-bottom: 20px;
}

/* Dark Username/ID Input */
.input-box {
  position: relative;
  width: 100%;
  max-width: 370px;
  height: 68px;
  background: #231d29;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.38);
  display: flex;
  align-items: center;
  padding: 0 18px;
  margin-bottom: 22px;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-box.error {
  border-color: #f87171;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.7);
}

.input-icon {
  width: 28px;
  height: 28px;
  color: #9ca3af;
  margin-right: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-icon svg {
  width: 100%;
  height: 100%;
}

.uid-input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 700;
}

.uid-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
}

/* Platform Grid */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 340px;
  margin-bottom: 30px;
}

.platform-btn {
  height: 68px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #231d29;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.platform-btn svg {
  width: 32px;
  height: 32px;
}

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

.platform-btn.selected {
  background: linear-gradient(135deg, #ff7eb9 0%, #6d6ae6 100%);
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.45);
}

/* Continue / Primary Button */
.btn-continue {
  width: 100%;
  max-width: 245px;
  height: 52px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: linear-gradient(90deg, #ff76b8 0%, #c06ad9 50%, #6b68df 100%);
  color: #16141a;
  font-family: Arial, sans-serif;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-continue:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

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

/* Step 2 & 3 States */
.status-label {
  font-size: 1.4rem;
  font-weight: 800;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  margin-bottom: 14px;
}

.search-name {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 10px;
  animation: pulseFade 0.8s ease-in-out infinite alternate;
}

.search-platform-pill {
  padding: 6px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  font-weight: 700;
  margin-bottom: 20px;
}

.spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin-bottom: 14px;
}

.check-badge {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.5);
  animation: popIn 0.35s ease;
}

/* Amount Selection */
.amount-list {
  width: 100%;
  max-width: 310px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.amount-btn {
  height: 50px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #231d29;
  color: #fff;
  font-family: inherit;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.amount-btn.selected {
  background: linear-gradient(135deg, #ff7eb9 0%, #6d6ae6 100%);
  border-color: #fff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
}

/* Progress Bar */
.progress-track {
  width: 100%;
  max-width: 340px;
  height: 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
  padding: 3px;
  margin-bottom: 18px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #fde047, #22c55e);
  transition: width 0.5s ease;
}

.counter-box {
  background: rgba(0, 0, 0, 0.45);
  border-radius: 12px;
  padding: 14px 28px;
}

.coin-big {
  font-size: 2rem;
}

.counter-val {
  font-size: 2rem;
  font-weight: 900;
}

.counter-user {
  font-size: 0.95rem;
  color: #e2e8f0;
}

/* Last Step */
.last-title {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  margin-bottom: 10px;
}

.last-desc {
  font-size: 1.05rem;
  line-height: 1.45;
  margin-bottom: 18px;
  max-width: 380px;
}

.summary-pill {
  background: rgba(0, 0, 0, 0.45);
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 1.35rem;
  margin-bottom: 22px;
}

.btn-reset {
  margin-top: 12px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

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

@keyframes pulseFade {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media (max-width: 520px) {
  .card {
    padding: 28px 18px 24px;
  }

  .platform-btn {
    height: 58px;
  }

  .btn-continue {
    font-size: 1.35rem;
  }
}
