/* Custom styles for Metal Goblin Games */

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

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #0d9488;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

/* Hero image parallax effect */
@media (min-width: 1024px) {
    #home img {
        will-change: transform;
    }
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 50%, #2dd4bf 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card hover effects */
.group:hover .group-hover\:bg-teal-500\/20 {
    background-color: rgba(20, 184, 166, 0.2);
}

/* Custom focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .animate-bounce {
        animation: none;
    }
    
    .animate-float {
        animation: none;
    }
    
    * {
        transition: none !important;
    }
}

/* Print styles */
@media print {
    nav,
    .animate-bounce,
    button {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.active {
    max-height: 400px;
}

/* Image loading placeholder */
img {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

img[src] {
    animation: none;
    background: none;
}

/* Ensure all text has proper contrast */
.text-slate-900,
.text-slate-800,
.text-slate-700 {
    color: #1e293b;
}

.text-slate-600,
.text-slate-500 {
    color: #475569;
}

/* Button hover states */
button:hover,
a:hover {
    transform: translateY(-1px);
}

button:active,
a:active {
    transform: translateY(0);
}

/* Form validation styles */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: #10b981;
}

/* Accessibility: focus visible */
*:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (forced-colors: active) {
    .bg-teal-600 {
        background-color: ButtonText;
    }
    
    .text-teal-600 {
        color: ButtonText;
    }
}
