@media (min-width: 768px) {
  input,
  textarea,
  select {
    cursor: text !important;
  }
  a,
  button,
  .footer-nav-item,
  .project-card,
  .skill-item,
  .contact-item,
  .music-menu,
  .music-menu *,
  .float-menu-btn,
  .music-menu-close,
  .music-control-btn,
  .music-playlist-item,
  .music-playlist-item * {
    cursor: pointer !important;
  }
}

@media (max-width: 767px) {
  .custom-cursor,
  .cursor-trail {
    display: none;
  }
}

.custom-cursor {
  display: block !important;
  width: 42px;
  height: 42px;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%) rotate(var(--cursor-angle, 0deg));
  transition: transform 0.2s ease, filter 0.2s ease;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(91, 160, 255, 0.35) 0%,
    rgba(38, 94, 255, 0) 70%
  );
  filter: drop-shadow(0 0 18px rgba(91, 160, 255, 0.9));
  opacity: 1;
  visibility: visible;
}

.custom-cursor::before {
  content: "\f135";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 22px;
  color: #ffffff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.9),
    0 0 18px rgba(120, 195, 255, 0.9);
}

.custom-cursor::after {
  content: "";
  position: absolute;
  top: 58%;
  left: 50%;
  transform: translate(-50%, 0) rotate(180deg);
  width: 12px;
  height: 70px;
  background: linear-gradient(
    180deg,
    rgba(255, 190, 92, 0.8) 0%,
    rgba(255, 81, 47, 0.6) 45%,
    rgba(255, 255, 255, 0) 100%
  );
  border-radius: 50% 50% 40% 40%;
  filter: blur(0.5px);
  animation: rocketTrail 0.6s ease-in-out infinite;
}

@keyframes rocketTrail {
  0% {
    opacity: 0.85;
    transform: translate(-50%, 0) rotate(180deg) scaleY(1);
  }
  50% {
    opacity: 0.45;
    transform: translate(-50%, 6px) rotate(180deg) scaleY(0.85);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 12px) rotate(180deg) scaleY(0.6);
  }
}

.custom-cursor.active {
  filter: drop-shadow(0 0 24px rgba(255, 134, 188, 0.95));
  transform: translate(-50%, -50%) rotate(var(--cursor-angle, 0deg)) scale(1.15);
}

.custom-cursor.click {
  transform: translate(-50%, -50%) rotate(var(--cursor-angle, 0deg)) scale(0.9);
  filter: drop-shadow(0 0 30px rgba(255, 119, 119, 0.95));
}

.cursor-trail {
  display: block !important;
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(79, 172, 254, 1) 0%,
    rgba(102, 126, 234, 0.7) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
  box-shadow: 0 0 20px rgba(79, 172, 254, 1), 0 0 40px rgba(79, 172, 254, 0.7),
    0 0 60px rgba(102, 126, 234, 0.5);
  animation: trailPulse 1.5s ease-in-out infinite;
  opacity: 1;
  visibility: visible;
}

@keyframes trailPulse {
  0%,
  100% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.3);
  }
}

.cursor-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99997;
  background: rgba(79, 172, 254, 1);
  box-shadow: 0 0 15px rgba(79, 172, 254, 1), 0 0 30px rgba(79, 172, 254, 0.8),
    0 0 45px rgba(102, 126, 234, 0.6);
  animation: particle-fade 0.8s ease-out forwards;
}

@keyframes particle-fade {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0)
      translate(var(--particle-x, 0), var(--particle-y, 0));
  }
}

.cursor-ripple {
  position: fixed;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(79, 172, 254, 0.9);
  pointer-events: none;
  z-index: 99996;
  transform: translate(-50%, -50%);
  animation: ripple-expand 1s ease-out forwards;
  box-shadow: 0 0 30px rgba(79, 172, 254, 0.8);
}

.cursor-sparkle {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99996;
  transform: translate(-50%, -50%);
  animation: sparkle-fade 1s ease-out forwards;
  box-shadow: 0 0 15px currentColor, 0 0 30px currentColor;
}

@keyframes sparkle-fade {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0) rotate(360deg);
  }
}

@keyframes ripple-expand {
  0% {
    width: 30px;
    height: 30px;
    opacity: 1;
  }
  100% {
    width: 120px;
    height: 120px;
    opacity: 0;
  }
}

a,
button,
.footer-nav-item,
.project-card,
.skill-item,
.contact-item,
.music-playlist-item,
.music-control-btn {
  position: relative;
}

a:hover ~ .custom-cursor,
button:hover ~ .custom-cursor,
.footer-nav-item:hover ~ .custom-cursor,
.project-card:hover ~ .custom-cursor,
.skill-item:hover ~ .custom-cursor {
  width: 60px;
  height: 60px;
  border-color: rgba(79, 172, 254, 1);
  background: rgba(79, 172, 254, 0.25);
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(102, 126, 234, 0.4);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
  z-index: 9999;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.magnetic-element {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.magnetic-element:hover {
  transform: translate(var(--mouse-x, 0), var(--mouse-y, 0)) scale(1.05);
}

.glow-on-hover {
  transition: all 0.3s ease;
}

.glow-on-hover:hover {
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.5),
    0 0 40px rgba(102, 126, 234, 0.3), 0 0 60px rgba(102, 126, 234, 0.1);
}

.text-gradient-hover {
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-hover:hover {
  background: linear-gradient(135deg, #4facfe 0%, #667eea 50%, #764ba2 100%);
  background-size: 200% 200%;
  animation: gradientShift 2s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.transform-3d {
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
}

.transform-3d:hover {
  transform: perspective(1000px) rotateY(5deg) rotateX(-5deg) translateZ(20px);
}

.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.shimmer:hover::before {
  left: 100%;
}

.neon-glow {
  transition: all 0.3s ease;
}

.neon-glow:hover {
  text-shadow: 0 0 10px rgba(102, 126, 234, 0.8),
    0 0 20px rgba(102, 126, 234, 0.6), 0 0 30px rgba(102, 126, 234, 0.4);
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.6),
    0 0 40px rgba(102, 126, 234, 0.4), 0 0 60px rgba(102, 126, 234, 0.2);
}

.bounce-hover {
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bounce-hover:hover {
  animation: bounce 0.6s ease;
}

.rotate-hover {
  transition: transform 0.3s ease;
}

.rotate-hover:hover {
  transform: rotate(5deg) scale(1.05);
}

.scale-hover {
  transition: transform 0.3s ease;
}

.scale-hover:hover {
  transform: scale(1.1);
}

.slide-hover {
  transition: transform 0.3s ease;
}

.slide-hover:hover {
  transform: translateX(10px);
}

.flip-card {
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
}
