/* =====================================================
   Go4casino Custom Styles
   Racing Car Theme with Parallax & Glow Animations
   ===================================================== */

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

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

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

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

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

/* Hide scrollbar for carousel */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* =====================================================
   ANIMATION 1: Parallax Effect
   ===================================================== */

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

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

/* Alternate parallax speed for variety */
.parallax-element:nth-child(even) {
  animation-duration: 8s;
}

/* =====================================================
   ANIMATION 2: Pulsating Glow (CTA Elements)
   ===================================================== */

@keyframes cta-glow-pulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.5), 0 0 40px rgba(220, 38, 38, 0.3), 0 0 60px rgba(220, 38, 38, 0.1);
  }
  50% {
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.8), 0 0 60px rgba(220, 38, 38, 0.5), 0 0 90px rgba(220, 38, 38, 0.3);
  }
}

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

/* =====================================================
   Prose Styling for Readability
   ===================================================== */

.prose-custom {
  font-size: 1rem;
  line-height: 1.75;
  color: #d1d5db;
}

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

.prose-custom h1,
.prose-custom h2,
.prose-custom h3,
.prose-custom h4 {
  color: #ffffff;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

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

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

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

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

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

.prose-custom li {
  margin-bottom: 0.5rem;
  color: #d1d5db;
}

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

.prose-custom a {
  color: #dc2626;
  text-decoration: underline;
  transition: color 0.2s;
}

.prose-custom a:hover {
  color: #b91c1c;
}

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

.prose-custom code {
  background-color: #374151;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  color: #fca5a5;
}

.prose-custom pre {
  background-color: #1f2937;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.prose-custom pre code {
  background-color: transparent;
  padding: 0;
}

.prose-custom table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.prose-custom th,
.prose-custom td {
  padding: 0.75rem;
  border: 1px solid #374151;
  text-align: left;
}

.prose-custom th {
  background-color: #1f2937;
  color: #ffffff;
  font-weight: 700;
}

.prose-custom tr:hover {
  background-color: #1f2937;
}

/* =====================================================
   Additional Racing Theme Elements
   ===================================================== */

/* Racing Stripes Background Pattern */
.racing-stripes {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(220, 38, 38, 0.05) 10px,
    rgba(220, 38, 38, 0.05) 20px
  );
}

/* Speed Lines Effect */
@keyframes speed-lines {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.speed-lines::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(220, 38, 38, 0.1) 50%, transparent 100%);
  animation: speed-lines 3s linear infinite;
  pointer-events: none;
}

/* Checkered Flag Pattern (Optional) */
.checkered-flag {
  background-image: linear-gradient(45deg, #1f2937 25%, transparent 25%),
    linear-gradient(-45deg, #1f2937 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #1f2937 75%),
    linear-gradient(-45deg, transparent 75%, #1f2937 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Gradient Text for Headings */
.gradient-text {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Card Hover Effect */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
}

/* Button Press Effect */
.btn-press:active {
  transform: scale(0.95);
}

/* Shimmer Effect for Loading */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(90deg, #1f2937 0%, #374151 50%, #1f2937 100%);
  background-size: 1000px 100%;
  animation: shimmer 2s 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;
}

/* Pulse Animation for Badges */
@keyframes badge-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

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

/* Neon Border Effect */
.neon-border {
  border: 2px solid #dc2626;
  box-shadow: 0 0 5px #dc2626, inset 0 0 5px #dc2626;
}

.neon-border:hover {
  box-shadow: 0 0 10px #dc2626, 0 0 20px #dc2626, inset 0 0 10px #dc2626;
}

/* Countdown Number Animation */
@keyframes countdown-fade {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.countdown-number {
  animation: countdown-fade 1s ease-in-out;
}

/* Mobile Menu Overlay */
@media (max-width: 768px) {
  #mobile-menu {
    backdrop-filter: blur(10px);
  }
}

/* Responsive Text Balance */
@supports (text-wrap: balance) {
  h1,
  h2,
  h3 {
    text-wrap: balance;
  }
}

@supports (text-wrap: pretty) {
  p {
    text-wrap: pretty;
  }
}

/* Focus Visible for Accessibility */
*:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
  border-radius: 0.25rem;
}

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

  .text-gray-300 {
    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;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Print Styles */
@media print {
  .no-print,
  header,
  footer,
  #sticky-cta,
  button,
  nav {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }
}

/* Custom Selection Color */
::selection {
  background-color: #dc2626;
  color: #ffffff;
}

::-moz-selection {
  background-color: #dc2626;
  color: #ffffff;
}

/* Loading Spinner Utility */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  border: 3px solid rgba(220, 38, 38, 0.3);
  border-top-color: #dc2626;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

/* Grid Gap Utilities for Older Browsers */
@supports not (gap: 1rem) {
  .grid > * {
    margin: 0.5rem;
  }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
  body {
    color-scheme: dark;
  }
}

/* =====================================================
   Performance Optimizations
   ===================================================== */

/* GPU Acceleration for Animations */
.parallax-element,
.cta-glow {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Prevent Layout Shift */
img {
  max-width: 100%;
  height: auto;
}

/* Aspect Ratio Utility */
.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-square {
  aspect-ratio: 1 / 1;
}

/* Container Query Support (Future-proofing) */
@container (min-width: 768px) {
  .container-responsive {
    grid-template-columns: repeat(2, 1fr);
  }
}
