/* Custom Animations and Styles */

/* Glow Pulse Animation */
@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(254, 231, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(254, 231, 0, 0.8), 0 0 60px rgba(254, 231, 0, 0.4);
  }
}

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

.shadow-glow {
  box-shadow: 0 0 30px rgba(254, 231, 0, 0.6);
}

/* Parallax Effect */
.parallax-element {
  transition: transform 0.3s ease-out;
}

.parallax-element:hover {
  transform: translateY(-5px);
}

/* Slide Up Animation */
@keyframes slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-slide-up {
  animation: slide-up 0.5s ease-out;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #1e3a8a;
}

::-webkit-scrollbar-thumb {
  background: #fee700;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ffd700;
}

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

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  color: #fee700;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

.prose h1 {
  font-size: 2.25em;
}

.prose h2 {
  font-size: 1.875em;
}

.prose h3 {
  font-size: 1.5em;
}

.prose p {
  margin-top: 1em;
  margin-bottom: 1em;
}

.prose a {
  color: #fee700;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.prose a:hover {
  color: #ffd700;
}

.prose strong {
  color: #fee700;
  font-weight: 600;
}

.prose ul,
.prose ol {
  margin-top: 1em;
  margin-bottom: 1em;
  padding-left: 1.5em;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose blockquote {
  border-left: 4px solid #fee700;
  padding-left: 1em;
  font-style: italic;
  color: #d1d5db;
  margin: 1.5em 0;
}

.prose code {
  background-color: #1e3a8a;
  color: #fee700;
  padding: 0.2em 0.4em;
  border-radius: 0.25em;
  font-size: 0.875em;
}

.prose pre {
  background-color: #1e3a8a;
  color: #e5e7eb;
  padding: 1em;
  border-radius: 0.5em;
  overflow-x: auto;
  margin: 1.5em 0;
}

.prose pre code {
  background-color: transparent;
  padding: 0;
}

.prose img {
  border-radius: 0.5em;
  margin: 1.5em 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}

.prose th,
.prose td {
  border: 1px solid #1e3a8a;
  padding: 0.75em;
  text-align: left;
}

.prose th {
  background-color: #1e3a8a;
  color: #fee700;
  font-weight: 600;
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #fee700 0%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Card Hover Glow */
.card-glow {
  transition: box-shadow 0.3s ease;
}

.card-glow:hover {
  box-shadow: 0 0 30px rgba(254, 231, 0, 0.4);
}

/* Responsive Tables */
@media (max-width: 768px) {
  .overflow-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Button Ripple Effect */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.button-ripple {
  position: relative;
  overflow: hidden;
}

.button-ripple::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.button-ripple:active::after {
  width: 300px;
  height: 300px;
}

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

.spinner {
  border: 3px solid rgba(254, 231, 0, 0.3);
  border-top-color: #fee700;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

/* Fade In Animation */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fade-in 0.6s ease-out;
}

/* Brazilian Carnival Colors Accent */
.carnival-gradient {
  background: linear-gradient(135deg, #00a86b 0%, #fee700 50%, #0047ab 100%);
}

/* Text Balance for Better Typography */
.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}
