* {
  box-sizing: border-box;
}

:root {
  --bg1: #05010b;
  --bg2: #160b25;
  --card: rgba(17, 11, 29, 0.88);
  --card-2: rgba(24, 16, 40, 0.94);
  --text: #f5eeff;
  --muted: #bda9da;
  --primary: #9747ff;
  --primary-2: #c76cff;
  --border: rgba(255, 255, 255, 0.08);
  --ok: #62f7a8;
  --err: #ff7b7b;
  --shadow: 0 24px 80px rgba(126, 50, 255, 0.24);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.3);
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, Arial, sans-serif;
  background: radial-gradient(circle at top, var(--bg2) 0%, var(--bg1) 56%, #000 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.bg-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: rgba(151, 71, 255, 0.12);
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.snow-wrap {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.snow-particle {
  position: absolute;
  top: -20px;
  border-radius: 50%;
  background: rgba(209, 140, 255, 0.9);
  box-shadow: 0 0 10px rgba(209, 140, 255, 0.35);
  animation: snow-fall linear forwards;
}

@keyframes snow-fall {
  from {
    transform: translateY(0);
    opacity: 0.82;
  }
  to {
    transform: translateY(115vh);
    opacity: 0;
  }
}

.app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 2;
}

.card {
  width: 100%;
  max-width: 430px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 24px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand {
  text-align: center;
  margin-bottom: 18px;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.logo {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  font-size: 34px;
  background: linear-gradient(135deg, rgba(151, 71, 255, 0.22), rgba(199, 108, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(151, 71, 255, 0.16);
}

h1,
h2 {
  margin: 0;
  font-weight: 900;
}

h1 {
  font-size: 36px;
  letter-spacing: 0.4px;
}

h2 {
  font-size: 24px;
}

.shimmer {
  background: linear-gradient(90deg, #8f49ff, #d792ff, #8f49ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  color: transparent;
  animation: shine 3s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.sub {
  margin: 10px auto 0;
  max-width: 290px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0 20px;
}

.stat {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  text-align: center;
  padding: 12px 10px;
  box-shadow: var(--shadow-soft);
}

.stat strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.stat span {
  color: var(--muted);
  font-size: 11px;
}

.field {
  margin-bottom: 12px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 700;
  color: #efe4ff;
}

input,
select {
  width: 100%;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a0613;
  color: white;
  outline: none;
  transition: 0.22s ease;
  font-size: 14px;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

input:focus,
select:focus {
  border-color: rgba(199, 108, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(151, 71, 255, 0.14);
  background: #0d0818;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.actions.single {
  grid-template-columns: 1fr;
}

.btn {
  border: none;
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.05em;
  transition: 0.22s ease;
}

.btn.primary {
  color: white;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: 0 14px 34px rgba(151, 71, 255, 0.28);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(151, 71, 255, 0.34);
}

.btn.secondary {
  color: white;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn.secondary:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}

.result {
  margin-top: 16px;
  min-height: 104px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 16px;
  line-height: 1.9;
}

.result.mini {
  min-height: auto;
  margin-top: 16px;
}

.ok {
  color: var(--ok);
}

.err {
  color: var(--err);
}

.small {
  color: var(--muted);
  font-size: 13px;
}

.footer-note {
  margin-top: 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.25);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 1, 11, 0.9);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 9999;
}

.hidden {
  display: none;
}

.loading-card {
  width: min(92%, 390px);
  background: var(--card-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  padding: 26px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  text-align: center;
}

.loading-card p {
  color: var(--muted);
}

.progress {
  margin-top: 14px;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 18px rgba(151, 71, 255, 0.4);
  transition: width 0.55s ease;
}

.steps {
  margin-top: 16px;
  display: grid;
  gap: 8px;
  text-align: left;
}

.step {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: #d7c7ee;
  font-size: 13px;
}

.step.active {
  background: rgba(151, 71, 255, 0.1);
  border-color: rgba(199, 108, 255, 0.35);
  color: white;
}

.step.done {
  color: var(--ok);
}

@media (max-width: 460px) {
  .card {
    padding: 20px;
    border-radius: 24px;
  }

  h1 {
    font-size: 31px;
  }

  .grid,
  .actions {
    grid-template-columns: 1fr;
  }
}