/* Games Hub Custom Styles */

/* Filter Bar */
.filter-bar {
    text-align: center;
    margin-bottom: 3em;
    padding: 1.5em;
    background: #312450;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.age-filters {
    display: flex;
    justify-content: center;
    gap: 1em;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 1em 2em;
    background: #2c3e50;
    border: 2px solid #9b59b6;
    border-radius: 30px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.filter-btn:hover {
    background: #9b59b6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.3);
}

.filter-btn.active {
    background: #9b59b6;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(155, 89, 182, 0.4);
}

/* Logo styling for intro section */
.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.intro-logo {
    max-width: 120px;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.3s ease;
}

.intro-logo:hover {
    transform: scale(1.1);
}

/* Games grid improvements */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.game-card {
    aspect-ratio: 1 / 1;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    background: linear-gradient(135deg, #312450 0%, #432768 100%);
    border: 2px solid #9b59b6;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(155, 89, 182, 0.4);
    border-color: #e74c3c;
}

.game-image {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #312450 0%, #432768 100%);
    padding: 20px;
}

.game-image img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(49, 36, 80, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.play-button {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    border: 2px solid #fff;
}

/* External link styling */
.external-link {
    cursor: pointer;
}

.external-link:hover {
    text-decoration: none;
}

.games-footer {
    text-align: center;
    margin-top: 4rem;
    padding: 3rem 0;
    border-top: 2px solid rgba(155, 89, 182, 0.3);
}

.games-footer h2 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.games-footer p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

/* Hidden class for filtering */
.hidden {
    display: none !important;
    grid-column: 0;
    grid-row: 0;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .age-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
    }
}

@media screen and (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .intro-logo {
        max-width: 60px;
    }
    
    .filter-bar {
        padding: 1em;
    }
    
    .filter-btn {
        width: 150px;
        padding: 0.8em 1.5em;
        font-size: 1em;
    }
}
