/* Animations */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes wave {
  0% {
    transform: translate(-0%, -50%) scale(0.5);
    opacity: 0;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* NFC Animation */
.nfc-animation {
  position: relative;
  width: 100%;
  height: clamp(200px, 40vw, 400px);
  margin: var(--spacing-xl) auto;
  perspective: 1000px;
}

.glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(150px, 30vw, 300px);
  height: clamp(150px, 30vw, 300px);
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  opacity: 0.3;
  z-index: 1;
  animation: pulse 2s infinite;
}

.phone {
  position: absolute;
  top: 10%;
  left: 40%;
  transform: translate(-50%, -50%);
  width: clamp(150px, 30vw, 300px);
  z-index: 2;
  animation: float 3s ease-in-out infinite;
}

.nfc-card {
  position: absolute;
  top: 40%;
  left: 15%;
  transform: translate(-50%, -50%);
  width: clamp(100px, 20vw, 200px);
  z-index: 3;
  transition: all var(--transition-normal);
  animation: float 3s ease-in-out infinite;
  animation-delay: 0.5s;
}

.nfc-waves {
  position: absolute;
  top: 40%;
  left: 40%;
  transform: translate(-50%, -50%);
  width: clamp(150px, 30vw, 300px);
  height: clamp(150px, 30vw, 300px);
  z-index: 1;
}

.wave {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: wave 2s infinite;
  opacity: 0;
}

.wave:nth-child(1) {
  width: 100%;
  height: 100%;
  animation-delay: 0s;
}

.wave:nth-child(2) {
  width: 120%;
  height: 120%;
  animation-delay: 0.5s;
}

.wave:nth-child(3) {
  width: 140%;
  height: 140%;
  animation-delay: 1s;
}

@media (max-width: 768px) {
  .nfc-animation {
    height: clamp(200px, 40vw, 300px);
    margin: var(--spacing-md) auto;
  }

  .phone {
    top: 10%;
    left: 45%;
    width: clamp(120px, 25vw, 200px);
  }

  .phone img {
    width: 100%;
  }

  .nfc-card {
    top: 40%;
    left: 20%;
    width: clamp(120px, 25vw, 2000px);
  }

  .nfc-card img {
    width: 100%;
    border-radius: 0.4rem;
  }

  .nfc-waves {
    top: 50%;
    left: 50%;
    width: clamp(100px, 25vw, 200px);
    height: clamp(100px, 25vw, 200px);
    opacity: 1;
  }

  .wave {
    opacity: 0.3;
  }
}

/* Hover Effects */
.nfc-card:hover {
  transform: translate(-50%, -50%) scale(1.1);
  filter: drop-shadow(0 0 10px rgba(var(--primary-rgb), 0.5));
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: clamp(1.5rem, 3vw, 2rem);
  height: clamp(1.5rem, 3vw, 2rem);
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }
}

