/* gamesGrid CSS */

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    width: 80%;
    max-width: 1200px;
    margin: 50px auto;
}

/* --- Tile container --- */
.game-tile {
    position: relative;
    display: block;
    text-decoration: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* --- Tile image --- */
.game-tile img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: filter 0.3s ease;
}

.game-tile:hover img {
    filter: brightness(90%);
}

/* --- Title overlay --- */
.game-tile h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    text-align: center;
    font-size: 1.2em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Show title on hover */
.game-tile:hover h3 {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 600px) {
    .games-grid {
        gap: 20px;
        width: 90%;
    }

    .game-tile img {
        height: 160px;
    }

    .game-tile h3 {
        font-size: 1em;
    }
}