/* =========================================
   ANGELSPIN CUSTOM STYLES
   Halo Drift Aura Theme
   ========================================= */

/* --- Keyframe Animations --- */

@keyframes tilt {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

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

@keyframes halo-pulse {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes ethereal-glow {
  0%,
  100% {
    box-shadow: 0 0 2rem rgba(147, 197, 253, 0.4), 0 0 4rem rgba(196, 181, 253, 0.3);
  }
  50% {
    box-shadow: 0 0 3rem rgba(147, 197, 253, 0.6), 0 0 6rem rgba(196, 181, 253, 0.5);
  }
}

@keyframes celestial-swirl {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* --- Animation Utilities --- */

.animate-tilt {
  animation: tilt 3s ease-in-out infinite;
}

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

.animate-halo-pulse {
  animation: halo-pulse 4s ease-in-out infinite;
}

.animate-ethereal-glow {
  animation: ethereal-glow 3s ease-in-out infinite;
}

.animate-celestial-swirl {
  animation: celestial-swirl 20s linear infinite;
}

/* --- Halo Drift Aura Theme Elements --- */

.halo-arc {
  position: relative;
}

.halo-arc::before {
  content: "";
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 0.25rem;
  background: linear-gradient(90deg, transparent, rgba(147, 197, 253, 0.6), rgba(196, 181, 253, 0.6), transparent);
  border-radius: 9999px;
  opacity: 0.7;
}

.ethereal-glow-box {
  box-shadow: 0 0 2rem rgba(147, 197, 253, 0.3), 0 0 4rem rgba(196, 181, 253, 0.2);
  border: 1px solid rgba(196, 181, 253, 0.3);
}

.celestial-gradient {
  background: linear-gradient(135deg, #e0f2fe 0%, #ede9fe 50%, #fce7f3 100%);
}

.celestial-gradient-dark {
  background: linear-gradient(135deg, #1e3a8a 0%, #5b21b6 50%, #831843 100%);
}

/* --- Prose Styling for Markdown Content --- */

.prose {
  color: #1f2937;
  max-width: 100%;
  font-size: 1rem;
  line-height: 1.75;
}

.prose h2 {
  color: #111827;
  font-weight: 700;
  font-size: 1.875rem;
  margin-top: 2.5em;
  margin-bottom: 1em;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

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

.prose h4 {
  color: #374151;
  font-weight: 600;
  font-size: 1.25rem;
  margin-top: 1.75em;
  margin-bottom: 0.5em;
  line-height: 1.5;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  color: #374151;
}

.prose a {
  color: #3b82f6;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s ease;
}

.prose a:hover {
  color: #2563eb;
}

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

.prose ul {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  list-style-type: disc;
  padding-left: 1.75em;
}

.prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  list-style-type: decimal;
  padding-left: 1.75em;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  color: #374151;
}

.prose li > p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose blockquote {
  font-style: italic;
  color: #4b5563;
  border-left: 0.25rem solid #d1d5db;
  padding-left: 1.5em;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  background: rgba(147, 197, 253, 0.05);
  padding-top: 1em;
  padding-bottom: 1em;
  border-radius: 0.5rem;
}

.prose table {
  width: 100%;
  max-width: 100%;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.9375rem;
  line-height: 1.6;
  border-collapse: collapse;
}

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

.prose thead th {
  color: #111827;
  font-weight: 600;
  vertical-align: bottom;
  padding: 0.75rem;
  text-align: left;
  background: rgba(147, 197, 253, 0.1);
}

.prose tbody tr {
  border-bottom: 1px solid #e5e7eb;
}

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

.prose tbody td {
  vertical-align: top;
  padding: 0.75rem;
  color: #374151;
}

.prose tbody tr:nth-child(odd) {
  background: rgba(249, 250, 251, 0.5);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin-top: 2em;
  margin-bottom: 2em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.prose code {
  color: #be185d;
  background: #fdf2f8;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-weight: 500;
}

.prose pre {
  background: #1f2937;
  color: #e5e7eb;
  overflow-x: auto;
  padding: 1.25rem 1.5rem;
  border-radius: 0.5rem;
  margin-top: 1.75em;
  margin-bottom: 1.75em;
  font-size: 0.875rem;
  line-height: 1.7;
}

.prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-weight: normal;
}

/* Dark mode prose adjustments */
@media (prefers-color-scheme: dark) {
  .prose {
    color: #d1d5db;
  }

  .prose h2,
  .prose h3,
  .prose h4 {
    color: #f3f4f6;
  }

  .prose p,
  .prose li {
    color: #d1d5db;
  }

  .prose a {
    color: #93c5fd;
  }

  .prose a:hover {
    color: #60a5fa;
  }

  .prose strong {
    color: #f9fafb;
  }

  .prose blockquote {
    color: #9ca3af;
    border-left-color: #4b5563;
    background: rgba(59, 130, 246, 0.05);
  }

  .prose thead th {
    color: #f3f4f6;
    background: rgba(59, 130, 246, 0.1);
  }

  .prose tbody td {
    color: #d1d5db;
  }

  .prose tbody tr {
    border-bottom-color: #374151;
  }

  .prose tbody tr:nth-child(odd) {
    background: rgba(31, 41, 55, 0.5);
  }

  .prose code {
    color: #fda4af;
    background: #4c0519;
  }
}

/* --- Responsive Table Wrapper --- */

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

/* --- Utility Overrides --- */

.text-shadow-glow {
  text-shadow: 0 0 1rem rgba(147, 197, 253, 0.5);
}

.backdrop-blur-celestial {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.9);
}

@media (prefers-color-scheme: dark) {
  .backdrop-blur-celestial {
    background: rgba(17, 24, 39, 0.9);
  }
}
