:root {
  --bg: #0b1020;
  --card: rgba(15, 23, 42, 0.84);
  --card-border: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --primary: #8b5cf6;
  --primary-strong: #7c3aed;
  --secondary: rgba(255, 255, 255, 0.08);
  --success: #10b981;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
  --radius: 24px;
  --radius-sm: 16px;
  --max-width: 460px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(139, 92, 246, 0.22), transparent 34%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.22), transparent 36%),
    linear-gradient(180deg, #0b1020 0%, #111827 100%);
}

code {
  font-family: inherit;
  font-size: 0.93em;
}

.bg-image {
  position: fixed;
  inset: 0;
  background: url('https://i.artfile.ru/1920x1080_1644427_[www.ArtFile.ru].jpg') center / cover no-repeat;
  filter: blur(20px);
  transform: scale(1.1);
  z-index: -2;
}

.bg-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.blur-cards-grid {
  display: flex;
  gap: 10px;
}

.blur-card {
  position: relative;
  width: 100px;
  height: 130px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.blur-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(6px) brightness(0.8);
}

.blur-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.blur-info {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  color: white;
  font-size: 11px;
}

.blur-name {
  font-weight: 600;
}

.blur-status {
  font-size: 10px;
  opacity: 0.85;
}

.blur-status.online {
  color: #4cff88;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow: hidden;
}

.background-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(56px);
  opacity: 0.55;
  pointer-events: none;
}

.orb-1 {
  width: 220px;
  height: 220px;
  top: 4%;
  right: -60px;
  background: rgba(139, 92, 246, 0.35);
}

.orb-2 {
  width: 180px;
  height: 180px;
  bottom: 12%;
  left: -60px;
  background: rgba(59, 130, 246, 0.25);
}

.quiz-app {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: 8px 0 24px;
}

.top-bar,
.quiz-card,
.site-footer {
  position: relative;
  z-index: 1;
}

.top-bar {
  width: min(100%, var(--max-width));
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.875rem;
}

.brand-mark {
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
}

.quiz-card {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.progress-wrap {
  padding: 18px 18px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 11.11%;
  background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%);
  border-radius: inherit;
  transition: width 0.32s ease;
}

.progress-text {
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--soft);
}

.step-container {
  position: relative;
  min-height: 640px;
}

.step {
  display: none;
  padding: 28px 22px 26px;
  animation: fadeIn 0.32s ease;
}

.step--active {
  display: block;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(167, 139, 250, 0.32);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  color: #ddd6fe;
  font-size: 0.8125rem;
  font-weight: 600;
}

h1,
h2 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.75rem;
}

.subtitle {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 22px;
}

.trust-pills span,
.benefit-item {
  padding: 11px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.9375rem;
}

.hero-panel {
  display: grid;
  gap: 14px;
}

.hero-preview-card,
.mini-info-card,
.email-value-box,
.summary-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
}

.hero-preview-card {
  padding: 16px;
}

.hero-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.avatar-stack {
  display: inline-flex;
}

.avatar-stack span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.9);
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.9), rgba(96, 165, 250, 0.9));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.avatar-stack span + span {
  margin-left: -10px;
}

.hero-preview-kicker,
.mini-info-label,
.summary-label,
.email-value-title {
  color: #ddd6fe;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-preview-title {
  margin-top: 14px;
  font-size: 1.1rem;
  font-weight: 700;
}

.hero-checklist,
.email-value-box ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.mini-info-grid,
.summary-grid {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.mini-info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-info-card,
.summary-card {
  padding: 14px;
}

.mini-info-value,
.summary-value {
  margin-top: 8px;
  font-size: 0.98rem;
  line-height: 1.4;
}

.option-group {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.option-btn,
.btn,
.text-input {
  width: 100%;
  border: none;
  border-radius: 18px;
  font: inherit;
}

.option-btn {
  text-align: left;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.option-btn:active,
.btn:active {
  transform: scale(0.99);
}

.option-btn:hover,
.option-btn.is-selected {
  border-color: rgba(167, 139, 250, 0.6);
  background: rgba(139, 92, 246, 0.16);
}

.btn {
  margin-top: 20px;
  padding: 16px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
}

.btn-primary:hover {
  opacity: 0.96;
}

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

.btn-hidden {
  display: none;
}

.step-processing {
  text-align: center;
  padding-top: 54px;
}

.loader {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: #a78bfa;
  animation: spin 0.9s linear infinite;
}

.processing-meter {
  margin: 0 auto 18px;
  width: 82px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.28);
  color: #ddd6fe;
  font-weight: 700;
}

.processing-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  text-align: left;
}

.processing-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
}

.processing-item.is-active,
.processing-item.is-done {
  border-color: rgba(167, 139, 250, 0.28);
  background: rgba(139, 92, 246, 0.1);
}

.processing-item.is-done {
  color: var(--text);
}

.processing-dot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.processing-item.is-active .processing-dot {
  background: #a78bfa;
  box-shadow: 0 0 0 6px rgba(167, 139, 250, 0.14);
}

.processing-item.is-done .processing-dot {
  background: var(--success);
}

.field-label {
  display: block;
  margin: 22px 0 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.text-input {
  padding: 16px 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  outline: none;
}

.text-input::placeholder {
  color: #94a3b8;
}

.text-input:focus {
  border-color: rgba(167, 139, 250, 0.6);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16);
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.checkbox-row input {
  margin-top: 3px;
}

.email-value-box {
  margin-top: 16px;
  padding: 15px 16px;
}

.error-message {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 0.875rem;
}

.text-link-btn {
  margin: 12px auto 0;
  display: block;
  background: transparent;
  border: none;
  color: #c4b5fd;
  font: inherit;
  cursor: pointer;
}

.benefits-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.support-note {
  margin-top: 18px;
  color: var(--soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

.site-footer {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 10px 4px 22px;
  text-align: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 16px;
  margin-bottom: 10px;
}

.site-footer a {
  color: #ddd6fe;
  text-decoration: none;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
  color: var(--soft);
  font-size: 0.84rem;
  line-height: 1.45;
}

.policy-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 22px 16px 40px;
}

.policy-card {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px 20px;
}

.policy-card h1 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.policy-card h2 {
  font-size: 1.2rem;
  margin-top: 24px;
}

.policy-card p,
.policy-card li {
  color: var(--muted);
  line-height: 1.65;
}

.policy-card ul {
  padding-left: 20px;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: #ddd6fe;
  text-decoration: none;
  font-weight: 600;
}

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

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

@media (max-width: 480px) {
  .page-shell {
    padding: 12px;
  }

  .step-container {
    min-height: 650px;
  }

  .step {
    padding: 24px 18px 22px;
  }

  h1 {
    font-size: 1.85rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .mini-info-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 481px) {
  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .step-container {
    min-height: 660px;
  }
}
