@tailwind base;
@tailwind components;
@tailwind utilities;

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Floating Blurred Shapes */
.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 10s infinite alternate ease-in-out;
}
.shape1 {
  width: 300px;
  height: 300px;
  background: #9333ea;
  top: -50px;
  left: -50px;
}
.shape2 {
  width: 400px;
  height: 400px;
  background: #ec4899;
  bottom: -100px;
  right: -80px;
  animation-delay: 2s;
}
.shape3 {
  width: 250px;
  height: 250px;
  background: #3b82f6;
  top: 200px;
  right: 20%;
  animation-delay: 4s;
}

@keyframes float {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(-50px) translateX(30px); }
}

/* NAVIGATION ANIMATION */
.nav-open #nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Hamburger to X animation */
.nav-open #menu-btn span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}
.nav-open #menu-btn span:nth-child(2) {
  opacity: 0;
}
.nav-open #menu-btn span:nth-child(3) {
  transform: rotate(-45deg) translate(10px, -10px);
}

#particle-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.social-icon {
  color: white;
  transition: color 0.3s ease, filter 0.3s ease;
}
.social-icon:hover,
.social-icon:focus {
  color: #a78bfa; /* Tailwind purple-400 */
  filter: drop-shadow(0 0 6px #a78bfa);
  outline: none;
}

:focus-visible {
  outline: 3px solid #a78bfa; /* Tailwind purple-400 */
  outline-offset: 2px;
}

#custom-cursor {
  transform: translate(-50%, -50%);
  mix-blend-mode: difference; /* nice contrast effect on light/dark */
  will-change: transform, width, height, border-color, opacity;
}

.hovered {
  width: 40px !important;
  height: 40px !important;
  border-color: #a78bfa !important; /* Tailwind purple-400 */
  opacity: 0.9 !important;
}
/* Overlay container */
#welcome-modal {
  position: fixed; /* So it sits above everything */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* dark transparent overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 9999; /* make sure it's on top */
}

/* Show state */
#welcome-modal.show {
  opacity: 1;
  pointer-events: auto;
}

/* Modal box */
#welcome-modal > div {
  background: linear-gradient(135deg, #1e1e2f, #2c2c43);
  box-shadow: 0 10px 30px rgba(167, 139, 250, 0.5);
  border: 1px solid rgba(167, 139, 250, 0.3);
  max-width: 28rem;
  padding: 2.5rem 2rem;
  position: relative;
  border-radius: 1rem;
  color: #e0e0ff;
  transform: scale(0.8);
  transition: transform 0.4s ease;
}

/* Scale animation when shown */
#welcome-modal.show > div {
  transform: scale(1);
}

/* Close button */
#modal-close {
  font-size: 1.5rem;
  color: #bbb;
  transition: color 0.25s ease;
}
#modal-close:hover,
#modal-close:focus {
  color: #a78bfa;
}

/* OK button */
#modal-ok {
  font-size: 1.125rem;
  box-shadow: 0 0 15px rgba(167, 139, 250, 0.6);
  transition: box-shadow 0.3s ease;
}
#modal-ok:hover,
#modal-ok:focus {
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.8);
}

/* Time Box */
  #time-box {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: #1e1e2f;
    color: #fff;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-family: monospace;
    z-index: 999;
  }

  /* Contact Floating Box */
  #contact-box {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1e1e2f;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 1000;
  }

  #contact-box a {
    color: #fff;
    font-size: 22px;
    transition: transform 0.2s, color 0.3s;
  }

  #contact-box a:hover {
    transform: scale(1.1);
  }

  #contact-close {
    background: transparent;
    border: none;
    color: #ff6b6b;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
  }

  #contact-close:hover {
    transform: rotate(90deg);
  }

  /* Contact Open Button */
  #contact-open {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #6c5ce7;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 14px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    z-index: 999;
  }

  #contact-open:hover {
    transform: scale(1.1);
  }

/* Fade-in animation */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
  animation: fadeIn 1.2s ease-out forwards;
}

/* Fade In */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fadeIn {
  animation: fadeIn 1.5s ease forwards;
}

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

.animate-fadeInUp {
  animation: fadeInUp 1.5s ease forwards;
}
