/* =============================================
   ZINGO POP CARNIVAL - CUSTOM STYLES
   ============================================= */

/* Keyframe Animations */
@keyframes confetti-fall {
  0% {
    transform: translateY(-100%) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

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

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

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

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

/* Gradient Border Animation */
.border-gradient {
  border-image: linear-gradient(90deg, #9333ea, #ec4899, #fbbf24, #9333ea) 1;
}

/* Confetti Animation */
.confetti-animation {
  position: relative;
  animation: spin-slow 10s linear infinite;
}

/* Pulse Animation */
.pulse-animation {
  animation: pulse 2s ease-in-out infinite;
}

/* Bonus Glow Effect */
.bonus-glow {
  border-image: linear-gradient(45deg, #9333ea, #ec4899, #fbbf24, #9333ea) 1;
  animation: gradient-shift 3s ease infinite;
  background-size: 200% 200%;
}

/* Animated Gradient Text */
.animate-gradient {
  background-size: 200% auto;
  animation: gradient-shift 3s ease infinite;
}

/* Navigation Link Hover Effect */
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #9333ea, #ec4899);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Parallax Background */
.parallax-bg {
  animation: float 6s ease-in-out infinite;
}

/* Particle Container */
.particles-container {
  pointer-events: none;
}

.particles-container::before,
.particles-container::after {
  content: "✦";
  position: absolute;
  font-size: 30px;
  color: #fbbf24;
  opacity: 0;
  animation: confetti-fall 4s linear infinite;
}

.particles-container::before {
  top: -50px;
  left: 20%;
  animation-delay: 0s;
}

.particles-container::after {
  top: -50px;
  left: 80%;
  animation-delay: 2s;
}

/* Table Responsive Wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Prose Styling for Readability */
.prose-custom {
  line-height: 1.75;
}

.prose-custom p {
  margin-bottom: 1.25rem;
}

.prose-custom h2 {
  font-size: 1.875rem;
  font-weight: 800;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #1f2937;
}

.prose-custom h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: #374151;
}

.prose-custom h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #4b5563;
}

.prose-custom ul,
.prose-custom ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose-custom li {
  margin-bottom: 0.5rem;
}

.prose-custom a {
  color: #9333ea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.prose-custom a:hover {
  color: #ec4899;
  text-decoration: underline;
}

.prose-custom strong {
  font-weight: 700;
  color: #1f2937;
}

.prose-custom code {
  background-color: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: #9333ea;
}

.prose-custom blockquote {
  border-left: 4px solid #9333ea;
  padding-left: 1rem;
  font-style: italic;
  color: #6b7280;
  margin: 1.5rem 0;
}

/* Smooth Transitions */
* {
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Mobile Optimization */
@media (max-width: 768px) {
  .prose-custom h2 {
    font-size: 1.5rem;
  }

  .prose-custom h3 {
    font-size: 1.25rem;
  }

  .prose-custom h4 {
    font-size: 1.125rem;
  }
}

/* Prevent horizontal scroll */
html {
  overflow-x: clip;
}

/* Ensure all images are responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Custom scrollbar for tables */
.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #9333ea, #ec4899);
  border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #7e22ce, #db2777);
}
