:root {
  color-scheme: dark;
  background: #1e214f;
}

* {
  box-sizing: border-box;
}

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

body {
  background: #1e214f;
}

#hero,
.hero__animation {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 22rem;
  overflow: hidden;
}

.hero__animation {
  isolation: isolate;
}

.background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  overflow: hidden;
  transition: opacity 4s ease-in-out;
}

.speed-control {
  position: fixed;
  z-index: 20;
  right: 50%;
  bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: min(19rem, calc(100vw - 2rem));
  padding: 0.7rem 0.9rem;
  color: rgba(255, 255, 255, 0.96);
  background: rgba(19, 25, 56, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  box-shadow: 0 0.5rem 2rem rgba(15, 19, 48, 0.22);
  transform: translateX(50%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font:
    600 0.85rem/1 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.speed-control label {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.speed-control output {
  min-width: 2rem;
  color: #fff4a1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.speed-control input {
  width: 100%;
  min-width: 0;
  accent-color: #fff4a1;
  cursor: pointer;
}

@media (max-width: 32rem) {
  .speed-control {
    bottom: 0.75rem;
    gap: 0.55rem;
    padding: 0.6rem 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .background,
  #stars {
    transition: none;
  }

  #clouds .cloud {
    left: var(--cloud-static-left);
    animation: none;
    transform: none;
  }
}
