/* Digital Grid Pattern Background */
.grid-pattern {
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(6, 182, 212, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

/* Particle Animation Background */
.particles-bg {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: particleFloat 15s ease-in-out infinite;
}

@keyframes particleFloat {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-20px) translateX(10px);
    opacity: 0.6;
  }
}

/* Tilt Animation */
.tilt-element {
  transition: transform 0.3s ease;
}

.tilt-element:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) scale(1.02);
}

/* Neon Glow Effect */
.neon-glow {
  box-shadow: 
    0 0 5px rgba(6, 182, 212, 0.5),
    0 0 10px rgba(6, 182, 212, 0.3),
    0 0 15px rgba(6, 182, 212, 0.2);
}

.neon-glow:hover {
  box-shadow: 
    0 0 10px rgba(6, 182, 212, 0.7),
    0 0 20px rgba(6, 182, 212, 0.5),
    0 0 30px rgba(6, 182, 212, 0.3);
}

/* Prose Styling for Markdown Content */
.prose {
  color: #d1d5db;
  line-height: 1.6;
  font-size: 1rem;
}

.prose h2 {
  color: #22d3ee;
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
  letter-spacing: -0.01em;
  background: linear-gradient(to right, #22d3ee, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.prose h3 {
  color: #06b6d4;
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 1.75em;
  margin-bottom: 0.75em;
  line-height: 1.4;
}

.prose h4 {
  color: #22d3ee;
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.4;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  color: #d1d5db;
  line-height: 1.7;
}

.prose a {
  color: #22d3ee;
  text-decoration: underline;
  text-decoration-color: rgba(34, 211, 238, 0.3);
  transition: all 0.2s ease;
}

.prose a:hover {
  color: #06b6d4;
  text-decoration-color: rgba(6, 182, 212, 0.6);
}

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

.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;
  color: #d1d5db;
  line-height: 1.6;
}

.prose li::marker {
  color: #22d3ee;
}

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

.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin-top: 2em;
  margin-bottom: 2em;
  background-color: rgba(31, 41, 55, 0.5);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 0.75rem;
  overflow: hidden;
}

.prose thead {
  background: linear-gradient(to right, rgba(6, 182, 212, 0.3), rgba(37, 99, 235, 0.3));
}

.prose th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
  color: #22d3ee;
  border-bottom: 1px solid rgba(6, 182, 212, 0.3);
  font-size: 0.9rem;
}

.prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(55, 65, 81, 0.5);
  color: #d1d5db;
  font-size: 0.9rem;
}

.prose tbody tr:last-child td {
  border-bottom: none;
}

.prose tbody tr:hover {
  background-color: rgba(55, 65, 81, 0.3);
}

.prose blockquote {
  border-left: 4px solid #22d3ee;
  padding-left: 1.5em;
  margin-left: 0;
  margin-right: 0;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  font-style: italic;
  color: #9ca3af;
  background-color: rgba(6, 182, 212, 0.05);
  padding-top: 1em;
  padding-bottom: 1em;
  border-radius: 0 0.5rem 0.5rem 0;
}

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

.prose code {
  background-color: rgba(6, 182, 212, 0.1);
  color: #22d3ee;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background-color: rgba(31, 41, 55, 0.8);
  color: #d1d5db;
  padding: 1.25em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.prose pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.85em;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin-top: 2em;
  margin-bottom: 2em;
  border: 1px solid rgba(6, 182, 212, 0.2);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.prose hr {
  border: none;
  border-top: 1px solid rgba(6, 182, 212, 0.3);
  margin-top: 3em;
  margin-bottom: 3em;
}

/* Table Responsive Wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

/* Ensure readability - light text on dark bg */
.prose {
  background-color: transparent;
}

.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  text-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .prose {
    font-size: 0.95rem;
  }
  
  .prose h2 {
    font-size: 1.5rem;
  }
  
  .prose h3 {
    font-size: 1.25rem;
  }
  
  .prose h4 {
    font-size: 1.1rem;
  }
  
  .prose table {
    font-size: 0.85rem;
  }
  
  .prose th, .prose td {
    padding: 0.5rem 0.75rem;
  }
}

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

/* Focus states for accessibility */
a:focus, button:focus, summary:focus {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
}
