:root {
  --demo-fuchsia: #ff007f;
  --demo-surface: #14161d;
  --demo-surface-2: #1b1e27;
  --demo-text: #f8f8fb;
  --demo-muted: rgba(248, 248, 251, 0.7);
  --demo-border: rgba(255, 255, 255, 0.1);
  --demo-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
  --demo-glow: 0 0 0 1px rgba(255, 0, 127, 0.22), 0 0 22px rgba(255, 0, 127, 0.16);
}

.ai-demo-section {
  position: relative;
  background:
    radial-gradient(circle at 10% 18%, rgba(255, 0, 127, 0.16), transparent 35%),
    radial-gradient(circle at 90% 78%, rgba(255, 0, 127, 0.1), transparent 45%),
    linear-gradient(180deg, #111217 0%, #0c0d10 100%);
  padding: 56px 16px 76px;
}

.ai-demo-shell {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.ai-demo-phone {
  position: relative;
  width: min(390px, 100%);
  border-radius: 28px;
}

.ai-demo-phone-glow {
  position: absolute;
  inset: -8px;
  border-radius: 34px;
  background: radial-gradient(circle at 50% 0%, rgba(255, 0, 127, 0.24), transparent 48%);
  filter: blur(16px);
  pointer-events: none;
}

.ai-demo-app {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, #101218 0%, #0e1016 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.ai-app-status {
  height: 24px;
  padding: 6px 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.ai-app-status-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-app-status-icons i {
  display: inline-block;
  width: 10px;
  height: 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.65);
}

.ai-app-header {
  padding: 14px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 21, 28, 0.9);
  backdrop-filter: blur(6px);
}

.ai-app-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #fff;
}

.ai-app-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  min-height: 620px;
  max-height: 700px;
}

.demo-flow-top {
  margin-bottom: 12px;
}

.demo-step-counter {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-flow-progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.demo-flow-progress-bar {
  width: 50%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff3aa4 0%, #ff007f 60%, #ff6fbe 100%);
  transition: width 320ms ease;
  box-shadow: 0 0 16px rgba(255, 0, 127, 0.48);
}

.demo-step-viewport {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.demo-pane {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(22px);
  pointer-events: none;
  transition: opacity 360ms ease, transform 360ms ease;
  overflow-y: auto;
  padding-bottom: 8px;
}

.demo-pane.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.demo-pane.is-left {
  transform: translateX(-22px);
}

.demo-card {
  background: linear-gradient(165deg, var(--demo-surface) 0%, var(--demo-surface-2) 100%);
  border: 1px solid var(--demo-border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--demo-shadow);
}

.ai-demo-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--demo-muted);
  margin: 0 0 10px;
}

.ai-demo-kicker::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--demo-fuchsia);
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.5);
}

.demo-step h2 {
  font-size: clamp(1.18rem, 4.4vw, 1.4rem);
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--demo-text);
}

.ai-demo-sub {
  color: var(--demo-muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.demo-goals {
  display: grid;
  gap: 9px;
}

.demo-goal-btn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.03);
  color: var(--demo-text);
  border-radius: 13px;
  padding: 12px;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.demo-goal-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 0, 127, 0.52);
}

.demo-goal-btn.is-active {
  border-color: rgba(255, 0, 127, 0.84);
  box-shadow: var(--demo-glow);
  background: linear-gradient(135deg, rgba(255, 0, 127, 0.2), rgba(255, 255, 255, 0.05));
}

.demo-step-note {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.85rem;
}

.demo-results {
  display: grid;
  gap: 10px;
}

.demo-bento {
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.07), 0 0 16px rgba(255, 0, 127, 0.12);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 340ms ease, transform 340ms ease;
}

.demo-bento.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.demo-bento h4 {
  margin: 0 0 10px;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

#demoPlanList {
  margin: 0;
  padding-left: 1rem;
  color: rgba(255, 255, 255, 0.9);
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
}

.demo-macro-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.demo-macro-grid > div {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 10px;
}

.demo-macro-label {
  display: block;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.62);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.demo-macro-grid strong {
  font-size: 1.08rem;
  color: #fff;
}

.demo-coach p {
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  line-height: 1.5;
  font-size: 0.9rem;
}

.demo-downloads {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.demo-downloads .store-badge img {
  width: min(170px, 58vw);
}

.demo-bottom-cta {
  margin-top: 12px;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(16, 18, 24, 0), rgba(16, 18, 24, 0.9) 38%, rgba(16, 18, 24, 1) 100%);
  display: grid;
  gap: 8px;
}

.demo-btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  padding: 12px 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

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

.demo-btn-primary {
  background: var(--demo-fuchsia);
  color: #151515;
  box-shadow: 0 10px 24px rgba(255, 0, 127, 0.28);
}

.demo-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(255, 0, 127, 0.35);
}

.demo-btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.demo-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.demo-reset-btn {
  font-size: 0.84rem;
}

@media (min-width: 768px) {
  .ai-demo-section {
    padding: 72px 24px 88px;
  }

  .ai-demo-phone {
    width: 390px;
  }
}
