/* Particle Animation */
.particle-container {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 0.25rem;
  height: 0.25rem;
  background: rgba(139, 199, 255, 0.5);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
}

.particle:nth-child(1) {
  left: 10%;
  top: 20%;
  animation-delay: 0s;
  animation-duration: 18s;
}

.particle:nth-child(2) {
  left: 30%;
  top: 60%;
  animation-delay: 2s;
  animation-duration: 22s;
}

.particle:nth-child(3) {
  left: 60%;
  top: 30%;
  animation-delay: 4s;
  animation-duration: 20s;
}

.particle:nth-child(4) {
  left: 80%;
  top: 70%;
  animation-delay: 1s;
  animation-duration: 25s;
}

.particle:nth-child(5) {
  left: 50%;
  top: 50%;
  animation-delay: 3s;
  animation-duration: 19s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  50% {
    transform: translate(calc(-50px + 100 * 1px), calc(-100px + 50 * 1px)) scale(1.5);
    opacity: 0.8;
  }
  90% {
    opacity: 0.6;
  }
}

/* Tilt Card Animation */
.tilt-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

/* Prose Styling for Markdown Content */
.prose {
  color: #d1d5db;
  max-width: 100%;
}

.prose h2 {
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.3;
  border-bottom: 2px solid #3f444a;
  padding-bottom: 0.75rem;
}

.prose h3 {
  color: #e0f2fe;
  font-size: 1.375rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.prose h4 {
  color: #b9e6fe;
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.prose p {
  color: #d1d5db;
  line-height: 1.75;
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.prose a {
  color: #36bffa;
  text-decoration: underline;
  text-decoration-color: rgba(54, 191, 250, 0.3);
  text-underline-offset: 0.2em;
  transition: all 0.2s ease;
}

.prose a:hover {
  color: #7cd4fd;
  text-decoration-color: rgba(124, 212, 253, 0.6);
}

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

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

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

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

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

.prose li {
  color: #d1d5db;
  margin-bottom: 0.5rem;
  line-height: 1.7;
  padding-left: 0.375rem;
}

.prose li::marker {
  color: #36bffa;
}

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

.prose blockquote {
  border-left: 4px solid #36bffa;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #b9e6fe;
  background: rgba(54, 191, 250, 0.05);
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
}

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

.prose img {
  border-radius: 0.75rem;
  margin: 2rem auto;
  max-width: 100%;
  height: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid #3f444a;
}

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

.prose thead {
  background: #2d3035;
  border-bottom: 2px solid #36bffa;
}

.prose thead th {
  color: #ffffff;
  font-weight: 600;
  text-align: left;
  padding: 0.875rem 1rem;
  border-bottom: 2px solid #36bffa;
}

.prose tbody tr {
  border-bottom: 1px solid #3f444a;
  transition: background 0.2s ease;
}

.prose tbody tr:hover {
  background: rgba(54, 191, 250, 0.05);
}

.prose tbody td {
  padding: 0.875rem 1rem;
  color: #d1d5db;
}

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

.prose code {
  background: #2d3035;
  color: #7cd4fd;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background: #2d3035;
  color: #d1d5db;
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid #3f444a;
}

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

.prose hr {
  border: none;
  border-top: 2px solid #3f444a;
  margin: 2.5rem 0;
}

/* Table Responsive Wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
}

.table-responsive::-webkit-scrollbar {
  height: 0.5rem;
}

.table-responsive::-webkit-scrollbar-track {
  background: #2d3035;
  border-radius: 0.25rem;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #36bffa;
  border-radius: 0.25rem;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #7cd4fd;
}

/* Ensure responsive images in prose */
.prose img, .prose video, .prose iframe {
  max-width: 100%;
  height: auto;
}

/* Responsive typography adjustments */
@media (max-width: 768px) {
  .prose h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
  }
  
  .prose h3 {
    font-size: 1.25rem;
    margin-top: 1.75rem;
  }
  
  .prose h4 {
    font-size: 1.0625rem;
    margin-top: 1.5rem;
  }
  
  .prose p, .prose li {
    font-size: 0.9375rem;
  }
  
  .prose table {
    font-size: 0.875rem;
  }
  
  .prose thead th, .prose tbody td {
    padding: 0.625rem 0.75rem;
  }
}
