/* Custom C64-inspired styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #6C5CE7 0%, #2D3436 100%);
}

/* Scanline effect for retro feel */
.scanlines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
}

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

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

/* Pixel-perfect scaling for retro assets */
.pixel-art {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -webkit-crisp-edges;
    image-rendering: -moz-crisp-edges;
    image-rendering: -o-crisp-edges;
    image-rendering: pixelated;
}

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

::-webkit-scrollbar-track {
    background: #2D3436;
}

::-webkit-scrollbar-thumb {
    background: #6C5CE7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5A4FCF;
}

/* Retro glow effect */
.retro-glow {
    box-shadow: 
        0 0 5px rgba(108, 92, 231, 0.3),
        0 0 10px rgba(108, 92, 231, 0.2),
        0 0 15px rgba(108, 92, 231, 0.1);
}

/* Text selection */
::selection {
    background: rgba(108, 92, 231, 0.3);
}

/* Focus styles */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #6C5CE7;
    outline-offset: 2px;
}

/* Line clamp utility */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Modal animation */
.modal-enter {
    opacity: 0;
    transform: scale(0.9);
}

.modal-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: all 300ms ease-out;
}

/* Card hover effects */
.game-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover {
    transform: translateY(-4px) scale(1.02);
}

/* Responsive typography */
@media (max-width: 768px) {
    .text-responsive {
        font-size: 0.875rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-blue-100 {
        background-color: #ffffff;
    }
    .text-gray-700 {
        color: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}