/* Aurora Zila Drift Theme - Custom Animations & Styling */

/* Keyframe Animations */
@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.5), 0 0 40px rgba(45, 212, 191, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(45, 212, 191, 0.7), 0 0 60px rgba(45, 212, 191, 0.5);
  }
}

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

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

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

@keyframes particle-float {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* Apply Animations */
.animate-glow {
  animation: glow 3s ease-in-out infinite;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.3), transparent);
  background-size: 1000px 100%;
  animation: shimmer 3s infinite;
}

/* Particle Animation Container */
.particle-container {
  pointer-events: none;
  overflow: hidden;
}

.particle-container::before,
.particle-container::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, rgba(94, 234, 212, 1), transparent);
  border-radius: 50%;
  animation: particle-float 8s ease-in-out infinite;
  --tx: 100px;
  --ty: -200px;
}

.particle-container::before {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.particle-container::after {
  top: 60%;
  left: 70%;
  animation-delay: 4s;
  --tx: -80px;
  --ty: -180px;
}

/* Marquee Effect */
.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 1rem;
}

.marquee-content {
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  min-width: 100%;
  animation: marquee 30s linear infinite;
}

.marquee:hover .marquee-content {
  animation-play-state: paused;
}

/* Enhanced Prose Styling for Readability */
.prose-custom {
  line-height: 1.75;
  letter-spacing: 0.01em;
}

.prose-custom p {
  margin-bottom: 1.25em;
  color: #d1d5db;
}

.prose-custom h3 {
  margin-top: 2em;
  margin-bottom: 1em;
  font-weight: 700;
  color: #5eead4;
  line-height: 1.3;
}

.prose-custom h4 {
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  font-weight: 600;
  color: #a5f3fc;
}

.prose-custom a {
  color: #2dd4bf;
  text-decoration: none;
  transition: color 0.2s;
}

.prose-custom a:hover {
  color: #5eead4;
}

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

.prose-custom li {
  margin-bottom: 0.5em;
  color: #d1d5db;
}

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

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

.prose h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: #5eead4;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.prose h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: #a5f3fc;
  margin-top: 1.75em;
  margin-bottom: 0.875em;
  line-height: 1.35;
}

.prose h4 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 600;
  color: #2dd4bf;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  line-height: 1.4;
}

.prose p {
  margin-bottom: 1.5em;
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  color: #d1d5db;
  line-height: 1.8;
}

.prose a {
  color: #2dd4bf;
  text-decoration: underline;
  text-decoration-color: rgba(45, 212, 191, 0.3);
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

.prose a:hover {
  color: #5eead4;
  text-decoration-color: rgba(94, 234, 212, 0.6);
}

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

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

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

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

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

.prose li::marker {
  color: #2dd4bf;
}

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

.prose blockquote {
  border-left: 4px solid #2dd4bf;
  padding-left: 1.25em;
  margin: 1.75em 0;
  font-style: italic;
  color: #9ca3af;
  background: rgba(45, 212, 191, 0.05);
  padding: 1em 1.25em;
  border-radius: 0.375rem;
}

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

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: clamp(0.875rem, 1.4vw, 1rem);
  overflow: hidden;
  border-radius: 0.5rem;
}

.prose thead {
  background: linear-gradient(135deg, #1a3d5c, #132847);
  border-bottom: 2px solid #2dd4bf;
}

.prose th {
  padding: 1em 1.25em;
  text-align: left;
  font-weight: 600;
  color: #5eead4;
  border-right: 1px solid rgba(45, 212, 191, 0.2);
}

.prose th:last-child {
  border-right: none;
}

.prose td {
  padding: 0.875em 1.25em;
  border-bottom: 1px solid rgba(45, 212, 191, 0.1);
  border-right: 1px solid rgba(45, 212, 191, 0.1);
  color: #d1d5db;
}

.prose td:last-child {
  border-right: none;
}

.prose tbody tr {
  background: rgba(19, 40, 71, 0.3);
  transition: background 0.2s ease;
}

.prose tbody tr:nth-child(even) {
  background: rgba(26, 61, 92, 0.3);
}

.prose tbody tr:hover {
  background: rgba(45, 212, 191, 0.08);
}

.prose code {
  background: rgba(26, 61, 92, 0.8);
  padding: 0.25em 0.5em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  color: #a5f3fc;
  border: 1px solid rgba(45, 212, 191, 0.2);
}

.prose pre {
  background: rgba(19, 40, 71, 0.8);
  padding: 1.25em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5em 0;
  border: 1px solid rgba(45, 212, 191, 0.2);
}

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

.prose hr {
  border: none;
  border-top: 2px solid rgba(45, 212, 191, 0.2);
  margin: 2.5em 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5em 0;
}

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

.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(26, 61, 92, 0.5);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(45, 212, 191, 0.5);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(45, 212, 191, 0.8);
}

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

/* Focus States for Accessibility */
a:focus,
button:focus,
summary:focus {
  outline: 2px solid #2dd4bf;
  outline-offset: 2px;
}

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

details[open] summary {
  color: #5eead4;
}

/* Image Loading Optimization */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Gradient Text Enhancement */
.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Northern Lights Glow Effect */
.northern-glow {
  position: relative;
}

.northern-glow::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.1), transparent 70%);
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

/* Card Hover Effects */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-4px);
}

/* Loading States */
.loading-shimmer {
  background: linear-gradient(90deg, rgba(19, 40, 71, 1) 0%, rgba(26, 61, 92, 1) 50%, rgba(19, 40, 71, 1) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
  .prose-custom {
    font-size: 0.95rem;
  }

  .particle-container::before,
  .particle-container::after {
    width: 3px;
    height: 3px;
  }
}

/* Mobile Optimization for Prose */
@media (max-width: 640px) {
  .prose {
    font-size: 0.9375rem;
  }

  .prose h2 {
    margin-top: 1.5em;
  }

  .prose h3 {
    margin-top: 1.25em;
  }

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

  .prose th,
  .prose td {
    padding: 0.625em 0.875em;
  }

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

/* Print Styles */
@media print {
  .particle-container,
  header,
  footer,
  .animate-glow,
  .animate-float {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }
}

/* Print Optimization for Prose */
@media print {
  .prose {
    color: #000;
  }

  .prose h2,
  .prose h3,
  .prose h4 {
    color: #000;
    page-break-after: avoid;
  }

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

  .prose a {
    color: #000;
    text-decoration: underline;
  }

  .prose table {
    page-break-inside: avoid;
  }
}
