#math-games-directory {
    padding: 20px;
    text-align: center;
    background-color: #f4f4f4;
}

#math-games-directory .main-title {
    margin-bottom: 30px;
    color: #333;
    font-family: sans-serif;
}

#math-games-directory .games-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 25px; 
    max-width: 1100px; 
    margin: auto; 
}

#math-games-directory .game-box { 
    background: white; 
    padding: 15px; 
    border-radius: 12px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
    cursor: pointer; 
    transition: all 0.3s ease; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

#math-games-directory .game-box:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

#math-games-directory .game-box img { 
    width: 100%; 
    height: 160px; 
    object-fit: contain; 
    border-radius: 8px; 
    background: #f9f9f9;
}

#math-games-directory .game-name {
    margin-top: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    font-family: sans-serif;
}