:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05070c;
  font-family: Inter, "Segoe UI", sans-serif;
}

.background-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.background-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.background-layer.is-active {
  opacity: 1;
}

.background-video,
.background-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.96) brightness(0.72);
  transform: scale(1.02);
}

.background-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.06), transparent 28%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.16), rgba(3, 7, 18, 0.42));
  pointer-events: none;
}

.floating-button {
  position: fixed;
  top: 18px;
  z-index: 10;
  width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(15, 23, 42, 0.34);
  color: #f8fafc;
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  isolation: isolate;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.floating-button:hover {
  transform: scale(1.04);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
    rgba(15, 23, 42, 0.42);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.floating-button:active {
  transform: scale(0.98);
}

.floating-button.is-loading {
  pointer-events: none;
}

.floating-button::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 2px solid transparent;
  opacity: 0;
  pointer-events: none;
}

.floating-button.is-loading::after {
  opacity: 1;
  border-top-color: rgba(255, 255, 255, 0.95);
  border-right-color: rgba(125, 211, 252, 0.75);
  border-bottom-color: rgba(255, 255, 255, 0.15);
  border-left-color: rgba(255, 255, 255, 0.15);
  animation: button-spin 0.8s linear infinite;
}

.button-icon {
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.1));
}

.left-button {
  left: 18px;
}

.right-button {
  right: 18px;
}

.hidden {
  display: none !important;
}

@keyframes button-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .floating-button {
    top: 14px;
    width: 52px;
    height: 52px;
  }

  .left-button {
    left: 14px;
  }

  .right-button {
    right: 14px;
  }
}
