/* Additional styles for Panorama Games theme */

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth transitions */
.games-grid {
    transition: opacity 0.3s ease;
}

.games-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Enhanced hover effects */
.game-card {
    position: relative;
    overflow: hidden;
}

.game-card::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;
}

.game-card:hover::before {
    left: 100%;
}

/* Badge animations */
.game-card-badge {
    animation: fadeInDown 0.5s ease;
}

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

/* Filter animations */
.games-filters {
    animation: fadeInUp 0.6s ease;
}

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

/* Game card stagger animation */
.game-card {
    animation: fadeInScale 0.5s ease backwards;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }
.game-card:nth-child(4) { animation-delay: 0.4s; }
.game-card:nth-child(5) { animation-delay: 0.5s; }
.game-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hero section animations */
.hero-section h1 {
    animation: fadeInDown 0.8s ease;
}

.hero-section p {
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-cta {
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

/* Host card hover effect */
.host-card {
    position: relative;
    overflow: hidden;
}

.host-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.host-card:hover::after {
    opacity: 1;
}

/* Gallery lightbox effect */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 48px;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: transform 0.3s;
}

.gallery-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover::before {
    opacity: 1;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .games-filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    #apply-filters {
        margin-top: 0 !important;
    }
    
    .hero-section h1 {
        font-size: 32px;
    }
    
    .hero-section p {
        font-size: 16px;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .games-filters,
    .hero-cta,
    .host-book-btn {
        display: none;
    }
}

/* Accessibility improvements */
.btn:focus,
.game-card:focus,
.host-card:focus,
input:focus,
select:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #667eea;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .game-card,
    .game-info-box,
    .host-card {
        border: 2px solid currentColor;
    }
}

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

/* Host name spacing */
.host-name {
    margin-bottom: 3px;
}
