body {
  font-family: 'Segoe UI', sans-serif;
  overflow-x: hidden;
  position: relative;
  scroll-behavior: smooth;
}

/* 🌈 Animated Gradient Background */
body {
  background: linear-gradient(-45deg, #e0eafc, #cfdef3, #e0eafc, #f0f0ff);
  background-size: 400% 400%;
  animation: gradientShift 16s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ✨ Floating Sparkles */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: radial-gradient(#ffffff44 1px, transparent 1px);
  background-size: 40px 40px;
  animation: floatSparkles 60s linear infinite;
  z-index: 0;
  opacity: 0.2;
}

@keyframes floatSparkles {
  0% { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}

/* 🧊 Glassmorphism Card */
.glassmorphism {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
  z-index: 1;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Hover effect on cards */
.glassmorphism:hover {
  transform: scale(1.01);
  box-shadow: 0 15px 60px rgba(100, 100, 255, 0.2);
}

/* 🌀 Spinner */
#spinner {
  border: 3px solid #ccc;
  border-top: 3px solid #6b21a8;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 🧠 Translated Text Typing Animation */
#translatedText {
  font-size: 1.1rem;
  white-space: pre-line;
  animation: typewriter 1.5s steps(40) 1 normal both;
}

@keyframes typewriter {
  0% { width: 0; opacity: 0.3; }
  100% { width: 100%; opacity: 1; }
}

/* 🌟 Button Magic Hover */
button {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

button::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, #a78bfa, #f472b6);
  transition: left 0.4s ease;
  z-index: 0;
  opacity: 0.2;
}

button:hover::before {
  left: 0;
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.3);
}

/* Placeholder Styling */
textarea::placeholder {
  color: #aaa;
  font-style: italic;
}

/* Glowing Focus Input */
textarea:focus, select:focus {
  outline: none;
  border-color: #9333ea;
  box-shadow: 0 0 12px rgba(147, 51, 234, 0.4);
}

/* Dark Mode */
.dark body {
  background: linear-gradient(-45deg, #12121a, #1c1c2b, #12121a, #1b1b2f);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
}

.dark .glassmorphism {
  background: rgba(30, 30, 40, 0.7);
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

textarea::-webkit-scrollbar {
  width: 8px;
}
textarea::-webkit-scrollbar-thumb {
  background-color: rgba(124, 58, 237, 0.4);
  border-radius: 8px;
}
textarea::-webkit-scrollbar-thumb:hover {
  background-color: rgba(124, 58, 237, 0.6);
}




button:hover {
  animation: pulseGlow 0.8s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  from {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
  }
  to {
    transform: scale(1.05);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.7);
  }
}

