/* Custom styles for Puzzle Survivor */

/* Responsive iframe container */
.aspect-w-16 {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.aspect-w-16 iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Mobile menu */
@media (max-width: 768px) {
    .md\:flex {
        display: none;
    }
    
    .mobile-menu {
        display: block;
    }
}

/* Smooth transitions */
.hover\:text-purple-600 {
    transition: color 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Language selector styling */
#languageSelector {
    transition: all 0.3s ease;
    cursor: pointer;
}

#languageSelector:hover {
    border-color: #9333ea;
}

/* Card hover effects */
.grid > div {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid > div:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Footer link hover */
footer a:hover {
    text-decoration: underline;
}

/* Responsive typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .text-lg {
        font-size: 1rem;
    }
}

/* Loading animation for iframe */
.aspect-w-16::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #9333ea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Hide loading animation when iframe is loaded */
.aspect-w-16.loaded::before {
    display: none;
} 