:root {
  --shoe-ai-lemon: #f3ff38;
  --shoe-ai-purple: #8d45ff;
  --shoe-ai-ink: #0b0316;
}

.shoe-ai-experience {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  min-height: min(720px, 78vh);
  margin: 0 0 clamp(56px, 8vw, 120px);
  padding: clamp(32px, 6vw, 92px);
  overflow: hidden;
  border: 1px solid rgba(243, 255, 56, .32);
  border-radius: 36px;
  background:
    radial-gradient(circle at 78% 45%, rgba(141, 69, 255, .3), transparent 33%),
    linear-gradient(135deg, rgba(18, 5, 36, .96), rgba(42, 12, 73, .82));
  box-shadow: 0 34px 90px rgba(5, 0, 15, .42), inset 0 0 50px rgba(160, 83, 255, .08);
}

.shoe-ai-experience::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: repeating-radial-gradient(ellipse at center, transparent 0 66px, rgba(181, 111, 255, .11) 67px 69px);
  transform: perspective(800px) rotateX(66deg) translateY(34%);
  animation: shoeAiGrid 12s linear infinite;
  pointer-events: none;
}

@keyframes shoeAiGrid { to { transform: perspective(800px) rotateX(66deg) translateY(24%) rotate(4deg); } }

.shoe-ai-experience-copy,
.shoe-ai-scanner { position: relative; z-index: 1; }

.shoe-ai-kicker,
.shoe-ai-dialog-head > span {
  color: var(--shoe-ai-lemon);
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .16em;
}

.shoe-ai-experience h2 {
  max-width: 760px;
  margin: 18px 0;
  color: #fff;
  font-size: clamp(3.2rem, 7vw, 7.8rem);
  line-height: .92;
  letter-spacing: -.06em;
}

.shoe-ai-experience-copy > p:not(.shoe-ai-kicker) {
  max-width: 650px;
  color: rgba(255,255,255,.72);
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  line-height: 1.75;
}

.shoe-ai-benefits { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0; }
.shoe-ai-benefits span {
  padding: 9px 14px;
  border: 1px solid rgba(243,255,56,.38);
  border-radius: 999px;
  color: #fff;
  background: rgba(243,255,56,.07);
  font-size: .82rem;
}

.shoe-ai-main-action,
.shoe-ai-analyze,
.shoe-ai-again {
  border: 0;
  cursor: pointer;
  color: #13051f;
  background: var(--shoe-ai-lemon);
  box-shadow: 0 14px 42px rgba(223,255,22,.2);
}

.shoe-ai-main-action {
  display: grid;
  grid-template-columns: 42px auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 14px;
  min-width: min(100%, 390px);
  padding: 16px 22px;
  border-radius: 18px;
  text-align: left;
}
.shoe-ai-main-action .shoe-ai-camera-icon { grid-row: 1 / 3; }
.shoe-ai-main-action > span:nth-child(2) { font-size: 1.06rem; font-weight: 900; }
.shoe-ai-main-action strong { font-size: .76rem; opacity: .7; }
.shoe-ai-experience-copy > small { display: block; margin-top: 13px; color: rgba(255,255,255,.45); }

.shoe-ai-camera-icon {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 26px;
  border: 3px solid currentColor;
  border-radius: 8px;
}
.shoe-ai-camera-icon::before { content: ""; position: absolute; left: 9px; top: -9px; width: 12px; height: 7px; border-radius: 4px 4px 0 0; background: currentColor; }
.shoe-ai-camera-icon::after { content: ""; position: absolute; left: 9px; top: 4px; width: 10px; height: 10px; border: 3px solid currentColor; border-radius: 50%; }

.shoe-ai-scanner { display: grid; place-items: center; min-height: 480px; }
.shoe-ai-phone {
  position: relative;
  z-index: 2;
  width: min(310px, 68vw);
  aspect-ratio: .55;
  padding: 18px;
  border: 2px solid rgba(255,255,255,.75);
  border-radius: 48px;
  background: rgba(8,2,20,.68);
  box-shadow: 0 0 0 8px rgba(128,63,230,.14), 0 36px 80px rgba(0,0,0,.5);
  transform: rotate(5deg);
}
.shoe-ai-phone-lens { display: block; width: 72px; height: 19px; margin: 0 auto 16px; border-radius: 99px; background: #050208; }
.shoe-ai-scan-stage { position: relative; display: grid; place-items: center; height: calc(100% - 82px); overflow: hidden; border-radius: 30px; background: radial-gradient(circle, rgba(159,91,255,.3), rgba(13,4,28,.92)); }
.shoe-ai-sneaker-mark { color: rgba(255,255,255,.9); font-weight: 900; font-size: 2rem; line-height: .9; text-align: center; transform: skewY(-7deg); }
.shoe-ai-scan-stage i { position: absolute; left: 5%; right: 5%; top: 8%; height: 2px; background: var(--shoe-ai-lemon); box-shadow: 0 0 18px 5px rgba(243,255,56,.55); animation: shoeAiScan 2.2s ease-in-out infinite alternate; }
@keyframes shoeAiScan { to { top: 90%; } }
.shoe-ai-phone > b { display: block; margin: 11px auto 0; color: var(--shoe-ai-lemon); text-align: center; letter-spacing: .16em; }
.shoe-ai-orbit { position: absolute; width: 115%; aspect-ratio: 1; border: 1px solid rgba(201,149,255,.25); border-radius: 50%; animation: shoeAiOrbit 10s linear infinite; }
.shoe-ai-orbit-two { width: 80%; animation-direction: reverse; animation-duration: 7s; }
@keyframes shoeAiOrbit { to { transform: rotate(360deg) scaleX(.72); } }

.shoe-ai-quick-entry {
  position: fixed;
  z-index: 900;
  left: 20px;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border: 1px solid rgba(243,255,56,.8);
  border-radius: 999px;
  color: var(--shoe-ai-lemon);
  background: rgba(12,3,27,.9);
  box-shadow: 0 0 28px rgba(223,255,22,.13);
  backdrop-filter: blur(16px);
  cursor: pointer;
}
.shoe-ai-quick-entry .shoe-ai-camera-icon { width: 28px; height: 20px; border-width: 2px; }
.shoe-ai-quick-entry .shoe-ai-camera-icon::before { left: 7px; top: -7px; width: 10px; height: 5px; }
.shoe-ai-quick-entry .shoe-ai-camera-icon::after { left: 7px; top: 3px; width: 8px; height: 8px; border-width: 2px; }
.shoe-ai-quick-entry span:last-child { display: grid; text-align: left; }
.shoe-ai-quick-entry b { font-size: .83rem; }
.shoe-ai-quick-entry small { color: #fff; font-size: .66rem; opacity: .65; }

.shoe-ai-dialog {
  width: min(1080px, calc(100vw - 30px));
  max-height: calc(100dvh - 30px);
  padding: 0;
  border: 1px solid rgba(243,255,56,.38);
  border-radius: 30px;
  color: #fff;
  background: #10051f;
  box-shadow: 0 36px 120px rgba(0,0,0,.7);
}
.shoe-ai-dialog::backdrop { background: rgba(4,0,10,.82); backdrop-filter: blur(12px); }
.shoe-ai-dialog-shell { position: relative; padding: clamp(24px, 4vw, 52px); }
.shoe-ai-dialog-close { position: absolute; z-index: 2; top: 16px; right: 16px; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: #fff; background: rgba(0,0,0,.22); font-size: 1.5rem; cursor: pointer; }
.shoe-ai-dialog-head { max-width: 720px; margin-bottom: 26px; }
.shoe-ai-dialog-head h2 { margin: 10px 0; font-size: clamp(2rem, 5vw, 4.2rem); line-height: .96; letter-spacing: -.04em; }
.shoe-ai-dialog-head p { color: rgba(255,255,255,.62); }
.shoe-ai-dialog-head > strong { display: inline-block; margin-top: 9px; padding: 8px 12px; border-radius: 9px; color: var(--shoe-ai-lemon); background: rgba(243,255,56,.08); }
.shoe-ai-workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.shoe-ai-capture,
.shoe-ai-result { padding: 18px; border: 1px solid rgba(255,255,255,.12); border-radius: 22px; background: rgba(255,255,255,.035); }
.shoe-ai-capture > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.shoe-ai-upload { display: grid; place-items: center; min-height: 290px; padding: 32px; border: 1px dashed rgba(243,255,56,.45); border-radius: 16px; color: var(--shoe-ai-lemon); text-align: center; cursor: pointer; }
.shoe-ai-upload b { margin-top: 20px; color: #fff; }
.shoe-ai-upload small { margin-top: 8px; color: rgba(255,255,255,.48); }
.shoe-ai-preview { position: relative; min-height: 290px; overflow: hidden; border-radius: 16px; background: #05020a; }
.shoe-ai-preview img { width: 100%; height: 290px; object-fit: contain; }
.shoe-ai-preview-scan { position: absolute; left: 4%; right: 4%; top: 5%; height: 2px; background: var(--shoe-ai-lemon); box-shadow: 0 0 20px 5px rgba(243,255,56,.45); animation: shoeAiScan 2.2s ease-in-out infinite alternate; }
.shoe-ai-preview button { position: absolute; right: 12px; bottom: 12px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: #fff; background: rgba(8,2,18,.84); cursor: pointer; }
.shoe-ai-analyze,
.shoe-ai-again { width: 100%; margin-top: 12px; padding: 15px; border-radius: 13px; font-weight: 900; }
.shoe-ai-analyze:disabled { opacity: .35; cursor: not-allowed; }
.shoe-ai-result { display: grid; gap: 12px; align-content: start; }
.shoe-ai-result[hidden] { display: none; }
.shoe-ai-result-status { display: flex; align-items: center; gap: 10px; color: var(--shoe-ai-lemon); }
.shoe-ai-result-status span { width: 12px; height: 12px; border-radius: 50%; background: var(--shoe-ai-lemon); box-shadow: 0 0 16px var(--shoe-ai-lemon); }
.shoe-ai-result article { display: grid; gap: 8px; padding: 18px; border-radius: 15px; background: rgba(133,67,226,.14); }
.shoe-ai-result article small { color: rgba(255,255,255,.5); }
.shoe-ai-result article strong { line-height: 1.45; }
.shoe-ai-disclaimer { margin: 18px 0 0; color: rgba(255,255,255,.42); font-size: .72rem; line-height: 1.6; }
.shoe-ai-analyze[data-loading="true"] { position: relative; color: transparent; }
.shoe-ai-analyze[data-loading="true"]::after { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px; border: 2px solid rgba(0,0,0,.22); border-top-color: #10051f; border-radius: 50%; animation: shoeAiSpinner .7s linear infinite; }
@keyframes shoeAiSpinner { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .shoe-ai-experience { grid-template-columns: 1fr; min-height: auto; padding: 28px 20px 36px; border-radius: 24px; }
  .shoe-ai-experience h2 { font-size: clamp(3rem, 15vw, 5.6rem); }
  .shoe-ai-scanner { min-height: 390px; order: -1; }
  .shoe-ai-phone { width: 218px; border-radius: 36px; }
  .shoe-ai-main-action { width: 100%; }
  .shoe-ai-quick-entry { left: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); padding: 10px 13px; }
  .shoe-ai-quick-entry small { display: none; }
  .shoe-ai-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 22px; }
  .shoe-ai-dialog-shell { padding: 24px 14px 18px; }
  .shoe-ai-dialog-head { padding-right: 38px; }
  .shoe-ai-dialog-head h2 { font-size: 2.15rem; }
  .shoe-ai-workspace { grid-template-columns: 1fr; }
  .shoe-ai-upload,
  .shoe-ai-preview { min-height: 250px; }
  .shoe-ai-preview img { height: 250px; }
}

@media (prefers-reduced-motion: reduce) {
  .shoe-ai-experience::before,
  .shoe-ai-scan-stage i,
  .shoe-ai-preview-scan,
  .shoe-ai-orbit { animation: none; }
}
