/* Cosmo Rush Theme - Custom Animations & Overrides */

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

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.5), 0 0 40px rgba(0, 206, 209, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.8), 0 0 60px rgba(0, 206, 209, 0.6);
  }
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

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

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

@keyframes burst {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Utility Classes */
.animate-float {
  animation: float 3s ease-in-out infinite;
}

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

.animate-marquee {
  animation: marquee 30s linear infinite;
}

.animate-spin-slow {
  animation: spin-slow 20s linear infinite;
}

.animate-twinkle {
  animation: twinkle 2s ease-in-out infinite;
}

.animate-burst {
  animation: burst 1.5s ease-in-out infinite;
}

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

/* Neon Text Effects */
.neon-pink {
  text-shadow: 0 0 10px rgba(255, 20, 147, 0.8), 0 0 20px rgba(255, 20, 147, 0.6), 0 0 30px rgba(255, 20, 147, 0.4);
}

.neon-teal {
  text-shadow: 0 0 10px rgba(0, 206, 209, 0.8), 0 0 20px rgba(0, 206, 209, 0.6), 0 0 30px rgba(0, 206, 209, 0.4);
}

.neon-border-pink {
  border: 2px solid #ff1493;
  box-shadow: 0 0 15px rgba(255, 20, 147, 0.6), inset 0 0 15px rgba(255, 20, 147, 0.3);
}

.neon-border-teal {
  border: 2px solid #00ced1;
  box-shadow: 0 0 15px rgba(0, 206, 209, 0.6), inset 0 0 15px rgba(0, 206, 209, 0.3);
}

/* Starfield Background */
.starfield {
  position: relative;
  overflow: hidden;
}

.starfield::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(2px 2px at 20% 30%, white, transparent),
    radial-gradient(2px 2px at 60% 70%, rgba(0, 206, 209, 0.8), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255, 20, 147, 0.8), transparent),
    radial-gradient(1px 1px at 80% 10%, white, transparent),
    radial-gradient(2px 2px at 90% 60%, rgba(0, 206, 209, 0.6), transparent),
    radial-gradient(1px 1px at 33% 80%, white, transparent);
  background-size: 200% 200%, 180% 180%, 220% 220%, 190% 190%, 210% 210%, 230% 230%;
  background-position: 0% 0%, 100% 100%, 50% 50%, 80% 20%, 10% 90%, 70% 40%;
  animation: twinkle 3s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

/* Cosmic Gradient Backgrounds */
.cosmic-gradient {
  background: linear-gradient(135deg, #0a0015 0%, #1a0033 25%, #0d001a 50%, #1a0033 75%, #0a0015 100%);
}

.cosmic-gradient-alt {
  background: linear-gradient(180deg, #050010 0%, #1a0033 50%, #050010 100%);
}

/* Reel Effect Border */
.reel-border {
  position: relative;
  border: 3px solid transparent;
  background: linear-gradient(#0a0015, #0a0015) padding-box, linear-gradient(135deg, #ff1493, #00ced1, #ff1493)
    border-box;
  border-radius: 12px;
}

/* Scatter Burst Effect */
.scatter-burst {
  position: relative;
}

.scatter-burst::after {
  content: "✦";
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 24px;
  color: #ff1493;
  animation: burst 1.5s ease-in-out infinite;
}

/* Glass Morphism */
.glass-effect {
  background: rgba(26, 0, 51, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 20, 147, 0.2);
}

/* Prose Styling for Readability */
.prose {
  color: #e0e0e0;
  line-height: 1.75;
  max-width: 100%;
}

/* Enhanced prose heading styles with better spacing and neon effects */
.prose h2 {
  color: #ff1493;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-top: 2.5em;
  margin-bottom: 1em;
  line-height: 1.3;
  text-shadow: 0 0 10px rgba(255, 20, 147, 0.5);
}

.prose h3 {
  color: #00ced1;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  margin-top: 2em;
  margin-bottom: 0.75em;
  line-height: 1.4;
  text-shadow: 0 0 8px rgba(0, 206, 209, 0.4);
}

.prose h4 {
  color: #ff69b4;
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

/* Improved paragraph and text styling */
.prose p {
  margin-bottom: 1.25em;
  font-size: clamp(1rem, 2vw, 1.0625rem);
  color: #d0d0d0;
}

.prose p:first-of-type {
  font-size: clamp(1.0625rem, 2.2vw, 1.125rem);
  color: #e8e8e8;
}

/* Enhanced list styling with cosmic theme */
.prose ul,
.prose ol {
  margin-left: 1.5em;
  margin-bottom: 1.5em;
  padding-left: 0.5em;
}

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

.prose ul li {
  position: relative;
  margin-bottom: 0.75em;
  padding-left: 1.5em;
}

.prose ul li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: #ff1493;
  font-size: 0.875em;
}

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

.prose ol li {
  margin-bottom: 0.75em;
  padding-left: 0.5em;
}

.prose ol li::marker {
  color: #00ced1;
  font-weight: 600;
}

/* Enhanced link styling with hover effects */
.prose a {
  color: #00ced1;
  text-decoration: underline;
  text-decoration-color: rgba(0, 206, 209, 0.3);
  text-underline-offset: 0.2em;
  transition: all 0.3s ease;
}

.prose a:hover {
  color: #ff1493;
  text-decoration-color: rgba(255, 20, 147, 0.6);
  text-shadow: 0 0 8px rgba(255, 20, 147, 0.4);
}

/* Improved strong and emphasis styling */
.prose strong {
  color: #ff69b4;
  font-weight: 600;
}

.prose em {
  color: #40e0d0;
  font-style: italic;
}

/* Enhanced table styling with responsive design */
.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: clamp(0.875rem, 1.8vw, 1rem);
  background: rgba(10, 0, 21, 0.6);
  border-radius: 8px;
  overflow: hidden;
}

.prose thead {
  background: linear-gradient(135deg, rgba(255, 20, 147, 0.25), rgba(0, 206, 209, 0.15));
}

.prose th {
  color: #ff1493;
  padding: 1em 0.75em;
  text-align: left;
  border: 1px solid rgba(255, 20, 147, 0.3);
  font-weight: 600;
  text-shadow: 0 0 5px rgba(255, 20, 147, 0.3);
}

.prose td {
  padding: 0.875em 0.75em;
  border: 1px solid rgba(0, 206, 209, 0.2);
  color: #d0d0d0;
}

.prose tbody tr {
  transition: background-color 0.2s ease;
}

.prose tbody tr:nth-child(even) {
  background: rgba(0, 206, 209, 0.05);
}

.prose tbody tr:hover {
  background: rgba(255, 20, 147, 0.08);
}

/* Blockquote styling with cosmic theme */
.prose blockquote {
  margin: 2em 0;
  padding: 1.25em 1.5em;
  border-left: 4px solid #ff1493;
  background: rgba(26, 0, 51, 0.5);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #e0e0e0;
  box-shadow: 0 0 15px rgba(255, 20, 147, 0.2);
}

.prose blockquote p {
  margin-bottom: 0.5em;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

/* Image styling for responsive markdown images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2em 0;
  box-shadow: 0 8px 24px rgba(255, 20, 147, 0.3), 0 4px 12px rgba(0, 206, 209, 0.2);
  border: 2px solid rgba(255, 20, 147, 0.3);
}

/* Code styling */
.prose code {
  background: rgba(0, 206, 209, 0.15);
  color: #40e0d0;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: "Courier New", monospace;
}

.prose pre {
  background: rgba(10, 0, 21, 0.8);
  padding: 1.25em;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5em 0;
  border: 1px solid rgba(0, 206, 209, 0.3);
}

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

/* Horizontal rule styling */
.prose hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff1493, #00ced1, transparent);
  margin: 3em 0;
  opacity: 0.5;
}

/* Table Responsive Wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2em 0;
  border-radius: 8px;
}

.table-responsive table {
  margin: 0;
}

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

/* Parallax Container */
.parallax-container {
  position: relative;
  transform-style: preserve-3d;
}

.parallax-layer {
  position: absolute;
  width: 100%;
  height: 100%;
}

/* Mobile Menu Transitions */
.mobile-menu {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.mobile-menu.hidden {
  transform: translateX(-100%);
  opacity: 0;
}

/* Button Hover Effects */
.btn-cosmic {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-cosmic::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-cosmic:hover::before {
  width: 300px;
  height: 300px;
}

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

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(255, 20, 147, 0.4), 0 5px 15px rgba(0, 206, 209, 0.3);
}

/* Responsive Utilities */
@media (max-width: 1024px) {
  .prose {
    line-height: 1.7;
  }

  .prose ul,
  .prose ol {
    margin-left: 1.25em;
  }

  .prose th,
  .prose td {
    padding: 0.75em 0.5em;
  }

  .prose blockquote {
    padding: 1em 1.25em;
  }
}

@media (max-width: 640px) {
  .prose {
    line-height: 1.65;
  }

  .prose ul,
  .prose ol {
    margin-left: 1em;
  }

  .prose th,
  .prose td {
    padding: 0.625em 0.5em;
    font-size: 0.875rem;
  }

  .prose blockquote {
    padding: 0.875em 1em;
    margin: 1.5em 0;
  }

  .prose img {
    margin: 1.5em 0;
  }
}
