*,
*::before,
*::after {
  box-sizing: border-box;
}

@keyframes rotate {
  100% {
    transform: rotate(1turn);
  }
}

.conic {
  position: relative;
  z-index: 0;
  width: 400px;
  height: 300px;
  margin: 20px;
  border-radius: 10px;
  overflow: hidden;
  padding: 2rem;

  &::before {
    content: "";
    position: absolute;
    z-index: -2;
    left: -50%;
    top: -50%;
    width: 200%;
    height: 200%;
    background-color: #1a232a;
    background-repeat: no-repeat;
    background-position: 0 0;
    background-image: conic-gradient(transparent,
        rgba(168, 239, 255, 1),
        transparent 30%);
    animation: rotate 4s linear infinite;
  }

  &::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 6px;
    top: 6px;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    background: #000;
    border-radius: 5px;
  }
}

.conic-demo::after {
  animation: opacityChange 5s infinite linear;
}

@keyframes opacityChange {
  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

/* NEW: Futuristic border wrapper - iOS compatible version */
.glow-buffer {
  position: relative;
  display: inline-block;
  padding: 20px;
  /* this allows blur to show without clipping */
  overflow: visible;
  z-index: 0;
  -webkit-transform: translateZ(0);
  /* helps iOS Safari render GPU layers correctly */
}


.futuristic-glow-wrapper {
  position: relative;
  display: inline-block;
  padding: 1px;
  border-radius: 52px;
  overflow: visible;
  background: linear-gradient(45deg,
      #ff006e, #8338ec, #3a86ff, #06ffa5,
      #ffbe0b, #fb5607, #ff006e, #ff006e);
  background-size: 300% 300%;
  -webkit-animation: futuristicGradientShift 8s linear infinite;
  animation: futuristicGradientShift 8s linear infinite;
  will-change: transform;
}

.futuristic-glow-wrapper::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 56px;
  background: linear-gradient(45deg,
      #ff006e, #8338ec, #3a86ff, #06ffa5,
      #ffbe0b, #fb5607, #ff006e, #ff006e);
  background-size: 300% 300%;
  -webkit-animation: futuristicGradientShiftReverse 8s linear infinite;
  animation: futuristicGradientShiftReverse 8s linear infinite;
  z-index: -1;
  -webkit-filter: blur(4px);
  filter: blur(4px);
  opacity: 0.8;
}

.futuristic-glow-wrapper::after {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 60px;
  background: linear-gradient(45deg,
      #ff006e, #8338ec, #3a86ff, #06ffa5,
      #ffbe0b, #fb5607, #ff006e, #ff006e);
  background-size: 300% 300%;
  -webkit-animation: futuristicGradientShift 8s linear infinite;
  animation: futuristicGradientShift 8s linear infinite;
  z-index: -2;
  -webkit-filter: blur(8px);
  filter: blur(8px);
  opacity: 0.6;
}

/* iOS-compatible animation keyframes */
@-webkit-keyframes futuristicGradientShift {
  0% {
    background-position: 0% 0%;
  }

  25% {
    background-position: 100% 0%;
  }

  50% {
    background-position: 100% 100%;
  }

  75% {
    background-position: 0% 100%;
  }

  100% {
    background-position: 0% 0%;
  }
}

@keyframes futuristicGradientShift {
  0% {
    background-position: 0% 0%;
  }

  25% {
    background-position: 100% 0%;
  }

  50% {
    background-position: 100% 100%;
  }

  75% {
    background-position: 0% 100%;
  }

  100% {
    background-position: 0% 0%;
  }
}

@-webkit-keyframes futuristicGradientShiftReverse {
  0% {
    background-position: 0% 0%;
  }

  25% {
    background-position: 0% 100%;
  }

  50% {
    background-position: 100% 100%;
  }

  75% {
    background-position: 100% 0%;
  }

  100% {
    background-position: 0% 0%;
  }
}

@keyframes futuristicGradientShiftReverse {
  0% {
    background-position: 0% 0%;
  }

  25% {
    background-position: 0% 100%;
  }

  50% {
    background-position: 100% 100%;
  }

  75% {
    background-position: 100% 0%;
  }

  100% {
    background-position: 0% 0%;
  }
}

/* Hover effects - iOS compatible */
.futuristic-glow-wrapper:hover {
  -webkit-animation-duration: 5s;
  animation-duration: 5s;
}

.futuristic-glow-wrapper:hover::before {
  -webkit-animation-duration: 5s;
  animation-duration: 5s;
  -webkit-filter: blur(6px);
  filter: blur(6px);
  opacity: 1;
}

.futuristic-glow-wrapper:hover::after {
  -webkit-animation-duration: 5s;
  animation-duration: 5s;
  -webkit-filter: blur(10px);
  filter: blur(10px);
  opacity: 0.8;
}

/* Ensure your button stays on top */
.futuristic-glow-wrapper>* {
  position: relative;
  z-index: 1;
}

/* iOS-specific fallback for reduced motion */
@media (prefers-reduced-motion: reduce) {

  .futuristic-glow-wrapper,
  .futuristic-glow-wrapper::before,
  .futuristic-glow-wrapper::after {
    -webkit-animation: none;
    animation: none;
  }

  .futuristic-glow-wrapper {
    background-position: 0% 50%;
  }
}

/* Minimalistic button styles */
.futuristic-glow-wrapper-min {
  position: relative;
  display: inline-block;
  padding: 1px;
  border-radius: 6px;
  overflow: visible;
  background: linear-gradient(45deg,
      rgba(255, 0, 110, 0.3),
      rgba(131, 56, 236, 0.3),
      rgba(58, 134, 255, 0.3),
      rgba(6, 255, 165, 0.3),
      rgba(255, 190, 11, 0.3),
      rgba(251, 86, 7, 0.3),
      rgba(255, 0, 110, 0.3),
      rgba(255, 0, 110, 0.3));
  background-size: 100% 100%;
  -webkit-animation: futuristicGradientShift 8s linear infinite;
  animation: futuristicGradientShift 8s linear infinite;
  will-change: transform;
}

.futuristic-glow-wrapper-min::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 6px;
  background: linear-gradient(45deg,
      rgba(255, 0, 110, 0.3),
      rgba(131, 56, 236, 0.3),
      rgba(58, 134, 255, 0.3),
      rgba(6, 255, 165, 0.3),
      rgba(255, 190, 11, 0.3),
      rgba(251, 86, 7, 0.3),
      rgba(255, 0, 110, 0.3),
      rgba(255, 0, 110, 0.3));
  background-size: 100% 100%;
  -webkit-animation: futuristicGradientShiftReverse 8s linear infinite;
  animation: futuristicGradientShiftReverse 8s linear infinite;
  z-index: -1;
  -webkit-filter: blur(3px);
  filter: blur(3px);
  opacity: 0.8;
}

.futuristic-glow-wrapper-min::after {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 6px;
  background: linear-gradient(45deg,
      rgba(255, 0, 110, 0.3),
      rgba(131, 56, 236, 0.3),
      rgba(58, 134, 255, 0.3),
      rgba(6, 255, 165, 0.3),
      rgba(255, 190, 11, 0.3),
      rgba(251, 86, 7, 0.3),
      rgba(255, 0, 110, 0.3),
      rgba(255, 0, 110, 0.3));
  background-size: 100% 100%;
  -webkit-animation: futuristicGradientShift 8s linear infinite;
  animation: futuristicGradientShift 8s linear infinite;
  z-index: -2;
  -webkit-filter: blur(7px);
  filter: blur(7px);
  opacity: 0.6;
}

/* Hover effects - iOS compatible */
.futuristic-glow-wrapper-min:hover {
  -webkit-animation-duration: 5s;
  animation-duration: 5s;
}

.futuristic-glow-wrapper-min:hover::before {
  -webkit-animation-duration: 5s;
  animation-duration: 5s;
  -webkit-filter: blur(5px);
  filter: blur(5px);
  opacity: 1;
}

.futuristic-glow-wrapper-min:hover::after {
  -webkit-animation-duration: 5s;
  animation-duration: 5s;
  -webkit-filter: blur(9px);
  filter: blur(9px);
  opacity: 0.8;
}

/* Ensure your button stays on top */
.futuristic-glow-wrapper-min>* {
  position: relative;
  z-index: 1;
}

/* iOS-specific fallback for reduced motion */
@media (prefers-reduced-motion: reduce) {

  .futuristic-glow-wrapper-min,
  .futuristic-glow-wrapper-min::before,
  .futuristic-glow-wrapper-min::after {
    -webkit-animation: none;
    animation: none;
  }

  .futuristic-glow-wrapper-min {
    background-position: 0% 50%;
  }
}

/* Animated rainbow border wrapper - No glow version */
.rainbow-border-wrapper {
  position: relative;
  display: inline-block;
  padding: 3px;
  /* Border thickness */
  overflow: visible;
  z-index: 0;
  -webkit-transform: translateZ(0);
  /* helps iOS Safari render GPU layers correctly */
}

.rainbow-border-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg,
      rgba(255, 0, 110, 0.5),
      rgba(131, 56, 236, 0.5),
      rgba(58, 134, 255, 0.5),
      rgba(6, 255, 165, 0.5),
      rgba(255, 190, 11, 0.5),
      rgba(251, 86, 7, 0.5),
      rgba(255, 0, 110, 0.5),
      rgba(255, 0, 110, 0.5));

  background-size: 300% 300%;
  -webkit-animation: rainbowShift 8s linear infinite;
  animation: rainbowShift 8s linear infinite;
  z-index: -1;
  will-change: transform;
}

/* Border radius classes - apply to both wrapper and ::before */
.rainbow-border-wrapper.rounded-sm,
.rainbow-border-wrapper.rounded-sm::before {
  border-radius: 6px;
}

.rainbow-border-wrapper.rounded,
.rainbow-border-wrapper.rounded::before {
  border-radius: 12px;
}

.rainbow-border-wrapper.rounded-lg,
.rainbow-border-wrapper.rounded-lg::before {
  border-radius: 20px;
}

.rainbow-border-wrapper.rounded-xl,
.rainbow-border-wrapper.rounded-xl::before {
  border-radius: 28px;
}

.rainbow-border-wrapper.rounded-full,
.rainbow-border-wrapper.rounded-full::before {
  border-radius: 50%;
}

/* Custom border radius - use CSS custom properties */
.rainbow-border-wrapper.custom-radius {
  border-radius: var(--border-radius, 12px);
}

.rainbow-border-wrapper.custom-radius::before {
  border-radius: var(--border-radius, 12px);
}

/* Animation keyframes */
@-webkit-keyframes rainbowShift {
  0% {
    background-position: 0% 0%;
  }

  25% {
    background-position: 100% 0%;
  }

  50% {
    background-position: 100% 100%;
  }

  75% {
    background-position: 0% 100%;
  }

  100% {
    background-position: 0% 0%;
  }
}

@keyframes rainbowShift {
  0% {
    background-position: 0% 0%;
  }

  25% {
    background-position: 100% 0%;
  }

  50% {
    background-position: 100% 100%;
  }

  75% {
    background-position: 0% 100%;
  }

  100% {
    background-position: 0% 0%;
  }
}

/* Hover effects - speeds up animation */
.rainbow-border-wrapper:hover::before {
  -webkit-animation-duration: 4s;
  animation-duration: 4s;
}

/* Ensure your content stays on top */
.rainbow-border-wrapper>* {
  position: relative;
  z-index: 1;
  background: inherit;
  /* Ensures content background covers the border */
}

/* iOS-specific fallback for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .rainbow-border-wrapper::before {
    -webkit-animation: none;
    animation: none;
    background-position: 0% 50%;
  }
}

/* Alternative border thickness options */
.rainbow-border-wrapper.border-thin {
  padding: 1px;
}

.rainbow-border-wrapper.border-medium {
  padding: 2px;
}

.rainbow-border-wrapper.border-thick {
  padding: 4px;
}

.rainbow-border-wrapper.border-extra-thick {
  padding: 6px;
}

/* Buy Button CSS */
.buy-now-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 290px;
  padding: 10px 24px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  border: none;
  cursor: pointer;

  /* Animated gradient background */
  background: linear-gradient(135deg, #28a745 0%, #20c997 50%, #28a745 100%);
  background-size: 200% 200%;
  animation: gradientShift 4s ease-in-out infinite;
  color: white;

  /* Enhanced shadow */
  box-shadow:
    0 4px 15px rgba(40, 167, 69, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.buy-now-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}

.buy-now-btn:hover::before {
  left: 100%;
}

.buy-now-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 25px rgba(40, 167, 69, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #218838 0%, #1e7e34 50%, #218838 100%);
  background-size: 200% 200%;
  animation: gradientShift 2s ease-in-out infinite;
}

.buy-now-btn:active {
  transform: translateY(0);
  box-shadow:
    0 4px 15px rgba(40, 167, 69, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-content {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.cart-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.buy-now-btn:hover .cart-icon {
  transform: scale(1.1);
  animation: bounce 0.6s ease;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) scale(1.1);
  }

  40% {
    transform: translateY(-3px) scale(1.1);
  }

  60% {
    transform: translateY(-1px) scale(1.1);
  }
}

.flag-img {
  height: 22px;
  width: auto;
  margin-left: 4px;
  transition: transform 0.3s ease;
  border-radius: 2px;
}

.buy-now-btn:hover .flag-img {
  transform: scale(1.05);
}

.btn-text {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.buy-now-btn:focus {
  outline: none;
  box-shadow:
    0 4px 15px rgba(40, 167, 69, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 0 0 3px rgba(40, 167, 69, 0.2);
}