/* Custom Animations and Styles for WonderLuck Casino */

/* Base Styles */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}

/* Prevent horizontal scroll */
* {
  box-sizing: border-box;
}

.container {
  max-width: 100%;
  overflow-x: hidden;
}

/* Navigation Styles */
.nav-link {
  @apply text-gray-700 hover:text-primary-blue transition-colors duration-300 font-medium;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #004bde, #4a6c7b);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* 3D Text Effect - Simplified for mobile */
.text-3d {
  text-shadow: 1px 1px 0 #004bde, 2px 2px 0 #4a6c7b, 3px 3px 0 #193416, 4px 4px 8px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .text-3d {
    transform: perspective(500px) rotateX(15deg);
  }
}

/* Glow Effects - Reduced for mobile */
.glow-effect {
  box-shadow: 0 0 10px rgba(0, 75, 222, 0.2);
}

@media (min-width: 768px) {
  .glow-effect {
    box-shadow: 0 0 20px rgba(0, 75, 222, 0.3);
    animation: pulse-glow 2s infinite alternate;
  }
}

.glow-button {
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .glow-button {
    box-shadow: 0 0 30px rgba(0, 75, 222, 0.4);
  }

  .glow-button::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
  }

  .glow-button:hover::before {
    animation: shine 0.6s ease-in-out;
    opacity: 1;
  }
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 20px rgba(0, 75, 222, 0.3);
  }
  100% {
    box-shadow: 0 0 30px rgba(0, 75, 222, 0.6);
  }
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

/* Floating Animations - Hidden on mobile to prevent overflow */
.floating-card,
.floating-dice,
.floating-chip,
.floating-star,
.floating-diamond {
  display: none;
}

@media (min-width: 768px) {
  .floating-card,
  .floating-dice,
  .floating-chip,
  .floating-star,
  .floating-diamond {
    display: block;
    position: absolute;
    z-index: 1;
  }

  .floating-card {
    animation: float-card 6s ease-in-out infinite;
  }

  .floating-dice {
    animation: float-dice 4s ease-in-out infinite;
  }

  .floating-chip {
    animation: float-chip 5s ease-in-out infinite;
  }

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

  .floating-diamond {
    animation: float-diamond 7s ease-in-out infinite;
  }
}

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

@keyframes float-dice {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(-5deg);
  }
}

@keyframes float-chip {
  0%,
  100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.1);
  }
}

@keyframes float-star {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-25px) rotate(180deg) scale(1.2);
  }
}

@keyframes float-diamond {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-30px) rotate(10deg);
  }
}

/* Spotlight Effects - Hidden on mobile */
.spotlight {
  display: none;
}

@media (min-width: 768px) {
  .spotlight {
    display: block;
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 75, 222, 0.1) 0%, transparent 70%);
    animation: spotlight-move 10s linear infinite;
    z-index: 1;
  }

  .spotlight-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
  }

  .spotlight-2 {
    bottom: 20%;
    right: 15%;
    animation-delay: -5s;
  }
}

@keyframes spotlight-move {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(50px, 25px);
  }
  50% {
    transform: translate(-25px, 50px);
  }
  75% {
    transform: translate(-50px, -25px);
  }
  100% {
    transform: translate(0, 0);
  }
}

/* Bonus Box Animation */
.bonus-box {
  position: relative;
  overflow: hidden;
}

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

.animate-shimmer {
  animation: shimmer 2s infinite;
}

/* Step Cards */
.step-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

@media (min-width: 768px) {
  .step-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 75, 222, 0.05), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
  }

  .step-card:hover::before {
    opacity: 1;
    animation: step-shine 1s ease-in-out;
  }

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

@keyframes step-shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.step-icon {
  transition: transform 0.3s ease;
}

@media (min-width: 768px) {
  .step-icon {
    animation: icon-bounce 2s infinite;
  }
}

@keyframes icon-bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Game Cards */
.game-card {
  transition: all 0.3s ease;
}

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

.game-overlay {
  backdrop-filter: blur(2px);
}

/* VIP Levels */
.vip-level {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .vip-level::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
  }

  .vip-level:hover::before {
    opacity: 1;
    animation: vip-shine 1s ease-in-out;
  }

  .vip-level:hover {
    transform: translateY(-3px) scale(1.02);
  }
}

@keyframes vip-shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

/* Promo Cards */
.promo-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

@media (min-width: 768px) {
  .promo-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
  }

  .promo-card:hover::after {
    left: 100%;
  }

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

/* Trust Badges */
.trust-badge {
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .trust-badge:hover {
    transform: translateY(-2px);
  }

  .trust-badge .w-16 {
    animation: trust-pulse 3s infinite;
  }
}

@keyframes trust-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* FAQ Items */
.faq-item {
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

@media (min-width: 768px) {
  .faq-item:hover {
    border-left-color: #004bde;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }
}

/* Hero Image Container - Simplified for mobile */
.hero-image-container {
  position: relative;
}

@media (min-width: 768px) {
  .hero-image-container::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #004bde, #4a6c7b, #d5c39d, #193416);
    border-radius: 20px;
    z-index: -1;
  }
}

@keyframes gradient-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Provider Cards */
.provider-card {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

@media (min-width: 768px) {
  .provider-card:hover {
    border-color: #004bde;
    transform: translateY(-2px);
  }
}

/* Mobile-specific fixes */
@media (max-width: 767px) {
  /* Ensure no horizontal overflow */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Simplify hero section for mobile */
  .hero-section {
    padding-top: 6rem;
    padding-bottom: 3rem;
  }

  /* Reduce text sizes on mobile */
  .text-4xl {
    font-size: 2rem;
  }

  .text-6xl {
    font-size: 2.5rem;
  }

  .text-7xl {
    font-size: 3rem;
  }

  /* Stack hero content vertically on mobile */
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Reduce padding on mobile */
  .py-20 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  /* Fix button sizes on mobile */
  .cta-button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  /* Ensure images don't overflow */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Fix grid layouts on mobile */
  .grid-cols-6 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Reduce spacing on mobile */
  .space-y-8 > * + * {
    margin-top: 1.5rem;
  }

  .gap-8 {
    gap: 1rem;
  }

  .gap-12 {
    gap: 2rem;
  }
}

/* Gradient Text Animation */
.gradient-text {
  background: linear-gradient(-45deg, #004bde, #4a6c7b, #d5c39d, #193416);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 768px) {
  .gradient-text {
    animation: gradient-shift 4s ease infinite;
  }
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Loading Animation */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #004bde;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #004bde, #4a6c7b);
  transform-origin: left;
  z-index: 9999;
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #004bde, #4a6c7b);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #4a6c7b, #004bde);
}

/* Ensure no elements cause horizontal scroll */
.overflow-hidden {
  overflow: hidden;
}

/* Fix any potential width issues */
.w-full {
  width: 100%;
  max-width: 100%;
}

/* Performance optimizations for mobile */
@media (max-width: 767px) {
  * {
    animation-duration: 0.3s !important;
    animation-iteration-count: 1 !important;
  }

  .transform {
    transform: none !important;
  }

  .hover\:scale-105:hover {
    transform: none !important;
  }

  .hover\:shadow-2xl:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
  }
}

/* Print Styles */
@media print {
  .floating-card,
  .floating-dice,
  .floating-chip,
  .floating-star,
  .floating-diamond,
  .spotlight {
    display: none !important;
  }

  .glow-effect,
  .glow-button {
    box-shadow: none !important;
  }
}
