/* Neon Zila Rush Custom Styles */

/* Keyframe Animations */
@keyframes particle-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  50% {
    transform: translate(var(--tx, 20px), var(--ty, -100px)) scale(1.5);
    opacity: 0.5;
  }
  90% {
    opacity: 0.3;
  }
}

@keyframes neon-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 8px currentColor) brightness(1);
  }
  50% {
    filter: drop-shadow(0 0 20px currentColor) brightness(1.3);
  }
}

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

@keyframes scatter-burst {
  0% {
    transform: scale(0.8) rotate(0deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.1) rotate(5deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes chrome-shine {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes flare-streak {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    opacity: 0;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: translateX(200%) translateY(200%) rotate(45deg);
    opacity: 0;
  }
}

/* Particle System */
.particle-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  animation: particle-float 4s infinite;
}

.particle:nth-child(odd) {
  background: #ff6b35;
  box-shadow: 0 0 10px #ff6b35;
}

.particle:nth-child(even) {
  background: #00d4ff;
  box-shadow: 0 0 10px #00d4ff;
}

/* Neon Effects */
.neon-text {
  text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor;
  animation: neon-pulse 2s ease-in-out infinite;
}

.neon-border {
  box-shadow: 0 0 15px currentColor, inset 0 0 15px rgba(255, 255, 255, 0.1);
  border: 2px solid currentColor;
}

.neon-glow {
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.6), 0 0 40px rgba(0, 212, 255, 0.4);
}

/* Chrome Reel Effect */
.chrome-effect {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
  background-size: 200% 200%;
  animation: chrome-shine 3s linear infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.chrome-surface {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(200, 200, 255, 0.7) 50%,
    rgba(255, 255, 255, 0.9) 100%
  );
  background-size: 200% 100%;
  animation: chrome-shine 2s linear infinite;
}

/* Scatter Burst */
.scatter-burst {
  animation: scatter-burst 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

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

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

/* Flare Streaks */
.flare-streak {
  position: absolute;
  width: 200%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff6b35, #00d4ff, transparent);
  animation: flare-streak 3s ease-in-out infinite;
  pointer-events: none;
}

/* Enhanced prose styling for markdown content with improved typography and readability */
.prose {
  max-width: 100%;
  line-height: 1.75;
  color: #e5e5e5;
  font-size: 1rem;
}

.prose > * {
  max-width: 100%;
}

.prose p {
  margin-bottom: 1.5em;
  line-height: 1.8;
  color: #d0d0d0;
}

.prose h2 {
  margin-top: 2.5em;
  margin-bottom: 1.25em;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  color: #ff6b35;
  text-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
  letter-spacing: -0.02em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 2em;
  margin-bottom: 1em;
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  font-weight: 600;
  color: #00d4ff;
  line-height: 1.3;
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
  letter-spacing: -0.01em;
}

.prose h4 {
  margin-top: 1.75em;
  margin-bottom: 0.875em;
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  font-weight: 600;
  color: #ffa366;
  line-height: 1.4;
}

.prose ul,
.prose ol {
  margin: 1.5em 0;
  padding-left: 1.75em;
  color: #d0d0d0;
}

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

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

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

.prose li::marker {
  color: #ff6b35;
}

.prose ul ul,
.prose ul ol,
.prose ol ul,
.prose ol ol {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}

.prose strong,
.prose b {
  font-weight: 700;
  color: #ff6b35;
}

.prose em,
.prose i {
  font-style: italic;
  color: #00d4ff;
}

.prose a {
  color: #00d4ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  transition: all 0.3s ease;
}

.prose a:hover {
  color: #ff6b35;
  border-bottom-color: rgba(255, 107, 53, 0.6);
  text-shadow: 0 0 10px rgba(255, 107, 53, 0.4);
}

.prose blockquote {
  margin: 2em 0;
  padding: 1.25em 1.5em;
  border-left: 4px solid #ff6b35;
  background: rgba(255, 107, 53, 0.05);
  font-style: italic;
  color: #c0c0c0;
}

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

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.9375rem;
  overflow-x: auto;
}

.prose th,
.prose td {
  padding: 0.875rem 1.25rem;
  border: 1px solid rgba(255, 107, 53, 0.2);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.25), rgba(0, 212, 255, 0.15));
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.prose td {
  background: rgba(0, 0, 0, 0.4);
  color: #d0d0d0;
}

.prose tr:hover td {
  background: rgba(255, 107, 53, 0.08);
}

.prose code {
  padding: 0.25em 0.5em;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 0.25rem;
  font-family: monospace;
  font-size: 0.9em;
  color: #00d4ff;
}

.prose pre {
  margin: 2em 0;
  padding: 1.5em;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 0.5rem;
  overflow-x: auto;
  border: 1px solid rgba(255, 107, 53, 0.2);
}

.prose pre code {
  padding: 0;
  background: none;
  color: #e5e5e5;
}

.prose hr {
  margin: 3em 0;
  border: none;
  border-top: 2px solid rgba(255, 107, 53, 0.3);
  box-shadow: 0 1px 10px rgba(255, 107, 53, 0.2);
}

.prose img {
  max-width: 100%;
  height: auto;
  margin: 2em 0;
  border-radius: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Table responsive wrapper to ensure horizontal scrolling on small devices */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2em 0;
  border-radius: 0.5rem;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.table-responsive table {
  margin: 0;
  min-width: 600px;
}

/* Button Enhancements */
.btn-neon {
  position: relative;
  overflow: hidden;
}

.btn-neon::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  animation: flare-streak 3s ease-in-out infinite;
}

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

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff6b35, #00d4ff);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff8555, #00e4ff);
}

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

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

/* Responsive prose adjustments for better mobile readability */
@media (max-width: 768px) {
  .prose {
    font-size: 0.9375rem;
  }

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

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

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