/* ===========================
   KEYFRAME ANIMATIONS
   =========================== */

@keyframes tilt {
  0%, 100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

@keyframes parallax-slow {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-20px);
  }
}

@keyframes parallax-fast {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-40px);
  }
}

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

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

.tilt-animation {
  animation: tilt 3s ease-in-out infinite;
}

.parallax-slow {
  animation: parallax-slow 8s ease-in-out infinite alternate;
}

.parallax-fast {
  animation: parallax-fast 5s ease-in-out infinite alternate;
}

.float-animation {
  animation: float 4s ease-in-out infinite;
}

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

/* ===========================
   PROSE STYLING
   =========================== */

.prose {
  max-width: 100%;
  color: #2d1b4e;
  line-height: 1.6;
}

.prose h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 1em;
  color: #ff1493;
  line-height: 1.2;
}

.prose h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  color: #ff6b9d;
  line-height: 1.3;
}

.prose h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.25em;
  margin-bottom: 0.5em;
  color: #9b59b6;
  line-height: 1.4;
}

.prose p {
  margin-top: 1em;
  margin-bottom: 1em;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.prose a {
  color: #ff1493;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.prose strong {
  font-weight: 700;
  color: #2d1b4e;
}

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

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  line-height: 1.75;
  padding-left: 0.375em;
}

.prose li::marker {
  color: #ff1493;
  font-weight: 600;
}

.prose blockquote {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  padding-left: 1.5em;
  border-left: 0.25rem solid #ff6b9d;
  font-style: italic;
  color: #5a3d7a;
  background: #fff0f8;
  padding: 1.25em 1.5em;
  border-radius: 0.5rem;
}

.prose table {
  width: 100%;
  max-width: 100%;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  border-collapse: collapse;
  font-size: 0.9375rem;
  overflow-x: auto;
  display: block;
}

.prose table thead {
  background: linear-gradient(135deg, #ff1493 0%, #ff6b9d 100%);
  color: #ffffff;
}

.prose table th {
  padding: 0.875em 1em;
  text-align: left;
  font-weight: 600;
  border: 1px solid #ffc0e0;
}

.prose table td {
  padding: 0.75em 1em;
  border: 1px solid #ffc0e0;
  background: #ffffff;
}

.prose table tbody tr:nth-child(even) {
  background: #fff5fa;
}

.prose table tbody tr:hover {
  background: #ffe8f5;
  transition: background 0.2s ease;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  box-shadow: 0 10px 30px rgba(255, 20, 147, 0.15);
}

.prose code {
  background: #fff0f8;
  padding: 0.125em 0.375em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: #9b59b6;
  font-family: monospace;
}

.prose pre {
  background: #2d1b4e;
  color: #ffc0e0;
  padding: 1.25em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

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

/* Table responsive wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5em 0;
}

/* ===========================
   CANDY THEME OVERRIDES
   =========================== */

body {
  background: linear-gradient(135deg, #ffe5f1 0%, #fff9e5 50%, #e5f9ff 100%);
  background-attachment: fixed;
}

.candy-gradient {
  background: linear-gradient(135deg, #ff1493 0%, #ff6b9d 50%, #ffc0e0 100%);
}

.candy-gradient-alt {
  background: linear-gradient(135deg, #9b59b6 0%, #e056fd 50%, #ff6b9d 100%);
}

.candy-border {
  border: 3px solid #ff1493;
  border-radius: 1.5rem;
  box-shadow: 0 8px 25px rgba(255, 20, 147, 0.3);
}

.candy-shadow {
  box-shadow: 0 10px 40px rgba(255, 20, 147, 0.25);
}

.candy-text-shadow {
  text-shadow: 2px 2px 4px rgba(255, 20, 147, 0.3);
}

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

/* Mobile menu background fix */
.mobile-menu-bg {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

/* Responsive utilities */
@media (max-width: 1024px) {
  .prose h2 {
    font-size: 1.5rem;
  }
  
  .prose h3 {
    font-size: 1.25rem;
  }
  
  .prose p {
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  .prose h2 {
    font-size: 1.375rem;
  }
  
  .prose h3 {
    font-size: 1.125rem;
  }
  
  .prose {
    font-size: 0.9375rem;
  }
}
