@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg: #0b1224;
  --panel: #0f172a;
  --panel-contrast: #0c182f;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #f59e0b;
  --accent-strong: #f97316;
  --danger: #ef4444;
}

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

body {
  margin: 0;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.08), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.08), transparent 28%),
    linear-gradient(135deg, #0b1224 0%, #111827 60%, #0f172a 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 70% 80%, rgba(14, 165, 233, 0.08), transparent 32%);
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 8px;
}

h1 {
  margin: 0 0 12px;
  font-size: 32px;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

.hint-card {
  background: var(--panel-contrast);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  min-width: 220px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.hint-title {
  margin: 0 0 6px;
  color: var(--accent);
  font-weight: 700;
}

.hint-text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 24px 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.card + .card {
  margin-top: 16px;
}

.progress {
  margin-bottom: 12px;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.progress-label {
  font-weight: 600;
}

.progress-hint {
  color: var(--muted);
  font-size: 14px;
}

.progress-bar {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  width: 0;
  transition: width 0.25s ease;
}

.steps {
  display: grid;
}

.step {
  display: none;
  gap: 12px;
  animation: fadeIn 0.2s ease;
}

.step.active {
  display: block;
}

.step h2 {
  margin-top: 8px;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.label {
  font-weight: 600;
}

.label-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.subtext {
  color: var(--muted);
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input,
textarea {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  width: 100%;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:focus,
textarea:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
  background: rgba(255, 255, 255, 0.04);
}

textarea {
  resize: vertical;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.option {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.option:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.option input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
}

.btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

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

.btn.primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border: none;
  color: #0b0b0b;
  box-shadow: 0 12px 35px rgba(245, 158, 11, 0.3);
}

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

.btn.ghost {
  background: transparent;
}

.hidden {
  display: none !important;
}

.error-text {
  color: var(--danger);
  font-size: 13px;
  min-height: 16px;
}

.invalid,
.invalid input,
.invalid textarea {
  border-color: rgba(239, 68, 68, 0.8) !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.status {
  margin-top: 6px;
  min-height: 20px;
  color: var(--muted);
  font-size: 14px;
}

.status.error {
  color: var(--danger);
}

.success {
  text-align: left;
  padding: 24px;
}

.success h2 {
  margin-top: 0;
}

.muted {
  color: var(--muted);
}

.loading-text {
  display: none;
}

.submitting .default-text {
  display: none;
}

.submitting .loading-text {
  display: inline;
}

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

@media (max-width: 800px) {
  .page-header {
    flex-direction: column;
  }

  .hint-card {
    width: 100%;
  }

  h1 {
    font-size: 26px;
  }

  .form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}
