:root {
  color-scheme: dark;
  --bg: #0b0f17;
  --surface: #111827;
  --surface-2: #172033;
  --text: #f8fafc;
  --muted: #9ca3af;
  --accent: #ff5722;
  --cyan: #22d3ee;
  --green: #84cc16;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.embed-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    linear-gradient(120deg, rgba(34, 211, 238, 0.12), transparent 34%),
    linear-gradient(300deg, rgba(132, 204, 22, 0.14), transparent 38%),
    var(--bg);
}

.embed-header,
.embed-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-color: rgba(148, 163, 184, 0.18);
}

.embed-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.embed-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--muted);
  font-size: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.brand-name {
  display: block;
  font-weight: 750;
  letter-spacing: 0;
}

.brand-meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 1px;
}

.open-app {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.stage {
  display: grid;
  place-items: center;
  padding: 20px;
}

.comparison-frame {
  width: min(100%, 960px);
  aspect-ratio: var(--frame-ratio, 16 / 9);
  min-height: 260px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: var(--surface);
}

.pane {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.pane-a {
  background:
    linear-gradient(135deg, rgba(255, 87, 34, 0.28), transparent 45%),
    linear-gradient(45deg, #111827, #263142);
}

.pane-b {
  clip-path: inset(0 0 0 var(--slider-position, 50%));
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.26), transparent 45%),
    linear-gradient(45deg, #0f172a, #193238);
}

.comparison-frame.horizontal .pane-b {
  clip-path: inset(var(--slider-position, 50%) 0 0 0);
}

.demo-object {
  width: min(44%, 300px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 44%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.10) 0 8px, transparent 8px 16px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.26);
}

.pane-b .demo-object {
  transform: translateX(12px) scale(1.04);
  border-color: rgba(34, 211, 238, 0.44);
}

.divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--slider-position, 50%);
  width: 2px;
  background: white;
  box-shadow: 0 0 0 999px transparent;
}

.comparison-frame.horizontal .divider {
  left: 0;
  right: 0;
  top: var(--slider-position, 50%);
  bottom: auto;
  width: auto;
  height: 2px;
}

.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  background: var(--accent);
  border: 2px solid #fff;
}

.label {
  position: absolute;
  top: 14px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.label-a {
  left: 14px;
}

.label-b {
  right: 14px;
}

.settings {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  padding: 6px 8px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 640px) {
  .embed-header,
  .embed-footer {
    padding: 12px;
  }

  .stage {
    padding: 12px;
  }

  .comparison-frame {
    min-height: 220px;
  }
}
