/* Animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.1);
  }
}

@keyframes float-delayed {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-30px) scale(1.05);
  }
}

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

@keyframes glow-pulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.6);
  }
}

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

.animate-float-delayed {
  animation: float-delayed 8s ease-in-out infinite;
  animation-delay: 1s;
}

.bonus-glow {
  animation: glow-pulse 3s ease-in-out infinite;
}

/* Parallax Effect */
.parallax-bg {
  transform: translateZ(-1px) scale(1.5);
  will-change: transform;
}

/* Marquee Pattern */
.marquee-pattern {
  background: repeating-linear-gradient(
    45deg,
    rgba(245, 158, 11, 0.05),
    rgba(245, 158, 11, 0.05) 10px,
    transparent 10px,
    transparent 20px
  );
  animation: marquee 20s linear infinite;
  width: 200%;
  height: 100%;
}

/* Prose Styling for Readability */
.prose {
  max-width: 100%;
  color: #e5e7eb;
  font-size: 1rem;
  line-height: 1.75;
}

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

.prose h3 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 2em;
  margin-bottom: 0.875em;
  color: #fbbf24;
}

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

/* First heading has no top margin */
.prose > h2:first-child,
.prose > h3:first-child {
  margin-top: 0;
}

/* Paragraphs */
.prose p {
  margin-top: 0;
  margin-bottom: 1.5em;
  color: #d1d5db;
  line-height: 1.75;
}

/* Links */
.prose a {
  color: #fbbf24;
  text-decoration: underline;
  text-decoration-color: rgba(251, 191, 36, 0.3);
  text-underline-offset: 0.2em;
  font-weight: 500;
  transition: all 0.2s ease;
}

.prose a:hover {
  color: #fcd34d;
  text-decoration-color: rgba(252, 211, 77, 0.6);
}

/* Strong/Bold */
.prose strong {
  color: #fcd34d;
  font-weight: 600;
}

/* Emphasis/Italic */
.prose em {
  font-style: italic;
  color: #e5e7eb;
}

/* Lists */
.prose ul {
  list-style-type: none;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 0;
}

.prose ul li {
  position: relative;
  padding-left: 1.75em;
  margin-bottom: 0.75em;
  color: #d1d5db;
  line-height: 1.75;
}

.prose ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: #f59e0b;
  font-weight: 700;
}

.prose ol {
  list-style-type: none;
  counter-reset: list-counter;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 0;
}

.prose ol li {
  position: relative;
  counter-increment: list-counter;
  padding-left: 2em;
  margin-bottom: 0.75em;
  color: #d1d5db;
  line-height: 1.75;
}

.prose ol li::before {
  content: counter(list-counter) ".";
  position: absolute;
  left: 0;
  color: #f59e0b;
  font-weight: 700;
}

/* Nested Lists */
.prose ul ul,
.prose ol ul,
.prose ul ol,
.prose ol ol {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}

/* Tables */
.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.9375rem;
  line-height: 1.6;
  overflow: hidden;
  border-radius: 0.5rem;
}

.prose thead {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(139, 92, 246, 0.15));
  border-bottom: 2px solid rgba(245, 158, 11, 0.3);
}

.prose th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #fcd34d;
  vertical-align: bottom;
}

.prose td {
  padding: 0.875rem 1rem;
  color: #d1d5db;
  border-bottom: 1px solid rgba(245, 158, 11, 0.1);
  vertical-align: top;
}

.prose tbody tr {
  background: rgba(26, 26, 26, 0.5);
  transition: background 0.2s ease;
}

.prose tbody tr:hover {
  background: rgba(245, 158, 11, 0.05);
}

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

/* Table Responsive Wrapper */
.prose .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 2em;
  margin-bottom: 2em;
  border-radius: 0.5rem;
}

/* Blockquotes */
.prose blockquote {
  position: relative;
  margin-top: 2em;
  margin-bottom: 2em;
  padding: 1.25em 1.5em;
  padding-left: 2em;
  background: rgba(139, 92, 246, 0.05);
  border-left: 0.25rem solid #8b5cf6;
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: #e5e7eb;
}

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

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

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

/* Code */
.prose code {
  padding: 0.2em 0.4em;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: #fbbf24;
  font-family: ui-monospace, monospace;
}

.prose pre {
  margin-top: 2em;
  margin-bottom: 2em;
  padding: 1.25em 1.5em;
  background: rgba(15, 15, 15, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 0.5rem;
  overflow-x: auto;
  font-size: 0.875em;
  line-height: 1.7;
}

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

/* Horizontal Rule */
.prose hr {
  margin-top: 3em;
  margin-bottom: 3em;
  border: none;
  border-top: 1px solid rgba(245, 158, 11, 0.2);
}

/* Responsive Typography */
@media (max-width: 640px) {
  .prose {
    font-size: 0.9375rem;
  }

  .prose h2 {
    font-size: 1.5rem;
    margin-top: 2em;
  }

  .prose h3 {
    font-size: 1.25rem;
    margin-top: 1.75em;
  }

  .prose h4 {
    font-size: 1.125rem;
    margin-top: 1.5em;
  }

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

  .prose th,
  .prose td {
    padding: 0.625rem 0.75rem;
  }
}

/* Ensure proper spacing for first and last elements */
.prose > *:first-child {
  margin-top: 0;
}

.prose > *:last-child {
  margin-bottom: 0;
}

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #f59e0b;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d97706;
}

/* Details/Summary Styling */
details summary::-webkit-details-marker {
  display: none;
}

details[open] summary {
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

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

/* Mobile Menu Transition */
#mobile-menu {
  transition: all 0.3s ease-in-out;
}

/* Hover Effects */
.group:hover .group-hover\:scale-110 {
  transform: scale(1.1);
}

/* Golden Motion Streaks */
.bg-chrome-dark::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(217, 119, 6, 0.1) 50%, transparent 100%);
  pointer-events: none;
  opacity: 0.3;
}
