:root {
  --red: #e10600;
  --red-bright: #ff2d2d;
  --red-dark: #9b0000;
  --black: #050505;
  --black-soft: #121212;
  --black-card: rgba(18, 18, 18, 0.82);
  --white: #f5f5f5;
  --muted: #a3a3a3;
  --border: rgba(225, 6, 0, 0.35);
  --glow: 0 0 40px rgba(225, 6, 0, 0.35);
  --radius: 20px;
  --transition: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Outfit', system-ui, sans-serif;
  color: var(--white);
  background: var(--black);
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(225, 6, 0, 0.22), transparent 35%),
    radial-gradient(circle at 85% 10%, rgba(255, 45, 45, 0.12), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(155, 0, 0, 0.25), transparent 40%),
    linear-gradient(160deg, #050505 0%, #0d0d0d 45%, #120000 100%);
}

.bg::before,
.bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: float 12s ease-in-out infinite;
}

.bg::before {
  width: 320px;
  height: 320px;
  top: -80px;
  right: -60px;
  background: rgba(225, 6, 0, 0.18);
}

.bg::after {
  width: 260px;
  height: 260px;
  bottom: 10%;
  left: -40px;
  background: rgba(255, 45, 45, 0.12);
  animation-delay: -4s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(24px) scale(1.05);
  }
}

.shell {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

.header {
  text-align: center;
  margin-bottom: 1.5rem;
  animation: fadeDown 0.8s var(--transition) both;
}

.logo-wrap {
  width: min(280px, 88vw);
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 auto 1rem;
  border-radius: 24px;
  padding: 6px;
  background: linear-gradient(135deg, var(--red-bright), var(--red-dark));
  box-shadow: var(--glow);
  animation: pulse 3s ease-in-out infinite;
}

.logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 18px;
  background: #000;
  display: block;
}

.logo-fallback {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #000;
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 0.08em;
  color: var(--red-bright);
}

.header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.card {
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  animation: fadeUp 0.8s var(--transition) 0.1s both;
}

.progress {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.25rem 0;
}

.progress-dot {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.progress-dot span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red-dark), var(--red-bright));
  border-radius: inherit;
  transition: width var(--transition);
}

.progress-dot.active span,
.progress-dot.done span {
  width: 100%;
}

.form-body {
  padding: 1.25rem 1.25rem 1.5rem;
  min-height: 420px;
  position: relative;
}

.step {
  display: none;
  opacity: 0;
  transform: translateX(24px);
}

.step.active {
  display: block;
  animation: stepIn var(--transition) forwards;
}

.step.leaving {
  display: block;
  animation: stepOut 0.35s ease forwards;
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes stepOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-24px);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 30px rgba(225, 6, 0, 0.35);
  }
  50% {
    box-shadow: 0 0 50px rgba(255, 45, 45, 0.55);
  }
}

.step-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.step-sub {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #ddd;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font: inherit;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #666;
}

.field select option {
  background: #111;
  color: #fff;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.age-badge {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(225, 6, 0, 0.12), rgba(0, 0, 0, 0.2));
  display: none;
  animation: fadeUp 0.5s ease both;
}

.age-badge.visible {
  display: block;
}

.age-badge strong {
  color: var(--red-bright);
  font-size: 1.1rem;
}

.chips {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.chip {
  flex: 1;
  min-width: 120px;
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip label {
  display: block;
  text-align: center;
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.25s ease;
  font-weight: 600;
}

.chip input:checked + label {
  border-color: var(--red-bright);
  background: rgba(225, 6, 0, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 45, 45, 0.35);
}

.hidden {
  display: none !important;
}

.hidden-step {
  display: none !important;
}

.summary {
  display: grid;
  gap: 0.65rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.92rem;
}

.summary-row span:first-child {
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 0.95rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-primary {
  background: linear-gradient(135deg, var(--red-bright), var(--red-dark));
  color: white;
  box-shadow: 0 10px 30px rgba(225, 6, 0, 0.35);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 14px 36px rgba(255, 45, 45, 0.45);
}

.alert {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  display: none;
}

.alert.error {
  display: block;
  background: rgba(225, 6, 0, 0.15);
  border: 1px solid rgba(255, 45, 45, 0.35);
  color: #ffb4b4;
}

.alert.success {
  display: block;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.success-screen {
  text-align: center;
  padding: 2rem 0.5rem;
}

.success-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  background: linear-gradient(135deg, var(--red-bright), var(--red-dark));
  animation: pop 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column-reverse;
  }

  .form-body {
    min-height: 460px;
  }
}
