:root {
  --bg: #090b12;
  --bg-soft: #111528;
  --text: #eef1ff;
  --text-muted: #b8bfd8;
  --primary: #8b5cf6;
  --primary-2: #ec4899;
  --line: rgba(255, 255, 255, 0.1);
  --panel: rgba(17, 21, 40, 0.72);
  --shadow: 0 18px 45px rgba(7, 8, 18, 0.5);
  --radius: 20px;
  --ui-scale: 0.8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
}

body {
  background: radial-gradient(1200px 700px at 15% 10%, #252a52 0%, transparent 45%), radial-gradient(900px 600px at 85% 85%, #351d43 0%, transparent 50%), var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.5;
  display: flex;
  justify-content: center;
  padding: 8px 10px;
  overflow: hidden;
}

.bg-orb {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  opacity: 0.35;
}

.orb-a {
  top: -120px;
  left: -80px;
  background: #9f7aea;
}

.orb-b {
  right: -100px;
  bottom: -150px;
  background: #ec4899;
}

.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0);
  background-size: 3px 3px;
}

.app-shell {
  width: min(940px, 100%);
  position: relative;
  z-index: 1;
  zoom: var(--ui-scale);
  max-height: calc((100dvh - 16px) / var(--ui-scale));
  overflow: hidden;
}

.app-header {
  text-align: center;
  margin-bottom: 10px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
}

.brand-subtitle {
  margin: 10px 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.progress-wrap {
  margin-bottom: 10px;
}

.progress-track {
  height: 10px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  width: 33.333%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 22px rgba(139, 92, 246, 0.7);
  transition: width 240ms ease;
}

.progress-label {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.panel {
  display: none;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(14px, 2.8vw, 20px);
  text-align: center;
  max-height: calc((100dvh - 130px) / var(--ui-scale));
  overflow: hidden;
}

.panel.is-active {
  display: block;
  animation: panel-in 250ms ease;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-pill {
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(159, 122, 234, 0.55);
  background: rgba(159, 122, 234, 0.18);
}

h1,
h2 {
  margin: 12px 0;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
}

h2 {
  font-size: clamp(1.3rem, 3.6vw, 1.75rem);
}

.panel-copy {
  margin: 0 0 10px;
  color: var(--text-muted);
}

.media-preview,
.shop-preview {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.media-preview {
  display: block;
  padding: 0;
  width: 100%;
  max-height: min(36vh, 340px);
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}

.media-preview img,
.shop-preview {
  display: block;
  max-width: 100%;
  object-fit: cover;
}

.media-preview img {
  width: 100%;
  height: auto;
  max-height: min(36vh, 340px);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.22);
}

.shop-preview {
  cursor: zoom-in;
  max-height: 220px;
  margin-bottom: 10px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.22);
}

.ad-slot {
  margin: 10px 0 12px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: auto;
}

.ad-slot-lg {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.ad-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ad-content {
  min-height: 50px;
  display: grid;
  place-items: center;
}

.ad-fixed {
  margin-inline: auto;
}

.ad-320x50 {
  width: 320px;
  min-height: 50px;
}

.ad-468x60 {
  width: 468px;
  min-height: 60px;
}

.ad-300x250 {
  width: 300px;
  min-height: 250px;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform 140ms ease, filter 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 26px rgba(139, 92, 246, 0.35);
}

.btn-primary[disabled] {
  filter: grayscale(0.35) brightness(0.65);
  cursor: not-allowed;
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.actions-row .btn {
  flex: 1;
  min-width: 180px;
  text-align: center;
}

.home-links {
  display: grid;
  gap: 10px;
  width: min(520px, 100%);
  margin: 0 auto;
}

.home-links .btn {
  width: 100%;
}

.warning-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 70;
}

.warning-modal.is-visible {
  display: block;
}

.warning-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 22, 0.7);
}

.warning-card {
  position: relative;
  width: min(560px, calc(100% - 24px));
  margin: max(18px, 6vh) auto 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(17, 21, 40, 0.95);
  box-shadow: var(--shadow);
  text-align: center;
}

.warning-card h3 {
  margin: 6px 0 10px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.warning-card p {
  margin: 0 0 10px;
  color: var(--text-muted);
}

.warning-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
}

.warning-lead {
  font-size: 0.98rem;
  color: #e8ebff;
}

.warning-list {
  margin: 10px 0 12px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.warning-list li {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #d9def8;
  line-height: 1.35;
}

.warning-note {
  font-size: 0.92rem;
}

.warning-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(7, 8, 18, 0.86);
  z-index: 50;
  padding: 20px;
}

.lightbox.is-visible {
  display: flex;
}

.lightbox img {
  max-width: min(100%, 980px);
  max-height: calc(100vh - 80px);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}

code {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px 6px;
}

@media (max-width: 640px) {
  :root {
    --ui-scale: 0.76;
  }

  body {
    padding-top: 6px;
  }

  .app-shell {
    width: 100%;
  }

  .panel {
    padding: 12px;
  }

  .actions-row {
    flex-direction: column;
  }

  .actions-row .btn {
    min-width: 100%;
  }

  .brand-subtitle {
    font-size: 0.82rem;
  }

  .lightbox {
    padding: 10px;
  }

  .warning-actions .btn {
    width: 100%;
  }
}
