/* ======================================================
   One Click Sites — Animated Product Demo
   Pure CSS + Vanilla JS. No dependencies.
   ====================================================== */

/* ---- Demo Section Wrapper ---- */
.demo-anim-section {
  padding: 20px 20px 80px;
  text-align: center;
  background: var(--gray-light, #f3f4f6);
}

.demo-anim-section .section-caption {
  display: block;
  margin-top: 18px;
  font-size: .95rem;
  color: var(--gray, #6b7280);
  font-style: italic;
}

/* ---- Browser Mockup Frame ---- */
.browser-frame {
  max-width: 820px;
  margin: 0 auto;
  background: #1e1e2e;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08);
  position: relative;
}

/* Title bar */
.browser-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #2a2a3e;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.browser-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.browser-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.browser-dot:nth-child(1) { background: #ff5f57; }
.browser-dot:nth-child(2) { background: #ffbd2e; }
.browser-dot:nth-child(3) { background: #28ca42; }

.browser-address {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,.3);
  border-radius: 6px;
  padding: 5px 12px;
  margin: 0 8px;
}

.browser-url-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.browser-url-bar .lock-icon {
  font-size: .7rem;
  color: rgba(255,255,255,.5);
  flex-shrink: 0;
}

.browser-url-text {
  font-size: .72rem;
  color: rgba(255,255,255,.65);
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}

.browser-nav-btns {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.browser-nav-btn {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: rgba(255,255,255,.06);
  border: none;
  color: rgba(255,255,255,.4);
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

/* Screen area */
.browser-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #0d0d1a;
  min-height: 320px;
}

/* ---- Step Indicator ---- */
.demo-steps {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: #2a2a3e;
}

.demo-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  transition: all .4s cubic-bezier(.4,0,.2,1);
}

.demo-step-dot.active {
  background: var(--green, #22c55e);
  width: 24px;
  border-radius: 4px;
}

.demo-step-dot.done {
  background: rgba(34,197,94,.4);
}

/* ---- Canvas — the simulation area ---- */
.demo-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* ---- Step overlays ---- */
.demo-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s cubic-bezier(.4,0,.2,1);
}

.demo-step.visible {
  opacity: 1;
}

/* ---- Step 1: Niche Selector ---- */
.step-niche {
  padding: 40px 32px;
  gap: 16px;
  background: #f8f9fa;
}

.niche-label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #9ca3af;
  text-transform: uppercase;
}

.niche-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
}

.niche-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 480px;
}

.niche-chip {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 8px;
  font-size: .82rem;
  font-weight: 600;
  color: #374151;
  cursor: default;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  font-family: inherit;
}

.niche-chip.selected {
  border-color: var(--green, #22c55e);
  background: #f0fdf4;
  color: #166534;
  transform: scale(1.04);
  box-shadow: 0 0 0 3px rgba(34,197,94,.15);
}

.niche-chip.clicked {
  animation: niche-click-pulse .4s ease-out;
}

@keyframes niche-click-pulse {
  0%   { transform: scale(1); border-color: #e5e7eb; }
  40%  { transform: scale(1.08); border-color: var(--green, #22c55e); box-shadow: 0 0 0 4px rgba(34,197,94,.2); }
  100% { transform: scale(1.04); border-color: var(--green, #22c55e); box-shadow: 0 0 0 3px rgba(34,197,94,.15); }
}

.niche-checkmark {
  display: none;
  margin-left: 4px;
  color: var(--green, #22c55e);
}

.niche-chip.selected .niche-checkmark { display: inline; }

.niche-cursor {
  position: absolute;
  width: 20px;
  height: 20px;
  pointer-events: none;
  z-index: 20;
  transform: translate(-4px, -4px);
  transition: left 1.8s cubic-bezier(.4,0,.2,1), top 1.8s cubic-bezier(.4,0,.2,1);
}

.niche-cursor svg {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
}

/* ---- Step 2: Theme Chooser ---- */
.step-theme {
  padding: 30px 32px;
  gap: 14px;
  background: #f8f9fa;
}

.theme-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.theme-thumb {
  width: 120px;
  height: 78px;
  border-radius: 10px;
  border: 3px solid transparent;
  overflow: hidden;
  position: relative;
  transition: all .4s cubic-bezier(.4,0,.2,1);
  opacity: 0.5;
  transform: scale(.95);
}

.theme-thumb.active {
  border-color: var(--green, #22c55e);
  opacity: 1;
  transform: scale(1.08);
  box-shadow: 0 8px 32px rgba(34,197,94,.3);
}

.theme-thumb-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.theme-thumb-header {
  height: 18px;
  background: rgba(0,0,0,.12);
}

.theme-thumb-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px;
}

.theme-thumb-line {
  height: 4px;
  border-radius: 2px;
  background: rgba(0,0,0,.15);
}

.theme-thumb-line.short { width: 60%; }
.theme-thumb-line.med  { width: 80%; }

.theme-name-badge {
  font-size: .65rem;
  font-weight: 700;
  color: #6b7280;
  margin-top: 6px;
}

.theme-arrow {
  font-size: 1.4rem;
  color: #d1d5db;
  flex-shrink: 0;
}

/* ---- Step 3: AI Content Generator ---- */
.step-ai {
  padding: 40px 48px;
  gap: 14px;
  background: #0f172a;
  color: #fff;
}

.ai-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
  font-weight: 600;
  color: #94a3b8;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34,197,94,.12);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .75rem;
  font-weight: 700;
}

.ai-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(34,197,94,.3);
  border-top-color: #4ade80;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.ai-generating-text {
  font-size: .85rem;
  color: #64748b;
}

.ai-generating-text.done {
  color: #4ade80;
}

.ai-content-preview {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 28px 32px;
  max-width: 520px;
  width: 100%;
  text-align: left;
  min-height: 130px;
  position: relative;
}

.ai-headline-typed {
  font-size: 1.1rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.3;
  margin-bottom: 10px;
  min-height: 2.6em;
}

.ai-body-typed {
  font-size: .82rem;
  color: #94a3b8;
  line-height: 1.5;
  min-height: 1.5em;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: #4ade80;
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: blink .7s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ---- Step 4: Publish ---- */
.step-publish {
  padding: 40px;
  gap: 16px;
  background: #0f172a;
}

.publish-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 16px 48px;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;
  cursor: default;
  box-shadow: 0 4px 20px rgba(34,197,94,.35);
  letter-spacing: .5px;
  transition: all .3s;
  position: relative;
}

.publish-btn.pressed {
  transform: translateY(2px) scale(.98);
  box-shadow: 0 2px 10px rgba(34,197,94,.2);
}

.publish-btn .btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

.publish-btn.loading .btn-spinner { display: inline-block; }

.published-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: #4ade80;
  opacity: 0;
  transform: translateY(10px);
  transition: all .4s cubic-bezier(.22,.68,0,1.2);
}

.published-text.show {
  opacity: 1;
  transform: translateY(0);
}

.live-url {
  font-size: .78rem;
  color: #64748b;
  font-family: 'SF Mono', 'Menlo', monospace;
}

/* Confetti particles */
.confetti-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
}

/* Sparkle burst */
.sparkle-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  animation: sparkle-fly 0.8s ease-out forwards;
}

@keyframes sparkle-fly {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: var(--sparkle-dir) scale(0); opacity: 0; }
}

/* ---- Step 5: Built Website Preview ---- */
.step-preview {
  background: #f8f9fa;
  overflow: hidden;
  position: relative;
}

.mini-site-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* The mini affiliate site — rendered inside the browser mockup */
.mini-site {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  transform-origin: top left;
}

/* Scrolling container for the mini-site */
.mini-site-scroll {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: top 5.5s cubic-bezier(.25,.1,.25,1);
}

.mini-site-inner {
  width: 100%;
  padding-bottom: 160%;
  position: relative;
}

/* Mini site sections */
.ms-hero {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #0a1a0f 0%, #162418 60%, #0d2a12 100%);
  padding: 20px 14px 16px;
  text-align: center;
  border-bottom: 2px solid #22c55e;
}

.ms-badge {
  display: inline-block;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.3);
  color: #4ade80;
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.ms-h1 {
  font-size: .95rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 6px;
  letter-spacing: -.3px;
}

.ms-h1 span { color: #4ade80; }

.ms-sub {
  font-size: .5rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 10px;
  line-height: 1.4;
}

.ms-cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: .52rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 6px;
  letter-spacing: .5px;
  text-transform: uppercase;
  box-shadow: 0 2px 12px rgba(34,197,94,.4);
}

.ms-trust {
  font-size: .45rem;
  color: rgba(255,255,255,.4);
  margin-top: 6px;
}

/* Section: Stats */
.ms-stats {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  padding: 8px 12px;
  background: rgba(0,0,0,.25);
}

.ms-stat {
  text-align: center;
  color: #fff;
}

.ms-stat-num {
  font-size: .65rem;
  font-weight: 900;
  color: #4ade80;
  display: block;
}

.ms-stat-label {
  font-size: .4rem;
  color: rgba(255,255,255,.5);
  display: block;
}

/* Section: Problem */
.ms-problem {
  position: absolute;
  top: 116px;
  left: 0;
  right: 0;
  padding: 10px 14px;
  background: linear-gradient(180deg, #fff9eb 0%, #fff 100%);
  border-bottom: 1px solid #fef3c7;
}

.ms-problem-title {
  font-size: .6rem;
  font-weight: 800;
  color: #92400e;
  margin-bottom: 4px;
  text-align: center;
}

.ms-problem-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ms-problem-item {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: .48rem;
  color: #78350f;
  line-height: 1.3;
}

.ms-problem-icon { color: #ef4444; flex-shrink: 0; }

/* Section: Solution / How it works */
.ms-solution {
  position: absolute;
  top: 192px;
  left: 0;
  right: 0;
  padding: 10px 14px;
  background: #fff;
}

.ms-solution-title {
  font-size: .6rem;
  font-weight: 800;
  color: #111827;
  text-align: center;
  margin-bottom: 8px;
}

.ms-steps-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.ms-step-item {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 6px 5px;
  text-align: center;
  flex: 1;
  max-width: 80px;
}

.ms-step-icon {
  font-size: .7rem;
  margin-bottom: 2px;
}

.ms-step-label {
  font-size: .42rem;
  font-weight: 700;
  color: #166534;
}

.ms-step-num {
  display: inline-block;
  background: #22c55e;
  color: #fff;
  font-size: .35rem;
  font-weight: 900;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  line-height: 12px;
  margin-bottom: 2px;
}

/* Section: Benefits */
.ms-benefits {
  position: absolute;
  top: 270px;
  left: 0;
  right: 0;
  padding: 10px 14px;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
}

.ms-benefit-title {
  font-size: .6rem;
  font-weight: 800;
  color: #111827;
  text-align: center;
  margin-bottom: 8px;
}

.ms-benefit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.ms-benefit-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

.ms-benefit-check {
  color: #22c55e;
  font-size: .6rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.ms-benefit-text {
  font-size: .45rem;
  color: #374151;
  line-height: 1.3;
}

.ms-benefit-text strong {
  display: block;
  color: #111827;
  font-size: .48rem;
  margin-bottom: 1px;
}

/* Section: Testimonial */
.ms-testimonial {
  position: absolute;
  top: 362px;
  left: 0;
  right: 0;
  padding: 10px 14px;
  background: #fff;
  border-top: 1px solid #f3f4f6;
}

.ms-tm-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ms-tm-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  font-size: .45rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ms-tm-content {
  flex: 1;
}

.ms-tm-stars {
  color: #f59e0b;
  font-size: .55rem;
  margin-bottom: 3px;
  letter-spacing: 1px;
}

.ms-tm-text {
  font-size: .5rem;
  color: #374151;
  line-height: 1.4;
  font-style: italic;
}

.ms-tm-name {
  font-size: .45rem;
  color: #6b7280;
  margin-top: 3px;
  font-weight: 600;
}

.ms-verified {
  display: inline-block;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  font-size: .35rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 20px;
  margin-left: 5px;
}

/* Section: Guarantee */
.ms-guarantee {
  position: absolute;
  top: 420px;
  left: 0;
  right: 0;
  padding: 10px 14px;
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
  border-top: 2px solid #22c55e;
  text-align: center;
}

.ms-guarantee-icon {
  font-size: .9rem;
  margin-bottom: 4px;
}

.ms-guarantee-title {
  font-size: .55rem;
  font-weight: 800;
  color: #166534;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.ms-guarantee-sub {
  font-size: .45rem;
  color: #15803d;
}

/* Section: Final CTA */
.ms-cta-section {
  position: absolute;
  top: 478px;
  left: 0;
  right: 0;
  padding: 12px 14px;
  background: linear-gradient(135deg, #0a2010 0%, #0f3018 100%);
  text-align: center;
}

.ms-cta-headline {
  font-size: .7rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 4px;
}

.ms-cta-sub {
  font-size: .45rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 8px;
}

.ms-cta-price-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ms-price-old {
  font-size: .55rem;
  text-decoration: line-through;
  color: #ef4444;
  font-weight: 700;
}

.ms-price-new {
  font-size: .8rem;
  font-weight: 900;
  color: #4ade80;
}

.ms-price-label {
  font-size: .4rem;
  color: rgba(255,255,255,.5);
}

.ms-buy-btn {
  display: inline-block;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: .58rem;
  font-weight: 800;
  padding: 8px 24px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: .5px;
  box-shadow: 0 4px 16px rgba(34,197,94,.4);
}

.ms-cta-secure {
  font-size: .4rem;
  color: rgba(255,255,255,.3);
  margin-top: 5px;
}

/* Section: Footer */
.ms-footer {
  position: absolute;
  top: 570px;
  left: 0;
  right: 0;
  padding: 8px 14px;
  background: #0f172a;
  text-align: center;
}

.ms-footer-text {
  font-size: .42rem;
  color: rgba(255,255,255,.35);
  margin-bottom: 3px;
}

.ms-footer-links {
  font-size: .38rem;
  color: rgba(255,255,255,.25);
}

.ms-footer-links a {
  color: rgba(255,255,255,.35);
  margin: 0 4px;
  text-decoration: none;
}

/* ---- "Live site" badge ---- */
.live-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #22c55e;
  color: #fff;
  font-size: .55rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 12px rgba(34,197,94,.4);
  z-index: 10;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.85); }
}

/* ---- Scroll progress bar (inside mini site) ---- */
.scroll-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #22c55e;
  width: 0%;
  z-index: 10;
  transition: width 0.1s linear;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .browser-screen {
    aspect-ratio: unset;
    min-height: 280px;
    height: 55vw;
  }

  .niche-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .niche-chip {
    padding: 10px 6px;
    font-size: .75rem;
  }

  .theme-thumb {
    width: 90px;
    height: 60px;
  }

  .ai-content-preview {
    padding: 20px 18px;
  }

  .ai-headline-typed {
    font-size: .9rem;
  }

  .ms-h1 { font-size: .8rem; }
  .ms-stat-num { font-size: .55rem; }
}

/* ---- Scroll progress indicator ---- */
.mini-site-scroll::-webkit-scrollbar { width: 3px; }
.mini-site-scroll::-webkit-scrollbar-track { background: transparent; }
.mini-site-scroll::-webkit-scrollbar-thumb { background: #22c55e; border-radius: 2px; }

/* ======================================================
   NEW ANIMATION STYLES — Published Sites Showcase
   ====================================================== */

/* Cursor */
.demo-cursor {
  position: absolute;
  z-index: 50;
  pointer-events: none;
  transition: left 2s cubic-bezier(.4,0,.2,1), top 2s cubic-bezier(.4,0,.2,1), opacity .3s;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}

/* Step label / title (shared) */
.step-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.step-title {
  font-size: 1rem;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 18px;
}

.step-hint {
  font-size: .72rem;
  color: #9ca3af;
  margin-top: 10px;
}

/* ===== Step 1: Niche Cards ===== */
.step-niche {
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
  padding: 28px 24px;
  gap: 0;
  flex-direction: column;
}

.niche-cards {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.niche-card {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  flex: 1;
  max-width: 130px;
  cursor: default;
  transition: all .35s cubic-bezier(.4,0,.2,1);
  position: relative;
}

.niche-card:hover { border-color: #22c55e; transform: translateY(-2px); }
.niche-card-featured { border-color: #22c55e; background: #f0fdf4; box-shadow: 0 4px 20px rgba(34,197,94,.15); }
.niche-card-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #22c55e;
  color: #fff;
  font-size: .55rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: .3px;
}

.niche-card-icon { font-size: 1.6rem; margin-bottom: 6px; }
.niche-card-name { font-size: .72rem; font-weight: 800; color: #111827; margin-bottom: 3px; }
.niche-card-desc { font-size: .6rem; color: #6b7280; margin-bottom: 6px; line-height: 1.3; }
.niche-card-commission { font-size: .6rem; color: #22c55e; font-weight: 700; }

.niche-card.selected {
  border-color: #22c55e;
  background: #f0fdf4;
  transform: scale(1.04);
  box-shadow: 0 0 0 4px rgba(34,197,94,.15);
  animation: niche-click-pulse .4s ease-out;
}

/* ===== Step 2: AI Generating ===== */
.step-generating {
  background: #0f172a;
  padding: 32px 40px;
  gap: 12px;
}

.gen-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #4b5563;
  text-transform: uppercase;
}

.gen-title {
  font-size: .95rem;
  font-weight: 800;
  color: #f1f5f9;
}

.gen-progress-wrap {
  width: 100%;
  max-width: 420px;
  height: 6px;
  background: rgba(255,255,255,.1);
  border-radius: 3px;
  overflow: hidden;
  margin: 4px 0;
}

.gen-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #4ade80, #22c55e);
  background-size: 200% 100%;
  width: 0%;
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}

.gen-progress-bar.animating {
  animation: progress-shimmer 1.2s linear infinite;
}

@keyframes progress-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.gen-steps {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 6px 0;
}

.gen-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  color: #64748b;
  font-weight: 600;
  transition: all .3s;
}

.gen-step.done { color: #4ade80; }
.gen-step-icon { font-size: .85rem; }
.gen-step-check {
  font-size: .7rem;
  color: transparent;
  transition: color .3s;
}
.gen-step.done .gen-step-check { color: #4ade80; }

.gen-status {
  font-size: .75rem;
  color: #64748b;
  min-height: 1.2em;
  transition: color .4s;
}
.gen-status.done { color: #4ade80; }

/* ===== Step 3/6: Live Published Site ===== */
.step-live-site {
  background: #f8f9fa;
  overflow: hidden;
}

.live-site-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.demo-site-scroll {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Sticky CTA bar */
.demo-sticky-cta {
  position: absolute;
  bottom: 52px;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  z-index: 15;
  font-size: .6rem;
  font-weight: 700;
  gap: 8px;
}

.demo-sticky-btn {
  background: #22c55e;
  color: #fff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: .58rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Mini site sections */
.ds-hero {
  padding: 12px 14px 10px;
  text-align: center;
  position: relative;
}

.ds-sleep-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #1e1b4b 100%);
  border-bottom: 2px solid #a78bfa;
}

.ds-fitness-hero {
  background: linear-gradient(135deg, #0a1a0f 0%, #162418 60%, #0d2a12 100%);
  border-bottom: 2px solid #22c55e;
}

.ds-sidehustle-hero {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 60%, #fed7aa 100%);
  border-bottom: 2px solid #f97316;
}

.ds-badge {
  display: inline-block;
  background: rgba(167,139,250,.15);
  border: 1px solid rgba(167,139,250,.3);
  color: #a78bfa;
  font-size: .48rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.ds-h1 {
  font-size: .85rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 5px;
}

.ds-sub {
  font-size: .48rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.ds-cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  font-size: .52rem;
  font-weight: 800;
  padding: 5px 18px;
  border-radius: 7px;
  text-transform: uppercase;
  letter-spacing: .5px;
  box-shadow: 0 2px 12px rgba(124,58,237,.4);
}

.ds-trust {
  font-size: .4rem;
  color: rgba(255,255,255,.82);
  margin-top: 5px;
}

/* Stats row */
.ds-stats-row {
  display: flex;
  justify-content: space-around;
  padding: 7px 12px;
  background: rgba(0,0,0,.2);
}

.ds-stat { text-align: center; color: #fff; }
.ds-stat-n { display: block; font-size: .65rem; font-weight: 900; color: #a78bfa; }
.ds-stat-l { display: block; font-size: .38rem; color: rgba(255,255,255,.5); }

.ds-fitness-hero + .ds-stats-row .ds-stat-n { color: #4ade80; }
.ds-sidehustle-hero + .ds-stats-row ~ * .ds-stat-n { color: #f97316; }

/* CTA box */
.ds-content {
  padding: 10px 14px;
}

.ds-cta-box {
  background: #fff;
  border: 2px solid #a78bfa;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(124,58,237,.1);
}

.ds-cta-box-title {
  font-size: .58rem;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 6px;
}

.ds-cta-price { display: flex; justify-content: center; gap: 10px; align-items: center; margin-bottom: 8px; }
.ds-old { font-size: .65rem; text-decoration: line-through; color: #ef4444; font-weight: 700; }
.ds-free {
  font-size: .85rem;
  font-weight: 900;
  color: #7c3aed;
  background: #f5f3ff;
  padding: 3px 10px;
  border-radius: 6px;
}

.ds-cta-box-btn {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  font-size: .58rem;
  font-weight: 800;
  padding: 8px 24px;
  border-radius: 8px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .5px;
  box-shadow: 0 3px 12px rgba(124,58,237,.3);
}

.ds-cta-micro {
  font-size: .42rem;
  color: #9ca3af;
  margin-top: 6px;
}

/* ===== Widget Overlays ===== */
.widget {
  position: absolute;
  z-index: 20;
  pointer-events: none;
}

/* Live visitor badge */
.visitor-badge {
  top: 8px;
  right: 8px;
  background: #7c3aed;
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .6rem;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(124,58,237,.4);
  opacity: 0;
  transform: scale(.8) translateY(-4px);
  transition: opacity .5s, transform .5s cubic-bezier(.34,1.56,.64,1);
}

.visitor-badge.show {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.vcount-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a78bfa;
  animation: live-pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

.vcount-num { font-variant-numeric: tabular-nums; }
.vcount-label { font-size: .55rem; color: rgba(255,255,255,.7); font-weight: 500; }

/* Countdown timer */
.countdown-widget {
  top: 8px;
  left: 8px;
  background: rgba(124,58,237,.15);
  border: 1px solid rgba(167,139,250,.4);
  border-radius: 10px;
  padding: 6px 10px;
  opacity: 0;
  transform: scale(.8);
  transition: opacity .5s .2s, transform .5s .2s cubic-bezier(.34,1.56,.64,1);
}

.countdown-widget.show {
  opacity: 1;
  transform: scale(1);
}

.cd-label {
  font-size: .45rem;
  color: rgba(167,139,250,.7);
  font-weight: 600;
  margin-bottom: 3px;
  text-align: center;
}

.cd-digits {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: .7rem;
  font-weight: 900;
  color: #a78bfa;
  font-variant-numeric: tabular-nums;
}

.cd-seg { text-align: center; }
.cd-seg span { display: block; line-height: 1; }
.cd-seg small { display: block; font-size: .38rem; color: rgba(167,139,250,.5); font-weight: 600; }
.cd-sep { font-size: .6rem; opacity: .6; }

/* Social proof popup */
.social-popup {
  bottom: 60px;
  left: 8px;
  background: #fff;
  border: 1px solid rgba(167,139,250,.3);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  max-width: 180px;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity .6s .4s, transform .6s .4s cubic-bezier(.34,1.56,.64,1);
}

.social-popup.show {
  opacity: 1;
  transform: translateX(0);
}

.sp-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #7c3aed;
  color: #fff;
  font-size: .45rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sp-body { flex: 1; }
.sp-name { font-size: .6rem; font-weight: 800; color: #1f2937; margin-bottom: 2px; }
.sp-text { font-size: .55rem; color: #374151; line-height: 1.3; margin-bottom: 3px; }
.sp-time { font-size: .42rem; color: #9ca3af; }

/* ===== Dashboard Row (floating below browser frame) ===== */
.demo-dash-row {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  background: #1f2937;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  gap: 8px;
  z-index: 30;
  border-top: 1px solid rgba(255,255,255,.08);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .5s, transform .5s cubic-bezier(.4,0,.2,1);
}

.demo-dash-row.show {
  opacity: 1;
  transform: translateY(0);
}

.dash-url {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .62rem;
  color: rgba(255,255,255,.65);
  font-family: 'SF Mono', 'Menlo', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 38%;
  flex-shrink: 0;
}

.dash-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: live-pulse 1.5s ease-in-out infinite;
}

.dash-btns {
  display: flex;
  gap: 4px;
  overflow: hidden;
}

.dash-btn {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.65);
  font-size: .55rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  cursor: default;
}

.dash-btn-ai {
  background: rgba(34,197,94,.15);
  border-color: rgba(34,197,94,.3);
  color: #4ade80;
}

.dash-btn-widget {
  background: rgba(251,146,60,.15);
  border-color: rgba(251,146,60,.3);
  color: #fb923c;
}

.dash-btn-del { color: rgba(255,255,255,.3); }

/* ===== Step 4: AI Edit Modal ===== */
.step-ai-edit {
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
}

.demo-dim-bg {
  position: absolute;
  inset: 0;
  background: transparent;
}

.ai-edit-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.9);
  width: 88%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,.4);
  overflow: hidden;
  opacity: 0;
  transition: opacity .4s, transform .5s cubic-bezier(.34,1.56,.64,1);
  z-index: 40;
}

.ai-edit-modal.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.ai-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.ai-edit-title {
  font-size: .9rem;
  font-weight: 800;
  color: #111827;
}

.ai-edit-close {
  font-size: .8rem;
  color: #9ca3af;
  cursor: default;
}

.ai-edit-body { padding: 16px 18px; }

.ai-edit-prompt-label {
  font-size: .72rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 8px;
}

.ai-edit-prompt-box {
  background: #f9fafb;
  border: 2px solid #22c55e;
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 50px;
  position: relative;
  margin-bottom: 12px;
}

.ai-prompt-text {
  font-size: .75rem;
  color: #111827;
  line-height: 1.4;
}

.ai-prompt-cursor {
  display: inline-block;
  color: #22c55e;
  font-weight: 700;
  animation: blink .7s step-end infinite;
  margin-left: 2px;
}

.ai-edit-examples {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.ai-example-chip {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: .62rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.ai-edit-actions {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.ai-preview-label {
  font-size: .62rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 8px;
}

.ai-preview-diff {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-diff-old {
  font-size: .65rem;
  color: #9ca3af;
  text-decoration: line-through;
  flex: 1;
}

.ai-diff-arrow {
  font-size: .8rem;
  color: #22c55e;
  flex-shrink: 0;
}

.ai-diff-new {
  font-size: .65rem;
  color: #166534;
  font-weight: 700;
  flex: 1;
}

.ai-edit-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.ai-edit-cancel {
  font-size: .72rem;
  color: #6b7280;
  font-weight: 600;
  padding: 8px 16px;
  cursor: default;
}

.ai-edit-apply {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(34,197,94,.3);
}

.demo-site-behind {
  position: absolute;
  inset: 0;
  overflow: hidden;
  filter: blur(2px);
  opacity: .4;
}

/* ===== Step 5: Widgets Config Panel ===== */
.step-widgets {
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
}

.widgets-panel {
  position: absolute;
  top: 50%;
  right: 5%;
  transform: translateY(-50%) scale(.85);
  width: 78%;
  max-width: 340px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,.4);
  overflow: hidden;
  opacity: 0;
  transition: opacity .4s .1s, transform .5s .1s cubic-bezier(.34,1.56,.64,1);
  z-index: 40;
}

.widgets-panel.show {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.wp-header {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 16px;
  font-size: .85rem;
  font-weight: 800;
  color: #111827;
}

.wp-list { padding: 8px 0; }

.wp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  transition: background .2s;
}

.wp-item:hover { background: #f9fafb; }

.wp-toggle {
  width: 28px;
  height: 16px;
  border-radius: 8px;
  background: #e5e7eb;
  position: relative;
  flex-shrink: 0;
  transition: background .3s;
}

.wp-toggle.on { background: #22c55e; }

.wp-toggle::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: left .3s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.wp-toggle.on::after { left: 14px; }

.wp-info { flex: 1; }
.wp-name { font-size: .72rem; font-weight: 700; color: #111827; }
.wp-desc { font-size: .58rem; color: #6b7280; margin-top: 1px; }

.wp-status {
  font-size: .58rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  background: #e5e7eb;
  color: #6b7280;
}
.wp-status.on { background: #f0fdf4; color: #166534; }

.wp-save {
  margin: 0 16px 16px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  font-size: .78rem;
  font-weight: 800;
  box-shadow: 0 2px 12px rgba(34,197,94,.3);
}

/* ===== Site Cycling (Steps 6a, 6b) ===== */
.site-cycle {
  animation: site-fade-in .5s cubic-bezier(.4,0,.2,1);
}

@keyframes site-fade-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* ===== Animations for widgets ===== */
@keyframes pulse-count {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}

.countdown-widget.animating .cd-digits span {
  animation: pulse-count 1s ease-in-out infinite;
}

/* ===== Demo URL change effect ===== */
.url-change {
  animation: url-flash .4s ease-out;
}

@keyframes url-flash {
  0% { color: #4ade80; }
  100% { color: rgba(255,255,255,.65); }
}

/* ===== Demo section title update ===== */
.demo-anim-section h2 {
  transition: all .3s;
}