/* Additional animations and transitions for better UX */

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Fade in up animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide in left animation */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide in right animation */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Pulse animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Bounce animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Apply animations to elements */
.post {
  animation: fadeInUp 0.6s ease-out;
}

#sidebar li {
  animation: slideInRight 0.6s ease-out;
}

#sidebar li:nth-child(1) {
  animation-delay: 0.1s;
}

#sidebar li:nth-child(2) {
  animation-delay: 0.2s;
}

/* Button hover effect */
#signup_form form input[type="submit"] {
  position: relative;
  overflow: hidden;
}

#signup_form form input[type="submit"]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

#signup_form form input[type="submit"]:hover::after {
  width: 300px;
  height: 300px;
}

/* Input focus animation */
#signup_form form input[type="text"],
#signup_form form input[type="email"],
#signup_form form input[type="tel"],
#signup_form form select,
#signup_form form textarea {
  position: relative;
  transition: all 0.3s ease;
}

#signup_form form input[type="text"]:focus,
#signup_form form input[type="email"]:focus,
#signup_form form input[type="tel"]:focus,
#signup_form form select:focus,
#signup_form form textarea:focus {
  transform: scale(1.01);
}

/* Loading spinner for form submission */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

/* Success message animation */
.success-message {
  animation: fadeInUp 0.6s ease-out;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 10px;
  margin: 1rem 0;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Error message animation */
.error-message {
  animation: fadeInUp 0.6s ease-out;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 10px;
  margin: 1rem 0;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Card hover effect */
.card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .header,
  .footer,
  #sidebar {
    display: none;
  }
  
  #content {
    width: 100%;
  }
  
  .post {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
