@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Roboto+Mono:wght@400;700&family=Orbitron:wght@400;700;900&display=swap');

.pixel-font {
    font-family: 'Press Start 2P', cursive;
    line-height: 1.6;
}

body {
    font-family: 'Roboto Mono', monospace;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    animation: backgroundShift 10s ease-in-out infinite alternate;
}

@keyframes backgroundShift {
    0% { background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); }
    100% { background: linear-gradient(135deg, #0f1419, #1a1a2e, #16213e); }
}

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

/* Enhanced button styles with better feedback */
button {
    border: 2px solid transparent;
    transition: all 0.2s ease;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.5);
    box-shadow: 0 4px 0 rgba(0,0,0,0.3);
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 0 rgba(0,0,0,0.3);
}

button:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Enhanced card hover effects */
.bg-gray-800:hover {
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Enhanced border effects for selected items */
.border-yellow-400 {
    border-style: solid;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
    animation: borderGlow 2s ease-in-out infinite alternate;
}

.border-blue-500 {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

@keyframes borderGlow {
    0% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.4); }
    100% { box-shadow: 0 0 30px rgba(251, 191, 36, 0.8); }
}

/* Enhanced image display effects */
@keyframes pixelGlow {
    0%, 100% { 
        filter: brightness(1) contrast(1);
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
    }
    50% { 
        filter: brightness(1.1) contrast(1.1);
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
    }
}

.pixelated:hover {
    animation: pixelGlow 2s ease-in-out infinite;
}

/* Loading spinner animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* Enhanced status indicators */
.status-success {
    color: #10B981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.status-error {
    color: #EF4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    animation: pulse 1s ease-in-out infinite;
}

.status-loading {
    color: #3B82F6;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Enhanced image container with proper contrast */
.image-container {
    background: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 0%, transparent 50%),
        linear-gradient(45deg, rgba(255,255,255,0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.05) 25%, transparent 25%);
    background-size: 20px 20px;
    box-shadow: 
        inset 0 0 20px rgba(251, 191, 36, 0.2),
        0 8px 32px rgba(0,0,0,0.3);
}

/* Zoom controls styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: #374151;
    border-radius: 4px;
    height: 6px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #3B82F6;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #3B82F6;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Fullscreen mode styles */
.fullscreen-overlay {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

/* Gallery enhanced hover effects */
.group:hover .group-hover\:bg-opacity-50 {
    background-opacity: 0.5;
}

.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

/* Custom scrollbar with better styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #6B7280, #9CA3AF);
    border-radius: 5px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #9CA3AF, #D1D5DB);
}

/* Enhanced notification styles */
.notification-enter {
    transform: translateX(100%);
    opacity: 0;
}

.notification-enter-active {
    transform: translateX(0);
    opacity: 1;
    transition: all 0.3s ease-out;
}

/* Type badge enhanced colors */
.type-fire { background: linear-gradient(45deg, #ff6666, #ff4444); }
.type-water { background: linear-gradient(45deg, #6666ff, #4444ff); }
.type-grass { background: linear-gradient(45deg, #66ff66, #44ff44); }
.type-electric { background: linear-gradient(45deg, #ffff66, #ffff44); }
.type-psychic { background: linear-gradient(45deg, #ff66ff, #ff44ff); }
.type-ice { background: linear-gradient(45deg, #66ffff, #44ffff); }
.type-dragon { background: linear-gradient(45deg, #9966ff, #7744ff); }
.type-dark { background: linear-gradient(45deg, #666666, #444444); }
.type-fairy { background: linear-gradient(45deg, #ffb3ff, #ff99ff); }
.type-fighting { background: linear-gradient(45deg, #ff9966, #ff7744); }
.type-poison { background: linear-gradient(45deg, #9966cc, #7744aa); }
.type-ground { background: linear-gradient(45deg, #cc9966, #aa7744); }
.type-flying { background: linear-gradient(45deg, #99ccff, #77aaff); }
.type-bug { background: linear-gradient(45deg, #99cc66, #77aa44); }
.type-rock { background: linear-gradient(45deg, #cccc66, #aaaa44); }
.type-ghost { background: linear-gradient(45deg, #9999cc, #7777aa); }
.type-steel { background: linear-gradient(45deg, #b3b3cc, #9999aa); }
.type-normal { background: linear-gradient(45deg, #cccccc, #aaaaaa); }

/* Responsive enhancements */
@media (max-width: 768px) {
    .pixel-font {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .image-container {
        max-width: 100%;
        min-height: 200px;
    }
}

/* Accessibility improvements */
button:focus, input:focus, select:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gray-800 { 
        background-color: #000000;
        border: 2px solid #ffffff;
    }
    .bg-gray-700 { 
        background-color: #333333;
    }
    .text-gray-400 {
        color: #ffffff;
    }
}

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