/* Custom retro styling for EarthBound Beginnings */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
  font-family: 'Press Start 2P', cursive;
  overflow-x: hidden;
}

/* Retro button styling */
.retro-button {
  position: relative;
  border: 4px solid;
  border-color: transparent;
  border-bottom-color: rgba(0, 0, 0, 0.3);
  border-right-color: rgba(0, 0, 0, 0.2);
  border-top-color: rgba(255, 255, 255, 0.3);
  border-left-color: rgba(255, 255, 255, 0.2);
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.retro-button:hover {
  border-bottom-color: rgba(0, 0, 0, 0.4);
  border-right-color: rgba(0, 0, 0, 0.3);
  border-top-color: rgba(255, 255, 255, 0.4);
  border-left-color: rgba(255, 255, 255, 0.3);
}

.retro-button:active {
  border-bottom-color: rgba(255, 255, 255, 0.3);
  border-right-color: rgba(255, 255, 255, 0.2);
  border-top-color: rgba(0, 0, 0, 0.3);
  border-left-color: rgba(0, 0, 0, 0.2);
}

/* Scanline overlay effect */
.scanline-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    transparent 50%, 
    rgba(0, 255, 0, 0.03) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
  animation: scanline 2s linear infinite;
}

@keyframes scanline {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

/* Glow effect for text */
.text-shadow-glow {
  text-shadow: 
    0 0 10px rgba(59, 130, 246, 0.5),
    0 0 20px rgba(59, 130, 246, 0.3),
    0 0 30px rgba(59, 130, 246, 0.1);
}

@keyframes glow {
  from { text-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }
  to { text-shadow: 0 0 20px rgba(239, 68, 68, 0.8); }
}

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

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

/* Character card hover effects */
.character-card:hover {
  box-shadow: 
    0 0 20px rgba(59, 130, 246, 0.3),
    0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Retro scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #1e3a8a;
  border: 2px solid #fbbf24;
}

::-webkit-scrollbar-thumb {
  background: #fbbf24;
  border: 1px solid #1e3a8a;
}

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

/* Mobile responsiveness improvements */
@media (max-width: 768px) {
  .font-pixel {
    line-height: 1.6;
  }
  
  .retro-button {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
  
  .text-4xl {
    font-size: 1.5rem;
  }
  
  .text-6xl {
    font-size: 2rem;
  }
}

/* CRT monitor effect */
@media (min-width: 1024px) {
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
      radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.1) 100%),
      linear-gradient(transparent 50%, rgba(0, 0, 0, 0.02) 50%);
    background-size: 100% 100%, 100% 2px;
    pointer-events: none;
    z-index: 1000;
  }
}

/* Smooth scrolling for internal navigation */
html {
  scroll-behavior: smooth;
}

/* Enhanced focus states for accessibility */
button:focus,
a:focus {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}

/* Animation delays for staggered effects */
.character-card:nth-child(1) { animation-delay: 0.1s; }
.character-card:nth-child(2) { animation-delay: 0.2s; }
.character-card:nth-child(3) { animation-delay: 0.3s; }
.character-card:nth-child(4) { animation-delay: 0.4s; }

/* Emoji and fallback styling */
.emoji-fallback {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
  font-size: inherit;
}

/* Gradient text effect */
.gradient-text {
  background: linear-gradient(45deg, #3b82f6, #ef4444);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradient 3s ease infinite;
}

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