/* Animations */
@keyframes tilt {
  0%, 100% {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
  }
  25% {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg);
  }
  75% {
    transform: perspective(1000px) rotateX(-2deg) rotateY(2deg);
  }
}

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

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.8);
  }
}

@keyframes particle-float {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) rotate(360deg);
    opacity: 0;
  }
}

/* Tilt on hover */
.tilt-on-hover {
  transition: transform 0.3s ease;
}

.tilt-on-hover:hover {
  animation: tilt 0.6s ease-in-out;
}

/* Glow effects */
.glow-pulse {
  animation: glow-pulse 2s ease-in-out infinite;
}

.glow-button {
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
  transition: all 0.3s ease;
}

.glow-button:hover {
  box-shadow: 0 0 50px rgba(168, 85, 247, 0.8);
}

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

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.8), transparent);
  border-radius: 50%;
  animation: particle-float 15s infinite ease-in-out;
}

.particle:nth-child(1) {
  left: 10%;
  top: 20%;
  --tx: 100px;
  --ty: -200px;
  animation-delay: 0s;
}

.particle:nth-child(2) {
  left: 80%;
  top: 40%;
  --tx: -150px;
  --ty: 180px;
  animation-delay: 3s;
}

.particle:nth-child(3) {
  left: 30%;
  top: 70%;
  --tx: 120px;
  --ty: -150px;
  animation-delay: 6s;
}

.particle:nth-child(4) {
  left: 60%;
  top: 10%;
  --tx: -100px;
  --ty: 220px;
  animation-delay: 9s;
}

.particle:nth-child(5) {
  left: 50%;
  top: 50%;
  --tx: 180px;
  --ty: -180px;
  animation-delay: 12s;
}

/* Responsive table wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

/* Prose styling for markdown content */
.prose {
  color: #e5e7eb;
  max-width: 100%;
}

.prose h2 {
  color: #d8b4fe;
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
  background: linear-gradient(to right, #d8b4fe, #f9a8d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.prose h4 {
  color: #f3e8ff;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.625rem;
  line-height: 1.5;
}

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

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

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

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

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

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

.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.6;
  color: #d1d5db;
}

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

.prose blockquote {
  font-style: italic;
  border-left: 0.25rem solid #c084fc;
  padding-left: 1em;
  margin-left: 0;
  margin-right: 0;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  color: #e9d5ff;
  background: rgba(192, 132, 252, 0.1);
  padding-top: 0.75em;
  padding-bottom: 0.75em;
  border-radius: 0.25rem;
}

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

.prose thead {
  border-bottom: 2px solid #c084fc;
}

.prose thead th {
  color: #d8b4fe;
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  background: rgba(192, 132, 252, 0.1);
}

.prose tbody tr {
  border-bottom: 1px solid rgba(192, 132, 252, 0.2);
  transition: background-color 0.3s ease;
}

.prose tbody tr:hover {
  background: rgba(192, 132, 252, 0.05);
}

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

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.prose code {
  color: #f0abfc;
  background: rgba(192, 132, 252, 0.1);
  padding: 0.125em 0.375em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background: rgba(30, 27, 75, 0.5);
  border: 1px solid rgba(192, 132, 252, 0.3);
  border-radius: 0.5rem;
  padding: 1em;
  overflow-x: auto;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .prose h2 {
    font-size: 1.5rem;
  }

  .prose h3 {
    font-size: 1.25rem;
  }

  .prose h4 {
    font-size: 1.125rem;
  }

  .prose table {
    font-size: 0.875rem;
  }

  .prose thead th,
  .prose tbody td {
    padding: 0.5rem 0.75rem;
  }
}

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

/* Details/Summary styling */
details summary {
  transition: all 0.3s ease;
}

details[open] summary i {
  transform: rotate(180deg);
}

details summary i {
  transition: transform 0.3s ease;
}
