/* Future Dream Tech (FDT.) - Animations & Glassmorphism */

/* ========== Glassmorphism Effects ========== */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(124, 140, 255, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(124, 140, 255, 0.2);
}

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

.float {
  animation: float 6s ease-in-out infinite;
}

.float-delayed {
  animation: float 6s ease-in-out infinite;
  animation-delay: 2s;
}

/* ========== Gradient Animation ========== */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animated-gradient {
  background: linear-gradient(-45deg, #7c8cff, #4dd0e1, #8b5cf6, #ec4899);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

/* ========== Fade In Animations ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

.fade-in-left {
  animation: fadeInLeft 0.8s ease-out forwards;
  opacity: 0;
}

.fade-in-right {
  animation: fadeInRight 0.8s ease-out forwards;
  opacity: 0;
}

.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
  opacity: 0;
}

/* Stagger delays for sequential animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ========== Pulse Animation ========== */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ========== Shimmer Effect ========== */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 3s infinite;
}

/* ========== Glow Effect ========== */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(124, 140, 255, 0.5),
                0 0 10px rgba(124, 140, 255, 0.3),
                0 0 20px rgba(124, 140, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 10px rgba(124, 140, 255, 0.8),
                0 0 20px rgba(124, 140, 255, 0.5),
                0 0 30px rgba(124, 140, 255, 0.3);
  }
}

.glow {
  animation: glow 2s ease-in-out infinite;
}

/* ========== Rotate Animation ========== */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.rotate-slow {
  animation: rotate 20s linear infinite;
}

/* ========== Scale on Hover ========== */
.scale-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.scale-hover:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ========== Bounce Animation ========== */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.bounce {
  animation: bounce 2s infinite;
}

/* ========== Typing Animation ========== */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.typing-effect {
  overflow: hidden;
  border-right: 2px solid var(--brand);
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* ========== Parallax Background ========== */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* ========== Animated Border ========== */
@keyframes borderPulse {
  0%, 100% {
    border-color: rgba(124, 140, 255, 0.3);
  }
  50% {
    border-color: rgba(124, 140, 255, 0.8);
  }
}

.animated-border {
  animation: borderPulse 2s ease-in-out infinite;
}

/* ========== Slide In Animations ========== */
@keyframes slideInFromLeft {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInFromRight {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-in-left {
  animation: slideInFromLeft 0.8s ease-out forwards;
}

.slide-in-right {
  animation: slideInFromRight 0.8s ease-out forwards;
}

/* ========== Starry Sky Background ========== */
.stars-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

/* Static stars with twinkling */
.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
  animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Shooting stars */
.shooting-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: linear-gradient(90deg, #fff, transparent);
  border-radius: 50%;
  box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8);
  animation: shoot 3s linear infinite;
  opacity: 0;
}

@keyframes shoot {
  0% {
    transform: translateX(0) translateY(0) rotate(-45deg);
    opacity: 1;
    width: 2px;
    height: 2px;
  }
  70% {
    opacity: 1;
    width: 100px;
    height: 2px;
  }
  100% {
    transform: translateX(-300px) translateY(300px) rotate(-45deg);
    opacity: 0;
    width: 100px;
    height: 2px;
  }
}

/* Large stars with stronger glow */
.star-large {
  width: 3px;
  height: 3px;
  box-shadow: 0 0 6px rgba(124, 140, 255, 1),
              0 0 12px rgba(77, 208, 225, 0.6);
  animation: twinkleLarge 4s infinite ease-in-out;
}

@keyframes twinkleLarge {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}

/* Constellation lines */
.constellation-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(124, 140, 255, 0.3) 50%, 
    transparent
  );
  transform-origin: left center;
  opacity: 0.3;
  animation: fadeConstellation 5s infinite ease-in-out;
}

@keyframes fadeConstellation {
  0%, 100% {
    opacity: 0.1;
  }
  50% {
    opacity: 0.4;
  }
}

/* ========== Smooth Transitions ========== */
.smooth-transition {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.smooth-transition-slow {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Reveal on Scroll ========== */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Loading Animation ========== */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--brand);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}
