:root {
  --sx-bg-a: #05d7a5;
  --sx-bg-b: #061a3f;
  --sx-bg-c: #d13cff;
  --sx-delay: 5200ms;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #061a3f;
}

.sx-slider {
  --bg-a: var(--sx-bg-a);
  --bg-b: var(--sx-bg-b);
  --bg-c: var(--sx-bg-c);

  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 54px);
  color: #fff;
  background:
    radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--bg-a) 72%, transparent), transparent 34%),
    radial-gradient(circle at 84% 18%, color-mix(in srgb, var(--bg-a) 58%, transparent), transparent 30%),
    radial-gradient(circle at 72% 82%, color-mix(in srgb, var(--bg-c) 70%, transparent), transparent 34%),
    linear-gradient(135deg, var(--bg-b), #020814 82%);
  isolation: isolate;
  transition: background 600ms ease;
}

.sx-backdrop {
  position: absolute;
  inset: -40px;
  z-index: -3;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(34px) saturate(1.18);
  transform: scale(1.12);
  opacity: 0.58;
  transition: background-image 500ms ease, opacity 500ms ease;
}

.sx-aurora {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 30%, rgba(0, 255, 214, 0.24), transparent 28%),
    radial-gradient(circle at 78% 72%, rgba(246, 72, 255, 0.34), transparent 36%),
    radial-gradient(circle at 50% 48%, rgba(2, 8, 28, 0.22), rgba(2, 8, 28, 0.72) 64%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.sx-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(1, 7, 20, 0.24), rgba(1, 7, 20, 0.56)),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08), rgba(1, 7, 20, 0.5) 72%);
  pointer-events: none;
}

.sx-layout {
  width: min(100%, 980px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: clamp(14px, 2.4vw, 22px);
}

.sx-header {
  width: min(100%, 760px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 255, 255, 0.88);
}

.sx-eyebrow,
.sx-counter {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: clamp(12px, 1.8vw, 14px);
  letter-spacing: 0.02em;
}

.sx-stage {
  position: relative;
  width: min(78vh, 760px);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  border-radius: clamp(18px, 3vw, 32px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.19), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 34px 120px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  padding: clamp(8px, 1.5vw, 14px);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.sx-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 32%),
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.16), transparent 36%);
  pointer-events: none;
  z-index: 3;
}

.sx-slide {
  position: absolute;
  inset: clamp(8px, 1.5vw, 14px);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition: opacity 520ms ease, transform 520ms ease;
  pointer-events: none;
}

.sx-slide.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.sx-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: clamp(14px, 2.4vw, 24px);
  box-shadow: 0 22px 72px rgba(0, 0, 0, 0.38);
  background: rgba(255, 255, 255, 0.04);
  user-select: none;
  -webkit-user-drag: none;
}

.sx-controls {
  width: min(100%, 760px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: clamp(12px, 2vw, 18px);
}

.sx-arrow {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 44px;
  line-height: 1;
  padding: 0 0 5px;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.sx-arrow:hover,
.sx-arrow:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.42);
  outline: none;
}

.sx-control-center {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.sx-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
}

.sx-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  padding: 0;
  transition: width 220ms ease, background 220ms ease, transform 220ms ease;
}

.sx-dot:hover,
.sx-dot:focus-visible {
  background: rgba(255, 255, 255, 0.72);
  outline: none;
}

.sx-dot.is-active {
  width: 34px;
  background: #fff;
  transform: translateY(-1px);
}

.sx-progress {
  position: relative;
  width: min(100%, 360px);
  height: 3px;
  margin-inline: auto;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
}

.sx-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.4), #fff);
  transform: scaleX(0);
  transform-origin: left center;
}

.sx-progress-fill.is-running {
  animation: sxProgress var(--sx-delay) linear forwards;
}

.sx-slider.is-paused .sx-progress-fill {
  animation-play-state: paused;
}

@keyframes sxProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 768px) {
  .sx-slider {
    padding: 14px 12px 20px;
  }

  .sx-layout {
    width: 100%;
    gap: 12px;
  }

  .sx-header {
    padding-inline: 2px;
  }

  .sx-eyebrow,
  .sx-counter {
    min-height: 32px;
    padding: 7px 11px;
    font-size: 12px;
  }

  .sx-stage {
    width: min(100%, 88svh);
    border-radius: 18px;
    padding: 7px;
  }

  .sx-slide {
    inset: 7px;
  }

  .sx-slide img {
    border-radius: 13px;
  }

  .sx-controls {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 10px;
  }

  .sx-arrow {
    width: 44px;
    height: 44px;
    font-size: 36px;
    padding-bottom: 4px;
  }
}

@media (max-width: 420px) {
  .sx-slider {
    padding-inline: 8px;
  }

  .sx-eyebrow {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sx-stage {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sx-slide,
  .sx-slider,
  .sx-backdrop,
  .sx-arrow,
  .sx-dot {
    transition: none;
  }

  .sx-progress-fill.is-running {
    animation: none;
    transform: scaleX(1);
  }
}
