/* Custom CSS for Monster Survivors Website */

.game-iframe {
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.hero-gradient {
    background: linear-gradient(135deg, #007AFF 0%, #AF52DE 100%);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007AFF;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .hero-gradient h1 {
        font-size: 2.5rem;
    }
    
    .hero-gradient p {
        font-size: 1.1rem;
    }
    
    .game-iframe {
        height: 300px !important;
    }
    
    .grid.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .grid.lg\\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
}

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

/* Focus states for accessibility */
a:focus,
button:focus {
    outline: 2px solid #007AFF;
    outline-offset: 2px;
}

/* Loading animation improvements */
.loading-spinner {
    margin: 0 auto;
}

/* Game iframe responsive improvements */
.game-iframe {
    aspect-ratio: 16/9;
    min-height: 400px;
}

@media (max-width: 640px) {
    .game-iframe {
        min-height: 300px;
    }
}

/* Enhanced hover effects */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: #007AFF;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Button hover effects */
.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

/* Feature cards animation */
.feature-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* FAQ accordion effect */
.faq-item {
    transition: all 0.3s ease;
}

.faq-item:hover {
    background-color: rgba(0, 122, 255, 0.05);
}

/* Footer improvements */
footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: #007AFF !important;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .card-hover,
    .loading-spinner {
        animation: none;
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-gradient {
        background: #000;
        color: #fff;
    }
    
    .bg-apple-gray-50 {
        background-color: #fff;
    }
    
    .text-apple-gray-600 {
        color: #000;
    }
}

/* Print styles */
@media print {
    .hero-gradient,
    footer,
    nav {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .game-iframe {
        display: none;
    }
    
    .game-iframe::after {
        content: "Visit dahuilang.online to play Monster Survivors online";
        display: block;
        text-align: center;
        padding: 2rem;
        border: 2px solid #000;
    }
}