/* Global Styles */
* { margin: 0; padding: 0; box-sizing: border-box; scrollbar-width: thin; scrollbar-color: #50C878 #1a1008; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1a1008; }
::-webkit-scrollbar-thumb { background: #50C878; border-radius: 4px; }
html { scroll-behavior: smooth; }

/* Pixel Art Border Pattern */
.pixel-border-top {
  background-image: repeating-linear-gradient(
    90deg,
    #3a2a1a 0px, #3a2a1a 8px,
    #4a3a2a 8px, #4a3a2a 16px,
    #2a1a0a 16px, #2a1a0a 24px,
    #5a4a3a 24px, #5a4a3a 32px
  );
  height: 8px;
  image-rendering: pixelated;
}

.pixel-border-bottom {
  background-image: repeating-linear-gradient(
    90deg,
    #50C878 0px, #50C878 4px,
    transparent 4px, transparent 8px,
    #8B5CF6 8px, #8B5CF6 12px,
    transparent 12px, transparent 16px
  );
  height: 4px;
}

/* Enchantment Particles */
@keyframes floatUp {
  0% { transform: translateY(100vh) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 0.8; }
  100% { transform: translateY(-20px) translateX(var(--drift)) rotate(720deg); opacity: 0; }
}

.particle {
  position: absolute;
  width: var(--size);
  height: var(--size);
  background: var(--color);
  animation: floatUp var(--duration) linear infinite;
  animation-delay: var(--delay);
  image-rendering: pixelated;
}

/* Glow Effects */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(80, 200, 120, 0.3), 0 0 30px rgba(80, 200, 120, 0.1); }
  50% { box-shadow: 0 0 25px rgba(80, 200, 120, 0.5), 0 0 50px rgba(80, 200, 120, 0.2); }
}

@keyframes glowPulsePurple {
  0%, 100% { box-shadow: 0 0 15px rgba(139, 92, 246, 0.3), 0 0 30px rgba(139, 92, 246, 0.1); }
  50% { box-shadow: 0 0 25px rgba(139, 92, 246, 0.5), 0 0 50px rgba(139, 92, 246, 0.2); }
}

@keyframes glowPulseGold {
  0%, 100% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.3), 0 0 30px rgba(245, 158, 11, 0.1); }
  50% { box-shadow: 0 0 25px rgba(245, 158, 11, 0.5), 0 0 50px rgba(245, 158, 11, 0.2); }
}

.glow-green { animation: glowPulse 2s ease-in-out infinite; }
.glow-purple { animation: glowPulsePurple 2s ease-in-out infinite; }
.glow-gold { animation: glowPulseGold 2s ease-in-out infinite; }

/* Title Glow Cycling */
@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 20px #50C878, 0 0 40px #50C87888, 0 0 60px #50C87844; }
  33% { text-shadow: 0 0 20px #8B5CF6, 0 0 40px #8B5CF688, 0 0 60px #8B5CF644; }
  66% { text-shadow: 0 0 20px #F59E0B, 0 0 40px #F59E0B88, 0 0 60px #F59E0B44; }
}

.title-glow { animation: titleGlow 4s ease-in-out infinite; }

/* Fade In Animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Screen Shake */
@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5px, -3px); }
  20% { transform: translate(5px, 3px); }
  30% { transform: translate(-3px, 5px); }
  40% { transform: translate(3px, -5px); }
  50% { transform: translate(-5px, 5px); }
  60% { transform: translate(5px, -3px); }
  70% { transform: translate(-3px, -5px); }
  80% { transform: translate(3px, 5px); }
  90% { transform: translate(-5px, -3px); }
}

.screen-shake { animation: screenShake 0.5s ease-in-out; }

/* Floating decorations */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

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

.float-slow { animation: floatSlow 6s ease-in-out infinite; }
.float-med { animation: floatMed 4s ease-in-out infinite; }

/* Dirt texture background */
.dirt-bg {
  background-color: #1a1008;
  background-image:
    radial-gradient(circle at 20% 30%, #2a1a0a 1px, transparent 1px),
    radial-gradient(circle at 60% 70%, #1a0f05 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, #2a1a0a 1px, transparent 1px),
    radial-gradient(circle at 40% 90%, #1a0f05 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Vignette */
.vignette::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Card hover */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
}

/* Accordion transition */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.3s ease;
}
.accordion-content.open {
  max-height: 2000px;
}

/* Copy button */
.copy-btn {
  transition: all 0.2s ease;
}
.copy-btn:hover {
  background: #50C878;
  color: #0d0d0d;
}

/* Mobile menu */
@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.slide-in { animation: slideIn 0.3s ease-out; }

/* Creeper pixel art CSS */
.creeper-face {
  display: inline-grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0;
  image-rendering: pixelated;
}
.creeper-face span {
  width: 4px;
  height: 4px;
  display: block;
}