/* =========================
   ANIMATIONS & KEYFRAMES
   ========================= */

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

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

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(118, 133, 203, 0.4), 0 0 40px rgba(118, 133, 203, 0.2); }
  50% { box-shadow: 0 0 30px rgba(118, 133, 203, 0.6), 0 0 60px rgba(118, 133, 203, 0.3); }
}

@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; }
}

@keyframes parallax {
  0% { transform: translateY(0); }
  100% { transform: translateY(50px); }
}

.animate-shimmer {
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

.glow-ring {
  animation: glow 2s ease-in-out infinite;
}

.parallax-text {
  animation: parallax 20s ease-in-out infinite alternate;
}

/* Particle System */
.particles-container {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.particles-container::before,
.particles-container::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  background: radial-gradient(circle, rgba(182, 197, 229, 0.8), transparent);
  border-radius: 50%;
  --tx: 100vw;
  --ty: -100vh;
  animation: particle-float 15s infinite;
}

.particles-container::before {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
  --tx: 80vw;
  --ty: -90vh;
}

.particles-container::after {
  top: 60%;
  left: 70%;
  animation-delay: 3s;
  --tx: -70vw;
  --ty: -110vh;
}

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

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

/* =========================
   PROSE STYLING
   ========================= */

.prose {
  color: #e2e8f0;
  max-width: 100%;
}

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

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

.prose h4 {
  color: #7685cb;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.4em;
  margin-bottom: 0.6em;
  line-height: 1.4;
}

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

.prose a {
  color: #7685cb;
  text-decoration: underline;
  text-decoration-color: rgba(118, 133, 203, 0.4);
  transition: all 0.2s ease;
  font-weight: 500;
}

.prose a:hover {
  color: #616bbd;
  text-decoration-color: rgba(97, 107, 189, 0.8);
}

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

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

/* Lists */
.prose ul,
.prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.75em;
}

.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.75;
  color: #cbd5e1;
}

.prose li::marker {
  color: #7685cb;
}

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

/* Tables */
.prose table {
  width: 100%;
  max-width: 100%;
  margin-top: 2em;
  margin-bottom: 2em;
  border-collapse: collapse;
  font-size: 0.9375rem;
  border: 1px solid rgba(118, 133, 203, 0.3);
  border-radius: 0.75rem;
  overflow: hidden;
}

.prose thead {
  background: rgba(118, 133, 203, 0.2);
  border-bottom: 2px solid rgba(118, 133, 203, 0.4);
}

.prose thead th {
  padding: 0.875rem 1rem;
  font-weight: 600;
  text-align: left;
  color: #b6c5e5;
  border-bottom: 1px solid rgba(118, 133, 203, 0.3);
}

.prose tbody tr {
  border-bottom: 1px solid rgba(118, 133, 203, 0.2);
  transition: background-color 0.2s ease;
}

.prose tbody tr:hover {
  background: rgba(118, 133, 203, 0.1);
}

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

.prose td {
  padding: 0.875rem 1rem;
  color: #cbd5e1;
  vertical-align: top;
}

.prose th {
  font-weight: 600;
}

/* Table responsive wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5em 0;
  border-radius: 0.75rem;
}

/* Blockquotes */
.prose blockquote {
  margin-top: 1.6em;
  margin-bottom: 1.6em;
  padding-left: 1.5em;
  border-left: 0.25rem solid #7685cb;
  font-style: italic;
  color: #94a4d7;
  background: rgba(118, 133, 203, 0.05);
  padding: 1.25rem 1.5rem;
  border-radius: 0.5rem;
}

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

/* Code */
.prose code {
  color: #94a4d7;
  font-size: 0.9em;
  font-weight: 500;
  background: rgba(118, 133, 203, 0.15);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-family: 'Courier New', Courier, monospace;
}

.prose pre {
  margin-top: 1.75em;
  margin-bottom: 1.75em;
  padding: 1.25em;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(118, 133, 203, 0.3);
  border-radius: 0.5rem;
  overflow-x: auto;
}

.prose pre code {
  background: transparent;
  padding: 0;
  color: #cbd5e1;
  font-size: 0.875rem;
  line-height: 1.7;
}

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

/* Horizontal Rules */
.prose hr {
  margin-top: 3em;
  margin-bottom: 3em;
  border: none;
  border-top: 1px solid rgba(118, 133, 203, 0.3);
}

/* First Paragraph Special Styling */
.prose > p:first-of-type {
  font-size: 1.125rem;
  color: #e2e8f0;
  line-height: 1.8;
}

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

/* Ensure readability - prevent dark on dark or light on light */
.prose * {
  color: inherit;
}

/* Fix nested color inheritance */
.prose ul li,
.prose ol li,
.prose table td,
.prose table th {
  color: inherit;
}
