/* Keyframe Animations */
@keyframes glow-pulse {
  0%,
  100% {
    text-shadow: 0 0 20px #ffd700, 0 0 40px #ffd700, 0 0 60px #ffd700;
  }
  50% {
    text-shadow: 0 0 30px #ffd700, 0 0 60px #ffd700, 0 0 90px #ffd700;
  }
}

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

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5), 0 0 40px rgba(255, 0, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 0, 255, 0.8), 0 0 80px rgba(255, 0, 255, 0.5);
  }
}

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

/* Utility Classes */
.glow-text {
  animation: glow-pulse 2s ease-in-out infinite;
}

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

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

/* Marquee */
.marquee-container {
  position: relative;
  width: 100%;
}

.marquee-content {
  animation: marquee 30s linear infinite;
  width: max-content;
}

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

/* Casino Pattern Background */
.casino-pattern {
  background-image: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 35px,
      rgba(255, 215, 0, 0.1) 35px,
      rgba(255, 215, 0, 0.1) 70px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 35px,
      rgba(255, 0, 255, 0.1) 35px,
      rgba(255, 0, 255, 0.1) 70px
    );
}

/* Parallax */
.parallax {
  transition: transform 0.1s ease-out;
  will-change: transform;
}

/* Enhanced prose styling for markdown content with proper contrast and responsive typography */
.prose-custom {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.75;
  color: #e5e5e5;
  max-width: 100%;
}

.prose-custom > * {
  max-width: 100%;
}

/* Paragraphs */
.prose-custom p {
  margin-bottom: 1.5em;
  color: #e5e5e5;
  line-height: 1.8;
}

.prose-custom p:first-of-type {
  font-size: 1.1em;
  line-height: 1.7;
}

/* Headings */
.prose-custom h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: #ffd700;
  margin-top: 2.5em;
  margin-bottom: 1em;
  line-height: 1.3;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  letter-spacing: -0.02em;
}

.prose-custom h2:first-child {
  margin-top: 0;
}

.prose-custom h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 700;
  color: #ff1493;
  margin-top: 2em;
  margin-bottom: 0.75em;
  line-height: 1.4;
  text-shadow: 0 0 15px rgba(255, 20, 147, 0.3);
}

.prose-custom h4 {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  font-weight: 600;
  color: #ff007f;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.5;
}

/* Links */
.prose-custom a {
  color: #ffd700;
  text-decoration: underline;
  text-decoration-color: rgba(255, 215, 0, 0.4);
  text-underline-offset: 0.2em;
  transition: all 0.3s ease;
  font-weight: 500;
}

.prose-custom a:hover {
  color: #ff00ff;
  text-decoration-color: #ff00ff;
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

/* Strong and Emphasis */
.prose-custom strong {
  font-weight: 700;
  color: #ffd700;
}

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

/* Lists */
.prose-custom ul,
.prose-custom ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

.prose-custom ul {
  list-style-type: disc;
}

.prose-custom ol {
  list-style-type: decimal;
}

.prose-custom li {
  margin-bottom: 0.5em;
  line-height: 1.7;
  color: #e5e5e5;
  padding-left: 0.5em;
}

.prose-custom li::marker {
  color: #ffd700;
  font-weight: 700;
}

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

/* Nested lists */
.prose-custom ul ul {
  list-style-type: circle;
}

.prose-custom ul ul ul {
  list-style-type: square;
}

/* Tables */
.prose-custom table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.95em;
  background-color: rgba(26, 26, 26, 0.8);
  border: 2px solid rgba(255, 215, 0, 0.3);
}

.prose-custom th,
.prose-custom td {
  padding: 0.875rem;
  text-align: left;
  border: 1px solid rgba(255, 215, 0, 0.2);
  vertical-align: top;
}

.prose-custom th {
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.3), rgba(255, 20, 147, 0.3));
  color: #ffd700;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #ffd700;
}

.prose-custom td {
  color: #e5e5e5;
  background-color: rgba(10, 10, 10, 0.5);
}

.prose-custom tbody tr:hover td {
  background-color: rgba(255, 215, 0, 0.05);
}

/* Table Responsive Wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2em 0;
  max-width: 100%;
  border-radius: 0.5rem;
}

.table-responsive table {
  margin: 0;
}

/* Blockquotes */
.prose-custom blockquote {
  margin: 2em 0;
  padding: 1.5em;
  border-left: 4px solid #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 0, 255, 0.1));
  font-style: italic;
  color: #f5f5f5;
  position: relative;
  border-radius: 0 0.5rem 0.5rem 0;
}

.prose-custom blockquote p {
  margin-bottom: 0.5em;
}

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

.prose-custom blockquote::before {
  content: '"';
  font-size: 4em;
  color: rgba(255, 215, 0, 0.2);
  position: absolute;
  top: -0.2em;
  left: 0.2em;
  font-family: Georgia, serif;
  line-height: 1;
}

/* Images */
.prose-custom img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2em auto;
  border-radius: 0.75rem;
  border: 3px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 10px 40px rgba(255, 0, 255, 0.3), 0 0 20px rgba(255, 215, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prose-custom img:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 60px rgba(255, 0, 255, 0.5), 0 0 30px rgba(255, 215, 0, 0.4);
}

/* Code blocks */
.prose-custom code {
  background-color: rgba(255, 215, 0, 0.1);
  color: #ff1493;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: "Courier New", monospace;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.prose-custom pre {
  background-color: rgba(10, 10, 10, 0.8);
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 0.5rem;
  padding: 1.5em;
  overflow-x: auto;
  margin: 2em 0;
}

.prose-custom pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e5e5e5;
  font-size: 0.875em;
}

/* Horizontal Rule */
.prose-custom hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffd700, #ff00ff, transparent);
  margin: 3em 0;
  opacity: 0.5;
}

/* First Letter Drop Cap (optional enhancement) */
.prose-custom > p:first-of-type::first-letter {
  font-size: 3.5em;
  line-height: 0.9;
  float: left;
  margin: 0.1em 0.1em 0 0;
  color: #ffd700;
  font-weight: 800;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .prose-custom {
    font-size: 1rem;
  }

  .prose-custom h2 {
    margin-top: 2em;
  }

  .prose-custom h3 {
    margin-top: 1.5em;
  }

  .prose-custom th,
  .prose-custom td {
    padding: 0.625rem;
    font-size: 0.9em;
  }

  .prose-custom blockquote {
    padding: 1em;
    margin: 1.5em 0;
  }

  .prose-custom > p:first-of-type::first-letter {
    font-size: 2.5em;
  }
}

@media (max-width: 480px) {
  .prose-custom ul,
  .prose-custom ol {
    padding-left: 1.25em;
  }

  .prose-custom th,
  .prose-custom td {
    padding: 0.5rem;
    font-size: 0.85em;
  }
}

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

/* Prevent Horizontal Overflow */
html,
body {
  overflow-x: clip;
  max-width: 100vw;
}

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

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #ffd700, #ff00ff);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #ff00ff, #ffd700);
}
