:root {
  --font-size: clamp(1rem, 4vw, 1.5rem);
  --background-color: rgb(9, 9, 12);
  --gradient-color-start: rgba(101, 89, 241, 1);
  --gradient-color-end: rgba(236, 136, 54, 1);
  --gradient: linear-gradient(
    to right,
    var(--gradient-color-start),
    var(--gradient-color-end)
  );
  --box-shadow: rgba(0, 0, 0, 0.6) 0px 2px 8px -1px;
}

body {
  height: 100vh;
  font-size: var(--font-size);
  background-color: var(--background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: hidden;
}

canvas {
  max-width: 90vw;
  height: auto;
  box-shadow: 0 0px 4px rgba(61, 38, 163, 0.349);
}

/* Styles for Gradient Borders and Gradient Underlines */
/*
1. Gradient Border (Fake Border): 
  - We createa "buttons" with gradient borders using ::before and ::after pseudoelements.
  - 'border' needs to be set to 'transparent'. This is because we want the border to show the gradient color from the 'background' property, not its own color.
  - 'background' gives the background color to the padding-box and the gradient color to the border-box. This creates the illusion of a gradient border.

2. Animation: 
  - Created with 'background-size' and 'background-position' properties.
  - 'background-size' larger than 100% for moving gradient effect.
  - Animation applied to ::before pseudo-element on hover for border animation.

3. Initial State Control: 
  - ::after pseudo-element controls initial state before hovering.
  - ::before pseudo-element becomes visible and starts animation on hover, ::after remains static.
*/

.signature {
  padding: 20px 20px;
  position: relative;
  color: rgba(255, 255, 255, 0.7);
  font-family: Arial, sans-serif;
  text-align: center;
  position: relative;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  transition: all 2s ease;
  -webkit-tap-highlight-color: transparent;
}

.signature::before,
.signature::after {
  content: "";
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  background-position: right bottom;
  border-radius: 99px;
  background: linear-gradient(var(--background-color), var(--background-color))
      padding-box,
    var(--gradient) border-box;
  box-shadow: var(--box-shadow);
  background-size: 200%;
  border: 1px solid transparent;
  z-index: -1;
}

.signature::before {
  opacity: 0;
  transition: 0.6s ease;
}

.signature:hover::before {
  opacity: 1;
  animation: gradient-move 2s linear infinite;
  background-position: left bottom;
  background-size: 400%;
}

.signature::after {
  opacity: 0.5;
}
.link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease-in-out;
  position: relative; /* Add this */
}

.link:hover {
  color: rgb(255, 255, 255, 1);
}

.link::before,
.link::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  background-size: 200%; /* Double the size of the background */
}

.link::before {
  opacity: 0; /* Start with 0 opacity */
  transition: opacity 0.6s ease; /* Transition the opacity */
}

.link:hover::before {
  opacity: 1; /* Full opacity on hover */
  animation: gradient-move 1.5s linear infinite; /* Apply the animation */
}

.link::after {
  opacity: 0.2; /* Lower opacity for initial underline */
  background-position: right bottom; /* Start the background from the right */
}

@keyframes gradient-move {
  0% {
    background-position: left bottom;
  }
  50% {
    background-position: right bottom;
  }
  100% {
    background-position: left bottom;
  }
}
