/* Custom EarthBound Styles */

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

* {
    box-sizing: border-box;
}

.font-pixel {
    font-family: 'Press Start 2P', 'Courier New', monospace;
}

.pixelated {
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.03) 2px,
        rgba(0, 255, 255, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1000;
}

.text-shadow-glow {
    text-shadow: 
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 40px currentColor;
}

.retro-button {
    position: relative;
    box-shadow: 
        inset -2px -2px 0px rgba(0, 0, 0, 0.3),
        inset 2px 2px 0px rgba(255, 255, 255, 0.3);
    transition: all 0.1s ease;
}

.retro-button:hover {
    box-shadow: 
        inset 2px 2px 0px rgba(0, 0, 0, 0.3),
        inset -2px -2px 0px rgba(255, 255, 255, 0.3);
}

.character-card {
    background: linear-gradient(135deg, #1a0d2e 0%, #2d1b4e 100%);
    box-shadow: 
        0 4px 15px rgba(0, 102, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: perspective(1000px) rotateX(0deg);
    transition: all 0.3s ease;
}

.character-card:hover {
    transform: perspective(1000px) rotateX(5deg) translateY(-5px);
    box-shadow: 
        0 8px 25px rgba(255, 204, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.mr-saturn-box {
    background: linear-gradient(45deg, #FFCC00 0%, #FFE066 100%);
    animation: gentle-bounce 3s ease-in-out infinite;
}

@keyframes gentle-bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.bouncing {
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

.polaroid {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

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

@keyframes pulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* CRT Monitor Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    z-index: 999;
}

/* Retro Grid Background */
.bg-retro-grid {
    background-image: 
        linear-gradient(rgba(0, 102, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 102, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

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

::-webkit-scrollbar-track {
    background: #1a0d2e;
}

::-webkit-scrollbar-thumb {
    background: #0066FF;
    border-radius: 6px;
}

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

/* Mobile responsiveness */
@media (max-width: 768px) {
    .text-8xl {
        font-size: 3rem;
    }
    
    .text-4xl {
        font-size: 2rem;
    }
    
    .font-pixel {
        font-size: 0.8rem;
    }
}

/* Loading animation for images */
img {
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}

/* Glow effects for special elements */
.glow-blue {
    box-shadow: 0 0 20px rgba(0, 102, 255, 0.6);
}

.glow-yellow {
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.6);
}

.glow-red {
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.6);
}

/* Pixel border effect */
.pixel-border {
    border-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect width="1" height="1" fill="%23fff"/><rect x="1" width="1" height="1" fill="%23000"/><rect y="1" width="1" height="1" fill="%23000"/><rect x="1" y="1" width="1" height="1" fill="%23fff"/></svg>') 2;
}