/* Custom Animations and Styles */

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(9, 100, 249, 0.5);
  }
  50% {
    box-shadow: 0 0 30px rgba(9, 100, 249, 0.8);
  }
}

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

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

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

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

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

/* Dragon Pattern Background */
.dragon-pattern {
  background-image: radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(255, 255, 255, 0.03) 10px,
      rgba(255, 255, 255, 0.03) 20px
    );
}

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

/* Prose Styling for Readability */
.prose {
  color: #374151;
  line-height: 1.75;
}

.prose h2 {
  font-weight: 800;
  font-size: 1.875rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #111827;
}

.prose h3 {
  font-weight: 700;
  font-size: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #1f2937;
}

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

.prose a {
  color: #0964f9;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.3s ease;
}

.prose a:hover {
  color: #0747b8;
}

/* Standalone CTA links (paragraph links) */
.prose > p > a[href*="/play"],
.prose > p > a[href*="Play Now"],
.prose > p > a[href*="Bet Now"],
.prose > p > a[href*="Start"],
.prose > p > a[href*="Explore"] {
  display: inline-block;
  background: linear-gradient(135deg, #0964f9, #667eea);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 9999px;
  font-weight: 700;
  text-decoration: none;
  margin: 1.5rem 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(9, 100, 249, 0.3);
}

.prose > p > a[href*="/play"]:hover,
.prose > p > a[href*="Play Now"]:hover,
.prose > p > a[href*="Bet Now"]:hover,
.prose > p > a[href*="Start"]:hover,
.prose > p > a[href*="Explore"]:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(9, 100, 249, 0.4);
  background: linear-gradient(135deg, #0747b8, #5568d3);
  color: white;
}

.prose ul,
.prose ol {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

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

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

.prose blockquote {
  border-left: 4px solid #0964f9;
  padding-left: 1rem;
  font-style: italic;
  color: #4b5563;
  margin: 1.5rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.prose thead {
  background: #0964f9;
  color: white;
}

.prose th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
}

.prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.prose tbody tr:hover {
  background: #f9fafb;
}

.prose img {
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  margin: 2rem 0;
}

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

.games-grid > div {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.games-grid > div:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(9, 100, 249, 0.2);
  border-color: #0964f9;
}

.games-grid h3 {
  color: #0964f9;
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.games-grid p {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.games-grid strong {
  color: #1f2937;
  font-weight: 700;
  display: inline-block;
  min-width: 80px;
}

.games-grid a {
  display: inline-block;
  background: linear-gradient(135deg, #0964f9, #667eea);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 700;
  text-decoration: none;
  margin-top: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(9, 100, 249, 0.3);
}

.games-grid a:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(9, 100, 249, 0.4);
  background: linear-gradient(135deg, #0747b8, #5568d3);
}

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

/* Store Grid Layout */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.store-grid > div {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
}

.store-grid > div:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(9, 100, 249, 0.2);
  border-color: #0964f9;
}

.store-grid h3 {
  color: #0964f9;
  font-size: 1.75rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 1rem;
}

.store-grid p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.store-grid strong {
  color: #1f2937;
  font-weight: 700;
}

.store-grid ul {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0;
}

.store-grid li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
}

.store-grid li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
}

.store-grid a {
  display: inline-block;
  background: linear-gradient(135deg, #0964f9, #667eea);
  color: white;
  padding: 0.875rem 2.5rem;
  border-radius: 9999px;
  font-weight: 700;
  text-decoration: none;
  margin-top: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(9, 100, 249, 0.3);
}

.store-grid a:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(9, 100, 249, 0.4);
  background: linear-gradient(135deg, #0747b8, #5568d3);
}

.store-grid hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .store-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Challenges Grid Layout */
.challenges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.challenges-grid > div {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 2px solid #0964f9;
  position: relative;
  overflow: hidden;
}

.challenges-grid > div::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0964f9, #667eea, #0964f9);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

.challenges-grid > div:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(9, 100, 249, 0.3);
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
}

.challenges-grid h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 1rem;
  color: #0964f9;
}

.challenges-grid p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.challenges-grid strong {
  color: #1f2937;
  font-weight: 700;
  display: inline-block;
}

.challenges-grid ul {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0;
  background: #f0f9ff;
  border-radius: 0.5rem;
  padding: 1rem;
}

.challenges-grid li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

.challenges-grid li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
}

.challenges-grid a {
  display: inline-block;
  background: linear-gradient(135deg, #0964f9, #667eea);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 700;
  text-decoration: none;
  margin-top: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(9, 100, 249, 0.3);
}

.challenges-grid a:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(9, 100, 249, 0.4);
  background: linear-gradient(135deg, #0747b8, #5568d3);
}

.challenges-grid hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1.5rem 0;
}

/* Inactive Challenges Styling */
.challenges-grid.inactive > div {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-color: #9ca3af;
  opacity: 0.7;
  filter: grayscale(60%);
}

.challenges-grid.inactive > div::before {
  background: #9ca3af;
  animation: none;
}

.challenges-grid.inactive > div:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  opacity: 0.8;
}

.challenges-grid.inactive h3 {
  color: #6b7280;
}

.challenges-grid.inactive strong {
  color: #4b5563;
}

.challenges-grid.inactive p {
  color: #6b7280;
}

.challenges-grid.inactive ul {
  background: #e5e7eb;
}

.challenges-grid.inactive li {
  color: #6b7280;
}

.challenges-grid.inactive li:before {
  color: #9ca3af;
  content: "🔒";
}

.challenges-grid.inactive a {
  background: #9ca3af;
  pointer-events: none;
  cursor: not-allowed;
}

.challenges-grid.inactive a:hover {
  transform: none;
  box-shadow: 0 4px 6px rgba(156, 163, 175, 0.3);
}

@media (max-width: 768px) {
  .challenges-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #0747b8;
}

/* Gradient Text Effect */
.gradient-text {
  background: linear-gradient(135deg, #0964f9 0%, #667eea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

/* Button Ripple Effect */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

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

.shimmer {
  background: linear-gradient(to right, #ebecff 0%, #ffffff 50%, #ebecff 100%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

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

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

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

/* Focus Styles for Accessibility */
a:focus,
button:focus {
  outline: 2px solid #0964f9;
  outline-offset: 2px;
}

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