/* Keyframes & Animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.8);
  }
}

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

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

@keyframes particle-float {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translate(100px, -100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Prose Styling for Readability */
.prose {
  max-width: 65ch;
  color: #d1d5db;
  line-height: 1.75;
}

.prose h1,
.prose h2,
.prose h3 {
  color: #f3f4f6;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 2em;
  margin-bottom: 1em;
}

.prose h1 {
  font-size: 2.25em;
}
.prose h2 {
  font-size: 1.875em;
}
.prose h3 {
  font-size: 1.5em;
}

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

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

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

.prose strong {
  color: #22c55e;
  font-weight: 600;
}

.prose a {
  color: #22c55e;
  text-decoration: underline;
  font-weight: 500;
}

.prose a:hover {
  color: #16a34a;
}

/* Custom Utility Classes */
.bg-tomb {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
  position: relative;
}

.bg-tomb::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(34, 197, 94, 0.03) 10px,
    rgba(34, 197, 94, 0.03) 20px
  );
  pointer-events: none;
}

.card-glow {
  background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-glow:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(34, 197, 94, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-primary {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  animation: pulse-glow 2s ease-in-out infinite;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  transform: scale(1.05);
}

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

.particle {
  position: fixed;
  width: 4px;
  height: 4px;
  background: #22c55e;
  border-radius: 50%;
  pointer-events: none;
  animation: particle-float 15s linear infinite;
  opacity: 0;
}

.particle:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
}
.particle:nth-child(2) {
  left: 20%;
  animation-delay: 2s;
}
.particle:nth-child(3) {
  left: 30%;
  animation-delay: 4s;
}
.particle:nth-child(4) {
  left: 40%;
  animation-delay: 6s;
}
.particle:nth-child(5) {
  left: 50%;
  animation-delay: 8s;
}
.particle:nth-child(6) {
  left: 60%;
  animation-delay: 10s;
}
.particle:nth-child(7) {
  left: 70%;
  animation-delay: 12s;
}
.particle:nth-child(8) {
  left: 80%;
  animation-delay: 14s;
}

.shimmer-effect {
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.2), transparent);
  background-size: 1000px 100%;
  animation: shimmer 3s infinite;
}

.tilt-card {
  animation: tilt 5s ease-in-out infinite;
}

/* Mobile Menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.mobile-menu.open {
  transform: translateX(0);
  overflow: hidden;
}

/* Prevent scrolling when mobile menu is open */
body.menu-open {
  overflow: hidden;
}

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

/* Game Grid */
.game-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .game-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Features Grid */
.features-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Sticky Elements */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(26, 26, 26, 0.9);
}

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(26, 26, 26, 0.95);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

@media (min-width: 1024px) {
  .sticky-cta.scroll-visible {
    display: block;
  }
}
