/* Custom Animations & Overrides */

/* Prevent horizontal scrolling */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Ensure all containers stay within viewport */
* {
  max-width: 100%;
  box-sizing: border-box;
}

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

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

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

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

.marquee-content > * {
  flex-shrink: 0;
}

/* Island Navigation */
.island-nav {
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

/* Prose Styling for Readability */
.prose-custom {
  line-height: 1.7;
}

.prose-custom h1,
.prose-custom h2,
.prose-custom h3,
.prose-custom h4 {
  line-height: 1.3;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

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

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

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

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

.prose-custom a:hover {
  color: #a78bfa;
  text-decoration: underline;
}

.prose-custom strong {
  font-weight: 700;
  color: #f59e0b;
}

.prose-custom code {
  background-color: rgba(139, 92, 246, 0.1);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

.prose-custom blockquote {
  border-left: 4px solid #8b5cf6;
  padding-left: 1em;
  margin-left: 0;
  font-style: italic;
  color: #9ca3af;
}

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

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

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

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

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

/* Focus States */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

/* Loading Animation */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Glow Effect */
.glow {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

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

  .prose-custom h1 {
    font-size: 2rem;
  }

  .prose-custom h2 {
    font-size: 1.5rem;
  }

  .prose-custom h3 {
    font-size: 1.25rem;
  }

  /* Ensure mobile elements don't overflow */
  .container {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Mobile-specific marquee adjustments */
  .marquee-content {
    animation-duration: 20s;
  }

  /* Prevent any grid items from overflowing */
  .grid > * {
    min-width: 0;
    overflow: hidden;
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .bg-casino-dark {
    background-color: #000000;
  }

  .text-gray-400 {
    color: #ffffff;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
