/* Custom animations and styling */

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

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

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes bounce-in {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slide-up {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes rotate-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes tilt {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

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

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

.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  background-size: 1000px 100%;
  animation: shimmer 3s infinite;
}

.animate-bounce-in {
  animation: bounce-in 0.6s ease-out;
}

.animate-slide-up {
  animation: slide-up 0.8s ease-out;
}

.animate-rotate-slow {
  animation: rotate-slow 20s linear infinite;
}

.animate-marquee {
  animation: marquee 30s linear infinite;
}

.animate-tilt {
  animation: tilt 4s ease-in-out infinite;
}

/* Prose styling */
.prose {
  max-width: 65ch;
  line-height: 1.7;
}

.prose h2 {
  margin-top: 2em;
  margin-bottom: 1em;
  font-weight: 700;
  font-size: 1.75rem;
}

.prose h3 {
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  font-weight: 600;
  font-size: 1.5rem;
}

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

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

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

.prose strong {
  font-weight: 600;
}

/* Custom gradient backgrounds */
.bg-pink-gradient {
  background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
}

.bg-yellow-gradient {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.bg-candy-gradient {
  background: linear-gradient(135deg, #ff1493 0%, #ff69b4 50%, #ffd700 100%);
}

/* Puffy button effect */
.btn-puffy {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition: all 0.3s ease;
}

.btn-puffy:before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.5s ease;
}

.btn-puffy:hover:before {
  transform: scale(1);
}

.btn-puffy:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Glass morphism */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

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

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

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

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

/* Pattern background */
.pattern-bg {
  background-color: #ff1493;
  background-image: radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 105, 180, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(255, 237, 78, 0.2) 0%, transparent 50%);
}

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

.card-hover:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Countdown animation */
.countdown-fade {
  animation: bounce-in 0.5s ease-out;
}

/* Games Grid Styling */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .games-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* Game Card Styling */
.game-card {
  position: relative;
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 40px rgba(255, 20, 147, 0.3), 0 0 30px rgba(255, 215, 0, 0.2);
}

.game-card:hover::before {
  opacity: 1;
}

.game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 20, 147, 0.1) 0%, rgba(255, 215, 0, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.game-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.game-card:hover img {
  transform: scale(1.1);
}

.game-card h4 {
  margin: 1rem 1.25rem 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
}

.game-card:hover h4 {
  color: #ff1493;
}

.game-card .provider {
  margin: 0 1.25rem 1rem;
  font-size: 0.875rem;
  color: #666;
  font-weight: 500;
  position: relative;
  z-index: 2;
}

.game-card .badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0.4rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
  z-index: 3;
  transition: all 0.3s ease;
  animation: pulse-glow 3s ease-in-out infinite;
}

.game-card:hover .badge {
  transform: scale(1.1);
  background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(255, 20, 147, 0.5);
}

/* Badge variants */
.game-card .badge.bonus-buy {
  background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
  color: #ffffff;
}

.game-card .badge.high-rtp {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  color: #ffffff;
}

.game-card .badge.jackpot {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #1a1a1a;
}

.game-card .badge.classic {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #ffffff;
}

.game-card .badge.cluster-pays {
  background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
  color: #ffffff;
}

.game-card .badge.free-spins {
  background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
  color: #ffffff;
}

.game-card .play-btn {
  display: block;
  margin: auto 1.25rem 1.25rem;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
  color: #ffffff;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.game-card .play-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.game-card:hover .play-btn {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 20, 147, 0.5);
  background: linear-gradient(135deg, #ff69b4 0%, #ffd700 100%);
}

.game-card:hover .play-btn::before {
  left: 100%;
}

.game-card .play-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
}

/* Loading skeleton for game cards */
.game-card.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  pointer-events: none;
}

.game-card.skeleton img,
.game-card.skeleton h4,
.game-card.skeleton .provider,
.game-card.skeleton .badge,
.game-card.skeleton .play-btn {
  opacity: 0;
}

/* Accessibility improvements */
.game-card:focus-within {
  outline: 3px solid #ff1493;
  outline-offset: 4px;
}

.game-card .play-btn:focus {
  outline: 2px solid #ffd700;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .games-grid {
    display: block;
  }
  
  .game-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 1rem;
  }
  
  .game-card:hover {
    transform: none;
    box-shadow: none;
  }
}