:root {
  --bg: #000;
  --text: #fff;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.16);
  --accent: #cc00ff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  background-image:
    radial-gradient(at 20% 20%, #ff00aa 0, transparent 40%),
    radial-gradient(at 80% 30%, #00ffff 0, transparent 40%),
    radial-gradient(at 50% 80%, #ffff00 0, transparent 45%),
    radial-gradient(at 10% 80%, #00ff00 0, transparent 40%);
  background-size: 200% 200%;
  animation: bgShift 12s ease-in-out infinite alternate;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#gl,
#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#gl {
  z-index: 0;
  background: transparent;
}

#particles {
  z-index: 2;
  pointer-events: none;
}

.fallback {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}

.fallback--hidden {
  display: none;
}

.ui {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  padding: 20px;
}

.badge {
  pointer-events: auto;
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
  transition: transform 0.2s ease, background 0.2s ease;
}

.badge:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.13);
}

.brand {
  top: 20px;
  left: 20px;
}

.hint {
  bottom: 20px;
  left: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
}

.fs {
  top: 20px;
  right: 20px;
  padding: 8px;
  cursor: pointer;
  border: none;
  color: inherit;
}

.icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@media (max-width: 520px) {
  .ui {
    padding: 14px;
  }

  .brand {
    top: 14px;
    left: 14px;
  }

  .hint {
    bottom: 14px;
    left: 14px;
  }

  .fs {
    top: 14px;
    right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html, body {
    animation: none;
  }

  .badge,
  .badge:hover {
    transition: none;
    transform: none;
  }
}

@keyframes bgShift {
  from {
    background-position: 0% 0%;
  }
  to {
    background-position: 100% 100%;
  }
}
