/* Rainbow Button Styles */
:root {
  --color-1: 0 100% 63%;
  --color-2: 270 100% 63%;
  --color-3: 210 100% 63%;
  --color-4: 195 100% 63%;
  --color-5: 90 100% 63%;
  --rainbow-speed: 2s;
}

@keyframes rainbow {
  0% {
    background-position: 0%;
  }
  100% {
    background-position: 200%;
  }
}

.rainbow-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0.5rem 2rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: white;
  cursor: pointer;
  border: calc(0.08 * 1rem) solid transparent;
  border-radius: 12px;
  background-clip: padding-box, border-box, border-box;
  background-origin: border-box;
  background-size: 200%;
  background-image:
    linear-gradient(#121213, #121213),
    linear-gradient(#121213 50%, rgba(18, 18, 19, 0.6) 80%, rgba(18, 18, 19, 0)),
    linear-gradient(90deg,
      hsl(var(--color-1)),
      hsl(var(--color-5)),
      hsl(var(--color-3)),
      hsl(var(--color-4)),
      hsl(var(--color-2))
    );
  animation: rainbow var(--rainbow-speed) infinite linear;
  transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
  outline: none;
  text-transform: lowercase;
}

.rainbow-button::before {
  content: '';
  position: absolute;
  bottom: -20%;
  left: 50%;
  z-index: 0;
  height: 20%;
  width: 60%;
  transform: translateX(-50%);
  background: linear-gradient(90deg,
    hsl(var(--color-1)),
    hsl(var(--color-5)),
    hsl(var(--color-3)),
    hsl(var(--color-4)),
    hsl(var(--color-2))
  );
  background-size: 200%;
  animation: rainbow var(--rainbow-speed) infinite linear;
  filter: blur(calc(0.8 * 1rem));
}

.rainbow-button span {
  position: relative;
  z-index: 1;
}

.rainbow-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.rainbow-button:active {
  transform: translateY(0);
}

.rainbow-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Light theme adjustments (if you add light mode later) */
.light-mode .rainbow-button {
  background-image:
    linear-gradient(#fff, #fff),
    linear-gradient(#fff 50%, rgba(255, 255, 255, 0.6) 80%, rgba(0, 0, 0, 0)),
    linear-gradient(90deg,
      hsl(var(--color-1)),
      hsl(var(--color-5)),
      hsl(var(--color-3)),
      hsl(var(--color-4)),
      hsl(var(--color-2))
    );
  color: #121213;
}
