/* Magical CTA Button */
.magical-cta-btn {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px 50px !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%) !important;
  background-size: 200% 200%;
  border: none !important;
  border-radius: 50px !important;
  color: #000 !important;
  cursor: pointer !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
  box-shadow:
    0 10px 40px rgba(255, 215, 0, 0.5),
    0 0 20px rgba(255, 215, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  animation: gradientShift 3s ease infinite, floatButton 3s ease-in-out infinite;
  transition: all 0.3s ease;
  text-decoration: none !important;
  z-index: 10 !important;
}

.magical-cta-btn:hover {
  transform: scale(1.08) translateY(-5px);
  box-shadow:
    0 15px 60px rgba(255, 215, 0, 0.8),
    0 0 40px rgba(255, 165, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: #000 !important;
}

.magical-cta-btn:active {
  transform: scale(1.02) translateY(-2px);
}

.btn-text {
  position: relative;
  z-index: 2;
  display: inline-block;
  animation: textPulse 2s ease-in-out infinite;
}

/* Background glow effect */
.btn-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent 70%);
  animation: rotateGlow 4s linear infinite;
  pointer-events: none;
}

/* Shine effect on hover */
.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}

.magical-cta-btn:hover .btn-shine {
  left: 100%;
}

/* Animations */
@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes floatButton {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes textPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

@keyframes rotateGlow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Magical particles around button */
.magical-cta-btn::before {
  content: '✨';
  position: absolute;
  top: -20px;
  left: 10%;
  font-size: 20px;
  animation: particleFloat1 3s ease-in-out infinite;
  opacity: 0.8;
}

.magical-cta-btn::after {
  content: '⭐';
  position: absolute;
  bottom: -20px;
  right: 10%;
  font-size: 18px;
  animation: particleFloat2 3s ease-in-out infinite;
  opacity: 0.8;
}

@keyframes particleFloat1 {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(180deg);
  }
}

@keyframes particleFloat2 {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(15px) rotate(-180deg);
  }
}

/* Secondary button enhancement - Portfolio Button */
.btn-dream-secondary {
  position: relative !important;
  padding: 18px 45px !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
  border: 3px solid #FFD700 !important;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(15, 52, 96, 0.9)) !important;
  color: #FFD700 !important;
  border-radius: 50px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  min-width: 280px !important;
  min-height: 56px !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3),
              0 0 30px rgba(255, 215, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
  overflow: visible !important;
  z-index: 5 !important;
}

.btn-dream-secondary::before {
  content: '🏛️';
  font-size: 20px;
  animation: portfolioIcon 2s ease-in-out infinite;
}

.btn-dream-secondary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-dream-secondary:hover {
  background: linear-gradient(135deg, #FFD700, #FFA500) !important;
  border-color: #FFFFFF !important;
  color: #1a1a2e !important;
  transform: translateY(-5px) scale(1.05) !important;
  box-shadow: 0 10px 40px rgba(255, 215, 0, 0.5),
              0 0 50px rgba(255, 215, 0, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  text-shadow: none !important;
}

.btn-dream-secondary:hover::after {
  width: 300px;
  height: 300px;
}

.btn-dream-secondary:active {
  transform: translateY(-2px) scale(1.02) !important;
}

@keyframes portfolioIcon {
  0%, 100% {
    transform: scale(1) rotateY(0deg);
  }
  50% {
    transform: scale(1.2) rotateY(180deg);
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .magical-cta-btn {
    padding: 18px 35px !important;
    font-size: 16px !important;
    letter-spacing: 1px;
  }

  .btn-dream-secondary {
    padding: 16px 35px !important;
    font-size: 15px !important;
  }

  .btn-dream-secondary::before {
    font-size: 18px;
  }

  .magical-cta-btn::before,
  .magical-cta-btn::after {
    font-size: 16px;
  }
}

/* Extra excitement on first view */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  70% {
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.final-buttons {
  animation: bounceIn 1s ease-out 0.5s backwards;
}
