/* Aurora Background Animation */
@keyframes aurora {
  0%, 100% {
    opacity: 0.3;
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: translateY(-2%) scale(1.05);
  }
}

.aurora-bg {
  background: radial-gradient(ellipse at 20% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 70%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 50%, rgba(192, 132, 252, 0.1) 0%, transparent 70%);
  animation: aurora 8s ease-in-out infinite;
}

/* Tilt Animation */
@keyframes tilt {
  0%, 100% {
    transform: rotate(-1deg);
  }
  50% {
    transform: rotate(1deg);
  }
}

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

/* Parallax Effect (using transform for performance) */
.parallax-slow {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Game Card Hover Effects */
.game-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 1rem 2rem rgba(139, 92, 246, 0.3);
}

/* Mobile Menu Styles */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.mobile-menu.active {
  max-height: 25rem;
}

body.menu-open {
  overflow: hidden;
}

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

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

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

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

.prose h3 {
  color: #d8b4fe;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.6em;
  margin-bottom: 0.8em;
  line-height: 1.4;
}

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

.prose p {
  margin-top: 0;
  margin-bottom: 1.25em;
  color: #d1d5db;
  font-size: 1.0625rem;
  line-height: 1.7;
}

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

.prose a {
  color: #a78bfa;
  text-decoration: underline;
  text-decoration-color: rgba(167, 139, 250, 0.4);
  text-underline-offset: 0.125em;
  transition: all 0.2s ease;
}

.prose a:hover {
  color: #c084fc;
  text-decoration-color: rgba(192, 132, 252, 0.7);
}

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

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

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  color: #d1d5db;
  line-height: 1.7;
}

.prose ul > li::marker {
  color: #a78bfa;
}

.prose ol > li::marker {
  color: #a78bfa;
  font-weight: 600;
}

.prose table {
  width: 100%;
  table-layout: auto;
  text-align: left;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.9375rem;
  line-height: 1.6;
  border-collapse: collapse;
  overflow-x: auto;
  display: block;
}

.prose thead {
  border-bottom: 0.125rem solid rgba(139, 92, 246, 0.4);
}

.prose thead th {
  color: #e9d5ff;
  font-weight: 600;
  vertical-align: bottom;
  padding: 0.75rem 1rem;
  background: rgba(139, 92, 246, 0.1);
}

.prose tbody tr {
  border-bottom: 0.0625rem solid rgba(139, 92, 246, 0.2);
}

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

.prose tbody tr:hover {
  background: rgba(139, 92, 246, 0.05);
}

.prose tbody td {
  vertical-align: baseline;
  padding: 0.75rem 1rem;
  color: #d1d5db;
}

.prose blockquote {
  font-style: italic;
  color: #e9d5ff;
  border-left: 0.25rem solid #8b5cf6;
  padding-left: 1.5em;
  margin-top: 1.6em;
  margin-bottom: 1.6em;
  background: rgba(139, 92, 246, 0.05);
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  border-radius: 0 0.5rem 0.5rem 0;
}

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

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin-top: 2em;
  margin-bottom: 2em;
  box-shadow: 0 0.625rem 1.875rem rgba(139, 92, 246, 0.2);
}

.prose code {
  color: #e9d5ff;
  font-size: 0.875em;
  font-weight: 600;
  background: rgba(139, 92, 246, 0.15);
  padding: 0.125em 0.375em;
  border-radius: 0.25rem;
}

.prose pre {
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.8);
  overflow-x: auto;
  font-size: 0.875em;
  line-height: 1.7;
  margin-top: 1.7em;
  margin-bottom: 1.7em;
  border-radius: 0.5rem;
  padding: 1em 1.25em;
  border: 0.0625rem solid rgba(139, 92, 246, 0.3);
}

.prose pre code {
  background: transparent;
  border-width: 0;
  border-radius: 0;
  padding: 0;
  font-weight: inherit;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.prose hr {
  border-color: rgba(139, 92, 246, 0.3);
  margin-top: 3em;
  margin-bottom: 3em;
}

/* Ensure readability - no dark text on dark backgrounds */
.prose {
  color: #e5e7eb;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .prose {
    font-size: 1rem;
  }
  
  .prose h2 {
    font-size: 1.5rem;
    margin-top: 1.5em;
  }
  
  .prose h3 {
    font-size: 1.25rem;
    margin-top: 1.4em;
  }
  
  .prose table {
    font-size: 0.875rem;
  }
  
  .prose thead th,
  .prose tbody td {
    padding: 0.5rem 0.75rem;
  }
}

/* Focus styles for accessibility */
a:focus,
button:focus {
  outline: 0.125rem solid #a78bfa;
  outline-offset: 0.125rem;
}

/* Text balance for better line breaks */
.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}
